:root {
  --green: #22C55E; --green-dark: #16A34A;
  --bg: #0B0F0D; --surface: #121A16; --surface-hi: #1A241F;
  --text: #E7F5EC; --muted: #A8BDB0; --danger: #F87171;

  --rail-w: 72px;                          /* rail colapsado */
  --rail-w-open: 232px;                    /* rail expandido */
  --tab-h: 56px;                           /* bottom-bar mobile */
  --pad-x: clamp(20px, 4vw, 56px);         /* padding horizontal de páginas/fileiras */
  --hit: 44px;                             /* alvo mínimo de toque */
  --line: #22302a;
  --line-hi: #2c3c34;
  --text-dim: #cfe0d6;
  --ease-out: cubic-bezier(.16, 1, .3, 1); /* entradas, expansões, rises */
  --ease-swift: cubic-bezier(.4, 0, .2, 1);/* fades, saídas, hide/show de UI */
  --shadow-card: 0 4px 14px rgba(0,0,0,.4);
  --shadow-pop: 0 16px 48px rgba(0,0,0,.6);
  --z-rail: 60; --z-sheet: 80;
  --z-player: 200; --z-var: 220; --z-toast: 300; --z-splash: 400;
}

/* ---------- splash (primeiro frame já estilizado) ---------- */
#splash { position: fixed; inset: 0; z-index: var(--z-splash);
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 30%, #14251c 0%, var(--bg) 65%);
  transition: opacity .45s var(--ease-swift), visibility .45s; }
#splash.out { opacity: 0; visibility: hidden; pointer-events: none; }
#splash.out .sp-mark { transform: scale(1.08); transition: transform .45s var(--ease-swift); }
.sp-center { text-align: center; }
.sp-mark { position: relative; width: 148px; height: 148px; margin: 0 auto 12px; display: grid; place-items: center; }
.sp-logo { width: 112px; height: auto; animation: sp-pop .6s var(--ease-out) both; }
.sp-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--green);
  opacity: 0; animation: sp-pulse 2s var(--ease-out) .4s infinite; }
.sp-ring2 { animation-delay: 1.4s; }
@keyframes sp-pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes sp-pulse { 0% { transform: scale(.68); opacity: .7; } 70%, 100% { transform: scale(1.28); opacity: 0; } }
.sp-word { font-size: 15px; font-weight: 800; letter-spacing: .34em; color: var(--text); margin-bottom: 34px;
  animation: sp-pop .6s var(--ease-out) .15s both; }
.sp-word b { color: var(--green); }
.sp-track { width: min(220px, 60vw); height: 3px; border-radius: 2px; margin: 0 auto 14px;
  background: rgba(255,255,255,.10); overflow: hidden; }
.sp-fill { height: 100%; width: 6%; border-radius: 2px; background: var(--green);
  box-shadow: 0 0 12px rgba(34,197,94,.6); transition: width .5s var(--ease-out); }
.sp-step { font-size: 13px; color: var(--muted); min-height: 18px; }
.sp-step.swap { animation: sp-swap .3s var(--ease-out); }
@keyframes sp-swap { from { opacity: 0; transform: translateY(6px); } }

/* ---------- base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
}
img { display: block; }
button { font-family: inherit; cursor: pointer; border: none; }
::-webkit-scrollbar { height: 8px; width: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-hi); border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }
.ic { display: inline-block; vertical-align: middle; flex-shrink: 0; }

/* ---------- utilitários ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fadein { from { opacity: 0; } }
main.route-in { animation: route-in .3s var(--ease-out) both; }
@keyframes route-in { from { opacity: 0; transform: translateY(10px); } }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.clamp-3 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; -webkit-line-clamp: 3; }

.meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 0;
  font-size: 13.5px; color: var(--text-dim); font-weight: 600; }
.meta-line > span:not(:last-child)::after { content: '•'; margin: 0 10px; color: var(--muted); opacity: .7; }
.meta-line b.rating { color: var(--green); font-weight: 800; margin-right: 10px; }

.badge-pill { display: inline-flex; align-items: center; font-size: 10px; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim);
  border: 1px solid rgba(255,255,255,.35); border-radius: 4px; padding: 2px 7px; line-height: 1.4; }

.icb { display: inline-flex; align-items: center; justify-content: center;
  min-width: var(--hit); min-height: var(--hit); border-radius: 50%;
  background: none; color: #fff; transition: background .18s; }
.icb:hover { background: rgba(255,255,255,.12); }

/* fade-in de imagens (mata o pop branco); só <img> — o placeholder <div class="poster"> fica visível */
.card img.poster, .card-land img, .t10-art img, .ep-thumb img { opacity: 0; transition: opacity .3s var(--ease-swift); }
img.ld { opacity: 1 !important; }

/* ---------- login ---------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 20%, #14251c 0%, var(--bg) 60%);
}
.login-card { width: 380px; max-width: 92vw; text-align: center; }
.login-card img { width: 150px; margin: 0 auto 6px; }
.login-card .max { color: var(--green); font-weight: 900; letter-spacing: .3em; margin-bottom: 30px; }
.login-card input {
  width: 100%; background: var(--surface-hi); color: var(--text);
  border: 1px solid var(--line-hi); border-radius: 12px; padding: 14px 16px;
  font-size: 15px; margin-bottom: 12px;
}
.login-card input:focus { outline: 2px solid var(--green-dark); }
.btn-primary {
  width: 100%; background: var(--green); color: #04170B; font-weight: 800;
  font-size: 15px; padding: 14px; border-radius: 12px; letter-spacing: .05em;
}
.btn-primary:hover { background: var(--green-dark); }
.btn-primary:disabled { opacity: .6; cursor: wait; }
.login-status { margin-top: 14px; font-size: 13px; color: var(--muted); min-height: 18px; }
.login-status.error { color: var(--danger); }

/* ---------- rail lateral ---------- */
.rail { position: fixed; inset: 0 auto 0 0; width: var(--rail-w); z-index: var(--z-rail);
  display: flex; flex-direction: column; gap: 4px; padding: 14px 12px;
  background: linear-gradient(90deg, rgba(11,15,13,.98), rgba(11,15,13,.92));
  border-right: 1px solid var(--line); overflow: hidden;
  transition: width .28s var(--ease-out), background-color .25s; }
.rail:hover, .rail:focus-within { width: var(--rail-w-open); background: #0D1310;
  box-shadow: 24px 0 48px -12px rgba(0,0,0,.6); }

.rail-brand { display: flex; align-items: center; gap: 10px; height: 44px; margin-bottom: 16px;
  padding-left: 6px; text-decoration: none; color: var(--text); font-weight: 800; font-size: 16px; white-space: nowrap; }
.rail-brand img { width: 36px; height: 36px; flex-shrink: 0; }
.rail-brand b { color: var(--green); }

.rail-item { position: relative; display: grid; grid-template-columns: 48px 1fr auto;
  align-items: center; min-height: var(--hit); width: 100%;
  background: none; color: var(--muted); border-radius: 10px;
  font-size: 14px; font-weight: 600; text-decoration: none; text-align: left; white-space: nowrap;
  transition: background .15s, color .15s; }
.rail-item .ic { justify-self: center; }
.rail-item:hover { color: var(--text); background: var(--surface-hi); }
.rail-item.active { color: var(--text); }
.rail-item.active .ic { color: var(--green); }
.rail-item.active::before { content: ''; position: absolute; left: -12px; width: 3px; height: 22px;
  border-radius: 0 3px 3px 0; background: var(--green); }

.rail-label { opacity: 0; transform: translateX(-6px);
  transition: opacity .18s var(--ease-swift), transform .22s var(--ease-out); }
.rail:hover .rail-label, .rail:focus-within .rail-label { opacity: 1; transform: none; transition-delay: 60ms; }
.rail-brand .rail-label { display: inline; }
.rail-spacer { flex: 1; }

main { padding-left: var(--rail-w); min-height: 100vh; }

/* ---------- busca ---------- */
.search-hero { padding: 26px 0 10px; }
.search-big { width: 100%; max-width: 640px; background: var(--surface-hi); color: var(--text);
  border: 1px solid var(--line-hi); border-radius: 14px; padding: 14px 20px; font-size: 18px; }
.search-big:focus { outline: 2px solid var(--green-dark); }

/* ---------- hero (carrossel de banners) ---------- */
.hero-carousel {
  position: relative; height: clamp(480px, 72vh, 720px);
}
.hero-slide {
  position: absolute; inset: 0; background-size: cover; background-position: center 18%;
  opacity: 0; transition: opacity .8s var(--ease-swift); pointer-events: none;
}
.hero-slide.active { opacity: 1; pointer-events: auto; }
.hero-slide::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(11,15,13,.96) 0%, rgba(11,15,13,.55) 40%, rgba(11,15,13,0) 75%),
    linear-gradient(0deg, var(--bg) 0%, transparent 40%);
}
.hero-content {
  position: absolute; z-index: 2; left: var(--pad-x); bottom: 88px; max-width: 560px;
}
.hero-content .kicker { color: var(--green); font-weight: 800; font-size: 12px; letter-spacing: .18em; margin-bottom: 10px; }
.hero-content h1 { font-size: clamp(30px, 4.6vw, 52px); line-height: 1.05; margin-bottom: 12px; text-shadow: 0 2px 22px rgba(0,0,0,.7); font-weight: 800; }
.hero-meta { margin-bottom: 12px; }
.hero-meta .badge-pill { margin-right: 6px; }
.hero-content p { color: var(--text-dim); font-size: 15px; line-height: 1.55; margin-bottom: 20px; max-width: 480px; }
.hero-actions { display: flex; gap: 10px; }
.hero-slide.active .hero-content > * { animation: rise .5s var(--ease-out) both; }
.hero-slide.active .hero-content > :nth-child(2) { animation-delay: 60ms; }
.hero-slide.active .hero-content > :nth-child(3) { animation-delay: 120ms; }
.hero-slide.active .hero-content > :nth-child(4) { animation-delay: 180ms; }
.hero-slide.active .hero-content > :nth-child(5) { animation-delay: 240ms; }
.hero-dots { position: absolute; z-index: 3; bottom: 26px; right: var(--pad-x); display: flex; gap: 0; }
.hero-dot {
  width: 9px; height: 9px; box-sizing: content-box; padding: 18px; border-radius: 50%;
  background: rgba(255,255,255,.35); background-clip: content-box; transition: background .2s;
}
.hero-dot:hover { background: rgba(255,255,255,.6); background-clip: content-box; }
.hero-dot.active { background: var(--green); width: 22px; border-radius: 5px; background-clip: content-box; }

.btn-play {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--green); color: #04170B; font-weight: 800; font-size: 15px;
  padding: 12px 26px; border-radius: 10px; transition: background .15s;
}
.btn-play:hover { background: var(--green-dark); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.14); color: var(--text); font-weight: 600;
  padding: 12px 20px; border-radius: 10px; backdrop-filter: blur(4px); transition: background .15s;
}
.btn-ghost:hover { background: rgba(255,255,255,.24); }

/* ---------- fileiras ---------- */
.row-section { margin: 26px 0 6px; position: relative; content-visibility: auto; contain-intrinsic-size: auto 340px; }
.row-section h2 { font-size: 20px; font-weight: 800; margin: 0; padding: 0 var(--pad-x) 12px; }
.row {
  display: flex; gap: 12px; overflow-x: auto;
  padding: 14px var(--pad-x) 22px;
  scroll-behavior: smooth;
}
.row, .cast-row { scrollbar-width: none; -ms-overflow-style: none; }
.row::-webkit-scrollbar, .cast-row::-webkit-scrollbar { display: none; }
.card {
  flex: 0 0 154px; cursor: pointer; transition: transform .18s var(--ease-out);
  position: relative;
}
.card:hover { transform: scale(1.06); transform-origin: center bottom; z-index: 2; }
.card .poster {
  width: 154px; height: 231px; border-radius: 10px; object-fit: cover;
  background: var(--surface-hi); box-shadow: var(--shadow-card);
}
.card .badge {
  position: absolute; top: 8px; right: 8px; background: var(--green);
  color: #04170B; font-size: 10px; font-weight: 800; padding: 3px 7px; border-radius: 6px;
}
.card .title {
  margin-top: 8px; font-size: 13px; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card.lg { flex: 0 0 200px; }
.card.lg .poster { width: 200px; height: 300px; border-radius: 12px; }
.card.lg .title { font-size: 14px; }

/* setas de navegação das fileiras */
.row-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 44px; height: 76px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(90deg, rgba(11,15,13,.85), rgba(11,15,13,.4)); color: #fff;
  opacity: 0; transition: opacity .2s;
}
.row-arrow.right { right: 0; background: linear-gradient(270deg, rgba(11,15,13,.85), rgba(11,15,13,.4)); }
.row-arrow.left { left: 0; }
.row-arrow.left .ic { transform: rotate(90deg); }
.row-arrow.right .ic { transform: rotate(-90deg); }
.row-arrow.hidden { display: none; }
.row-section:hover .row-arrow { opacity: 1; }
.row-arrow:hover { background: rgba(11,15,13,.95); }
@media (hover: none) { .row-arrow { display: none !important; } }

/* Top 10 numerado */
.top10-card { flex: 0 0 auto; display: flex; align-items: flex-end; cursor: pointer; }
.t10-num { font-size: 140px; font-weight: 900; line-height: .78; letter-spacing: -.06em;
  color: var(--bg); -webkit-text-stroke: 3px #37453D; paint-order: stroke;
  width: 86px; text-align: right; margin-right: -16px; z-index: 0; user-select: none;
  font-variant-numeric: tabular-nums; transition: -webkit-text-stroke-color .18s; }
.top10-card:hover .t10-num { -webkit-text-stroke-color: var(--green); }
.t10-art { position: relative; z-index: 1; width: 260px; aspect-ratio: 16/9; border-radius: 10px;
  overflow: hidden; box-shadow: var(--shadow-card); background: var(--surface-hi);
  transition: transform .18s var(--ease-out); }
.t10-art img { width: 100%; height: 100%; object-fit: cover; }
.top10-card:hover .t10-art, .top10-card:focus-visible .t10-art { transform: scale(1.05); }
.row.top10 { padding-left: calc(var(--pad-x) + 8px); }

/* cartão paisagem (continuar assistindo + vale a pena conferir) */
.card-land { position: relative; flex: 0 0 300px; aspect-ratio: 16/9; border-radius: 10px;
  overflow: hidden; cursor: pointer; background: var(--surface-hi); box-shadow: var(--shadow-card);
  transition: transform .18s var(--ease-out), box-shadow .18s var(--ease-out); }
.card-land img { width: 100%; height: 100%; object-fit: cover; }
.card-land .cl-grad, .t10-art .cl-grad { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.85), transparent 55%); }
.card-land .cl-name, .t10-art .cl-name { position: absolute; z-index: 1; left: 12px; right: 12px; bottom: 10px;
  color: #fff; font-size: 14px; font-weight: 700; text-shadow: 0 1px 8px rgba(0,0,0,.8);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-land .cl-name .cl-sub { display: block; font-size: 12px; color: var(--text-dim); font-weight: 600; }
.card-land:hover, .card-land:focus-visible { transform: scale(1.05); z-index: 2;
  box-shadow: 0 10px 30px rgba(0,0,0,.55), 0 0 0 2px rgba(34,197,94,.35); }
.card-land .progress { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(0,0,0,.55); }
.card-land .progress > div { height: 100%; background: var(--green); }
.play-fx { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center;
  opacity: 0; background: rgba(0,0,0,.35); transition: opacity .18s; }
.card-land:hover .play-fx, .card-land:focus-visible .play-fx { opacity: 1; }
.pf-circle { width: 48px; height: 48px; border-radius: 50%; background: var(--green); color: #04170B;
  display: grid; place-items: center; transform: scale(.8); transition: transform .18s var(--ease-out); }
.card-land:hover .pf-circle { transform: scale(1); }

/* ---------- grids / páginas ---------- */
.page { padding: 18px var(--pad-x) 60px; }
.page h1 { font-size: 24px; margin: 14px 0; }
/* título em cima, seletor de categoria logo abaixo, alinhados à esquerda */
.page-head { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin: 8px 0 22px; }
.page-head h1 { margin: 0; }
/* dropdown de categoria (páginas de grade) */
.catbar { position: relative; }
.cat-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface-hi); color: var(--text); border: 1px solid var(--line-hi);
  padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 600; min-width: 220px;
}
.cat-toggle:hover { border-color: var(--green-dark); }
.cat-toggle .cat-label { color: var(--muted); font-weight: 500; }
.cat-toggle #cat-current { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-toggle .ic { transition: transform .2s; }
.cat-toggle.open .ic { transform: rotate(180deg); }
.cat-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; width: 300px; max-width: 84vw;
  background: var(--surface); border: 1px solid var(--line-hi); border-radius: 14px; overflow: hidden;
  box-shadow: var(--shadow-pop);
}
.cat-search-box {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--muted);
}
.cat-search { flex: 1; background: none; border: none; color: var(--text); font-size: 13px; outline: none; }
.cat-list { max-height: 320px; overflow-y: auto; padding: 6px; }
.cat-item {
  display: block; width: 100%; text-align: left; background: none; color: var(--text);
  padding: 10px 12px; border-radius: 8px; font-size: 14px;
}
.cat-item:hover { background: var(--surface-hi); }
.cat-item.active { background: var(--green); color: #04170B; font-weight: 700; }
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(154px, 1fr)); gap: 18px 12px;
}
.grid .card { flex: unset; }
.grid .card .poster { width: 100%; height: auto; aspect-ratio: 2/3; }

/* canais */
.channel-row {
  display: flex; align-items: center; gap: 14px; padding: 10px 12px;
  border-radius: 12px; cursor: pointer;
}
.channel-row:hover { background: var(--surface); }
.channel-row img { width: 46px; height: 46px; border-radius: 9px; object-fit: contain; background: var(--surface-hi); }
.channel-row .num { color: var(--muted); font-size: 12px; }
.channel-row .play { margin-left: auto; color: var(--green); display: inline-flex; align-items: center; }

/* jogos */
.game-card {
  background: var(--surface); border-radius: 14px; padding: 14px 16px; cursor: pointer;
  border: 1px solid var(--line); transition: border-color .15s;
}
.game-card:hover { border-color: var(--green-dark); }
.game-card.info { cursor: default; }
.game-card.info:hover { border-color: var(--line); }
.game-card .top { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.game-card .top img { width: 15px; height: 15px; }
.game-card .comp { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-status { font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 7px; white-space: nowrap; }
.game-status.live { background: rgba(255,77,77,.18); color: #FF6B6B; }
.game-status.live::before { content: '● '; animation: pulse 1.2s infinite; }
.game-status.end { background: var(--surface-hi); color: var(--muted); }
.game-status.sched { background: rgba(34,197,94,.18); color: var(--green); }
@keyframes pulse { 50% { opacity: .3; } }
.game-card .teams { display: flex; align-items: center; gap: 10px; }
.game-card .teams img { width: 30px; height: 30px; object-fit: contain; }
.game-card .team { flex: 1; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game-card .team.right { text-align: right; }
.game-card .score { font-size: 19px; font-weight: 900; color: var(--green); white-space: nowrap; }
.game-card .channels { margin-top: 10px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.game-card .channels img { width: 15px; height: 15px; border-radius: 3px; }
.row .game-card { flex: 0 0 320px; }
/* popup informativo do jogo */
.gm-back { position: fixed; inset: 0; z-index: var(--z-var); background: rgba(0,0,0,.65);
  display: flex; align-items: center; justify-content: center; padding: 20px; animation: fadein .2s var(--ease-swift) both; }
.gm { width: 480px; max-width: 94vw; background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; padding: 24px; box-shadow: var(--shadow-pop); animation: rise .3s var(--ease-out) both; }
.gm-comp { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.gm-comp img { width: 18px; height: 18px; }
.gm-comp span:first-of-type { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-bottom: 12px; }
.gm-team { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; text-align: center; }
.gm-team img.gm-logo, .gm-team .gm-logo { width: 52px; height: 52px; object-fit: contain; }
.gm-score { font-size: 30px; font-weight: 900; color: var(--green); white-space: nowrap; }
.gm-when { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 16px; text-transform: capitalize; }
.gm-ch-title { font-size: 11px; font-weight: 800; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; margin-bottom: 8px; }
.gm-channels { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.gm-ch { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-hi);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 12.5px; font-weight: 600; }
.gm-ch img { width: 16px; height: 16px; border-radius: 3px; }
.gm-hint { color: var(--muted); font-size: 12px; margin-bottom: 16px; }
.gm-actions { display: flex; gap: 10px; }
.gm-actions .btn-play { flex: 1; justify-content: center; }

.day-header { font-size: 17px; font-weight: 800; margin: 22px 0 12px; }
.games-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }

/* ---------- página de título ---------- */
.title-page { position: relative; min-height: 100vh; }
.tp-backdrop { position: absolute; top: 0; left: calc(-1 * var(--rail-w)); right: 0; height: 72vh;
  background-size: cover; background-position: center 20%; animation: fadein .6s var(--ease-swift) both; }
.tp-scrim { position: absolute; inset: 0; background:
  linear-gradient(90deg, rgba(11,15,13,.95) 0%, rgba(11,15,13,.55) 42%, rgba(11,15,13,.08) 78%),
  linear-gradient(0deg, var(--bg) 6%, transparent 52%); }
.tp-goback { position: fixed; top: 18px; left: calc(var(--rail-w) + 14px); z-index: 5; background: rgba(0,0,0,.55); }
.tp-goback:hover { background: rgba(0,0,0,.8); }
.tp-body { position: relative; z-index: 2; padding: 34vh var(--pad-x) 60px; max-width: 1020px; }
.tp-title { font-size: clamp(30px, 4.6vw, 52px); font-weight: 800; line-height: 1.05;
  margin-bottom: 12px; text-shadow: 0 2px 24px rgba(0,0,0,.7); outline: none; }
.tp-new { color: var(--green); font-weight: 800; font-size: 13px; letter-spacing: .04em; margin-bottom: 10px; }
.tp-badges { display: flex; gap: 6px; margin: 10px 0 12px; }
.tp-desc { font-size: 15px; line-height: 1.6; color: var(--text); max-width: 620px;
  margin-bottom: 20px; cursor: pointer; }
.tp-desc.open { -webkit-line-clamp: unset; }
.tp-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 30px; }
.tp-actions .btn-play { padding: 14px 30px; font-size: 16px; }
.tp-body h3, .tp-body h2 { font-size: 18px; font-weight: 800; margin: 26px 0 12px; }
.tp-eps-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.tp-extra .episode { max-width: 820px; }
.tp-body > * { animation: rise .45s var(--ease-out) both; }
.tp-body > :nth-child(2) { animation-delay: 50ms; }
.tp-body > :nth-child(3) { animation-delay: 100ms; }
.tp-body > :nth-child(4) { animation-delay: 150ms; }
.tp-body > :nth-child(5) { animation-delay: 200ms; }
.tp-body > :nth-child(6) { animation-delay: 250ms; }

/* elenco */
.cast-row { display: flex; gap: 14px; overflow-x: auto; padding: 8px 0 4px; }
.cast-row .actor { flex: 0 0 84px; text-align: center; font-size: 12px; color: var(--text); }
.cast-row .actor img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; margin: 0 auto 6px; background: var(--surface-hi); }
.cast-row .actor-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cast-row .actor-role { font-size: 11px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* temporadas / episódios */
.season-select {
  background: var(--surface-hi); color: var(--text); border: 1px solid var(--line-hi);
  border-radius: 10px; padding: 10px 14px; font-size: 14px; font-weight: 600; margin: 10px 0;
}
.episode {
  display: flex; gap: 14px; padding: 12px; border-radius: 12px; cursor: pointer;
}
.episode:hover { background: var(--surface-hi); }
.episode img { width: 220px; height: 124px; object-fit: cover; border-radius: 10px; background: var(--surface-hi); }
.episode .ep-title { font-weight: 700; font-size: 15px; }
.episode .ep-meta { color: var(--muted); font-size: 12px; margin: 2px 0 6px; }
.episode .ep-plot { color: var(--muted); font-size: 12.5px; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ep-thumb { position: relative; flex: 0 0 220px; }
.ep-thumb .ep-play { position: absolute; inset: 0; display: grid; place-items: center;
  color: #04170B; opacity: 0; transition: opacity .18s; }
.ep-thumb .ep-play .ic { width: 20px; height: 20px; padding: 10px; background: var(--green); border-radius: 50%; box-sizing: content-box; }
.episode:hover .ep-play, .episode:focus-visible .ep-play { opacity: 1; }
.ep-thumb .progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(0,0,0,.5); }
.ep-thumb .progress > div { height: 100%; background: var(--green); }

/* variant dialog */
.variant-pop { position: fixed; inset: 0; z-index: var(--z-var); background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; }
.variant-box { background: var(--surface); border-radius: 16px; padding: 22px; width: 320px; animation: rise .3s var(--ease-out) both; }
.variant-box h3 { margin-bottom: 14px; font-size: 17px; }
.variant-box button { display: block; width: 100%; padding: 13px; border-radius: 10px; margin-bottom: 8px; font-weight: 800; font-size: 14px; }
.variant-box .v-dub { background: var(--green); color: #04170B; }
.variant-box .v-leg { background: var(--surface-hi); color: var(--text); }
.variant-box .v-cancel { background: none; color: var(--muted); font-weight: 600; }

/* ---------- player ---------- */
.player-wrap { position: fixed; inset: 0; background: #000; z-index: var(--z-player); display: flex; flex-direction: column; }
.player-wrap.hide-ui { cursor: none; }
.player-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 7; display: flex; align-items: center; gap: 12px;
  padding: 14px 20px; background: linear-gradient(180deg, rgba(0,0,0,.75), transparent);
  transition: opacity .25s var(--ease-swift), transform .25s var(--ease-swift);
}
.player-wrap.hide-ui .player-top { opacity: 0; transform: translateY(-10px); pointer-events: none; }
.player-top .pt-title { font-weight: 800; font-size: 16px; }
.player-top .pt-sub { color: #bbb; font-size: 12.5px; }
.player-top .spacer { flex: 1; }
.pill-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.14); color: #fff; font-weight: 700; font-size: 13px;
  padding: 8px 16px; border-radius: 999px;
}
.pill-btn:hover { background: rgba(255,255,255,.26); }
.pill-btn.green { background: var(--green); color: #04170B; }
video { width: 100%; height: 100%; }
.live-tag { background: #e11; color: #fff; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 6px; }

.player-bottom { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5;
  padding: 0 20px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(0deg, rgba(0,0,0,.85), rgba(0,0,0,.4) 60%, transparent);
  transition: opacity .25s var(--ease-swift), transform .25s var(--ease-swift); }
.player-wrap.hide-ui .player-bottom { opacity: 0; transform: translateY(10px); pointer-events: none; }

.pl-seek { position: relative; padding: 20px 0 8px; cursor: pointer; touch-action: none; outline-offset: 4px; }
.pls-track { position: relative; height: 4px; border-radius: 2px; background: rgba(255,255,255,.22);
  overflow: hidden; transition: height .12s; }
.pl-seek:hover .pls-track, .pl-seek.drag .pls-track, .pl-seek:focus-visible .pls-track { height: 6px; }
.pls-buffer, .pls-played { position: absolute; inset: 0 auto 0 0; width: 0; }
.pls-buffer { background: rgba(255,255,255,.35); }
.pls-played { background: var(--green); }
.pls-knob { position: absolute; top: 50%; left: 0; width: 14px; height: 14px; margin: 2px 0 0 -7px;
  border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(0,0,0,.35);
  transform: translateY(-50%) scale(0); transition: transform .12s; pointer-events: none; }
.pl-seek:hover .pls-knob, .pl-seek.drag .pls-knob, .pl-seek:focus-visible .pls-knob { transform: translateY(-50%) scale(1); }
.pl-seek.drag .pls-knob { transform: translateY(-50%) scale(1.25); }
.pls-tip { position: absolute; bottom: 26px; transform: translateX(-50%); padding: 4px 9px;
  background: rgba(0,0,0,.85); color: #fff; font-size: 12px; font-weight: 700;
  font-variant-numeric: tabular-nums; border-radius: 6px; pointer-events: none; white-space: nowrap; }

.pl-row { display: flex; align-items: center; gap: 4px; min-height: 52px; }
#pl-play .ic { width: 28px; height: 28px; }
.pl-time { font-size: 13px; color: #ddd; margin-left: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pl-vol { display: flex; align-items: center; }
#pl-volume { width: 0; opacity: 0; accent-color: var(--green); cursor: pointer; height: var(--hit);
  transition: width .18s var(--ease-out), opacity .18s; }
.pl-vol:hover #pl-volume, .pl-vol:focus-within #pl-volume { width: 90px; opacity: 1; margin-right: 8px; }

.pl-taps { position: absolute; inset: 60px 0 90px; display: flex; z-index: 3; pointer-events: none; }
.pl-taps > div { flex: 1; display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 15px; opacity: 0; transition: opacity .2s; }
.pl-taps > div.flash { opacity: 1; background: radial-gradient(circle, rgba(255,255,255,.12), transparent 65%); }

.skip-flash { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); z-index: 5;
  background: rgba(0,0,0,.6); color: #fff; font-size: 18px; font-weight: 800;
  padding: 14px 22px; border-radius: 999px; pointer-events: none; animation: skipfade .5s ease both; }
@keyframes skipfade { to { opacity: 0; transform: translate(-50%,-50%) scale(1.15); } }

.pl-status { position: absolute; left: 20px; bottom: 96px; z-index: 5; color: #ddd; font-size: 13px;
  background: rgba(0,0,0,.55); padding: 8px 14px; border-radius: 999px; }

.player-spinner {
  position: absolute; inset: 0; z-index: 4; display: flex; align-items: center; justify-content: center; pointer-events: none;
}
.player-spinner[hidden] { display: none; }
.player-spinner .loader {
  width: 52px; height: 52px; border-radius: 50%;
  border: 4px solid rgba(255,255,255,.2); border-top-color: var(--green); animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.player-error {
  position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; background: rgba(0,0,0,.7); color: #fff; text-align: center; padding: 20px;
}
.player-error[hidden] { display: none; }
.player-error .pe-msg { font-size: 16px; font-weight: 600; }
.player-error .pe-actions { display: flex; gap: 10px; }

/* ---------- skeleton / vazio / foco ---------- */
.skel { background: linear-gradient(100deg, var(--surface-hi) 40%, #243029 50%, var(--surface-hi) 60%); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; border-radius: 10px; }
@keyframes shimmer { to { background-position: -200% 0; } }

.empty { color: var(--muted); text-align: center; padding: 60px 0; font-size: 14px; }

:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 6px; }
.card:focus-visible, .channel-row:focus-visible, .game-card:focus-visible { outline: 2px solid var(--green); }
.rail-item:focus-visible, .tab:focus-visible, .top10-card:focus-visible, .card-land:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; }

/* ---------- toast ---------- */
#toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--surface-hi); color: var(--text); border: 1px solid var(--line-hi);
  padding: 12px 20px; border-radius: 12px; font-size: 14px; z-index: var(--z-toast);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; box-shadow: 0 8px 30px rgba(0,0,0,.5);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- bottom sheet (mobile "Mais") ---------- */
.sheet-back { position: fixed; inset: 0; z-index: var(--z-sheet); background: rgba(0,0,0,.55);
  animation: fadein .2s var(--ease-swift) both; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; background: var(--surface);
  border-radius: 18px 18px 0 0; padding: 8px 14px calc(16px + env(safe-area-inset-bottom));
  animation: sheet-up .3s var(--ease-out) both; }
@keyframes sheet-up { from { transform: translateY(100%); } }
.sheet-grip { width: 40px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.25); margin: 6px auto 12px; }
.sheet-item { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 52px;
  padding: 0 12px; background: none; color: var(--text); font-size: 15px; font-weight: 600; border-radius: 12px; }
.sheet-item:active { background: var(--surface-hi); }
.sheet-item.danger { color: var(--danger); }

/* ---------- tab bar (mobile) ---------- */
.tabbar { display: none; }
@media (max-width: 840px) {
  .rail { display: none; }
  main { padding-left: 0; padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 16px); }
  #toast { bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 20px); }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-rail);
    display: flex; height: calc(var(--tab-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(11,15,13,.97); backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
  .tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; background: none; color: var(--muted); font-size: 10.5px; font-weight: 600; text-decoration: none; }
  .tab .ic { width: 22px; height: 22px; }
  .tab.active { color: var(--green); }

  /* splash */
  .sp-logo { width: 96px; }
  .sp-mark { width: 128px; height: 128px; }

  /* hero */
  .hero-carousel { height: clamp(340px, 56vh, 520px); }
  .hero-content { left: 16px; right: 16px; bottom: 28px; max-width: none; }
  .hero-content h1 { font-size: 28px; }
  .hero-meta { font-size: 12.5px; }
  .hero-content p { -webkit-line-clamp: 2; }
  .hero-actions { flex-wrap: wrap; }
  .hero-actions .btn-play { flex: 1; justify-content: center; }
  .hero-dots { right: 16px; bottom: 14px; }

  /* fileiras */
  .row { gap: 10px; }
  .card { flex: 0 0 118px; }
  .card .poster { width: 118px; height: 177px; }
  .card.lg { flex: 0 0 150px; }
  .card.lg .poster { width: 150px; height: 225px; }
  .card-land { flex: 0 0 240px; }
  .t10-num { font-size: 84px; width: 52px; margin-right: -10px; -webkit-text-stroke-width: 2px; }
  .t10-art { width: 190px; }
  .row .game-card { flex: 0 0 300px; }

  .page { padding: 12px 20px 50px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); }
  .games-list { grid-template-columns: 1fr; }

  /* página de título */
  .tp-backdrop { height: 46vh; background-position: center top; left: 0; }
  .tp-body { padding: 28vh 20px 90px; }
  .tp-title { font-size: clamp(26px, 8vw, 34px); }
  .tp-goback { left: 14px; top: 14px; }
  .tp-actions .btn-play { flex: 1 1 100%; justify-content: center; min-height: 52px; }
  .ep-thumb { flex: 0 0 120px; }
  .episode img { width: 120px; height: 68px; }
  .cast-row .actor { flex: 0 0 72px; }
  .cast-row .actor img { width: 60px; height: 60px; }

  /* player */
  .player-bottom { padding: 0 12px calc(10px + env(safe-area-inset-bottom)); }
  .pl-seek { padding: 22px 0 10px; }
  .pl-time { font-size: 12px; margin-left: 6px; }
  .player-top { padding: 10px 12px; }

  /* busca: nunca <16px em input no iOS (evita zoom) */
  .search-big { font-size: 16px; }
}
@media (hover: none) { #pl-volume { display: none; } }

/* respeita quem pede menos movimento (WCAG 2.3.3) — manter por último */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
