/* ==========================================================================
   bada.coffee — Retro-Futuristic Coffee Transmission Station
   Color Palette:
   Deep Void:      #1A1035
   Marble White:   #F5F0EB
   Hot Signal:     #FF2D7B
   Cyan Stream:    #00E5CC
   Lemon Grid:     #FFD23F
   Orchid Haze:    #C97DFF
   Marble Vein:    #B8A99A
   Soft Lavender:  #E8E0F0
   Marble Gold:    #D4B896
   Dark Purple:    #3D3450
   ========================================================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: #1A1035;
    color: #E8E0F0;
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    line-height: 1.72;
    letter-spacing: 0.01em;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* CRT Scan Lines Global Overlay */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 2px,
        #000 2px, /* CRT scan line color from design: 2% opacity via rgba */
        rgba(0, 0, 0, 0.02) 3px
    );
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: multiply;
    opacity: 0;
    animation: crtFadeIn 0.5s 0.3s forwards;
}

@keyframes crtFadeIn {
    to { opacity: 1; }
}

.svg-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* --- Frequency Bar (Top) --- */
#frequency-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 32px;
    background: rgba(26, 16, 53, 0.92);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(0, 229, 204, 0.15);
}

.freq-wave {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 100%;
    padding: 6px 0;
}

.freq-wave span {
    display: inline-block;
    width: 3px;
    min-height: 4px;
    height: 4px;
    border-radius: 1.5px;
    background: #00E5CC;
    animation: freqPulse 1.5s ease-in-out infinite;
    opacity: 0.6;
}

.freq-wave span:nth-child(3n) { background: #FF2D7B; }
.freq-wave span:nth-child(5n) { background: #FFD23F; }
.freq-wave span:nth-child(7n) { background: #C97DFF; }

@keyframes freqPulse {
    0%, 100% { height: 4px; opacity: 0.4; }
    50% { height: 20px; opacity: 1; }
}

/* Stagger the frequency bar animations */
.freq-wave span:nth-child(1) { animation-delay: 0s; }
.freq-wave span:nth-child(2) { animation-delay: 0.05s; }
.freq-wave span:nth-child(3) { animation-delay: 0.1s; }
.freq-wave span:nth-child(4) { animation-delay: 0.15s; }
.freq-wave span:nth-child(5) { animation-delay: 0.2s; }
.freq-wave span:nth-child(6) { animation-delay: 0.25s; }
.freq-wave span:nth-child(7) { animation-delay: 0.3s; }
.freq-wave span:nth-child(8) { animation-delay: 0.35s; }
.freq-wave span:nth-child(9) { animation-delay: 0.4s; }
.freq-wave span:nth-child(10) { animation-delay: 0.45s; }
.freq-wave span:nth-child(11) { animation-delay: 0.5s; }
.freq-wave span:nth-child(12) { animation-delay: 0.55s; }
.freq-wave span:nth-child(13) { animation-delay: 0.6s; }
.freq-wave span:nth-child(14) { animation-delay: 0.65s; }
.freq-wave span:nth-child(15) { animation-delay: 0.7s; }
.freq-wave span:nth-child(16) { animation-delay: 0.75s; }
.freq-wave span:nth-child(17) { animation-delay: 0.8s; }
.freq-wave span:nth-child(18) { animation-delay: 0.85s; }
.freq-wave span:nth-child(19) { animation-delay: 0.9s; }
.freq-wave span:nth-child(20) { animation-delay: 0.95s; }
.freq-wave span:nth-child(21) { animation-delay: 1.0s; }
.freq-wave span:nth-child(22) { animation-delay: 1.05s; }
.freq-wave span:nth-child(23) { animation-delay: 1.1s; }
.freq-wave span:nth-child(24) { animation-delay: 1.15s; }
.freq-wave span:nth-child(25) { animation-delay: 1.2s; }
.freq-wave span:nth-child(26) { animation-delay: 0.05s; }
.freq-wave span:nth-child(27) { animation-delay: 0.12s; }
.freq-wave span:nth-child(28) { animation-delay: 0.19s; }
.freq-wave span:nth-child(29) { animation-delay: 0.26s; }
.freq-wave span:nth-child(30) { animation-delay: 0.33s; }
.freq-wave span:nth-child(31) { animation-delay: 0.4s; }
.freq-wave span:nth-child(32) { animation-delay: 0.47s; }
.freq-wave span:nth-child(33) { animation-delay: 0.54s; }
.freq-wave span:nth-child(34) { animation-delay: 0.61s; }
.freq-wave span:nth-child(35) { animation-delay: 0.68s; }
.freq-wave span:nth-child(36) { animation-delay: 0.75s; }
.freq-wave span:nth-child(37) { animation-delay: 0.82s; }
.freq-wave span:nth-child(38) { animation-delay: 0.89s; }
.freq-wave span:nth-child(39) { animation-delay: 0.96s; }
.freq-wave span:nth-child(40) { animation-delay: 1.03s; }
.freq-wave span:nth-child(41) { animation-delay: 0.08s; }
.freq-wave span:nth-child(42) { animation-delay: 0.17s; }
.freq-wave span:nth-child(43) { animation-delay: 0.26s; }
.freq-wave span:nth-child(44) { animation-delay: 0.35s; }
.freq-wave span:nth-child(45) { animation-delay: 0.44s; }
.freq-wave span:nth-child(46) { animation-delay: 0.53s; }
.freq-wave span:nth-child(47) { animation-delay: 0.62s; }
.freq-wave span:nth-child(48) { animation-delay: 0.71s; }
.freq-wave span:nth-child(49) { animation-delay: 0.8s; }
.freq-wave span:nth-child(50) { animation-delay: 0.89s; }
.freq-wave span:nth-child(51) { animation-delay: 0.03s; }
.freq-wave span:nth-child(52) { animation-delay: 0.14s; }
.freq-wave span:nth-child(53) { animation-delay: 0.25s; }
.freq-wave span:nth-child(54) { animation-delay: 0.36s; }
.freq-wave span:nth-child(55) { animation-delay: 0.47s; }
.freq-wave span:nth-child(56) { animation-delay: 0.58s; }
.freq-wave span:nth-child(57) { animation-delay: 0.69s; }
.freq-wave span:nth-child(58) { animation-delay: 0.8s; }
.freq-wave span:nth-child(59) { animation-delay: 0.91s; }
.freq-wave span:nth-child(60) { animation-delay: 1.02s; }

/* --- Geometric Shape Navigation --- */
#shape-nav {
    position: fixed;
    bottom: 40px;
    left: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 1000;
}

.shape-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #B8A99A;
    transition: color 0.3s ease, transform 0.3s ease;
    padding: 0;
    width: 24px;
    height: 24px;
}

.shape-btn:hover {
    color: #E8E0F0;
    transform: scale(1.15);
}

.shape-btn.active svg circle,
.shape-btn.active svg polygon,
.shape-btn.active svg rect {
    fill: currentColor;
}

.shape-btn.active[data-shape="circle"] { color: #FF2D7B; }
.shape-btn.active[data-shape="triangle"] { color: #00E5CC; }
.shape-btn.active[data-shape="hexagon"] { color: #FFD23F; }
.shape-btn.active[data-shape="diamond"] { color: #C97DFF; }
.shape-btn.active[data-shape="square"] { color: #FF2D7B; }

/* --- Hero Section --- */
#hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.hero-marble-slab {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #F5F0EB;
    background-image:
        radial-gradient(ellipse 80% 40% at 20% 50%, rgba(184, 169, 154, 0.25) 0%, transparent 70%),
        radial-gradient(ellipse 60% 80% at 70% 30%, rgba(184, 169, 154, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse 100% 30% at 50% 80%, rgba(212, 184, 150, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 40% 90% at 85% 60%, rgba(184, 169, 154, 0.2) 0%, transparent 55%),
        radial-gradient(ellipse 70% 25% at 35% 20%, rgba(212, 184, 150, 0.1) 0%, transparent 45%);
    opacity: 0;
    filter: blur(4px);
    animation: marbleResolve 0.8s 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes marbleResolve {
    to {
        opacity: 1;
        filter: blur(0px);
    }
}

.hero-grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(to right, rgba(0, 229, 204, 0.08) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 229, 204, 0.08) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

/* Broadcast Window */
.broadcast-window {
    position: relative;
    width: min(85vw, 800px);
    padding: 0;
}

.broadcast-border {
    position: relative;
    padding: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 4vw, 3rem);
}

.border-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.border-path {
    stroke-dasharray: 2400;
    stroke-dashoffset: 2400;
    animation: drawBorder 1.2s 1.4s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

@keyframes drawBorder {
    to { stroke-dashoffset: 0; }
}

.broadcast-content {
    text-align: center;
    opacity: 0;
    animation: contentFadeIn 0.6s 2.6s ease forwards;
}

@keyframes contentFadeIn {
    to { opacity: 1; }
}

/* Headline with Glitch */
#headline {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(2.8rem, 6vw, 5.2rem);
    letter-spacing: -0.02em;
    color: #1A1035;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    position: relative;
}

.glitch-text {
    position: relative;
    display: inline-block;
}

.glitch-text:hover .glitch-layer {
    text-shadow: 2px 0 #FF2D7B, -2px 0 #00E5CC;
}

.glitch-layer {
    position: relative;
    display: inline-block;
    transition: text-shadow 0.15s ease;
}

.glitch-layer::before,
.glitch-layer::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.glitch-layer::before {
    color: #FF2D7B;
    z-index: -1;
    animation: glitchTop 6s infinite linear alternate-reverse;
}

.glitch-layer::after {
    color: #00E5CC;
    z-index: -2;
    animation: glitchBottom 6s infinite linear alternate-reverse;
}

@keyframes glitchTop {
    0%, 90%, 100% {
        clip-path: inset(0 0 90% 0);
        transform: translateX(0);
    }
    92% {
        clip-path: inset(10% 0 60% 0);
        transform: translateX(-3px);
    }
    94% {
        clip-path: inset(40% 0 20% 0);
        transform: translateX(2px);
    }
    96% {
        clip-path: inset(70% 0 5% 0);
        transform: translateX(-4px);
    }
    98% {
        clip-path: inset(20% 0 50% 0);
        transform: translateX(3px);
    }
}

@keyframes glitchBottom {
    0%, 90%, 100% {
        clip-path: inset(90% 0 0 0);
        transform: translateX(0);
    }
    91% {
        clip-path: inset(50% 0 20% 0);
        transform: translateX(3px);
    }
    93% {
        clip-path: inset(20% 0 50% 0);
        transform: translateX(-2px);
    }
    95% {
        clip-path: inset(70% 0 10% 0);
        transform: translateX(4px);
    }
    97% {
        clip-path: inset(5% 0 70% 0);
        transform: translateX(-3px);
    }
}

/* Subtitle */
.subtitle-mono {
    font-family: 'Space Mono', monospace;
    font-size: clamp(0.75rem, 1.2vw, 0.9rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #3D3450;
    margin-bottom: 1rem;
    opacity: 0;
    animation: subtitleGlitchIn 0.5s 3.2s ease forwards;
}

@keyframes subtitleGlitchIn {
    0% { opacity: 0; transform: translateX(-4px); }
    30% { opacity: 1; transform: translateX(2px); }
    60% { transform: translateX(-1px); }
    100% { opacity: 1; transform: translateX(0); }
}

.data-tag {
    color: #00E5CC;
}

.subtitle-tagline {
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: #3D3450;
    opacity: 0;
    animation: fadeIn 0.8s 3.6s ease forwards;
}

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

/* --- Waveform Dividers --- */
.waveform-divider {
    position: relative;
    width: 100%;
    height: 60px;
    overflow: hidden;
    z-index: 2;
}

.waveform-svg {
    width: 100%;
    height: 100%;
}

.wave-path {
    vector-effect: non-scaling-stroke;
}

/* --- Data Panels --- */
.data-panel {
    position: relative;
    min-height: 80vh;
    padding: clamp(3rem, 6vh, 6rem) clamp(1.5rem, 5vw, 4rem);
    padding-left: clamp(3rem, 6vw, 6rem);
    z-index: 2;
    background-color: #1A1035;
    /* Noise texture via subtle gradient overlay */
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(26, 16, 53, 0.6) 0%, transparent 70%),
        radial-gradient(ellipse at 80% 50%, rgba(61, 52, 80, 0.3) 0%, transparent 60%);
}

.data-panel.panel-marble {
    background-color: #F5F0EB;
    background-image:
        radial-gradient(ellipse 80% 40% at 30% 40%, rgba(184, 169, 154, 0.2) 0%, transparent 70%),
        radial-gradient(ellipse 60% 70% at 75% 60%, rgba(184, 169, 154, 0.15) 0%, transparent 55%),
        radial-gradient(ellipse 90% 25% at 50% 85%, rgba(212, 184, 150, 0.08) 0%, transparent 45%);
}

.panel-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: clamp(2rem, 4vw, 5rem);
    min-height: 60vh;
}

/* Panel Config A: text left 55%, shape right */
.panel-config-a .panel-text {
    flex: 0 0 55%;
    max-width: 55%;
}

.panel-config-a .panel-shape-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Panel entrance animation */
.data-panel .panel-inner {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.data-panel.in-view .panel-inner {
    opacity: 1;
    transform: translateY(0);
}

/* --- Panel Typography --- */
.panel-label {
    display: block;
    margin-bottom: 1.5rem;
}

.mono-accent {
    font-family: 'Space Mono', monospace;
    font-size: clamp(0.75rem, 1.2vw, 0.9rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #00E5CC;
}

.mono-accent.cyan { color: #00E5CC; }
.mono-accent.yellow { color: #FFD23F; }
.mono-accent.orchid { color: #C97DFF; }
.mono-accent.magenta { color: #FF2D7B; }

.panel-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(2.2rem, 4.5vw, 3.8rem);
    letter-spacing: -0.02em;
    color: #FFFFFF;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    transition: text-shadow 0.15s ease;
}

.panel-heading:hover {
    text-shadow: 2px 0 #FF2D7B, -2px 0 #00E5CC;
}

.panel-heading.dark-text {
    color: #1A1035;
}

.panel-heading.dark-text:hover {
    text-shadow: 2px 0 #FF2D7B, -2px 0 #00E5CC;
}

.panel-body {
    color: #E8E0F0;
    max-width: 38em;
    margin-bottom: 1.2rem;
}

.panel-body.dark-body {
    color: #3D3450;
}

/* --- Geometric Shapes --- */
.geo-shape {
    width: clamp(200px, 25vw, 380px);
    height: clamp(200px, 25vw, 380px);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.85) rotate(-5deg);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s,
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s;
}

.data-panel.in-view .geo-shape {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.shape-marble-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #F5F0EB;
    background-image:
        radial-gradient(ellipse 70% 50% at 40% 50%, rgba(184, 169, 154, 0.3) 0%, transparent 70%),
        radial-gradient(ellipse 50% 80% at 70% 30%, rgba(212, 184, 150, 0.15) 0%, transparent 60%);
    transition: transform 0.4s ease;
}

.shape-marble-fill.dark-marble {
    background-color: #1A1035;
    background-image:
        radial-gradient(ellipse 70% 50% at 40% 50%, rgba(61, 52, 80, 0.5) 0%, transparent 70%),
        radial-gradient(ellipse 50% 80% at 70% 30%, rgba(0, 229, 204, 0.05) 0%, transparent 60%);
}

.geo-shape:hover .shape-marble-fill {
    transform: rotate(15deg) scale(1.02);
}

/* Circle */
.geo-circle {
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #FF2D7B;
    animation: borderColorCycle 12s linear infinite;
}

.geo-circle .shape-marble-fill {
    border-radius: 50%;
}

/* Triangle */
.geo-triangle {
    clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
    border: none;
}

.geo-triangle::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
    background: #00E5CC;
    z-index: -1;
    animation: borderColorCycleAlt 12s linear infinite;
}

.geo-triangle .shape-marble-fill {
    clip-path: polygon(50% 1%, 99% 99%, 1% 99%);
}

/* Hexagon */
.geo-hexagon {
    clip-path: polygon(50% 0%, 93.3% 25%, 93.3% 75%, 50% 100%, 6.7% 75%, 6.7% 25%);
}

.geo-hexagon::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    clip-path: polygon(50% 0%, 93.3% 25%, 93.3% 75%, 50% 100%, 6.7% 75%, 6.7% 25%);
    background: #FFD23F;
    z-index: -1;
    animation: borderColorCycleB 12s linear infinite;
}

.geo-hexagon .shape-marble-fill {
    clip-path: polygon(50% 1%, 92% 25.5%, 92% 74.5%, 50% 99%, 8% 74.5%, 8% 25.5%);
}

/* Diamond */
.geo-diamond {
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.geo-diamond::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    background: #C97DFF;
    z-index: -1;
    animation: borderColorCycleC 12s linear infinite;
}

.geo-diamond .shape-marble-fill {
    clip-path: polygon(50% 2%, 98% 50%, 50% 98%, 2% 50%);
}

/* Square */
.geo-square {
    border: 2px solid #FF2D7B;
    overflow: hidden;
    animation: borderColorCycle 12s linear infinite;
}

/* Border color cycling animations */
@keyframes borderColorCycle {
    0%, 100% { border-color: #FF2D7B; }
    20% { border-color: #00E5CC; }
    40% { border-color: #FFD23F; }
    60% { border-color: #C97DFF; }
    80% { border-color: #B8A99A; }
}

@keyframes borderColorCycleAlt {
    0%, 100% { background: #00E5CC; }
    20% { background: #FFD23F; }
    40% { background: #C97DFF; }
    60% { background: #FF2D7B; }
    80% { background: #B8A99A; }
}

@keyframes borderColorCycleB {
    0%, 100% { background: #FFD23F; }
    20% { background: #C97DFF; }
    40% { background: #FF2D7B; }
    60% { background: #00E5CC; }
    80% { background: #B8A99A; }
}

@keyframes borderColorCycleC {
    0%, 100% { background: #C97DFF; }
    20% { background: #FF2D7B; }
    40% { background: #00E5CC; }
    60% { background: #FFD23F; }
    80% { background: #B8A99A; }
}

/* Shape hover pulse */
.geo-shape:hover {
    animation: shapePulse 0.4s ease infinite alternate;
}

@keyframes shapePulse {
    from { opacity: 1; }
    to { opacity: 0.6; }
}

/* Shape Tooltip */
.shape-tooltip {
    position: absolute;
    bottom: -40px;
    background: #FF2D7B;
    color: #FFFFFF;
    padding: 6px 14px;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.panel-shape-container:hover .shape-tooltip {
    opacity: 1;
    transform: translateY(0);
}

/* Tooltip colors per section */
#panel-origin .shape-tooltip { background: #FF2D7B; }
#panel-process .shape-tooltip { background: #00E5CC; color: #1A1035; }
#panel-flavor .shape-tooltip { background: #FFD23F; color: #1A1035; }
#panel-ritual .shape-tooltip { background: #C97DFF; }
#panel-signal .shape-tooltip { background: #FF2D7B; }

/* --- Readout Strips --- */
.readout-strip {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #1A1035;
    border-top: 1px solid #00E5CC;
    border-bottom: 1px solid #00E5CC;
    box-shadow: 0 0 12px rgba(0, 229, 204, 0.15);
    padding: 12px 0;
    z-index: 2;
}

.readout-scroll {
    display: flex;
    white-space: nowrap;
    animation: scrollReadout 30s linear infinite;
}

.readout-scroll.readout-reverse {
    animation: scrollReadoutReverse 28s linear infinite;
}

.readout-strip:hover .readout-scroll {
    animation-play-state: paused;
}

.readout-text {
    font-family: 'Space Mono', monospace;
    font-size: clamp(0.75rem, 1.2vw, 0.9rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #00E5CC;
    flex-shrink: 0;
}

.readout-text.yellow { color: #FFD23F; }
.readout-text.cyan { color: #00E5CC; }
.readout-text.magenta { color: #FF2D7B; }

@keyframes scrollReadout {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@keyframes scrollReadoutReverse {
    from { transform: translateX(-50%); }
    to { transform: translateX(0); }
}

/* --- Signal Status Indicator --- */
.signal-status {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 229, 204, 0.2);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #00E5CC;
    box-shadow: 0 0 8px rgba(0, 229, 204, 0.6);
    animation: statusBlink 2s ease-in-out infinite;
}

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

/* --- Glitch Overlay --- */
#glitch-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    opacity: 0;
}

#glitch-overlay.active {
    opacity: 1;
}

.glitch-band {
    position: absolute;
    left: 0;
    width: 100%;
    background: rgba(0, 229, 204, 0.06);
    mix-blend-mode: screen;
}

/* Scan line sweep */
.scan-line-sweep {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(0, 229, 204, 0.3);
    pointer-events: none;
    z-index: 9997;
    opacity: 0;
    transition: none;
}

.scan-line-sweep.active {
    opacity: 1;
    animation: scanSweep 0.2s linear forwards;
}

@keyframes scanSweep {
    from { top: 0; }
    to { top: 100%; }
}

/* Major glitch effect (at scroll milestones) */
body.major-glitch {
    transform: translateX(4px);
    box-shadow: -8px 0 0 rgba(255, 45, 123, 0.4), 0 -4px 0 rgba(0, 229, 204, 0.3);
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .panel-inner {
        flex-direction: column;
        text-align: center;
    }

    .panel-config-a .panel-text {
        flex: 1;
        max-width: 100%;
    }

    .panel-config-a .panel-shape-container {
        width: 100%;
    }

    .geo-shape {
        width: 180px;
        height: 180px;
    }

    #shape-nav {
        bottom: 16px;
        left: 12px;
        gap: 12px;
    }

    .shape-btn {
        width: 20px;
        height: 20px;
    }

    .panel-body {
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    .broadcast-window {
        width: 95vw;
    }

    .geo-shape {
        width: 140px;
        height: 140px;
    }

    #shape-nav {
        display: none;
    }
}

/* --- Utility: Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .readout-scroll,
    .readout-scroll.readout-reverse {
        animation: none;
    }

    #glitch-overlay,
    .scan-line-sweep {
        display: none;
    }
}
