/* ============================================================
   matchoomnews.com — Terminal News Feed
   Warm Terminal Aesthetic — NeXTSTEP Inspired
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    background-color: #E8E0D4;
    color: #3A2E24;
}

/* ============================================================
   DESKTOP & BACKGROUND
   ============================================================ */

.desktop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #E8E0D4 0%, #E8E0D4 100%);
    overflow: hidden;
}

/* ============================================================
   HUD PANELS (Decorative Sci-Fi Elements)
   ============================================================ */

.hud-panel {
    position: absolute;
    border: 1px solid rgba(106, 139, 160, 0.4);
    background: rgba(232, 224, 212, 0.6);
    padding: 12px;
    border-radius: 4px;
    opacity: 0.7;
    transition: opacity 0.4s ease;
}

.hud-panel:hover {
    opacity: 0.95;
}

.hud-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #A08A74;
    margin-bottom: 8px;
    line-height: 1.2;
}

/* Bias spectrum bar */
.hud-bias {
    top: 5vh;
    left: 1vw;
    width: 140px;
}

.bias-bar {
    width: 120px;
    height: 8px;
    background: linear-gradient(90deg, #B86B5A, #E8E0D4 50%, #6A8BA0);
    border-radius: 2px;
    position: relative;
}

.bias-bar::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 6px solid #5A4A3A;
    left: 60%;
    top: 1px;
}

/* Source diversity pie */
.hud-diversity {
    top: 50%;
    left: 1vw;
    transform: translateY(-50%);
    width: 140px;
}

.diversity-pie {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        #A8B8A0 0deg 90deg,
        #B86B5A 90deg 180deg,
        #6A8BA0 180deg 270deg,
        #C9B896 270deg 360deg
    );
    margin: 0 auto;
}

/* Topic coverage bars */
.hud-coverage {
    bottom: 5vh;
    left: 1vw;
    width: 140px;
}

.coverage-bars {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.coverage-bars .bar {
    height: 4px;
    background-color: #6A8BA0;
    border-radius: 2px;
    transition: width 0.6s ease-out;
}

.coverage-bars .bar:nth-child(1) {
    background-color: #A8B8A0;
}

.coverage-bars .bar:nth-child(3) {
    background-color: #C9B896;
}

/* ============================================================
   TERMINAL WINDOW
   ============================================================ */

.terminal-window {
    position: absolute;
    top: 5vh;
    left: 4vw;
    width: 92vw;
    height: 90vh;
    display: flex;
    flex-direction: column;
    background-color: #F5F0E8;
    border: 1px solid #C4A48A;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    overflow: hidden;
}

/* ============================================================
   TITLE BAR (NeXTSTEP Style)
   ============================================================ */

.title-bar {
    display: flex;
    align-items: center;
    height: 28px;
    background-color: #E2D8CC;
    border-bottom: 1px solid #C4A48A;
    padding: 0 10px;
    gap: 8px;
    flex-shrink: 0;
}

.traffic-lights {
    display: flex;
    gap: 6px;
    align-items: center;
}

.light {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 0.5px solid rgba(0, 0, 0, 0.2);
}

.light.close {
    background-color: #C4A48A;
}

.light.minimize {
    background-color: #C9B896;
}

.light.maximize {
    background-color: #A8B8A0;
}

.title-text {
    font-family: 'Lora', serif;
    font-size: 0.7rem;
    font-weight: 400;
    color: #3A2E24;
    letter-spacing: 0.5px;
    flex: 1;
}

/* ============================================================
   COMMAND LINE AREA
   ============================================================ */

.command-line {
    display: flex;
    align-items: center;
    height: 48px;
    background-color: #F5F0E8;
    border-bottom: 1px solid #E2D8CC;
    padding: 0 16px;
    gap: 6px;
    flex-shrink: 0;
    overflow: hidden;
    white-space: nowrap;
}

.command-prompt {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 400;
    color: #7A6A5A;
    flex-shrink: 0;
}

.command-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 400;
    color: #7A6A5A;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.blink-cursor {
    width: 1px;
    height: 1.2em;
    background-color: #5A4A3A;
    flex-shrink: 0;
    animation: blink 0.8s infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

/* ============================================================
   OUTPUT AREA & SCROLLING
   ============================================================ */

.output-area {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    background-color: #F5F0E8;
    scroll-behavior: smooth;
}

.output-area::-webkit-scrollbar {
    width: 8px;
}

.output-area::-webkit-scrollbar-track {
    background-color: #E2D8CC;
}

.output-area::-webkit-scrollbar-thumb {
    background-color: #C4A48A;
    border-radius: 4px;
}

.output-area::-webkit-scrollbar-thumb:hover {
    background-color: #A8B8A0;
}

/* ============================================================
   NEWS ITEMS - Terminal Output Format
   ============================================================ */

.news-item {
    margin-bottom: 32px;
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
}

.news-item:nth-child(1) { animation-delay: 0.1s; }
.news-item:nth-child(2) { animation-delay: 0.2s; }
.news-item:nth-child(3) { animation-delay: 0.3s; }
.news-item:nth-child(4) { animation-delay: 0.4s; }
.news-item:nth-child(5) { animation-delay: 0.5s; }
.news-item:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Timestamp Line - Typewriter Effect */
.timestamp-line {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.04em;
    color: #8A7A6A;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    animation: typewriter 1.2s steps(30, end) forwards;
}

@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

/* Rule Line - Draws in */
.rule-line {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: #8A7A6A;
    margin-bottom: 12px;
    letter-spacing: 0.1em;
    animation: drawLine 0.4s ease-out forwards;
    opacity: 0;
}

@keyframes drawLine {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Headline */
.headline {
    font-family: 'Lora', serif;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    font-weight: 700;
    color: #3A2E24;
    line-height: 1.5;
    margin-bottom: 12px;
    animation: headlineFade 0.3s ease-out forwards;
    animation-delay: 1.6s;
    opacity: 0;
}

@keyframes headlineFade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Metadata Lines - Typewriter Effect */
.metadata-lines {
    margin-bottom: 12px;
}

.metadata-line {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.04em;
    color: #8A7A6A;
    white-space: nowrap;
    overflow: hidden;
    animation: typewriter 0.9s steps(40, end) forwards;
    margin-bottom: 4px;
}

.metadata-line:nth-child(1) {
    animation-delay: 2s;
}

.metadata-line:nth-child(2) {
    animation-delay: 2.2s;
}

/* Body Text - Fade in */
.body-text {
    margin-bottom: 12px;
    animation: bodyFade 0.4s ease-out forwards;
    animation-delay: 2.4s;
    opacity: 0;
}

.body-text p {
    font-family: 'Lora', serif;
    font-size: 0.95rem;
    font-weight: 400;
    color: #5A4A3A;
    line-height: 1.8;
    margin-bottom: 10px;
}

.body-text p:last-child {
    margin-bottom: 0;
}

@keyframes bodyFade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Related Line */
.related-line {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.04em;
    color: #8A7A6A;
    margin-top: 12px;
    animation: relatedFade 0.2s ease-out forwards;
    animation-delay: 2.8s;
    opacity: 0;
}

@keyframes relatedFade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* End of Feed Marker */
.end-of-feed {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 400;
    color: #7A6A5A;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #E2D8CC;
}

/* ============================================================
   INTERACTIVE EFFECTS
   ============================================================ */

.news-item {
    transition: transform 0.2s ease;
    cursor: pointer;
}

.news-item:hover {
    transform: translateX(2px);
}

/* ============================================================
   RESPONSIVE BEHAVIOR
   ============================================================ */

@media (max-width: 1024px) {
    .hud-panel {
        display: none;
    }
}

@media (max-width: 768px) {
    .terminal-window {
        top: 2vh;
        left: 1vw;
        width: 98vw;
        height: 96vh;
    }

    .title-bar {
        height: 24px;
        padding: 0 8px;
        gap: 6px;
    }

    .traffic-lights {
        display: none;
    }

    .title-text {
        font-size: 0.65rem;
    }

    .light {
        width: 8px;
        height: 8px;
    }

    .command-line {
        height: 40px;
        padding: 0 12px;
        gap: 4px;
    }

    .command-prompt,
    .command-text {
        font-size: 0.75rem;
    }

    .output-area {
        padding: 16px 16px;
    }

    .headline {
        font-size: clamp(1rem, 1.8vw, 1.3rem);
    }

    .body-text p {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .news-item {
        margin-bottom: 24px;
    }
}

/* ============================================================
   UNICODE PROGRESS BAR STYLING
   ============================================================ */

/* Full blocks: █ (U+2588)
   Light blocks: ░ (U+2591) */

.metadata-line {
    word-spacing: 0.15em;
}

/* ============================================================
   ACCESSIBILITY EXCLUSIONS
   ============================================================ */

/* Per design spec: skip focus styles, ARIA styling, accessibility patterns
   This is an aesthetic terminal interface, not an accessible UI system */
