@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=VT323&display=swap');

/* ── Root ── */
.eb-retrotv {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 2.5rem 1rem 3rem;
}

/* ── Cabinet ── */
.eb-retrotv-cabinet {
    background: linear-gradient(160deg,
        var(--eb-tv-cab-a, #2e3238) 0%,
        var(--eb-tv-cab-b, #22262c) 40%,
        var(--eb-tv-cab-c, #181c20) 100%);
    border-radius: 28px 28px 24px 24px;
    padding: 28px 32px 36px;
    position: relative;
    border: 2px solid rgba(200,191,173,0.12);
    filter: drop-shadow(0 40px 80px rgba(0,0,0,0.9)) drop-shadow(0 0 60px rgba(100,120,140,0.08));
    animation: eb-tv-float 6s ease-in-out infinite;
    box-shadow:
        inset 0 2px 4px rgba(255,255,255,0.06),
        inset 0 -4px 8px rgba(0,0,0,0.6),
        0 8px 0 var(--eb-tv-shd-a, #10141a),
        0 12px 0 var(--eb-tv-shd-b, #0a0e12);
}

.eb-retrotv-cabinet::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: repeating-linear-gradient(
        92deg,
        transparent 0px, transparent 24px,
        rgba(255,255,255,0.015) 24px, rgba(255,255,255,0.015) 25px
    );
    pointer-events: none;
}

@keyframes eb-tv-float {
    0%, 100% { transform: translateY(0);     }
    50%       { transform: translateY(-10px); }
}

/* ── Bezel ── */
.eb-retrotv-bezel {
    background: linear-gradient(145deg,
        var(--eb-tv-bzl-a, #1a1c20) 0%,
        var(--eb-tv-bzl-b, #0e1012) 100%);
    border-radius: 14px;
    padding: 18px;
    box-shadow:
        inset 0 0 0 2px rgba(255,255,255,0.04),
        inset 4px 4px 12px rgba(0,0,0,0.8),
        inset -2px -2px 8px rgba(255,255,255,0.03);
}

/* ── Screen ── */
.eb-retrotv-screen {
    width: 520px;
    height: 390px;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    outline: none;
}

.eb-retrotv-screen::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    box-shadow:
        inset  8px  0  20px rgba(0,0,0,0.35),
        inset -8px  0  20px rgba(0,0,0,0.35),
        inset  0    8px 20px rgba(0,0,0,0.25),
        inset  0  -8px 20px rgba(0,0,0,0.25);
    pointer-events: none;
    z-index: 20;
}

.eb-retrotv-canvas {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
}

.eb-retrotv-scanlines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px, transparent 3px,
        rgba(0,0,0,0.18) 3px, rgba(0,0,0,0.18) 4px
    );
    pointer-events: none;
    z-index: 15;
    border-radius: 8px;
    mix-blend-mode: multiply;
}

.eb-retrotv-glow {
    position: absolute;
    inset: -2px;
    border-radius: 10px;
    pointer-events: none;
    z-index: 5;
    transition: box-shadow 1.2s ease;
}

.eb-retrotv-glass {
    position: absolute;
    top: 6px; left: 8px;
    width: 45%; height: 30%;
    background: linear-gradient(135deg,
        rgba(255,255,255,0.06) 0%,
        rgba(255,255,255,0.02) 50%,
        transparent 100%
    );
    border-radius: 6px 6px 0 0;
    pointer-events: none;
    z-index: 25;
}

/* ── Controls bar ── */
.eb-retrotv-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    padding: 0 4px;
}

.eb-retrotv-brand {
    font-family: 'VT323', monospace;
    font-size: 22px;
    color: rgba(200,191,173,0.35);
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.eb-retrotv-indicator {
    display: flex;
    gap: 6px;
    align-items: center;
}

.eb-retrotv-led {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #c4893a;
    box-shadow: 0 0 6px #c4893a, 0 0 12px rgba(196,137,58,0.5);
    animation: eb-tv-led 2s ease-in-out infinite;
}

@keyframes eb-tv-led {
    0%, 100% { opacity: 1;   }
    50%       { opacity: 0.4; }
}

.eb-retrotv-onair {
    font-family: 'VT323', monospace;
    font-size: 14px;
    color: rgba(200,191,173,0.3);
    letter-spacing: 0.1em;
}

.eb-retrotv-knobs {
    display: flex;
    gap: 18px;
    align-items: center;
}

.eb-retrotv-knob {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #4a5058, #22282e);
    border: 2px solid rgba(200,191,173,0.25);
    box-shadow:
        0 3px 8px rgba(0,0,0,0.7),
        inset 0 1px 3px rgba(255,255,255,0.18),
        0 0 0 1px rgba(0,0,0,0.4);
    cursor: pointer;
    position: relative;
    transition: transform 0.15s ease;
}

.eb-retrotv-knob::after {
    content: '';
    position: absolute;
    top: 4px; left: 50%;
    transform: translateX(-50%);
    width: 3px; height: 10px;
    background: rgba(232,226,217,0.85);
    border-radius: 2px;
    box-shadow: 0 0 4px rgba(232,226,217,0.4);
}

.eb-retrotv-knob:hover  { transform: rotate(30deg);  }
.eb-retrotv-knob:active { transform: rotate(60deg);  }

.eb-retrotv-knob-lg { width: 38px; height: 38px; }
.eb-retrotv-knob-lg::after { height: 12px; top: 5px; }

/* ── Channel strip ── */
.eb-retrotv-strip {
    display: flex;
    gap: 8px;
    margin-top: 22px;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 590px;
}

.eb-retrotv-ch-btn {
    width: 44px; height: 30px;
    border: 1px solid rgba(var(--eb-tv-btn-r, 60), var(--eb-tv-btn-g, 60), var(--eb-tv-btn-b, 70), 0.3);
    background: rgba(var(--eb-tv-btn-r, 60), var(--eb-tv-btn-g, 60), var(--eb-tv-btn-b, 70), 0.04);
    border-radius: 4px;
    color: rgba(var(--eb-tv-btn-r, 60), var(--eb-tv-btn-g, 60), var(--eb-tv-btn-b, 70), 0.6);
    font-family: 'Share Tech Mono', monospace;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.eb-retrotv-ch-btn:hover {
    border-color: rgba(var(--eb-tv-btn-r, 60), var(--eb-tv-btn-g, 60), var(--eb-tv-btn-b, 70), 0.75);
    color: rgba(var(--eb-tv-btn-r, 60), var(--eb-tv-btn-g, 60), var(--eb-tv-btn-b, 70), 1);
    transform: translateY(-1px);
}

.eb-retrotv-ch-btn.eb-retrotv-active {
    border-color: var(--ch-color, #c4893a);
    color: rgba(var(--eb-tv-btn-r, 60), var(--eb-tv-btn-g, 60), var(--eb-tv-btn-b, 70), 1);
    box-shadow: 0 0 10px var(--ch-color, #c4893a), inset 0 0 8px rgba(255,255,255,0.05);
}


/* ── Channel switch animation ── */
.eb-retrotv-screen.eb-retrotv-switching .eb-retrotv-canvas {
    animation: eb-tv-switch 0.45s ease forwards;
}

@keyframes eb-tv-switch {
    0%   { transform: scaleY(1);    filter: brightness(1.2);         }
    20%  { transform: scaleY(0.02); filter: brightness(3) blur(1px); }
    55%  { transform: scaleY(0.02); filter: brightness(0.1);          }
    75%  { transform: scaleY(1.04); filter: brightness(1.4);          }
    90%  { transform: scaleY(0.97); filter: brightness(0.9);          }
    100% { transform: scaleY(1);    filter: brightness(1);            }
}

/* ── Cabinet themes ── */
.eb-retrotv-slate .eb-retrotv-cabinet {
    background: linear-gradient(160deg, #3a3f45 0%, #2a2f34 40%, #1e2228 100%);
    border-color: rgba(200,191,173,0.18);
    box-shadow:
        inset 0 2px 4px rgba(255,255,255,0.06),
        inset 0 -4px 8px rgba(0,0,0,0.6),
        0 8px 0 #141819,
        0 12px 0 #0e1214;
}

.eb-retrotv-midnight .eb-retrotv-cabinet {
    background: linear-gradient(160deg, #1e2448 0%, #141a38 40%, #0e1228 100%);
    border-color: rgba(130,150,220,0.2);
    box-shadow:
        inset 0 2px 4px rgba(255,255,255,0.06),
        inset 0 -4px 8px rgba(0,0,0,0.6),
        0 8px 0 #0a0e20,
        0 12px 0 #060a18;
}

.eb-retrotv-forest .eb-retrotv-cabinet {
    background: linear-gradient(160deg, #1e3020 0%, #162418 40%, #0e1a10 100%);
    border-color: rgba(100,180,100,0.18);
    box-shadow:
        inset 0 2px 4px rgba(255,255,255,0.06),
        inset 0 -4px 8px rgba(0,0,0,0.6),
        0 8px 0 #0c1a0e,
        0 12px 0 #081208;
}

/* ── Mobile ── */
@media (max-width: 640px) {
    .eb-retrotv-screen  { width: 300px; height: 225px; }
    .eb-retrotv-cabinet { padding: 14px 16px 22px; }
    .eb-retrotv-ch-btn  { width: 36px; height: 26px; font-size: 11px; }
    .eb-retrotv-brand   { font-size: 18px; }
}
