/* The cinema look (approved 2026-10-27), laid over style.css and tvhome.css: a near-black canvas
   with charcoal surfaces, one red for what matters (live, the main action, the open section, a
   channel in focus), a quiet blue light, Bricolage Grotesque for titles and Figtree for the rest.
   The Android app draws the same (MainActivity.kt tokens, Screens.kt, TvHome.kt). */
:root {
  --bg: #07080b;
  --surface: #12141a;
  --surface-2: #1a1d25;
  --line: rgba(255, 255, 255, .1);
  --hairline: rgba(255, 255, 255, .14);
  --soft: #d4d6dc;
  --muted: #9a9ea8;
  --dim: #6b6f79;
  --red-hot: #ff1f2b;
  --red-hover: #ff1f2b;
  --red-glow: rgba(229, 9, 20, .38);
  --blue: #3d7bff;
  --blue-glow: rgba(61, 123, 255, .2);
  --radius: 10px;
  --display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

/* ---------- header: the open section glows red underneath, the focused one sits in a pill */
header { background: linear-gradient(to bottom, rgba(7,8,11,.88) 0%, rgba(7,8,11,.4) 60%, rgba(7,8,11,0)); }
header.solid { background-color: rgba(7, 8, 11, .96); backdrop-filter: blur(14px); }
.logo img { filter: drop-shadow(0 0 16px rgba(229, 9, 20, .25)); }
.primary { gap: .35vw; }
.primary a {
  position: relative; display: inline-block; padding: 8px 14px; border-radius: 999px; font-size: 15px; font-weight: 600;
  transition: color .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
}
.primary a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.primary a:focus-visible { outline: none; color: #fff; background: rgba(255, 255, 255, .12); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .9); }
.primary a.active { color: #fff; }
.primary a.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 3px; border-radius: 3px;
  background: var(--red); box-shadow: 0 0 12px 1px var(--red-glow);
}

/* ---------- buttons: red for the main action, glass for the rest */
.btn {
  background: var(--red); color: #fff; border-radius: 10px; padding: .62em 1.6em .62em 1.3em;
  transition: background .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease), color .18s var(--ease);
  box-shadow: 0 8px 28px rgba(229, 9, 20, .28);
}
.btn:hover { background: var(--red-hot); }
.btn:focus-visible { outline: none; background: var(--red-hot); transform: scale(1.05); box-shadow: 0 0 0 3px #fff, 0 14px 40px rgba(229, 9, 20, .5); }
.btn.more, .btn.ghost {
  background: rgba(255, 255, 255, .1); color: #fff; box-shadow: inset 0 0 0 1px var(--hairline); backdrop-filter: blur(14px);
}
.btn.more:hover, .btn.ghost:hover { background: rgba(255, 255, 255, .18); }
.btn.more:focus-visible, .btn.ghost:focus-visible { background: #fff; color: #0b0c10; transform: scale(1.05); box-shadow: 0 0 0 3px rgba(255, 255, 255, .35); }
.btn.small { border-radius: 8px; box-shadow: none; }
.btn.danger { box-shadow: none; }

/* ---------- billboard: layered shade and the two lights */
.bb-shade {
  background:
    linear-gradient(90deg, rgba(7,8,11,.94) 0%, rgba(7,8,11,.74) 26%, rgba(7,8,11,.28) 50%, rgba(7,8,11,0) 68%),
    linear-gradient(to bottom, rgba(7,8,11,.55) 0%, rgba(7,8,11,0) 18%, rgba(7,8,11,0) 55%, rgba(7,8,11,.66) 80%, var(--bg) 100%),
    radial-gradient(ellipse 55% 65% at 0% 95%, rgba(229, 9, 20, .18), transparent 60%),
    radial-gradient(ellipse 45% 55% at 100% 0%, var(--blue-glow), transparent 60%);
}
h1.bb-logo.text { font-family: var(--display); font-weight: 800; letter-spacing: -.025em; }
.bb-synopsis { color: var(--soft); -webkit-line-clamp: 2; }
.bb-maturity { border-radius: 8px 0 0 8px; background: rgba(18, 20, 26, .6); backdrop-filter: blur(10px); border-left-color: var(--red); }

/* ---------- rows and tiles */
.shelf-head { font-family: var(--display); color: #fff; font-weight: 700; letter-spacing: -.01em; }
.boxart { border-radius: var(--radius); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.boxart.tall { border-radius: 8px; }
.boxtitle { font-family: var(--display); font-weight: 700; }
.ranktile .poster { border-radius: 8px; }
.ranktile .num { font-family: var(--display); }
.tile:focus-visible { outline: 2.5px solid #fff; outline-offset: 3px; border-radius: var(--radius); }
.preview { border-radius: 12px; background: var(--surface); box-shadow: 0 18px 50px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.06); }

/* ---------- TV front page */
.tvh-hero { background: var(--bg); }
.tvh-hero-shade {
  background:
    linear-gradient(90deg, rgba(7,8,11,.96) 0%, rgba(7,8,11,.82) 24%, rgba(7,8,11,.35) 48%, rgba(7,8,11,0) 66%),
    linear-gradient(to top, var(--bg) 0%, rgba(7,8,11,.72) 18%, rgba(7,8,11,0) 46%),
    linear-gradient(to bottom, rgba(7,8,11,.6) 0%, rgba(7,8,11,0) 16%),
    radial-gradient(ellipse 60% 70% at 0% 100%, rgba(229, 9, 20, .2), transparent 60%),
    radial-gradient(ellipse 50% 60% at 100% 0%, var(--blue-glow), transparent 60%) !important;
}
.tvh-layer img { filter: saturate(1.1) contrast(1.05) brightness(1.06); }
.tvh-content { width: min(860px, 56vw); }
.tvh-badges { gap: 10px; margin-bottom: 20px; }
.tvh-live { height: 34px; padding: 0 14px 0 12px; border-radius: 8px; font-size: 13px; letter-spacing: 1.4px; box-shadow: 0 8px 26px rgba(229,9,20,.35); }
.tvh-chan-chip {
  display: inline-flex; align-items: center; gap: 9px; height: 34px; padding: 0 12px; border-radius: 8px;
  background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px var(--hairline); backdrop-filter: blur(14px);
  font-size: 14px; font-weight: 700; color: var(--soft); white-space: nowrap;
}
.tvh-chan-chip .tvh-hero-logo { height: 22px; max-width: 90px; }
.tvh-title { font-family: var(--display); font-weight: 800; letter-spacing: -.025em; line-height: .98; font-size: clamp(2.4rem, 4.2vw, 4.8rem); text-wrap: balance;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tvh-meta { display: flex; align-items: center; gap: 0; white-space: nowrap; margin-bottom: 14px; }
.tvh-sep { width: 1px; height: 1em; margin: 0 14px; background: var(--hairline); }
.tvh-next { color: var(--muted); overflow: hidden; text-overflow: ellipsis; max-width: 26ch; }
.tvh-progress { margin-bottom: 18px; }
.tvh-bar-big { flex: 0 1 420px; height: 5px; }
.tvh-bar-big i { background: linear-gradient(90deg, #b8060f, var(--red-hot)); box-shadow: 0 0 12px var(--red-glow); }
.tvh-desc { color: var(--soft); opacity: .9; -webkit-line-clamp: 2; }
.tvh-actions .btn { border-radius: 10px; }
.tvh-again, .tvh-guide { background: rgba(255,255,255,.1); }
.tvh-dot.on i { background: #fff; }

.tvh-row-head h2 { font-family: var(--display); font-weight: 700; letter-spacing: -.01em; }
.tvh-tile { border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), 0 14px 34px rgba(0,0,0,.4);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.tvh-tile:hover, .tvh-tile:focus-visible { transform: scale(1.04); outline: none; box-shadow: 0 0 0 2.5px #fff, 0 22px 50px rgba(0,0,0,.6); z-index: 2; }
.tvh-glass { display: inline-flex; align-items: center; height: 30px; padding: 4px 10px; border-radius: 8px;
  background: rgba(10,11,15,.62); box-shadow: inset 0 0 0 1px var(--hairline); backdrop-filter: blur(10px); }
.tvh-glass .tvh-tile-logo { height: 100%; max-height: 22px; }
.tvh-tile-title { font-family: var(--display); font-weight: 700; }

/* channel cards: the logo fills the card; the card is lit in the logo's own colour */
.tvh-lcard {
  --tint: 42, 51, 72;
  position: relative; flex: 0 0 clamp(220px, 17.5vw, 340px); aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden;
  scroll-snap-align: start; display: block;
  background:
    radial-gradient(60% 50% at 50% 28%, rgba(255,255,255,.1), transparent 70%),
    radial-gradient(120% 120% at 50% 0%, rgba(var(--tint), .42) 0%, rgba(var(--tint), .18) 50%, transparent 85%),
    #0a0b0f;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), inset 0 1px 0 rgba(255,255,255,.06), 0 16px 36px rgba(0,0,0,.45);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.tvh-lcard::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.55)); }
.tvh-lcard-logo { position: absolute; left: 13%; right: 13%; top: 9%; height: 56%; }
.tvh-lcard-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 6px 18px rgba(0,0,0,.45)); transition: transform .3s var(--ease); }
.tvh-lcard-logo .tvh-logo-text { position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
  font-family: var(--display); font-size: clamp(1.2rem, 1.6vw, 2rem); font-weight: 800; line-height: 1.05; }
.tvh-lcard-foot { position: absolute; z-index: 1; left: 14px; right: 14px; bottom: 12px; }
.tvh-lcard-line { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; min-width: 0; }
.tvh-mini-live { flex: none; display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 8px; border-radius: 5px;
  background: var(--red); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .8px; }
.tvh-mini-live i { width: 5px; height: 5px; border-radius: 50%; background: #fff; }
.tvh-lcard-now { font-size: 13px; font-weight: 600; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; transform: translateY(3px); transition: opacity .3s var(--ease), transform .3s var(--ease); }
.tvh-lcard .tvh-bar { height: 3px; }
.tvh-lcard:hover, .tvh-lcard:focus-visible {
  outline: none; transform: scale(1.06); z-index: 2;
  box-shadow: 0 0 0 2.5px var(--red-hot), 0 0 0 6px rgba(229,9,20,.2), 0 22px 54px rgba(229,9,20,.26), 0 26px 54px rgba(0,0,0,.55);
}
.tvh-lcard:hover .tvh-lcard-img, .tvh-lcard:focus-visible .tvh-lcard-img { transform: scale(1.04); }
.tvh-lcard:hover .tvh-lcard-now, .tvh-lcard:focus-visible .tvh-lcard-now { opacity: 1; transform: none; }
.tvh-track { padding-top: 12px; padding-bottom: 18px; gap: 18px; }
@media (max-width: 799px) {
  .tvh-lcard { flex-basis: 46vw; border-radius: 12px; }
  .tvh-content { width: auto; }
  .tvh-meta { flex-wrap: wrap; white-space: normal; }
  .tvh-next { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .btn, .tvh-tile, .tvh-lcard, .tvh-lcard-img, .tvh-lcard-now { transition: none !important; }
  .tvh-layer.tvh-on img { animation: none !important; }
}

/* IMDb's rating: IMDb's own yellow tag and the number (app.js imdbBadge). */
.imdb { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--ink, #fff); white-space: nowrap;
  font-variant-numeric: tabular-nums; }
.imdb b { display: inline-grid; place-items: center; height: 1.35em; padding: 0 .38em; border-radius: 4px;
  background: #f5c518; color: #000; font-family: Arial, Helvetica, sans-serif; font-size: .78em; font-weight: 900; letter-spacing: -.02em; line-height: 1; }
.imdb.big { font-size: 1.08em; }
.imdb.small { font-size: 12.5px; gap: 5px; font-weight: 700; color: var(--soft); flex: 0 0 auto; }
.ep-top .t { flex: 1 1 auto; min-width: 0; }
.imdb-link { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; border-radius: 6px; }
.imdb-link svg { width: 14px; height: 14px; opacity: .6; }
.imdb-link:hover .imdb, .imdb-link:focus-visible .imdb { text-decoration: underline; text-underline-offset: 3px; }
.imdb-credit { margin: 18px 0 0; font-size: 11.5px; color: var(--muted, #8a8f98); letter-spacing: .1px; }
