/* Streammore — Netflix-flavoured UI.
   Only two ideas matter here: everything is dark and full-bleed, and every
   card is a poster that lifts toward you on hover. */

:root {
  --bg: #141414;
  --bg-2: #181818;
  --bg-3: #232323;
  --text: #ffffff;
  --muted: #b3b3b3;
  --dim: #808080;
  --red: #e50914;
  --red-dark: #b20710;
  --radius: 4px;
  --nav-h: 68px;
  --shadow: 0 12px 32px rgba(0, 0, 0, .6);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Helvetica Neue", Helvetica, Arial, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.no-scroll { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; color: inherit; cursor: pointer; }
img { display: block; }

::-webkit-scrollbar { height: 8px; width: 8px; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

.hidden { display: none !important; }

/* ── Loading ── */
.spinner-wrap {
  display: flex; align-items: center; justify-content: center;
  min-height: 60vh; width: 100%;
}
.spinner {
  width: 44px; height: 44px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .15);
  border-top-color: var(--red);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Top navigation ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  height: var(--nav-h);
  display: flex; align-items: center; gap: 22px;
  padding: 0 4vw;
  background: linear-gradient(180deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,.35) 60%, transparent 100%);
  transition: background-color .3s ease;
}
.nav.solid { background-color: #141414; }
.nav-logo {
  font-size: 26px; font-weight: 800; letter-spacing: 1px;
  color: var(--red); text-transform: uppercase; white-space: nowrap;
}
.nav-links { display: flex; gap: 20px; }
.nav-link {
  font-size: 14px; color: #e5e5e5; opacity: .85;
  background: none; border: 0; padding: 0;
}
.nav-link:hover { opacity: 1; }
.nav-link.active { font-weight: 700; opacity: 1; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }

.search-box { display: flex; align-items: center; gap: 8px; }
.search-box input {
  background: rgba(0,0,0,.75);
  border: 1px solid #444;
  color: #fff;
  padding: 8px 12px;
  width: 0; opacity: 0;
  border-radius: var(--radius);
  transition: width .25s ease, opacity .25s ease;
  font-size: 14px;
}
.search-box.open input { width: 240px; opacity: 1; }
.search-toggle {
  background: none; border: 0; font-size: 18px; line-height: 1;
  color: #fff; padding: 4px;
}

.avatar-btn {
  display: flex; align-items: center; gap: 8px;
  background: none; border: 0; padding: 0;
}
.avatar {
  width: 32px; height: 32px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; color: #fff;
  flex: 0 0 auto;
}
.avatar.lg { width: 84px; height: 84px; font-size: 34px; border-radius: 6px; }
.avatar.xl { width: 128px; height: 128px; font-size: 52px; border-radius: 8px; }

.profile-menu {
  position: absolute; top: var(--nav-h); right: 4vw; z-index: 70;
  background: rgba(0,0,0,.92); border: 1px solid #333;
  border-radius: var(--radius); min-width: 200px; padding: 8px 0;
}
.profile-menu button, .profile-menu a {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left;
  background: none; border: 0; padding: 10px 16px; font-size: 14px;
}
.profile-menu button:hover { background: #222; }
.profile-menu .sep { height: 1px; background: #333; margin: 8px 0; }

/* ── Billboard / hero ── */
.billboard {
  position: relative;
  min-height: 88vh;
  display: flex; align-items: flex-end;
  padding: 0 4vw 8vh;
  margin-bottom: -60px;
}
.billboard-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center 20%;
}
.billboard-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(20,20,20,.92) 0%, rgba(20,20,20,.55) 45%, transparent 75%),
    linear-gradient(0deg, var(--bg) 2%, transparent 45%);
}
.billboard-content { position: relative; z-index: 2; max-width: 640px; }
.billboard-title {
  font-size: clamp(34px, 5.2vw, 74px);
  font-weight: 800; line-height: 1.02; margin: 0 0 14px;
  text-shadow: 0 2px 12px rgba(0,0,0,.6);
}
.billboard-meta {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font-size: 15px; color: #e5e5e5; margin-bottom: 14px;
}
.billboard-overview {
  font-size: clamp(14px, 1.35vw, 18px); line-height: 1.5; color: #e5e5e5;
  margin: 0 0 22px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.match { color: #46d369; font-weight: 700; }
.badge {
  border: 1px solid #777; padding: 1px 6px; font-size: 12px;
  color: #ddd; border-radius: 2px;
}

/* ── Buttons ── */
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  border: 0; border-radius: var(--radius);
  padding: 11px 26px; font-size: 16px; font-weight: 600;
  background: #fff; color: #000;
  transition: background-color .2s ease, transform .1s ease;
}
.btn:hover { background: rgba(255,255,255,.78); }
.btn:active { transform: scale(.985); }
.btn.grey { background: rgba(109,109,110,.7); color: #fff; }
.btn.grey:hover { background: rgba(109,109,110,.5); }
.btn.small { padding: 8px 16px; font-size: 14px; }
.btn.icon { padding: 10px; border-radius: 50%; background: rgba(42,42,42,.75); color: #fff; border: 1px solid rgba(255,255,255,.4); }
.btn.icon:hover { background: rgba(60,60,60,.9); }
.btn[disabled] { opacity: .5; cursor: default; }

/* ── Rows ── */
.rows { position: relative; z-index: 3; padding-bottom: 60px; }
.row { margin: 0 0 2.4vw; }
.row-head {
  display: flex; align-items: baseline; gap: 12px;
  padding: 0 4vw; margin-bottom: 10px;
}
.row-title { font-size: 20px; font-weight: 700; margin: 0; }
.row-more { font-size: 13px; color: var(--muted); background: none; border: 0; padding: 0; }
.row-more:hover { color: #fff; }

.row-strip-wrap { position: relative; }
.row-strip {
  display: flex; gap: 8px;
  overflow-x: auto; overflow-y: hidden;
  scroll-behavior: smooth; scrollbar-width: none;
  /* Room for the hover scale inside the scroll container's clipping box. */
  padding: 18px 4vw 42px;
}
.row-strip::-webkit-scrollbar { display: none; }
.row-arrow {
  position: absolute; top: 10px; bottom: 42px; width: 4vw;
  /* Always above a scaled card, so hover cannot steal the arrow click. */
  z-index: 20;
  background: rgba(20,20,20,.6); border: 0; color: #fff;
  font-size: 26px; opacity: .35; transition: opacity .2s ease;
}
.row-strip-wrap:hover .row-arrow { opacity: 1; }
.row-arrow.left { left: 0; }
.row-arrow.right { right: 0; }
.row-arrow:hover { background: rgba(20,20,20,.85); }

/* ── Cards ── */
.card {
  position: relative; flex: 0 0 auto;
  width: 200px; border-radius: var(--radius);
  background: var(--bg-2); border: 0; padding: 0;
  text-align: left;
  transition: transform .22s ease, box-shadow .22s ease;
  transform-origin: center bottom;
}
.card:hover, .card:focus-visible {
  transform: scale(1.06); z-index: 5; box-shadow: var(--shadow);
  outline: none;
}
.card-poster {
  width: 100%; aspect-ratio: 2 / 3; border-radius: var(--radius);
  background: linear-gradient(135deg, #1f1f27, #2b2b36);
  background-size: cover; background-position: center;
}
.card-body { padding: 10px 12px 14px; }
.card-title {
  font-size: 14px; font-weight: 600; margin: 0 0 6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--muted);
}
.card-actions { display: flex; gap: 8px; margin-top: 10px; }
.card-actions .mini {
  width: 28px; height: 28px; border-radius: 50%; border: 1px solid #666;
  background: rgba(42,42,42,.8); color: #fff; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.card-actions .mini:hover { background: #fff; color: #000; }
.card-progress {
  position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: rgba(255,255,255,.3); border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
}
.card-progress span { display: block; height: 100%; background: var(--red); }
.card-sub {
  margin-top: 4px; font-size: 12px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Grid (browse / search / my list) */
.page { padding: calc(var(--nav-h) + 26px) 4vw 80px; }
.page-title { font-size: 30px; font-weight: 700; margin: 0 0 20px; }
.grid {
  display: grid; gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.grid .card { width: auto; }
.empty-state { color: var(--muted); font-size: 16px; padding: 40px 0; }

/* ── Detail page ── */
.detail-hero { position: relative; padding: 0 4vw 30px; }
.detail-hero-bg {
  position: absolute; inset: 0 0 -120px 0;
  background-size: cover; background-position: center 15%;
}
.detail-hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(20,20,20,.95) 0%, rgba(20,20,20,.6) 50%, rgba(20,20,20,.25) 100%),
    linear-gradient(0deg, var(--bg) 1%, transparent 55%);
}
.detail-hero-inner {
  position: relative; z-index: 2;
  padding-top: calc(var(--nav-h) + 24vh);
  max-width: 720px;
}
.detail-title { font-size: clamp(30px, 4.4vw, 60px); font-weight: 800; margin: 0 0 12px; line-height: 1.05; }
.detail-meta {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  color: #e5e5e5; font-size: 15px; margin-bottom: 18px;
}
.detail-overview { font-size: 16px; line-height: 1.55; color: #e5e5e5; margin: 0 0 24px; max-width: 640px; }
.detail-tagline { color: var(--muted); font-style: italic; margin: 0 0 10px; }

.detail-section {
  /* The hero backdrop extends below the hero to create a fade. Keep the real
     content above that overlap; otherwise the backdrop cuts through the top
     of cast portraits and episode rows. */
  position: relative; z-index: 1;
  padding: 30px 4vw;
}
.detail-section h3 { font-size: 20px; margin: 0 0 16px; }

.cast-strip { display: flex; gap: 20px; overflow-x: auto; padding-bottom: 10px; }
.cast-person { flex: 0 0 auto; width: 120px; }
.cast-person img, .cast-person .ph {
  width: 110px; height: 110px; border-radius: 50%; object-fit: cover;
  background: linear-gradient(135deg, #2a2a33, #3a3a45);
}
.cast-person .name { font-size: 13px; font-weight: 600; margin: 10px 0 2px; }
.cast-person .role { font-size: 12px; color: var(--dim); }

.episode-toolbar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-bottom: 18px;
}
.season-select {
  background: #2a2a2a; color: #fff; border: 1px solid #666;
  padding: 10px 14px; font-size: 15px; border-radius: var(--radius);
  min-width: 220px;
}
.season-select:hover { background: #333; border-color: #999; }
.season-select:focus { outline: none; border-color: var(--red); }

/* The hero's season picker: the one you actually notice. It sits next to Play
   instead of below a 650px backdrop where a black-on-black select vanished. */
.hero-season { display: inline-flex; align-items: center; gap: 10px; }
.hero-season-label {
  color: var(--muted); font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
}
.hero-season .season-select { min-width: 200px; background: #1c1c1c; border-color: #777; }
.hero-season .season-select:hover { border-color: #aaa; background: #262626; }

/* Hero trailer: click-through, and scaled up so YouTube's own chrome is
   cropped out of frame. The backdrop stays underneath as a fallback. */
.billboard-trailer {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: 0; pointer-events: none;
  transform: scale(1.35);
}

/* Player keyboard help, toggled with "?". */
.player-shortcuts {
  position: absolute; z-index: 5; right: 4vw; bottom: 130px;
  background: rgba(0, 0, 0, .9); border: 1px solid #333; border-radius: 6px;
  padding: 18px 22px; min-width: 280px; box-shadow: var(--shadow);
}
.player-shortcuts h4 { margin: 0 0 12px; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.player-shortcuts ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.player-shortcuts li { display: flex; align-items: center; gap: 6px; font-size: 13.5px; }
.player-shortcuts li span { margin-left: auto; color: var(--muted); }
.player-shortcuts kbd {
  background: #2a2a2a; border: 1px solid #444; border-bottom-width: 2px;
  border-radius: 4px; padding: 2px 7px; font-size: 11.5px;
  font-family: inherit; color: #eee;
}
.episode-list { display: flex; flex-direction: column; }
.episode {
  display: flex; gap: 18px; align-items: center;
  padding: 16px 8px; border-top: 1px solid #2a2a2a;
  background: none; border-left: 0; border-right: 0; border-bottom: 0;
  text-align: left; width: 100%; position: relative;
}
.episode:hover { background: #1a1a1a; }
.episode-num { flex: 0 0 34px; font-size: 22px; color: var(--muted); text-align: center; }
.episode-still {
  flex: 0 0 160px; aspect-ratio: 16 / 9; border-radius: var(--radius);
  background: linear-gradient(135deg, #1f1f27, #2b2b36); background-size: cover; background-position: center;
}
.episode-info { flex: 1 1 auto; min-width: 0; }
.episode-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.episode-title { font-size: 15px; font-weight: 600; margin: 0 0 6px; }
.episode-runtime { font-size: 13px; color: var(--muted); }
.episode-overview {
  font-size: 13px; color: var(--muted); line-height: 1.45; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.episode-progress {
  position: absolute; left: 8px; bottom: 4px; width: calc(100% - 16px);
  height: 3px; background: rgba(255,255,255,.2); overflow: hidden; border-radius: 2px;
}
.episode-progress span { display: block; height: 100%; background: var(--red); }

/* ── Profile gate ── */
.gate {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 34px;
  padding: 40px 20px;
}
.gate h1 { font-size: clamp(28px, 4.5vw, 52px); font-weight: 500; margin: 0; }
.gate-profiles { display: flex; gap: 26px; flex-wrap: wrap; justify-content: center; }
.gate-profile {
  background: none; border: 0; padding: 0;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  width: 140px;
}
.gate-profile .avatar { transition: outline-color .15s ease, transform .15s ease; outline: 3px solid transparent; }
.gate-profile:hover .avatar { outline-color: #fff; transform: scale(1.04); }
.gate-profile span { font-size: 15px; color: var(--muted); }
.gate-profile:hover span { color: #fff; }
.gate-add .avatar {
  background: #333 !important; font-size: 46px; font-weight: 300; color: #aaa;
  display: flex; align-items: center; justify-content: center;
}
.gate-manage { background: none; border: 1px solid #777; color: #ccc; padding: 10px 22px; font-size: 15px; letter-spacing: 1px; }
.gate-manage:hover { color: #fff; border-color: #fff; }
.gate-form { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.gate-form input {
  background: #1c1c1c; border: 1px solid #555; color: #fff;
  padding: 10px 14px; font-size: 15px; border-radius: var(--radius); min-width: 220px;
}
.gate-hint { color: var(--dim); font-size: 13px; }

/* ── Player ── */
.player {
  position: fixed; inset: 0; z-index: 100; background: #000;
  display: flex; align-items: center; justify-content: center;
}
.player video { width: 100%; height: 100%; background: #000; }
.player-msg {
  position: absolute; z-index: 5; text-align: center; max-width: 560px;
  color: #ddd; font-size: 16px; line-height: 1.6; padding: 0 20px;
}
.player-msg .err { color: #ff6b6b; }
.player-overlay {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(0deg, rgba(0,0,0,.85) 0%, transparent 30%, transparent 70%, rgba(0,0,0,.75) 100%);
  opacity: 1; transition: opacity .3s ease;
}
.player.hide-ui .player-overlay { opacity: 0; pointer-events: none; }
.player.hide-ui { cursor: none; }
.player-top {
  display: flex; align-items: center; gap: 18px;
  padding: 22px 28px;
}
.player-top .title { font-size: 17px; font-weight: 600; }
.player-top .sub { font-size: 14px; color: var(--muted); }
.player-bottom { padding: 0 28px 26px; }
.scrub {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 5px; margin: 0 0 12px;
  background: rgba(255,255,255,.25); border-radius: 3px; cursor: pointer;
}
.scrub::-webkit-slider-thumb {
  -webkit-appearance: none; width: 15px; height: 15px; border-radius: 50%;
  background: var(--red); border: 0; cursor: pointer;
}
.scrub::-moz-range-thumb { width: 15px; height: 15px; border: 0; border-radius: 50%; background: var(--red); }
.player-bar { display: flex; align-items: center; gap: 20px; }
.player-bar .spacer { margin-left: auto; }
.player-time { font-size: 14px; color: #ddd; font-variant-numeric: tabular-nums; }
.pbtn { background: none; border: 0; font-size: 20px; padding: 6px; line-height: 1; }
.pbtn:hover { color: #fff; opacity: .8; }
.pbtn.big { font-size: 30px; }
.vol { width: 96px; }

.player-panel {
  position: absolute; right: 0; top: 0; bottom: 0; width: 380px; max-width: 90vw;
  background: rgba(18,18,18,.96); border-left: 1px solid #2a2a2a;
  z-index: 6; padding: 76px 20px 20px; overflow-y: auto;
}
.player-panel h4 { margin: 0 0 14px; font-size: 16px; }
.player-panel .item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: none; border: 0; border-bottom: 1px solid #262626;
  padding: 13px 4px; text-align: left;
}
.player-panel .item:hover { background: #242424; }
.player-panel .item.active { background: #2c2c2c; }
.player-panel .item .q { font-size: 14px; font-weight: 600; }
.player-panel .item .u { font-size: 11px; color: var(--dim); word-break: break-all; }
.player-panel .close {
  position: absolute; top: 18px; right: 18px;
  background: none; border: 0; font-size: 22px;
}

.next-up {
  position: absolute; z-index: 7; right: 40px; bottom: 130px;
  background: rgba(20,20,20,.95); border: 1px solid #333;
  padding: 20px 22px; border-radius: 6px; width: 340px;
}
.next-up h5 { margin: 0 0 8px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.next-up .name { font-size: 17px; font-weight: 700; margin: 0 0 14px; }
.next-up .count { color: var(--red); }

/* ── Toast ── */
.toast {
  position: fixed; left: 4vw; bottom: 34px; z-index: 200;
  background: rgba(20,20,20,.96); border: 1px solid #333;
  border-left: 3px solid var(--red);
  padding: 13px 20px; font-size: 14px; border-radius: var(--radius);
  box-shadow: var(--shadow); max-width: 420px;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  :root { --nav-h: 56px; }
  .nav { gap: 14px; }
  .nav-logo { font-size: 20px; }
  .nav-links { gap: 14px; }
  .nav-link { font-size: 13px; }
  .card { width: 145px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .billboard { min-height: 70vh; padding-bottom: 6vh; }
  .episode-still { flex-basis: 110px; }
  .episode-overview { display: none; }
  .player-panel { width: 100%; }
  .next-up { right: 16px; left: 16px; width: auto; }
  .search-box.open input { width: 150px; }
}

/* ── Sign in / sign up ── */
.auth {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 26px;
  padding: 40px 20px;
  background:
    radial-gradient(1100px 560px at 50% -10%, rgba(229, 9, 20, .20), transparent 62%),
    var(--bg);
}
.auth-brand {
  font-size: 30px; font-weight: 800; letter-spacing: 1px;
  color: var(--red); text-transform: uppercase;
}
.auth-card {
  background: rgba(0, 0, 0, .75);
  border: 1px solid #2a2a2a; border-radius: 6px;
  padding: 40px 44px; width: 100%; max-width: 400px;
  display: flex; flex-direction: column; gap: 16px;
}
.auth-card h1 { margin: 0 0 6px; font-size: 26px; font-weight: 700; }
.auth-card label { display: flex; flex-direction: column; gap: 7px; font-size: 13px; color: var(--muted); }
.auth-card input {
  background: #1c1c1c; border: 1px solid #444; color: #fff;
  padding: 13px 15px; font-size: 15px; border-radius: var(--radius);
}
.auth-card input:focus { outline: none; border-color: #8a8a8a; }
.auth-submit { justify-content: center; margin-top: 6px; }
.auth-msg { color: #ffb020; font-size: 14px; margin: 0; }
.auth-switch { color: var(--muted); font-size: 14px; margin: 8px 0 0; text-align: center; }
.auth-switch button {
  background: none; border: 0; color: #fff; font-size: 14px;
  text-decoration: underline; padding: 0 0 0 4px;
}
.auth-note { color: var(--dim); font-size: 12px; text-align: center; max-width: 400px; }

.menu-user { display: flex; flex-direction: column; gap: 3px; padding: 8px 16px; }
.menu-user strong { font-size: 14px; }
.menu-user span { font-size: 12px; color: var(--dim); }

/* ── Browse by genre ── */
.genre-nav { position: relative; }
.genre-nav .caret { font-size: 10px; opacity: .7; }
.genre-menu {
  position: absolute; top: 34px; left: 0; z-index: 70;
  background: rgba(0, 0, 0, .95); border: 1px solid #333; border-radius: 4px;
  padding: 18px 24px; display: flex; gap: 40px;
  box-shadow: var(--shadow);
}
.genre-col h4 {
  margin: 0 0 10px; font-size: 12px; color: var(--dim);
  text-transform: uppercase; letter-spacing: 1px;
}
.genre-col button {
  display: block; width: 100%; text-align: left;
  background: none; border: 0; padding: 5px 0; font-size: 14px; color: #ddd;
}
.genre-col button:hover { color: #fff; text-decoration: underline; }

.kids-chip {
  font-size: 10px; font-weight: 700; letter-spacing: 1px;
  background: #1f7aec; color: #fff; padding: 3px 7px; border-radius: 3px;
}

.load-more-wrap { display: flex; align-items: center; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.load-more-note { color: var(--dim); font-size: 13px; }

/* ── Account & devices ── */
.account-line { color: var(--muted); margin: 0 0 24px; }
.device-list { display: flex; flex-direction: column; gap: 10px; max-width: 900px; }
.device {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  background: var(--bg-2); border: 1px solid #262626; border-radius: 4px; padding: 16px 18px;
}
.device.current { border-color: #454545; }
.device-name { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.device-now {
  font-size: 11px; font-weight: 600; color: #46d369;
  border: 1px solid #46d369; padding: 1px 6px; border-radius: 3px;
}
.device-meta { font-size: 12.5px; color: var(--dim); margin-top: 6px; }

/* ── Profile management ── */
.gate-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.gate-form input[type="checkbox"] { min-width: 0; width: auto; padding: 0; margin: 0; }

.profile-cards {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
.profile-card {
  background: var(--bg-2); border: 1px solid #262626; border-radius: 6px;
  padding: 20px; display: flex; flex-direction: column; gap: 14px;
}
.profile-card-head { display: flex; align-items: center; gap: 16px; }
.profile-card-fields { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; min-width: 0; }
.profile-name {
  background: #1c1c1c; border: 1px solid #444; color: #fff;
  padding: 8px 10px; font-size: 15px; border-radius: 4px;
}
.profile-langs { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--muted); }
.profile-langs input {
  background: #1c1c1c; border: 1px solid #444; color: #fff;
  padding: 8px 10px; font-size: 14px; border-radius: 4px; width: 100%;
}

/* ── Top 10 ranked row ── */
.row-strip.ranked { gap: 2px; align-items: flex-end; }
.rank-card {
  width: 230px; background: none; display: flex; align-items: flex-end;
  margin-right: 6px;
}
.rank-card:hover { background: none; }
.rank-num {
  font-size: 118px; font-weight: 900; line-height: .78;
  color: #141414; -webkit-text-stroke: 4px #6d6d6d;
  font-family: "Arial Black", Impact, sans-serif;
  margin-right: -18px; letter-spacing: -6px; z-index: 1;
  transition: -webkit-text-stroke-color .2s ease;
}
.rank-card:hover .rank-num { -webkit-text-stroke-color: #e5e5e5; }
.rank-card .card-poster { width: 150px; border-radius: 4px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ── Emoji avatars ── */
.avatar.emoji { font-size: 19px; line-height: 1; }
.avatar.lg.emoji { font-size: 44px; }
.avatar.xl.emoji { font-size: 66px; }

.avatar-picker { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.avatar-option {
  width: 40px; height: 40px; border-radius: 6px; font-size: 20px; line-height: 1;
  background: #1f1f27; border: 2px solid transparent; color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.avatar-option:hover { background: #2b2b36; }
.avatar-option.selected { border-color: var(--red); background: #2b2b36; }
.profile-avatar-row { display: flex; flex-direction: column; gap: 8px; }
.profile-avatar-row .avatar-picker { justify-content: flex-start; }
.profile-langs-label { font-size: 12.5px; color: var(--muted); }
.profile-avatar-row .avatar-option { width: 34px; height: 34px; font-size: 17px; }

/* ── Person / cast page ── */
.person-head { display: flex; gap: 28px; align-items: flex-start; margin-bottom: 34px; }
.person-photo {
  width: 180px; height: 270px; object-fit: cover; border-radius: 6px;
  background: linear-gradient(135deg, #2a2a33, #3a3a45); flex: 0 0 auto;
}
.person-meta { color: var(--dim); font-size: 14px; margin: 0 0 14px; }
.person-bio { color: #d5d5d5; font-size: 14.5px; line-height: 1.6; margin: 0; max-width: 800px; }
.section-title { font-size: 18px; margin: 30px 0 14px; }

button.cast-person {
  background: none; border: 0; padding: 0; text-align: left; width: 120px;
}
button.cast-person:hover .name { text-decoration: underline; }
button.cast-person[disabled] { cursor: default; }

/* ── Trailer overlay ── */
.trailer-overlay {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(0, 0, 0, .82);
  display: flex; align-items: center; justify-content: center;
  padding: 4vh 4vw;
}
.trailer-frame {
  width: min(1200px, 92vw); aspect-ratio: 16 / 9;
  background: #000; border-radius: 6px; overflow: hidden;
  box-shadow: var(--shadow);
}
.trailer-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.trailer-close {
  position: absolute; top: 3vh; right: 4vw;
  background: rgba(20, 20, 20, .8); border: 1px solid #444; color: #fff;
  width: 40px; height: 40px; border-radius: 50%; font-size: 18px;
}
.trailer-close:hover { background: #333; }

/* ── Live TV ──
   Channels carry no artwork upstream, so the "poster" is a letter plus a genre
   emoji on a colour derived from the channel name. */

.live-count { color: var(--muted); font-size: 15px; font-weight: 400; margin-left: 10px; }

.live-dot {
  display: inline-block; background: var(--red); color: #fff;
  font-size: 10px; font-weight: 700; letter-spacing: .08em;
  padding: 2px 6px; border-radius: 3px; margin-right: 6px;
  vertical-align: middle;
}

.live-filters { display: flex; flex-direction: column; gap: 14px; margin: 26px 0 22px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: #1f1f1f; border: 1px solid #333; color: var(--muted);
  padding: 7px 14px; border-radius: 999px; font-size: 13.5px;
  transition: background .15s, color .15s, border-color .15s;
}
.chip span { color: var(--dim); font-size: 12px; margin-left: 5px; }
.chip:hover { background: #2a2a2a; color: #fff; }
.chip.active { background: #fff; border-color: #fff; color: #000; font-weight: 600; }
.chip.active span { color: #555; }

.live-filters-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.live-search {
  background: #1c1c1c; border: 1px solid #444; color: #fff;
  padding: 10px 14px; border-radius: var(--radius); font-size: 14px;
  min-width: 240px; flex: 1 1 240px; max-width: 420px;
}
.live-search:focus { outline: none; border-color: #666; }

.channel-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.channel-card { display: flex; flex-direction: column; }

/* Genre chips sit under the page title on Movies / TV Shows and in a genre. */
.genre-chips { margin: 4px 0 22px; }

/* "60 of 19,432" next to a page title, and the infinite-scroll sentinel. */
.title-count { color: var(--muted); font-size: 14px; font-weight: 400; margin-left: 10px; }
.scroll-sentinel {
  display: flex; align-items: center; justify-content: center;
  min-height: 72px; margin-top: 24px;
  color: var(--dim); font-size: 13px;
}
.scroll-sentinel.done { color: #555; }
.channel-logo {
  position: relative; aspect-ratio: 16 / 10;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius) var(--radius) 0 0;
}
.channel-emoji { font-size: 34px; opacity: .9; }
.channel-initial {
  position: absolute; right: 10px; bottom: 6px;
  font-size: 30px; font-weight: 800; color: rgba(255, 255, 255, .18);
}
.channel-card .card-body { padding: 10px 12px 14px; }

/* ── What's on ── */

.whats-on { margin-bottom: 8px; }
.whats-on-tz { color: var(--dim); font-size: 12.5px; }
.whats-on-empty {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--bg-2); border-left: 3px solid #333;
  padding: 14px 18px; border-radius: var(--radius);
  margin: 22px 0 4px; font-size: 13.5px; color: var(--muted);
}
.whats-on-empty strong { color: #fff; font-size: 15px; }

.event-card {
  flex: 0 0 260px; background: var(--bg-2); border: 1px solid #262626;
  border-radius: var(--radius); padding: 14px; min-height: 132px;
  display: flex; flex-direction: column; gap: 8px;
}
.event-card.live { border-color: var(--red); }
.event-time { font-size: 13px; font-weight: 700; color: var(--muted); }
.event-title {
  font-size: 14px; line-height: 1.35; font-weight: 600;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.event-channels { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.event-channel {
  background: #2a2a2a; border: 1px solid #3a3a3a; color: #ddd;
  border-radius: 999px; padding: 4px 10px; font-size: 11.5px;
}
.event-channel:hover { background: var(--red); border-color: var(--red); color: #fff; }
.event-nochannel { color: var(--dim); font-size: 11.5px; font-style: italic; }

/* Quality / subtitle pickers reuse the sources panel's item rows. */
.player-bar #pTime .live-dot { margin-right: 0; }

/* ── Downloads ── */

.downloads-space {
  color: var(--muted); font-size: 13.5px; margin: 6px 0 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.downloads-space strong { color: #fff; }
.dot-sep { color: #444; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12px; color: var(--dim); }
.downloads-warning {
  margin-top: 14px; padding: 12px 16px; border-radius: var(--radius);
  background: rgba(229, 9, 20, .09); border-left: 3px solid var(--red);
  color: #ffb3b7; font-size: 13.5px;
}

.download-list { display: flex; flex-direction: column; gap: 2px; }
.download-row {
  display: flex; align-items: center; gap: 18px;
  padding: 14px 16px; background: var(--bg-2); border-radius: var(--radius);
  border: 1px solid transparent;
}
.download-row:hover { background: var(--bg-3); }
.download-main { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 0; }
.download-title { font-size: 14.5px; font-weight: 600; }
.download-meta {
  font-size: 12.5px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.download-status { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.download-actions { display: flex; gap: 8px; flex: 0 0 auto; }

.mini-btn {
  background: #333; border: 1px solid #444; color: #eee;
  border-radius: var(--radius); padding: 7px 13px; font-size: 12.5px;
  text-decoration: none; display: inline-block;
}
.mini-btn:hover { background: #3f3f3f; color: #fff; }
.mini-btn.danger { background: transparent; border-color: #5a2226; color: #ff8b90; }
.mini-btn.danger:hover { background: var(--red); border-color: var(--red); color: #fff; }

.progress {
  height: 4px; background: #333; border-radius: 999px; overflow: hidden;
  margin-top: 3px; max-width: 420px;
}
.progress-fill { height: 100%; background: var(--red); transition: width .4s ease; }

/* The download chip on an episode row; the row itself is a link. */
.dl-chip { opacity: .55; }
.dl-chip:hover { opacity: 1; color: #fff; }

/* ── System page ── */

.sys-list { display: flex; flex-direction: column; gap: 2px; }
.sys-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; background: var(--bg-2); border-radius: var(--radius);
  font-size: 13.5px;
}
.sys-row:hover { background: var(--bg-3); }
.sys-name { flex: 0 0 auto; font-weight: 600; min-width: 210px; }
.sys-meta {
  color: var(--muted); font-size: 12.5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sys-warn { color: #ffb3b7; }

.pill {
  flex: 0 0 auto; font-size: 10.5px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; padding: 3px 8px; border-radius: 999px;
  background: #333; color: #ddd;
}
.pill.good { background: rgba(18, 184, 134, .18); color: #4ade9f; }
.pill.warn { background: rgba(245, 166, 35, .18); color: #f5c26b; }
.pill.bad { background: rgba(229, 9, 20, .18); color: #ff8b90; }
.pill.muted { background: #2a2a2a; color: var(--dim); }
h3.section-title .pill { margin-left: 8px; vertical-align: middle; }

/* ── Account forms + PIN ── */

.account-form {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  background: var(--bg-2); border-radius: var(--radius); padding: 16px;
}
.account-form input, .account-form select {
  background: #1c1c1c; border: 1px solid #444; color: #fff;
  padding: 10px 13px; border-radius: var(--radius); font-size: 14px; min-width: 190px;
}
.account-form input:focus { outline: none; border-color: #666; }
.form-note { flex: 1 1 100%; color: var(--dim); font-size: 12px; margin: 2px 0 0; }

.lock-badge { font-size: 13px; opacity: .85; }

/* The toast can carry one action, e.g. Undo. */
.toast-action {
  margin-left: 14px; background: transparent; border: 1px solid #6b6b6b;
  color: #fff; border-radius: var(--radius); padding: 4px 12px;
  font-size: 12.5px; font-weight: 600;
}
.toast-action:hover { background: #fff; border-color: #fff; color: #000; }

.pin-card {
  background: var(--bg-2); border: 1px solid #333; border-radius: 8px;
  padding: 30px 34px; width: min(360px, 90vw); text-align: center;
  display: flex; flex-direction: column; gap: 12px; align-items: center;
  box-shadow: var(--shadow);
}
.pin-card h3 { margin: 0; font-size: 19px; }
.pin-hint { margin: 0; color: var(--muted); font-size: 13px; }
.pin-avatar .avatar { margin: 0 auto; }
.pin-input {
  background: #1c1c1c; border: 1px solid #444; color: #fff;
  font-size: 26px; letter-spacing: .4em; text-align: center;
  padding: 10px 14px; border-radius: var(--radius); width: 170px;
}
.pin-input:focus { outline: none; border-color: var(--red); }
.pin-error { color: #ff8b90; font-size: 13px; margin: 0; }
.pw-input { letter-spacing: normal; width: 260px; font-size: 16px; }

/* ── Ribbons on cards ──
   The Netflix tell: you can see what is new from across the room. */
.card-ribbon {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  background: var(--red); color: #fff;
  font-size: 10px; font-weight: 700; letter-spacing: .06em;
  padding: 3px 6px; border-radius: 3px; text-transform: uppercase;
}

/* ── Card chips ── */
.mini.on { background: #fff; color: #000; }
.card:focus-visible {
  outline: 3px solid #fff; outline-offset: 3px; border-radius: var(--radius);
}
.card:focus-visible .card-body { opacity: 1; }

/* ── Nav: Play Something and the bell ── */
.nav-action {
  display: inline-flex; align-items: center; gap: 7px;
  background: none; border: 1px solid #555; color: #fff;
  padding: 7px 12px; border-radius: var(--radius);
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.nav-action:hover { background: #2a2a2a; border-color: #888; }
@media (max-width: 1100px) { .nav-action span { display: none; } }

.bell {
  position: relative; background: none; border: none; color: #fff;
  font-size: 18px; cursor: pointer; padding: 6px 8px; line-height: 1;
}
.bell-count {
  position: absolute; top: 0; right: 0;
  background: var(--red); color: #fff; font-size: 10px; font-weight: 700;
  min-width: 16px; height: 16px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.bell-menu {
  position: absolute; top: 62px; right: 18px; z-index: 40;
  width: 360px; max-height: 70vh; overflow-y: auto;
  background: #141414; border: 1px solid #333; border-radius: var(--radius);
  box-shadow: 0 18px 40px rgba(0,0,0,.6);
}
.bell-head { padding: 14px 16px; font-weight: 700; border-bottom: 1px solid #2a2a2a; }
.bell-item {
  display: flex; gap: 12px; align-items: center; width: 100%; text-align: left;
  background: none; border: none; border-bottom: 1px solid #232323;
  color: #fff; padding: 12px 16px; cursor: pointer;
}
.bell-item:hover { background: #1f1f1f; }
.bell-poster {
  width: 40px; height: 60px; flex: 0 0 auto; border-radius: 3px;
  background-size: cover; background-position: center;
}
.bell-text { display: flex; flex-direction: column; gap: 3px; }
.bell-text span { color: var(--dim); font-size: 13px; }

/* ── Skip intro / recap ── */
.skip-bar { position: absolute; right: 28px; bottom: 118px; z-index: 6; }
.skip-btn {
  background: rgba(255,255,255,.92); color: #000; border: none;
  padding: 11px 20px; border-radius: var(--radius);
  font-size: 15px; font-weight: 700; cursor: pointer;
}
.skip-btn:hover { background: #fff; }

/* ── Intro / recap marker panel ── */
.marker-panel {
  position: absolute; right: 28px; bottom: 174px; z-index: 7;
  background: rgba(18,18,18,.97); border: 1px solid #333; border-radius: var(--radius);
  padding: 16px 18px; width: 320px;
}
.marker-panel h5 { margin: 0 0 6px; font-size: 15px; }
.marker-panel .muted { margin: 0 0 12px; font-size: 12px; }
.marker-panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.marker-panel li { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.marker-panel li span { color: var(--dim); font-size: 13px; font-variant-numeric: tabular-nums; }

/* ── Thumbs up / down / not interested ── */
.rate-group { display: inline-flex; gap: 2px; }
.rate-btn {
  background: #1c1c1c; border: 1px solid #444; color: #fff;
  padding: 10px 14px; cursor: pointer; font-size: 16px; line-height: 1;
}
.rate-btn:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.rate-btn:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.rate-btn:hover { background: #2e2e2e; }
.rate-btn.on { background: #fff; color: #000; border-color: #fff; }

/* ── Profile preferences ── */
.prefs-block { display: grid; gap: 10px; margin: 14px 0; }
.pref-row { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.prefs-block select {
  background: #2a2a2a; color: #fff; border: 1px solid #666;
  padding: 8px 10px; border-radius: var(--radius); font-size: 14px;
}

/* ── Viewing activity ── */
.activity-list { display: grid; gap: 10px; margin-top: 18px; }
.activity-item {
  display: flex; align-items: center; gap: 14px;
  background: #141414; border: 1px solid #262626; border-radius: var(--radius);
  padding: 10px 14px;
}
.activity-poster {
  width: 44px; height: 66px; flex: 0 0 auto; border-radius: 3px;
  background-size: cover; background-position: center; background-color: #222;
}
.activity-text { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.activity-title {
  background: none; border: none; color: #fff; cursor: pointer;
  font-size: 15px; font-weight: 600; text-align: left; padding: 0;
}
.activity-title:hover { text-decoration: underline; }
.activity-text .muted { font-size: 12px; }

/* ── Subtitle appearance (a profile preference) ──
   ::cue is the only way to style native captions. */
video::cue {
  font-size: var(--cue-size, 20px);
  background: var(--cue-bg, rgba(0,0,0,.9));
  color: var(--cue-color, #fff);
}




