/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --warm-tan: #d4a574;
    --deep-brown: #2a1e12;
    --parchment: #f0e6d6;
    --light-gold: #e8c39e;
    --muted-bronze: #a89478;
    --darkest: #1a120b;
    --mid-brown: #3d2b1a;
    --caramel: #b8956a;
    --phosphor-green: #7ab89a;
}

html {
    background: var(--darkest);
    color: var(--parchment);
    font-family: 'Source Serif 4', Georgia, serif;
    overflow: hidden;
    height: 100%;
}

body {
    height: 100%;
    overflow: hidden;
}

/* ===== TRANSMISSION BAR (Fixed Nav) ===== */
.transmission-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 48px;
    background: rgba(26, 18, 11, 0.92);
    border-bottom: 1px solid rgba(168, 148, 120, 0.25);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 100;
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted-bronze);
}

.transmission-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.signal-icon {
    display: flex;
    animation: pulse-signal 2s ease-in-out infinite;
}

@keyframes pulse-signal {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.freq-display {
    color: var(--phosphor-green);
    font-weight: 700;
}

.timestamp-display {
    color: var(--caramel);
    font-size: 10px;
}

/* ===== SCANLINE OVERLAY ===== */
.scanline-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 90;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(26, 18, 11, 0.06) 2px,
        rgba(26, 18, 11, 0.06) 4px
    );
}

.scanline-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 50%, rgba(26, 18, 11, 0.4) 100%);
}

/* ===== HORIZONTAL SCROLL CONTAINER ===== */
.news-reel {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    height: 100vh;
    scrollbar-width: none;
}

.news-reel::-webkit-scrollbar {
    display: none;
}

/* ===== TUNING SCREEN ===== */
.tuning-screen {
    min-width: 100vw;
    height: 100vh;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    background: radial-gradient(ellipse at 50% 50%, var(--mid-brown) 0%, var(--deep-brown) 40%, var(--darkest) 80%);
    overflow: hidden;
}

.tuning-dial {
    position: relative;
    width: 280px;
    height: 280px;
    margin-bottom: 30px;
    cursor: pointer;
}

.dial-ring {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid;
    transition: transform 0.6s ease;
}

.dial-ring-outer {
    width: 280px;
    height: 280px;
    top: 0;
    left: 0;
    border-color: var(--muted-bronze);
    opacity: 0.5;
}

.dial-ring-mid {
    width: 200px;
    height: 200px;
    top: 40px;
    left: 40px;
    border-color: var(--warm-tan);
    opacity: 0.7;
}

.dial-ring-inner {
    width: 120px;
    height: 120px;
    top: 80px;
    left: 80px;
    border-color: var(--light-gold);
}

.dial-center {
    position: absolute;
    width: 60px;
    height: 60px;
    top: 110px;
    left: 110px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, var(--light-gold), var(--warm-tan));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(212, 165, 116, 0.3), inset 0 -3px 8px rgba(0,0,0,0.3);
}

.dial-label {
    font-family: 'Space Mono', monospace;
    font-size: 8px;
    letter-spacing: 0.15em;
    color: var(--darkest);
    font-weight: 700;
}

.dial-indicator {
    position: absolute;
    width: 2px;
    height: 40px;
    background: var(--phosphor-green);
    top: 0;
    left: 139px;
    transform-origin: bottom center;
    box-shadow: 0 0 8px var(--phosphor-green);
    animation: dial-rotate 8s linear infinite;
}

@keyframes dial-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.tuning-text {
    text-align: center;
    margin-bottom: 40px;
}

.site-title {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-style: italic;
    font-size: clamp(2.5rem, 6vw, 5.5rem);
    line-height: 1.05;
    color: var(--parchment);
    letter-spacing: 0.02em;
    text-shadow: 0 0 40px rgba(232, 195, 158, 0.15);
}

.site-tagline {
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted-bronze);
    margin-top: 12px;
}

/* ===== CATEGORY BUBBLES ===== */
.category-bubbles {
    display: flex;
    gap: 18px;
    margin-bottom: 40px;
}

.bubble {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    background: radial-gradient(circle at 30% 25%, rgba(240, 230, 214, 0.15), transparent 50%),
                linear-gradient(135deg, rgba(212, 165, 116, 0.15), rgba(168, 148, 120, 0.08));
    border: 1px solid rgba(168, 148, 120, 0.3);
    box-shadow: inset 0 -4px 12px rgba(0,0,0,0.3), 0 0 20px rgba(212, 165, 116, 0.05);
    color: var(--light-gold);
    transition: all 0.4s ease;
    animation: bubble-float 4s ease-in-out infinite;
}

.bubble:nth-child(1) { animation-delay: 0s; }
.bubble:nth-child(2) { animation-delay: 0.5s; }
.bubble:nth-child(3) { animation-delay: 1s; }
.bubble:nth-child(4) { animation-delay: 1.5s; }
.bubble:nth-child(5) { animation-delay: 2s; }

@keyframes bubble-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.bubble:hover {
    border-color: var(--phosphor-green);
    box-shadow: inset 0 -4px 12px rgba(0,0,0,0.3), 0 0 25px rgba(122, 184, 154, 0.2);
    color: var(--phosphor-green);
    transform: scale(1.1);
}

.bubble.active {
    background: radial-gradient(circle at 30% 25%, rgba(122, 184, 154, 0.2), transparent 50%),
                linear-gradient(135deg, rgba(122, 184, 154, 0.2), rgba(122, 184, 154, 0.08));
    border-color: var(--phosphor-green);
    color: var(--phosphor-green);
}

.scroll-hint {
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    color: var(--muted-bronze);
    letter-spacing: 0.08em;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: hint-pulse 2s ease-in-out infinite;
}

.scroll-arrow {
    font-size: 18px;
    animation: arrow-slide 1.5s ease-in-out infinite;
}

@keyframes arrow-slide {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(6px); }
}

@keyframes hint-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* ===== STORY FRAMES ===== */
.story-frame {
    min-width: 100vw;
    height: 100vh;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.story-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--muted-bronze), transparent);
    opacity: 0.3;
}

.story-frame:nth-child(2) {
    background: radial-gradient(ellipse at 30% 60%, rgba(61, 43, 26, 0.8), var(--darkest));
}
.story-frame:nth-child(3) {
    background: radial-gradient(ellipse at 70% 40%, rgba(61, 43, 26, 0.6), var(--darkest));
}
.story-frame:nth-child(4) {
    background: radial-gradient(ellipse at 40% 30%, rgba(42, 30, 18, 0.9), var(--darkest));
}
.story-frame:nth-child(5) {
    background: radial-gradient(ellipse at 60% 70%, rgba(61, 43, 26, 0.7), var(--darkest));
}
.story-frame:nth-child(6) {
    background: radial-gradient(ellipse at 50% 50%, rgba(42, 30, 18, 0.8), var(--darkest));
}

.story-inner {
    max-width: 640px;
    padding: 0 40px;
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.story-frame.in-view .story-inner {
    opacity: 1;
    transform: translateX(0);
}

.story-category-badge {
    display: inline-block;
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.2em;
    color: var(--phosphor-green);
    border: 1px solid rgba(122, 184, 154, 0.4);
    padding: 4px 14px;
    margin-bottom: 24px;
    text-transform: uppercase;
}

.phosphor-display {
    margin-bottom: 28px;
    opacity: 0.7;
    display: flex;
    justify-content: center;
}

.phosphor-shape svg {
    filter: drop-shadow(0 0 8px rgba(122, 184, 154, 0.2));
}

.story-headline {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-style: italic;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1.15;
    letter-spacing: 0.02em;
    color: var(--parchment);
    margin-bottom: 20px;
}

.story-body {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    line-height: 1.7;
    color: var(--light-gold);
    margin-bottom: 24px;
    opacity: 0.85;
}

.story-meta {
    display: flex;
    gap: 20px;
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.08em;
    color: var(--muted-bronze);
    text-transform: uppercase;
}

.meta-time {
    color: var(--caramel);
}

/* ===== END TRANSMISSION ===== */
.end-transmission {
    min-width: 100vw;
    height: 100vh;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at 50% 50%, var(--deep-brown) 0%, var(--darkest) 70%);
}

.end-inner {
    text-align: center;
}

.signal-lost-icon {
    margin-bottom: 30px;
    animation: pulse-signal 3s ease-in-out infinite;
}

.end-title {
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    letter-spacing: 0.3em;
    color: var(--muted-bronze);
    margin-bottom: 16px;
}

.end-message {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 16px;
    color: var(--caramel);
    line-height: 1.7;
    margin-bottom: 30px;
}

.retune-btn {
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--phosphor-green);
    background: transparent;
    border: 1px solid rgba(122, 184, 154, 0.4);
    padding: 12px 28px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retune-btn:hover {
    background: rgba(122, 184, 154, 0.1);
    border-color: var(--phosphor-green);
    box-shadow: 0 0 20px rgba(122, 184, 154, 0.15);
}

/* ===== FLOATING BUBBLES ===== */
.floating-bubbles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

.floating-bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 25%, rgba(240, 230, 214, 0.08), transparent 60%);
    border: 1px solid rgba(168, 148, 120, 0.1);
    animation: float-up linear infinite;
}

@keyframes float-up {
    0% {
        transform: translateY(100vh) scale(0.5);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) scale(1);
        opacity: 0;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .category-bubbles {
        gap: 10px;
    }

    .bubble {
        width: 56px;
        height: 56px;
        font-size: 8px;
    }

    .tuning-dial {
        width: 200px;
        height: 200px;
    }

    .dial-ring-outer { width: 200px; height: 200px; }
    .dial-ring-mid { width: 140px; height: 140px; top: 30px; left: 30px; }
    .dial-ring-inner { width: 80px; height: 80px; top: 60px; left: 60px; }
    .dial-center { width: 40px; height: 40px; top: 80px; left: 80px; }
    .dial-indicator { left: 99px; height: 30px; }

    .story-inner {
        padding: 0 24px;
    }

    .transmission-center,
    .transmission-right {
        display: none;
    }
}
