/* RetroHub: the front door to the Retro family. Same cable-guide DNA as the sister sites,
   on a late-night midnight ground, with every channel wearing its own site's colors. */
:root {
  --night: #0d0828;        /* page ground */
  --panel: #1a1145;        /* guide cells */
  --panel-hi: #2a1d6b;     /* hovered / tuned row */
  --line: #06031a;         /* gaps between cells */
  --gold: #ffd23a;
  --ivory: #f3efe2;
  --red: #d8322b;
  --osd: #5dff6a;
  --wood: #4a2f1c;
  --wood-hi: #6b4428;
  --font-guide: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --font-osd: "VT323", "Courier New", monospace;
  --font-logo: "Bungee", "Impact", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--night); color: var(--ivory); }
body {
  font-family: var(--font-guide); font-size: 17px; line-height: 1.35;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(120, 70, 255, .22), transparent 60%),
    var(--night);
  min-height: 100vh;
}
a { color: inherit; }

.app { max-width: 1200px; margin: 0 auto; padding: 12px 16px 28px; display: grid; gap: 16px; }

/* ---------- Masthead (same parts as the sister sites) ---------- */
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.logo { display: flex; align-items: baseline; gap: 2px; flex-wrap: wrap; text-decoration: none; }
.logo-retro, .logo-hub { font-family: var(--font-logo); font-size: clamp(28px, 5.4vw, 44px); line-height: 1; letter-spacing: .02em; }
.logo-retro { color: var(--gold); text-shadow: 3px 3px 0 var(--red); }
.logo-hub { color: var(--ivory); text-shadow: 3px 3px 0 #6f1a9e; }
.logo-tag { margin-left: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; font-size: 14px; color: var(--gold); }
.clock { font-family: var(--font-osd); font-size: 34px; color: var(--gold); display: flex; gap: 10px; align-items: baseline; font-variant-numeric: tabular-nums; }
#clockAmPm { font-size: 22px; }
.visits {
  display: inline-flex; align-items: baseline; gap: 6px; margin-left: auto;
  font-family: var(--font-osd); font-size: 22px; color: var(--osd);
  background: #000; border: 2px solid var(--line); border-radius: 6px; padding: 2px 10px;
  text-shadow: 0 0 6px currentColor; font-variant-numeric: tabular-nums;
}
.visits b { font-weight: 400; }

/* ---------- Top: the TV + the "on the network" panel ---------- */
.top { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 16px; align-items: start; }

.tv-cabinet {
  background: linear-gradient(160deg, var(--wood-hi), var(--wood) 55%, #3a2414);
  border-radius: 22px; padding: 18px 18px 12px;
  box-shadow: 0 10px 0 #24170d, 0 18px 40px rgba(0, 0, 0, .55), inset 0 2px 0 rgba(255, 255, 255, .12);
}
.screen {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden; isolation: isolate;
  border-radius: 18px / 26px; border: 10px solid #141414;
  background: var(--ch-bg, #07124a);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, .65);
  transition: background .25s;
}
/* scanlines + glass */
.screen::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 5;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .18) 0 2px, transparent 2px 4px),
    radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, .10), transparent 55%);
}
.static { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4; opacity: 0; pointer-events: none; transition: opacity .12s; }
.screen.tuning .static { opacity: 1; }

.osd {
  position: absolute; top: 14px; left: 18px; z-index: 3;
  font-family: var(--font-osd); font-size: clamp(28px, 4.6vw, 46px); line-height: 1; color: var(--osd);
  text-shadow: 0 0 8px rgba(93, 255, 106, .7), 2px 2px 0 #000;
}
.osd-call { position: absolute; top: 18px; right: 18px; z-index: 3; font-family: var(--font-osd); font-size: clamp(20px, 3vw, 30px); color: var(--osd); text-shadow: 0 0 8px rgba(93, 255, 106, .7), 2px 2px 0 #000; }

.show {
  position: absolute; inset: 0; z-index: 2;
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: clamp(12px, 3vw, 28px);
  padding: clamp(46px, 8vw, 70px) clamp(16px, 4vw, 40px) clamp(16px, 3vw, 28px);
}
.show-icon {
  width: clamp(72px, 14vw, 150px); height: auto; aspect-ratio: 1; border-radius: 22%;
  box-shadow: 0 0 0 4px var(--ch-edge, var(--gold)), 0 10px 26px rgba(0, 0, 0, .5);
}
.show-name { font-family: var(--font-logo); font-size: clamp(24px, 4.2vw, 46px); line-height: 1.02; margin: 0; }
.show-name .r { color: var(--gold); text-shadow: 3px 3px 0 var(--red); }
.show-name .n { color: var(--ivory); text-shadow: 3px 3px 0 var(--ch-shadow, #13299c); }
.show-tag { margin: 6px 0 0; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; font-size: clamp(12px, 1.8vw, 15px); color: var(--ch-edge, var(--gold)); }
.show-blurb { margin: 8px 0 12px; font-size: clamp(15px, 2.2vw, 20px); max-width: 46ch; }
.tune {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  font-weight: 800; font-size: clamp(16px, 2.4vw, 20px); letter-spacing: .05em; text-transform: uppercase;
  background: var(--ch-edge, var(--gold)); color: #120b06; border-radius: 8px; padding: 8px 16px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, .45);
}
.tune:hover, .tune:focus-visible { filter: brightness(1.12); outline: 3px solid #fff; outline-offset: 2px; }
.tune:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0, 0, 0, .45); }

.tv-chin { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 4px 2px; }
.brand { font-family: var(--font-guide); font-weight: 800; letter-spacing: .3em; font-size: 14px; color: #e8c79a; opacity: .85; }
.knobs { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ch-btn, .surf-btn {
  font: inherit; font-weight: 800; font-size: 15px; letter-spacing: .06em; cursor: pointer;
  background: linear-gradient(#2a2a2a, #111); color: var(--ivory); border: 1px solid #000; border-radius: 6px;
  padding: 7px 12px; box-shadow: 0 3px 0 #000, inset 0 1px 0 rgba(255, 255, 255, .12);
}
.ch-btn:active, .surf-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #000; }
.ch-btn:focus-visible, .surf-btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.surf-btn[aria-pressed="true"] { color: var(--osd); }

/* right panel */
.now { display: grid; gap: 12px; }
.card { background: linear-gradient(var(--panel-hi), var(--panel)); border: 2px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.card h2 { margin: 0 0 8px; font-family: var(--font-logo); font-weight: 400; font-size: 22px; color: var(--gold); }
.card p { margin: 0 0 8px; }
.stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stats li { background: #000; border: 2px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.stats b { display: block; font-family: var(--font-osd); font-weight: 400; font-size: 34px; line-height: 1; color: var(--osd); text-shadow: 0 0 6px rgba(93, 255, 106, .6); font-variant-numeric: tabular-nums; }
.stats span { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; opacity: .85; }
.promise { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.promise li::before { content: "★ "; color: var(--gold); }
.install-btn {
  font: inherit; font-weight: 800; font-size: 16px; letter-spacing: .04em; margin-top: 4px;
  background: var(--gold); color: var(--night); border: 0; border-radius: 6px; padding: 8px 14px; cursor: pointer; box-shadow: 0 3px 0 #a8850f;
}

/* ---------- Channel guide ---------- */
.guide { display: grid; gap: 0; border: 3px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--line); }
.guide-title {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap;
  background: var(--gold); color: var(--night); padding: 6px 14px;
  font-weight: 800; letter-spacing: .14em; text-transform: uppercase; font-size: 15px;
}
.guide-head, .row { display: grid; grid-template-columns: 92px minmax(0, 1.35fr) minmax(0, 1.85fr) minmax(0, .85fr); gap: 3px; }
.guide-head > div { background: #241a5c; color: var(--gold); padding: 6px 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: 14px; }
.row { text-decoration: none; margin-top: 3px; color: var(--ivory); }
.row > div { background: var(--panel); padding: 12px; display: flex; flex-direction: column; justify-content: center; gap: 2px; min-width: 0; transition: background .12s; }
.row:hover > div, .row:focus-visible > div, .row.tuned > div { background: var(--panel-hi); }
.row:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; position: relative; z-index: 1; }
.row-chan { background: var(--red) !important; align-items: center; text-align: center; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .25); }
.row-chan b { font-family: var(--font-osd); font-weight: 400; font-size: 40px; line-height: .9; }
.row-chan small { font-weight: 800; letter-spacing: .12em; font-size: 12px; }
.row-name { flex-direction: row !important; align-items: center; justify-content: flex-start !important; gap: 12px !important; }
.row-name img { width: 52px; height: 52px; border-radius: 22%; flex: none; box-shadow: 0 0 0 3px var(--edge); }
.row-name strong { font-family: var(--font-logo); font-weight: 400; font-size: clamp(16px, 1.65vw, 21px); line-height: 1.05; }
.row-name em { display: block; font-style: normal; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--edge); font-weight: 800; }
.row-what { font-size: 17px; }
.row-what small { opacity: .8; font-size: 15px; }
.row-stat { font-weight: 700; }
.row-stat .go { color: var(--gold); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-size: 15px; }
.row-stat .count { font-family: var(--font-osd); font-weight: 400; font-size: 20px; color: var(--osd); }
.row.tuned .row-chan b::before { content: "▶"; font-size: .6em; margin-right: 2px; vertical-align: middle; }

.guide-hint { margin: 0; text-align: center; font-size: 15px; opacity: .8; }

/* ---------- Footer ---------- */
.foot { text-align: center; font-size: 15px; opacity: .9; display: grid; gap: 6px; }
.foot p { margin: 0; }
.foot nav a { font-weight: 700; color: var(--gold); text-decoration: none; }
.foot nav a:hover, .foot nav a:focus-visible { text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .top { grid-template-columns: minmax(0, 1fr); }
  .guide-head, .row { grid-template-columns: 76px minmax(0, 1fr) minmax(0, 1.4fr); }
  .guide-head > div:last-child, .row-stat { display: none !important; }
}
@media (max-width: 600px) {
  .clock { font-size: 26px; }
  .tv-cabinet { padding: 10px 10px 8px; border-radius: 16px; }
  .screen { aspect-ratio: auto; min-height: 290px; border-width: 7px; }
  .show { position: relative; inset: auto; grid-template-columns: 56px minmax(0, 1fr); align-items: start; gap: 12px; padding: 58px 14px 18px; }
  .show-icon { width: 56px; height: 56px; align-self: start; margin-top: 4px; }
  .show-blurb { font-size: 16px; }
  .guide-hint { display: none; }
  .show-blurb { margin: 6px 0 10px; }
  .guide-head { display: none; }
  .row { grid-template-columns: 64px minmax(0, 1fr); }
  .row-what { grid-column: 2; padding-top: 0 !important; }
  .row-chan { grid-row: span 2; }
  .row-chan b { font-size: 32px; }
  .row-name img { width: 40px; height: 40px; }
  .row-name strong { font-size: 18px; }
  .stats b { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .screen, .row > div { transition: none; }
}
