/* TRONICOLOR 3K — CRT TV shell */
:root {
  --wood-1: #6b4a2b;
  --wood-2: #543a20;
  --wood-3: #7d5a36;
  --bezel: #2a2a2e;
  --bezel-dark: #17171a;
  --knob: #d8d2c4;
  --knob-dark: #8f887a;
  --led: #ff3b30;
  --room-1: #101018;
  --room-2: #1a1a26;
  --paper: #efe6d0;
  --ink: #2a2418;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 700px at 50% 30%, var(--room-2), var(--room-1) 70%);
  font-family: "Courier New", monospace;
  color: #cfc8b8;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.room {
  display: flex;
  gap: 40px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

/* ================= THE CABINET ================= */
.cabinet {
  position: relative;
  width: 560px;
  padding: 26px 26px 14px;
  border-radius: 26px;
  background:
    repeating-linear-gradient(93deg,
      var(--wood-1) 0px, var(--wood-1) 7px,
      var(--wood-2) 7px, var(--wood-2) 9px,
      var(--wood-3) 9px, var(--wood-3) 15px,
      var(--wood-2) 15px, var(--wood-2) 17px);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,.12),
    inset 0 -6px 14px rgba(0,0,0,.5),
    0 24px 60px rgba(0,0,0,.65);
}

.bezel {
  background: linear-gradient(180deg, var(--bezel), var(--bezel-dark));
  border-radius: 16px;
  padding: 18px 18px 10px;
  box-shadow: inset 0 0 0 2px #000, inset 0 4px 10px rgba(0,0,0,.6);
}

.screen-wrap {
  position: relative;
  border-radius: 12px / 22px;
  overflow: hidden;
  background: #000;
  box-shadow:
    inset 0 0 28px rgba(0,0,0,.9),
    inset 0 0 4px rgba(120,200,255,.15);
}

#screen {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* CRT glass layers */
.scanlines {
  position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,0) 0px, rgba(0,0,0,0) 2px,
    rgba(0,0,0,.28) 3px, rgba(0,0,0,.28) 4px);
  mix-blend-mode: multiply;
}
.cabinet.is-on .scanlines { animation: flicker 4s infinite steps(60); }

.glass-glare {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(140% 60% at 20% 0%, rgba(255,255,255,.10), transparent 60%),
    radial-gradient(120% 50% at 80% 100%, rgba(160,200,255,.05), transparent 60%);
}
.vignette {
  position: absolute; inset: 0; pointer-events: none;
  border-radius: 12px / 22px;
  box-shadow:
    inset 0 0 60px rgba(0,0,0,.75),
    inset 0 0 140px rgba(0,0,0,.45);
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  3% { opacity: .96; }
  7% { opacity: 1; }
  41% { opacity: .98; }
  43% { opacity: 1; }
  77% { opacity: .95; }
  79% { opacity: 1; }
}

/* Brand plate */
.brand {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 4px 2px;
  color: #c9c2b2;
  letter-spacing: .18em;
}
.brand-name { font-weight: 700; font-size: 13px; }
.brand-model {
  font-size: 11px; color: #8f887a;
  border: 1px solid #55504a; padding: 0 5px; border-radius: 3px;
}
.power-led {
  margin-left: auto; width: 8px; height: 8px; border-radius: 50%;
  background: #3a1512; box-shadow: inset 0 0 2px #000;
}
.power-led.lit {
  background: var(--led);
  box-shadow: 0 0 8px var(--led), 0 0 16px rgba(255,59,48,.6);
}

/* Controls row */
.controls {
  display: flex; align-items: center; gap: 22px;
  padding: 14px 8px 10px;
}
.knob-group { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.knob-group label { font-size: 9px; letter-spacing: .2em; color: #b7ab92; }

.knob {
  width: 44px; height: 44px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--knob), var(--knob-dark));
  border: 2px solid #4a4034;
  box-shadow: 0 3px 6px rgba(0,0,0,.5), inset 0 -2px 4px rgba(0,0,0,.4);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #3a3226; font-weight: 700;
  transition: transform .1s;
}
.knob:hover { transform: rotate(12deg); }
.knob:active { transform: scale(.94); }
.knob.small { width: 30px; height: 30px; font-size: 12px; }
.knob-notch {
  width: 3px; height: 14px; background: #3a3226; border-radius: 2px;
  transform: translateY(-8px);
}
.ch-readout {
  font-size: 12px; color: #ffd27a;
  text-shadow: 0 0 6px rgba(255,210,122,.7);
  background: #171310; padding: 2px 8px; border-radius: 3px;
  border: 1px solid #3a3226;
}

.speaker {
  margin-left: auto;
  display: grid;
  grid-template-columns: repeat(4, 8px);
  gap: 6px;
}
.speaker span {
  width: 8px; height: 8px; border-radius: 50%;
  background: #171310;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.8), 0 1px 0 rgba(255,255,255,.08);
}

.feet {
  display: flex; justify-content: space-between; padding: 0 40px;
}
.feet::before, .feet::after {
  content: ""; width: 46px; height: 10px;
  background: #171310; border-radius: 0 0 8px 8px;
}

.hint {
  max-width: 560px; text-align: center; font-size: 12px;
  color: #8f887a; margin-top: 18px;
}
.hint b { color: #cfc8b8; }

/* ================= TV GUIDE ================= */
.guide {
  width: 300px;
  background: var(--paper);
  color: var(--ink);
  border-radius: 4px;
  padding: 20px 22px;
  box-shadow: 0 18px 40px rgba(0,0,0,.5), inset 0 0 40px rgba(0,0,0,.06);
  transform: rotate(-1.2deg);
}
.guide-title {
  margin: 0; font-size: 30px; letter-spacing: .06em;
  border-bottom: 3px solid var(--ink); padding-bottom: 6px;
}
.guide-sub { margin: 6px 0 14px; font-size: 12px; letter-spacing: .25em; color: #6b5f48; }

.lineup { list-style: none; margin: 0; padding: 0; }
.lineup-item {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 2px 10px;
  padding: 9px 6px;
  border-bottom: 1px dashed #b7ab92;
  cursor: pointer;
  transition: background .12s;
}
.lineup-item:hover { background: rgba(216,132,42,.18); }
.lineup-item .ch {
  grid-row: span 2;
  font-weight: 700; font-size: 15px;
  color: #fff; background: var(--ink);
  border-radius: 3px; padding: 4px 6px; height: fit-content;
}
.lineup-item .name { font-weight: 700; font-size: 14px; letter-spacing: .04em; }
.lineup-item .desc { font-size: 11px; color: #6b5f48; }

.guide-note { margin-top: 16px; }
.guide-note h3 { margin: 0 0 4px; font-size: 13px; letter-spacing: .2em; }
.guide-note .muted { font-size: 11px; color: #6b5f48; margin: 0; }

@media (max-width: 980px) {
  .room { flex-direction: column; }
  .cabinet { width: min(560px, 94vw); }
}
