/* =============================================================================
   Astro Player app — UI do player (paleta ASTRO: INDIGO/NEBULA + SPACE)
   Regra de cor da marca: INDIGO = ação/estado (botões, foco, pills, seleção);
   VERMELHO = SÓ badge "AO VIVO" (--live). Nada mais é vermelho.
     space 900 #05070F / 800 #0B1020 / 700 #141A2C / 600 #1E2540
     accent (indigo) #6366F1 / 600 #4F46E5 / nebula 400 #8B5CF6 / live #dc2626
     glass = backdrop-blur + bg white/5 + inset highlight + sombra macia
   OBS: --crimson é ALIAS LEGADO de --accent (a UI nasceu vermelha estilo Netflix,
   passou pelo esmeralda e chegou na marca Astro). Código novo usa --accent; os 60+
   usos antigos seguem valendo. Cores de marca trocáveis em runtime via applyBrand()
   (brand.js) — a fábrica de marcas (FASE 3) pluga aqui.
   ============================================================================= */
:root {
  --base-900: #05070F;
  --base-800: #0B1020;
  --base-700: #141A2C;
  --base-600: #1E2540;
  --home-bg: #05070F;

  /* marca Astro Player (indigo/nebula) */
  --accent: #6366F1;
  --accent-600: #4F46E5;
  --accent-400: #8B5CF6;
  /* badge AO VIVO (única coisa vermelha da UI) */
  --live: #dc2626;

  /* aliases legados (60+ usos espalhados) — NÃO remover */
  --crimson: var(--accent);
  --crimson-600: var(--accent-600);
  --crimson-400: var(--accent-400);

  --text: #f3f3f5;
  --white-80: rgba(255, 255, 255, 0.80);
  --white-65: rgba(255, 255, 255, 0.65);
  --white-55: rgba(255, 255, 255, 0.55);
  --white-40: rgba(255, 255, 255, 0.40);
  --white-30: rgba(255, 255, 255, 0.30);

  --err: #f87171;

  /* glass */
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-bg-strong: rgba(255, 255, 255, 0.08);
  --glass-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.12), 0 10px 40px -10px rgba(0, 0, 0, 0.7);
  --glass-shadow-strong: inset 0 1px 0 0 rgba(255, 255, 255, 0.18), 0 16px 50px -12px rgba(0, 0, 0, 0.8);
  --crimson-glow: inset 0 1px 0 0 rgba(255, 255, 255, 0.25), 0 8px 30px -6px rgba(99, 102, 241, 0.55);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  background: var(--base-900);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

#app { height: 100vh; width: 100vw; }

/* views: só uma visível por vez */
.view { display: none; height: 100vh; width: 100vw; }
.view.active { display: flex; }

/* lente de vidro padrão (glass) — usado em barras, ações, overlays, setas */
/* SEM backdrop-filter (blur é o assassino nº1 de GPU no Fire Stick, e a .glass está na
   barra do topo, composta sobre TODA a rolagem). Fundo escuro sólido no lugar — visual
   quase igual (barra/botões/modal escuros), rolagem lisa. */
.glass {
  background: rgba(14, 14, 20, 0.86);
  box-shadow: var(--glass-shadow);
}
.glass-strong {
  background: rgba(14, 14, 20, 0.94);
  box-shadow: var(--glass-shadow-strong);
}

/* hide scrollbar util */
.hide-scrollbar { scrollbar-width: none; -ms-overflow-style: none; }
.hide-scrollbar::-webkit-scrollbar { display: none; }

/* spinner */
.spin {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: var(--crimson-400);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: -2px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================= LOGIN ============================= */
.login {
  align-items: center;
  justify-content: center;
  padding: 32px 16px calc(32px + env(safe-area-inset-bottom));
  background: 
    radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.15), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.12), transparent 25%),
    linear-gradient(135deg, #101736 0%, #05070F 100%);
  overflow-y: auto;
}
.login-wrap { width: 100%; max-width: 384px; }

/* TV / DEITADO (altura curta): compacta o login pra CABER sem cortar/espremer/rolar.
   Aparelho em pe (altura normal) continua com o layout acima. */
@media (max-height: 600px) {
  /* Deitado/TV (altura curta): logo+texto à ESQUERDA, card à DIREITA, lado a lado e
     CENTRALIZADO — cabe na altura sem jogar o botão pra baixo nem precisar rolar. */
  .login { padding: 14px 22px; align-items: center; justify-content: center; }
  .login-wrap { display: flex; flex-direction: row; align-items: center; gap: 30px; max-width: 780px; margin: auto; }
  .login-head { flex: 0 0 auto; margin: 0; text-align: left; max-width: 250px; }
  .login-wordmark { height: 34px; margin: 0; }
  .login-sub { margin-top: 8px; font-size: 13px; }
  .login-card { flex: 1 1 340px; min-width: 290px; padding: 16px 18px; gap: 10px; }
  .login-card .input { padding: 9px 13px; font-size: 14px; }
  .login-card .field label { font-size: 12.5px; }
  .login-divider { margin: 4px 0; }
  .login-foot { display: none; }

  /* MENU (worldbar) na TV/deitado: largura CHEIA + itens compactos + UMA linha
     (nunca empilhar). Se nao couber, rola na horizontal em vez de quebrar. */
  .worldbar { max-width: 100%; gap: 3px; padding: 6px 10px; flex-wrap: nowrap; }
  .wb-wordmark { height: 22px; margin-right: 4px; }
  .wb-world, .wb-action { padding: 5px 9px; font-size: 11.5px; flex-shrink: 0; }
  .wb-worlds { gap: 2px; }
}
/* altura MUITO curta (TV alta densidade / emulador deitado): esconde subtexto,
   rodapé e a dica do teste (não essenciais) e aperta botões/inputs, pra o card de
   login caber INTEIRO sem rolar. */
@media (max-height: 470px) {
  /* altura MUITO curta: aperta o card; mantém logo+sub à esquerda (já cabem no layout
     lado a lado). Esconde só o rodapé e a dica (não essenciais). */
  .login-foot { display: none; }
  .login-wordmark { height: 28px; }
  .login-sub { font-size: 12px; }
  .login-card { padding: 12px 14px; gap: 7px; }
  .login-card .input { padding: 7px 12px; }
  .login-card .btn-primary { padding: 9px 14px; font-size: 14px; }
  .login-divider { margin: 2px 0; }
  .login-card .field label { font-size: 12px; }
}

.login-head { text-align: center; margin-bottom: 32px; }
.login-wordmark { height: 36px; width: auto; margin: 0 auto; display: block; user-select: none; }
.login-sub { margin-top: 12px; font-size: 14px; color: var(--white-65); line-height: 1.4; }

.login-card {
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: var(--base-800);
  border-radius: 20px; /* 2xl */
  padding: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 14px;
  font-weight: 500;
  color: var(--white-80);
}

.input {
  appearance: none;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: var(--base-700);
  color: var(--text);
  font-size: 15px;
  padding: 11px 14px;
  border-radius: 14px; /* xl */
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.input::placeholder { color: var(--white-30); }
.input:focus {
  border-color: rgba(99, 102, 241, 0.70);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.30);
}

.btn-primary {
  appearance: none;
  border: none;
  width: 100%;
  background: var(--crimson);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  padding: 11px 16px;
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.08s ease, box-shadow 0.18s ease;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.btn-primary:hover { background: var(--crimson-600); }
.btn-primary:active { transform: scale(0.99); }
.btn-primary:focus-visible { box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.55); }
.btn-primary[disabled] { opacity: 0.6; cursor: not-allowed; }

.login-error {
  border: 1px solid rgba(99, 102, 241, 0.30);
  background: rgba(99, 102, 241, 0.10);
  color: var(--crimson-400);
  font-size: 14px;
  padding: 9px 12px;
  border-radius: 10px;
}

.login-foot { margin-top: 24px; text-align: center; font-size: 12px; color: var(--white-30); }

/* ---- AQUISIÇÃO: Testar grátis (login) ---- */
.login-divider {
  display: flex; align-items: center; gap: 10px;
  margin: 14px 0 10px; color: var(--white-30); font-size: 12px;
}
.login-divider::before, .login-divider::after {
  content: ''; flex: 1; height: 1px; background: rgba(255, 255, 255, 0.10);
}

/* ---- Conta VENCIDA no login (funil de renovação) ---- */
.login-expired {
  border: 1px solid rgba(99, 102, 241, 0.35);
  background: rgba(99, 102, 241, 0.10);
  border-radius: 14px; padding: 14px;
  display: flex; flex-direction: column; gap: 10px; align-items: center;
  text-align: center;
}
.login-expired[hidden] { display: none; }   /* display:flex não pode atropelar o hidden */
.login-expired .le-icon { font-size: 28px; line-height: 1; }
.login-expired .le-text { display: flex; flex-direction: column; gap: 4px; }
.login-expired .le-text strong { font-size: 15px; color: #fff; }
.login-expired .le-text span { font-size: 13px; color: var(--white-60, rgba(255,255,255,0.6)); }
.login-expired .le-btn { margin-top: 2px; }


/* ============================= HOME ============================= */
.home { 
  display: flex; flex-direction: column; 
  background: 
    var(--home-bg);
  background-size: cover;
}

/* ---- WorldBar sticky de vidro flutuante ---- */
.worldbar-shell {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: max(12px, env(safe-area-inset-top)) 12px 0 12px;
  flex-shrink: 0;
}
.worldbar {
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: 1100px;
  margin: 0 auto;
  border-radius: 9999px;
  padding: 7px 9px;
  overflow-x: auto;
}
.worldbar.hide-scrollbar { scrollbar-width: none; }
.worldbar::-webkit-scrollbar { display: none; }

.wb-wordmark { height: 26px; width: auto; flex-shrink: 0; user-select: none; margin-left: 2px; }

.wb-worlds {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1;
}
.wb-world {
  appearance: none;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  border-radius: 9999px;
  padding: 6px 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--white-65);
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.wb-world:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.wb-world.active {
  background: var(--crimson);
  color: #fff;
  box-shadow: var(--crimson-glow);
}
.wb-world:focus-visible { box-shadow: 0 0 0 2px var(--crimson); transform: scale(1.04); }

.wb-action {
  appearance: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  border-radius: 9999px;
  padding: 6px 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--white-65);
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.wb-action:hover { background: rgba(255, 255, 255, 0.10); color: #fff; }
.wb-action:focus-visible { box-shadow: 0 0 0 2px var(--crimson); transform: scale(1.04); }

.wb-exit {
  appearance: none;
  border: none;
  background: transparent;
  flex-shrink: 0;
  border-radius: 9999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--white-55);
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.wb-exit:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.wb-exit:focus-visible { box-shadow: 0 0 0 2px var(--crimson); transform: scale(1.04); }

/* esconde labels no muito-estreito (só ícones) */
@media (max-width: 560px) {
  .wb-label { display: none; }
  .wb-world, .wb-action { padding: 8px 11px; }
}

/* FIX 4 (D1): celular estreito — compacta wordmark + botões pra caber a barra
   inteira (wordmark SVG é 5,83:1; sem max-width virava ~152px e empurrava o
   "Minha conta" pra fora). Padrão copiado do @media (max-height:600px). */
@media (max-width: 480px) {
  .wb-wordmark { height: 18px; max-width: 104px; margin-left: 0; }
  .worldbar { gap: 3px; padding: 6px 7px; }
  .wb-worlds { gap: 3px; }
  .wb-world, .wb-action { padding: 7px 9px; font-size: 12px; }
}

/* FIX 4 (D1): muito estreito (≤400px) — quebra em 2 linhas pra NADA sair da tela.
   Linha 1: wordmark + ações (Favoritos/Buscar/Minha conta). Linha 2: os mundos
   (Ao vivo/Filmes/Séries) full-width centrados. Garante o "Minha conta" visível. */
@media (max-width: 400px) {
  .worldbar { flex-wrap: wrap; justify-content: center; row-gap: 6px; }
  .wb-wordmark { order: 1; }
  .wb-action { order: 2; }
  .wb-worlds { order: 3; flex: 1 1 100%; justify-content: center; }
}

/* ---- Conteúdo rolável ---- */
.home-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 0 calc(32px + env(safe-area-inset-bottom)) 0;
}

/* ---- HERO rotativo ---- */
.hero {
  position: relative;
  margin: 0 12px 8px 12px;
  overflow: hidden;
  border-radius: 24px; /* 3xl */
  height: 45vh;
  min-height: 300px;
}
.hero-base {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--base-700), var(--base-800) 60%, #000);
}
.hero-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top;   /* pôster retrato em espaço deitado: mostra o TOPO (cabeça/título) */
  opacity: 0;
  transition: opacity 0.7s ease-out;
}
.hero-img.show { opacity: 1; }
.hero-scrim-b {
  position: absolute; inset: 0;
  background: linear-gradient(to top, var(--home-bg) 0%, rgba(6, 6, 9, 0.35) 45%, transparent 100%);
}
.hero-scrim-l {
  position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(6, 6, 9, 0.85) 0%, rgba(6, 6, 9, 0.25) 40%, transparent 100%);
}
.hero-content {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 20px;
}
.hero-inner { max-width: 600px; animation: heroIn 0.5s ease-out; }
@keyframes heroIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.hero-kicker {
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--crimson-400);
}
.hero-title {
  font-size: clamp(24px, 6vw, 40px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: #fff;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}
.hero-meta {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  font-size: 12px;
  color: var(--white-65);
}
.hero-meta .rating { color: var(--crimson-400); }
.hero-meta .genre { color: var(--white-55); }
.hero-plot {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--white-65);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-cta {
  margin-top: 18px;
}
.hero-play {
  appearance: none;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 9999px;
  padding: 11px 26px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(99, 102, 241, 0.90);
  box-shadow: var(--crimson-glow);
  transition: transform 0.3s ease, box-shadow 0.2s ease;
}
.hero-play:hover { transform: scale(1.03); }
.hero-play:focus-visible { box-shadow: 0 0 0 3px var(--crimson), var(--crimson-glow); transform: scale(1.04); }
.hero-play .tri { font-size: 15px; line-height: 1; }

.hero-dots {
  position: absolute;
  bottom: 16px; right: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.hero-dot {
  appearance: none; border: none;
  height: 6px; width: 6px;
  border-radius: 9999px;
  background: var(--white-40);
  cursor: pointer;
  outline: none;
  transition: all 0.3s ease;
}
.hero-dot.active { width: 20px; background: var(--crimson); }

/* ---- ROWS ---- */
.rows {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 8px 0;
}
.row { position: relative; }
.row-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  margin-bottom: 12px;
}
/* Titulo agora e BOTAO (abre "Ver tudo"): reset de botao + alvo de toque grande. */
.row-title {
  appearance: none;
  border: none;
  background: transparent;
  cursor: pointer;
  outline: none;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  text-align: left;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.90);
  padding: 6px 6px 6px 0;       /* alvo de toque maior, sem deslocar o texto */
  border-radius: 10px;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s ease, box-shadow 0.2s ease;
}
.row-title-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row-title:hover { color: #fff; }
.row-title:focus-visible, .row-title.focused {
  color: #fff;
  box-shadow: 0 0 0 2px var(--crimson);
}
.row-count {
  flex-shrink: 0;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--white-40);
}
/* "Ver tudo ›" — SEMPRE VISIVEL (sem hover), clicavel em toque + D-pad. */
.row-seeall {
  appearance: none;
  border: none;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  outline: none;
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--glass-shadow);
  color: var(--white-80);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding: 7px 14px;
  border-radius: 9999px;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.row-seeall span { font-size: 16px; line-height: 1; }
.row-seeall:hover { background: var(--glass-bg-strong); color: #fff; }
.row-seeall:focus-visible, .row-seeall.focused {
  background: var(--crimson);
  color: #fff;
  box-shadow: var(--crimson-glow);
  transform: scale(1.04);
}
.row-scroller {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding-left: 16px;
  padding: 4px 16px 8px 16px;
}

/* ---- PosterCard ---- */
.card {
  position: relative;
  display: block;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 20px; /* 2xl */
  background: rgba(255, 255, 255, 0.04);
  border: none;
  text-align: left;
  padding: 0;
  cursor: pointer;
  outline: none;
  scroll-snap-align: start;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.3s ease, box-shadow 0.2s ease;
  /* SEM 'will-change: transform': em Fire Stick isso força CADA card (240+) a virar uma
     camada de GPU permanente e estoura a memória gráfica -> app lento. O navegador
     promove sozinho na hora da animação de foco; não precisa fixar. */
}
.card.poster { aspect-ratio: 2 / 3; width: 132px; }
.card.wide { aspect-ratio: 16 / 9; width: 230px; }
/* FIX 5 (D1): shimmer por imagem — cobre o card enquanto a capa carrega (removido
   no img.onload). Posicionado → pinta acima do <img> até sumir. Reusa 'pulse'. */
.card-thumb-skel {
  position: absolute; inset: 0;
  background: rgba(255, 255, 255, 0.06);
  animation: pulse 1.4s ease-in-out infinite;
  border-radius: inherit;
}
.card:hover, .card.focused { transform: scale(1.04); }
.card:focus-visible, .card.focused { box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.70); }
.card img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top;   /* capa começa pelo topo (só afeta cards deitados; poster 2:3 fica igual) */
  transition: transform 0.5s ease;
  display: block;
}
.card:hover img, .card.focused img { transform: scale(1.05); }
.card .card-fallback {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: linear-gradient(135deg, var(--base-700), var(--base-800) 60%, #000);
}
.card .card-fallback span {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--white-65);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card .card-badge {
  position: absolute;
  left: 8px; top: 8px;
  border-radius: 9999px;
  background: var(--live); /* AO VIVO = vermelho (única exceção da paleta) */
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
  box-shadow: 0 4px 12px -2px rgba(220, 38, 38, 0.6);
}
.card .card-name {
  pointer-events: none;
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 10px;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
}
.card:hover .card-name, .card.focused .card-name { opacity: 1; }
.card .card-name p {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* card skeleton (loading) */
.card.skeleton {
  background: rgba(255, 255, 255, 0.06);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ---- mensagens centrais (loading / vazio / erro) ---- */
.center-msg {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 50vh;
  color: var(--white-55);
  font-size: 15px;
  text-align: center;
  padding: 24px;
}
.center-msg .big { font-size: 40px; opacity: 0.5; }
.center-msg.err { color: var(--crimson-400); }
.center-msg .btn-retry {
  appearance: none; border: none;
  background: var(--crimson);
  color: #fff; font-weight: 600; font-size: 14px;
  padding: 10px 22px; border-radius: 9999px; cursor: pointer;
  box-shadow: var(--crimson-glow);
}

/* ============================= OVERLAYS ============================= */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
}
.overlay[hidden] { display: none; }
.overlay-backdrop {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  background-color: var(--home-bg);
}
.overlay-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(to top, var(--home-bg) 0%, rgba(6, 6, 9, 0.55) 50%, rgba(6, 6, 9, 0.75) 100%);
}
.overlay-scrim.solid { background: rgba(6, 6, 9, 0.96); }
.overlay-close {
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  right: 14px;
  z-index: 5;
  appearance: none; border: none;
  width: 40px; height: 40px;
  border-radius: 9999px;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  outline: none;
}
.overlay-close:focus-visible { box-shadow: 0 0 0 2px var(--crimson), var(--glass-shadow); transform: scale(1.05); }

/* ---- série detalhe ---- */
.overlay-inner {
  position: relative;
  z-index: 2;
  margin-top: auto;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 24px 20px calc(28px + env(safe-area-inset-bottom));
}
.sd-title {
  font-size: clamp(24px, 6vw, 38px);
  font-weight: 800;
  line-height: 1.05;
  color: #fff;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  max-width: 700px;
}
.sd-meta {
  margin-top: 8px;
  display: flex; flex-wrap: wrap; gap: 4px 12px;
  font-size: 12px; color: var(--white-65);
}
.sd-meta .rating { color: var(--crimson-400); }
.sd-plot {
  margin-top: 12px;
  max-width: 700px;
  font-size: 13px; line-height: 1.55;
  color: var(--white-65);
}
.sd-seasons {
  margin-top: 22px;
  display: flex; gap: 8px; flex-wrap: wrap;
}
.sd-season-btn {
  appearance: none; border: none;
  background: var(--glass-bg);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--glass-shadow);
  color: var(--white-80);
  font-size: 13px; font-weight: 600;
  padding: 8px 16px; border-radius: 9999px;
  cursor: pointer; outline: none;
  transition: all 0.2s ease;
}
.sd-season-btn.active { background: var(--crimson); color: #fff; box-shadow: var(--crimson-glow); }
.sd-season-btn:focus-visible { box-shadow: 0 0 0 2px var(--crimson); transform: scale(1.04); }
.sd-eps {
  margin-top: 18px;
  display: flex; flex-direction: column; gap: 8px;
}
.sd-ep {
  appearance: none;
  display: flex; align-items: center; gap: 14px;
  width: 100%;
  text-align: left;
  background: rgba(255, 255, 255, 0.04);
  border: none;
  border-radius: 16px;
  padding: 12px 14px;
  cursor: pointer; outline: none;
  color: var(--text);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.sd-ep:hover { background: rgba(255, 255, 255, 0.08); }
.sd-ep.focused, .sd-ep:focus-visible { box-shadow: 0 0 0 2px var(--crimson); transform: scale(1.02); background: rgba(255, 255, 255, 0.08); }
.sd-ep-num {
  flex-shrink: 0;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: var(--base-700);
  font-size: 14px; font-weight: 700; color: var(--white-80);
}
.sd-ep-body { min-width: 0; flex: 1; }
.sd-ep-title {
  font-size: 14px; font-weight: 600; color: #fff;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.sd-ep-plot {
  margin-top: 2px;
  font-size: 12px; color: var(--white-55);
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.sd-ep-play { flex-shrink: 0; color: var(--crimson-400); font-size: 18px; }

/* ---- busca ---- */
.search-overlay { z-index: 70; }
.search-top {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: max(16px, env(safe-area-inset-top)) 16px 12px 16px;
}
.search-input {
  flex: 1;
  font-size: 16px;
  background: var(--base-800);
  border: 1px solid rgba(255, 255, 255, 0.10);
}
.search-input:focus { border-color: rgba(99, 102, 241, 0.70); box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.30); }
.search-top .overlay-close { position: static; }
.search-results {
  position: relative;
  z-index: 5;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 16px calc(28px + env(safe-area-inset-bottom));
}
.search-grid {
  display: grid;
  /* FIX 3 (D1): teto de célula 156px (era 1fr → esticava a capa na TV) + centraliza */
  grid-template-columns: repeat(auto-fill, minmax(116px, 156px));
  justify-content: center;
  gap: 14px;
}
.search-hint {
  text-align: center;
  color: var(--white-40);
  font-size: 14px;
  padding: 40px 20px;
}

/* ---- Ver tudo / CategoryView ---- */
.catview-overlay { z-index: 71; }
.catview-top {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: max(16px, env(safe-area-inset-top)) 16px 12px 16px;
}
.catview-top .overlay-close { position: static; flex-shrink: 0; }
.catview-title {
  flex: 1;
  min-width: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}
.catview-results {
  position: relative;
  z-index: 5;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 16px calc(28px + env(safe-area-inset-bottom));
}
.catview-grid {
  display: grid;
  /* FIX 3 (D1): teto de célula 156px + centraliza (reusado por catview E favoritos) */
  grid-template-columns: repeat(auto-fill, minmax(116px, 156px));
  justify-content: center;
  gap: 14px;
}
.catview-sentinel { height: 1px; width: 100%; }

/* ---- toggle Lista / Mosaico ---- */
.catview-modes { display: flex; gap: 6px; flex-shrink: 0; }
.catview-mode {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255, 255, 255, 0.06); color: var(--white-65);
  border: 1px solid rgba(255, 255, 255, 0.10); border-radius: 9px;
  font-size: 13px; font-weight: 700; padding: 7px 12px; cursor: pointer; outline: none;
}
.catview-mode.active { background: var(--crimson, #6366F1); color: #fff; border-color: var(--crimson, #6366F1); }
.catview-mode:focus-visible, .catview-mode:focus { box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.55); }

/* ---- modo LISTA: split (lista | preview + EPG) ---- */
.catview-split {
  position: relative;
  z-index: 5;
  flex: 1;
  display: flex;
  min-height: 0;            /* deixa os filhos rolarem */
}
.catview-split[hidden] { display: none; }
.catview-results[hidden] { display: none; }

.cv-list {
  flex: 0 0 40%;
  max-width: 460px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 8px calc(20px + env(safe-area-inset-bottom)) 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}
.cv-li {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left;
  background: transparent; border: 0; border-radius: 12px;
  padding: 8px 10px; margin: 2px 0;
  color: var(--white-80); cursor: pointer; outline: none;
  transition: background .12s ease;
}
.cv-li:hover { background: rgba(255, 255, 255, 0.05); }
.cv-li.sel { background: rgba(99, 102, 241, 0.16); color: #fff; }
.cv-li:focus-visible, .cv-li:focus {
  background: rgba(99, 102, 241, 0.22);
  box-shadow: inset 0 0 0 2px var(--crimson, #6366F1);
  color: #fff;
}
.cv-li-thumb {
  flex: 0 0 auto; width: 56px; height: 38px;
  border-radius: 7px; overflow: hidden; background: #1c1c22;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px; color: var(--white-40);
}
.cv-li-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.cv-li-name {
  flex: 1; min-width: 0; font-size: 14px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cv-li-live { flex: 0 0 auto; color: var(--crimson, #6366F1); font-size: 10px; }
.cv-li-sentinel { height: 1px; width: 100%; }

.cv-preview {
  flex: 1; min-width: 0;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 4px 16px calc(28px + env(safe-area-inset-bottom)) 18px;
}
.cv-pv-empty { color: var(--white-40); padding: 40px 8px; }
.cv-pv-hero {
  position: relative;
  width: 100%; aspect-ratio: 16 / 9; max-height: 30vh;
  border-radius: 14px; overflow: hidden; background: #000; margin-bottom: 14px;
}
.cv-pv-poster, .cv-pv-video {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
}
/* FIX 3 (D1): o pôster do canal/item é 2:3; num quadro 16:9 o 'cover' recortava
   agressivo (só uma faixa do topo). 'contain' mostra o pôster INTEIRO (letterbox
   limpo sobre o #000 do .cv-pv-hero). */
.cv-pv-poster { object-fit: contain; opacity: 1; transition: opacity .25s ease; }
.cv-pv-video { object-fit: contain; background: #000; opacity: 0; transition: opacity .25s ease; }
.cv-pv-hero.previewing .cv-pv-video { opacity: 1; }
.cv-pv-hero.previewing .cv-pv-poster { opacity: 0; }
.cv-pv-livetag {
  position: absolute; left: 8px; top: 8px; z-index: 2;
  background: var(--live); color: #fff; /* AO VIVO = vermelho */
  font-size: 10px; font-weight: 800; letter-spacing: .04em;
  padding: 3px 8px; border-radius: 6px; text-transform: uppercase;
}
.cv-pv-title { font-size: 22px; font-weight: 800; color: #fff; margin: 0 0 6px; letter-spacing: -0.01em; }
.cv-pv-meta { font-size: 13px; color: var(--white-55); margin-bottom: 14px; }
.cv-pv-play {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--crimson, #6366F1); color: #fff;
  border: 0; border-radius: 10px; font-size: 16px; font-weight: 800;
  padding: 12px 26px; margin-bottom: 18px; cursor: pointer; outline: none;
}
.cv-pv-play:hover { background: var(--accent-400); }
.cv-pv-play:focus-visible, .cv-pv-play:focus { box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.55); transform: translateY(-1px); }
.cv-pv-h {
  font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  color: var(--white-55); margin: 14px 0 8px;
}
.cv-pv-h.now { color: var(--crimson, #6366F1); }
.cv-epg-dot { color: var(--crimson, #6366F1); }
.cv-pv-plot { font-size: 14px; line-height: 1.55; color: var(--white-80); margin: 0; }
.cv-epg-msg { font-size: 13px; color: var(--white-40); padding: 6px 0; }
.cv-epg-now {
  background: rgba(99, 102, 241, 0.10); border: 1px solid rgba(99, 102, 241, 0.30);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 6px;
}
.cv-epg-now-title { font-size: 15px; font-weight: 700; color: #fff; }
.cv-epg-now-desc { font-size: 13px; line-height: 1.5; color: var(--white-65); margin: 6px 0 0; }
.cv-epg-row {
  display: flex; gap: 12px; align-items: baseline;
  padding: 8px 4px; border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.cv-epg-time { flex: 0 0 auto; font-size: 13px; font-weight: 800; color: var(--crimson, #6366F1); width: 44px; }
.cv-epg-name { flex: 1; min-width: 0; font-size: 14px; color: var(--white-80); }

/* celular em pé (portrait estreito): empilha lista em cima / preview embaixo */
@media (orientation: portrait) and (max-width: 640px) {
  .catview-split { flex-direction: column; }
  .cv-preview {                      /* PREVIEW EM CIMA (Diego: preview topo, lista baixo) */
    order: 0;
    flex: 0 0 auto; max-height: 56vh;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .cv-list {                         /* LISTA EMBAIXO */
    order: 1;
    flex: 1 1 auto; max-width: none; max-height: none;
    border-right: 0;
  }
  .cv-pv-hero { max-height: 30vh; }
  .cv-mode-lbl { display: none; }   /* só ícone no toggle */
}

/* TV / telas grandes — alvos maiores */
/* TV / DESKTOP (≥900px): DENSIDADE ESTILO NETFLIX/PRIME (Diego 05/07) — capas
   MENORES pra caber MAIS filmes por fileira e na grade da categoria. */
@media (min-width: 900px) {
  .card.poster { width: 134px; }   /* era 158 -> menor, mais por fileira (Netflix) */
  .card.wide { width: 244px; }     /* ao vivo 16:9 proporcional */
  .hero { height: 52vh; }
  .row-scroller { gap: 12px; }
  .row-title { font-size: 18px; }
  .row-seeall { font-size: 15px; padding: 9px 18px; }
  .catview-title { font-size: 22px; }
  .catview-grid { grid-template-columns: repeat(auto-fill, minmax(128px, 156px)); justify-content: center; gap: 14px; }  /* FIX 3 (D1): teto de célula na TV */
  .cv-list { flex-basis: 38%; max-width: 520px; }
  .cv-li-thumb { width: 64px; height: 42px; }
  .cv-li-name { font-size: 15px; }
  .cv-pv-title { font-size: 26px; }
}

/* ===================== "PRÓXIMO EM 10s" (autoplay) ===================== */
.nextup-overlay {
  position: fixed; inset: 0; z-index: 999998;
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 8vh;
  background: linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,0) 45%);
  animation: rnFade .2s ease;
}
.nextup-card {
  background: rgba(10,10,14,.96); border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px; padding: 20px 26px; text-align: center;
  box-shadow: 0 24px 70px rgba(0,0,0,.7);
}
.nextup-title { font-size: 20px; font-weight: 800; color: #fff; margin-bottom: 14px; }
.nextup-count { color: var(--accent, #6366F1); }
.nextup-actions { display: flex; gap: 12px; justify-content: center; }
.nextup-btn {
  appearance: none; border: 0; border-radius: 12px; cursor: pointer;
  font-weight: 800; font-size: 16px; padding: 13px 22px;
}
.nextup-btn.primary { background: var(--accent, #6366F1); color: #fff; }
.nextup-btn.ghost { background: rgba(255,255,255,.08); color: rgba(255,255,255,.75); border: 1px solid rgba(255,255,255,.14); }
.nextup-btn:focus-visible, .nextup-btn.focus { outline: 3px solid #fff; outline-offset: 2px; }
@media (min-width: 900px) { .nextup-title { font-size: 24px; } .nextup-btn { font-size: 18px; padding: 15px 28px; } }

/* ===================== QR DO WHATSAPP NA TV (5ª leva) ===================== */
/* Overlay acima de TUDO (takeover 999999, nudge 999998). Sem backdrop-filter
   (GPU do Fire Stick). Quadro BRANCO com padding: a câmera do celular exige
   contraste — QR preto sobre branco, nunca escuro sobre escuro. */
.wa-qr-overlay {
  position: fixed; inset: 0; z-index: 2147483000;
  display: flex; align-items: center; justify-content: center;
  padding: 4vh 16px;
  background: rgba(6, 6, 9, 0.92);
  animation: rnFade .18s ease;
}
/* [hidden] precisa vencer o .wa-qr-overlay{display:flex} (senão o overlay cobre a tela sempre) */
.wa-qr-overlay[hidden] { display: none; }
.wa-qr-card {
  background: rgba(14, 14, 20, 0.96);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .7);
  padding: 24px 26px 22px;
  max-width: 92vw;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  text-align: center;
}
.wa-qr-title { font-size: 20px; font-weight: 800; color: #fff; letter-spacing: -.01em; }
.wa-qr-frame {
  background: #fff;
  padding: 18px;
  border-radius: 16px;
  line-height: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}
.wa-qr-canvas {
  display: block;
  width: min(58vw, 58vh);
  height: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.wa-qr-num { font-size: 22px; font-weight: 800; color: #fff; letter-spacing: .01em; }
.wa-qr-close {
  appearance: none; border: 0; border-radius: 12px; cursor: pointer;
  font-weight: 800; font-size: 17px; padding: 13px 30px;
  background: var(--accent, #6366F1); color: #fff;
}
.wa-qr-close:focus-visible, .wa-qr-close:focus { outline: 3px solid #fff; outline-offset: 2px; }
@media (min-width: 900px) {
  .wa-qr-title { font-size: 24px; }
  .wa-qr-num { font-size: 26px; }
  .wa-qr-close { font-size: 19px; padding: 15px 36px; }
}

/* ============================= MINHA CONTA / NOTIFICAÇÕES ============================= */
/* Overlays full-screen no mesmo estilo Netflix vermelho/preto + glass. */
.account-overlay, .notif-overlay { z-index: 72; }

/* topo: ‹ voltar  ·  título  ·  ✕ fechar */
.acc-top {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: max(16px, env(safe-area-inset-top)) 16px 12px 16px;
}
.acc-top .overlay-close { position: static; }
.acc-top-title {
  flex: 1;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
}

/* área rolável */
.acc-scroll {
  position: relative;
  z-index: 5;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 16px calc(28px + env(safe-area-inset-bottom));
}
.acc-inner {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

/* ---- cabeçalho do cliente (avatar + usuário + status) ---- */
.acc-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  margin: 8px 0 22px;
  border-radius: 20px;
  background: var(--base-800);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 25px 50px -16px rgba(0, 0, 0, 0.55);
}
.acc-avatar {
  flex-shrink: 0;
  width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 9999px;
  font-size: 30px;
  background: radial-gradient(120% 120% at 30% 20%, rgba(99, 102, 241, 0.55), var(--base-700) 70%);
  box-shadow: var(--crimson-glow);
}
.acc-id { min-width: 0; flex: 1; }
.acc-user {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.acc-statline {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}
.acc-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--white-65);
}
.acc-chip.ok { background: rgba(99, 102, 241, 0.18); color: #a5b4fc; }
.acc-chip.ok .dot { width: 7px; height: 7px; border-radius: 50%; background: #818cf8; box-shadow: 0 0 8px #818cf8; }
.acc-chip.bad { background: rgba(99, 102, 241, 0.16); color: var(--crimson-400); }
.acc-chip.bad .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--crimson-400); box-shadow: 0 0 8px var(--crimson-400); }
.acc-chip.warn { background: rgba(244, 63, 94, 0.16); color: #fda4af; }
.acc-statline .spin { margin-left: 2px; }

/* ---- linhas/cards de opção ---- */
.acc-list { display: flex; flex-direction: column; gap: 10px; }
.acc-item {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  border: none;
  border-radius: 16px;
  padding: 15px 16px;
  cursor: pointer;
  outline: none;
  color: var(--text);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: var(--glass-bg);
  box-shadow: var(--glass-shadow);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.acc-item:hover { background: var(--glass-bg-strong); }
.acc-item:focus-visible, .acc-item.focused {
  box-shadow: 0 0 0 2px var(--crimson), var(--glass-shadow);
  transform: scale(1.02);
  background: var(--glass-bg-strong);
}
.acc-ico {
  flex-shrink: 0;
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--base-700);
  font-size: 20px;
}
.acc-item.accent .acc-ico {
  background: rgba(99, 102, 241, 0.16);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.12);
}
.acc-body { min-width: 0; flex: 1; }
.acc-label {
  font-size: 15px; font-weight: 600; color: #fff;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.acc-sub {
  margin-top: 2px;
  font-size: 12px; color: var(--white-55);
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.acc-chev { flex-shrink: 0; color: var(--white-40); font-size: 22px; line-height: 1; }

/* bloco de indicação (link + botão compartilhar), aberto inline */
.acc-referral {
  margin-top: 4px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.14);
}
.acc-referral-link {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--crimson-400);
  word-break: break-all;
  margin-bottom: 12px;
}
.acc-share-btn {
  appearance: none; border: none;
  width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--crimson);
  color: #fff; font-size: 14px; font-weight: 700;
  padding: 11px 16px; border-radius: 12px;
  cursor: pointer; outline: none;
  box-shadow: var(--crimson-glow);
  -webkit-tap-highlight-color: transparent;
  transition: background 0.18s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.acc-share-btn:hover { background: var(--crimson-600); }
.acc-share-btn:focus-visible, .acc-share-btn.focused { box-shadow: 0 0 0 3px var(--crimson), var(--crimson-glow); transform: scale(1.02); }

/* texto simples (Meus dispositivos) */
.acc-section-title {
  font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--white-40);
  margin: 4px 0 12px;
}
.acc-prose {
  font-size: 14px; line-height: 1.6; color: var(--white-65);
}
.acc-prose strong { color: #fff; font-weight: 700; }
.acc-prose ul { margin: 12px 0 0; padding-left: 18px; }
.acc-prose li { margin-bottom: 8px; }

/* ---- rodapé: Sair (vermelho discreto) ---- */
.acc-footer {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.acc-logout {
  appearance: none;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  border: 1px solid rgba(99, 102, 241, 0.30);
  background: rgba(99, 102, 241, 0.08);
  color: var(--crimson-400);
  font-size: 14px; font-weight: 600;
  padding: 13px 16px; border-radius: 14px;
  cursor: pointer; outline: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.18s ease, transform 0.12s ease, box-shadow 0.2s ease;
}
.acc-logout:hover { background: rgba(99, 102, 241, 0.16); }
.acc-logout:focus-visible, .acc-logout.focused { box-shadow: 0 0 0 2px var(--crimson); transform: scale(1.02); }
.acc-footer-note { margin-top: 14px; text-align: center; font-size: 11px; color: var(--white-30); }

/* confirmação inline de sair */
.acc-confirm {
  margin-top: 12px;
  display: flex; gap: 10px;
}
.acc-confirm button {
  appearance: none; border: none;
  flex: 1;
  font-size: 14px; font-weight: 700;
  padding: 12px 14px; border-radius: 12px;
  cursor: pointer; outline: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.18s ease;
}
.acc-confirm .yes { background: var(--crimson); color: #fff; box-shadow: var(--crimson-glow); }
.acc-confirm .yes:focus-visible, .acc-confirm .yes.focused { box-shadow: 0 0 0 3px var(--crimson), var(--crimson-glow); transform: scale(1.02); }
.acc-confirm .no { background: var(--glass-bg-strong); color: var(--white-80); box-shadow: var(--glass-shadow); }
.acc-confirm .no:focus-visible, .acc-confirm .no.focused { box-shadow: 0 0 0 2px var(--crimson); transform: scale(1.02); }

/* ---- NOTIFICAÇÕES ---- */
.notif-list { display: flex; flex-direction: column; gap: 10px; }
.notif-item {
  appearance: none;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  text-align: left;
  border: none;
  border-radius: 16px;
  padding: 15px 16px;
  cursor: pointer;
  outline: none;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.notif-item:hover { background: rgba(255, 255, 255, 0.08); }
.notif-item:focus-visible, .notif-item.focused {
  box-shadow: 0 0 0 2px var(--crimson);
  transform: scale(1.02);
  background: rgba(255, 255, 255, 0.08);
}
.notif-item.alert { background: rgba(99, 102, 241, 0.10); }
.notif-item.alert:hover, .notif-item.alert:focus-visible, .notif-item.alert.focused { background: rgba(99, 102, 241, 0.16); }
.notif-ico {
  flex-shrink: 0;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--base-700);
  font-size: 19px;
}
.notif-item.alert .notif-ico { background: rgba(99, 102, 241, 0.20); }
.notif-body { min-width: 0; flex: 1; }
.notif-title {
  font-size: 14px; font-weight: 700; color: #fff;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.notif-text {
  margin-top: 3px;
  font-size: 13px; line-height: 1.45; color: var(--white-65);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.notif-time { margin-top: 6px; font-size: 11px; color: var(--white-40); }
.notif-dot {
  position: absolute;
  top: 14px; right: 14px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--crimson);
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.8);
}
.notif-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px;
  min-height: 50vh;
  text-align: center;
  color: var(--white-40);
}
.notif-empty .big { font-size: 40px; opacity: 0.5; }
.notif-empty .txt { font-size: 15px; }

/* ============================= FAVORITOS / GUIA / LISTA / INDICA (organização = site) ============================= */

/* coração no card (favoritar) */
.card-fav {
  position: absolute; top: 6px; right: 6px; z-index: 3;
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(6, 6, 9, 0.55); color: #fff;
  border: 0; font-size: 15px; line-height: 1; cursor: pointer;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .15s ease, transform .12s ease;
}
.card:hover .card-fav, .card:focus-within .card-fav, .card-fav.on { opacity: 1; }
.card-fav.on { color: var(--crimson, #6366F1); }
.card-fav:active { transform: scale(1.18); }
@media (hover: none) { .card-fav { opacity: 1; background: rgba(6, 6, 9, 0.45); } }

/* botão 🎁 Ganhe 1 mês — roxo do Astro */
.wb-action.wb-indica { color: #c4b5fd; border-color: rgba(99, 102, 241, 0.35); }
.wb-action.wb-indica:hover { background: rgba(99, 102, 241, 0.16); color: #ddd6fe; }

/* GUIA (EPG) — lista de canais com o programa atual */
.guide-list {
  position: relative; z-index: 5; flex: 1; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 6px 12px calc(24px + env(safe-area-inset-bottom));
}
.guide-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  text-align: left; background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 12px;
  padding: 10px 12px; margin: 6px 0; color: #fff; cursor: pointer; outline: none;
  transition: background .12s ease;
}
.guide-row:hover { background: rgba(255, 255, 255, 0.07); }
.guide-row:focus-visible, .guide-row:focus { box-shadow: inset 0 0 0 2px var(--crimson, #6366F1); background: rgba(99, 102, 241, 0.12); }
.guide-logo {
  flex: 0 0 auto; width: 64px; height: 40px; border-radius: 8px; overflow: hidden;
  background: #1c1c22; display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: var(--white-40); font-size: 16px;
}
.guide-logo img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.guide-info { flex: 1; min-width: 0; }
.guide-name { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guide-now { font-size: 13px; color: var(--white-55); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guide-now.live { color: var(--crimson, #6366F1); font-weight: 600; }
.guide-now.muted { color: var(--white-40); }

/* LISTA — índice de categorias */
.catlist {
  position: relative; z-index: 5; flex: 1; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 6px 12px calc(24px + env(safe-area-inset-bottom));
  max-width: 760px; margin: 0 auto; width: 100%;
}
.catlist-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  text-align: left; background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 12px;
  padding: 14px 16px; margin: 6px 0; color: #fff; cursor: pointer; outline: none;
  font-size: 15px; font-weight: 600; transition: background .12s ease;
}
.catlist-item:hover { background: rgba(255, 255, 255, 0.07); }
.catlist-item:focus-visible, .catlist-item:focus { box-shadow: inset 0 0 0 2px var(--crimson, #6366F1); background: rgba(99, 102, 241, 0.12); }
.catlist-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.catlist-arrow { flex: 0 0 auto; color: var(--white-40); font-size: 20px; }

/* MODAL (Ganhe 1 mês / indicação) */
.modal-overlay { z-index: 73; align-items: center; justify-content: center; }

/* Modal "Atendimento WhatsApp": layout que CABE na TV (deitado) sem cortar o QR.
   Deitado = QR à esquerda + número/botões à direita. Em pé = empilhado. O número
   fica grande e visível pro cliente desconfiado salvar/ligar. */
.wa-card { max-width: 700px; width: auto; max-height: 92vh; overflow-y: auto; display: flex; flex-direction: row; align-items: center; gap: 20px; text-align: left; padding: 20px 22px; margin: auto; }
.wa-card .wa-qr { background: #fff; padding: 11px; border-radius: 12px; flex: 0 0 auto; line-height: 0; }
.wa-card .wa-qr img { width: 166px; height: 166px; display: block; }
.wa-card .wa-info { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.wa-card .wa-info h2 { font-size: 19px; margin: 0 0 6px; line-height: 1.15; }
.wa-card .wa-sub { color: #aaa; font-size: 13.5px; margin: 0 0 10px; }
.wa-card .wa-phone { font-size: 22px; font-weight: 800; color: #fff; letter-spacing: .3px; margin: 0 0 14px; white-space: nowrap; }
.wa-card .wa-info .btn { width: 100%; margin-bottom: 9px; }
.wa-card .wa-info .btn:last-child { margin-bottom: 0; }
/* Em pé (tela mais alta que larga): empilha + centraliza */
@media (max-aspect-ratio: 1/1) {
  .wa-card { flex-direction: column; text-align: center; align-items: center; }
  .wa-card .wa-phone { white-space: normal; }
}
.modal-card {
  position: relative; z-index: 5; width: min(440px, 92vw);
  margin: auto; border-radius: 20px; padding: 26px 22px calc(22px + env(safe-area-inset-bottom));
  text-align: center; max-height: 88vh; overflow-y: auto;
}
.modal-emoji { font-size: 40px; }
.modal-title { font-size: 20px; font-weight: 800; color: #fff; margin: 8px 0 6px; }
.modal-sub { font-size: 14px; line-height: 1.5; color: var(--white-65); margin: 0 0 16px; }
.modal-linkbox {
  font-size: 13px; color: var(--white-80); background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10); border-radius: 10px;
  padding: 12px; word-break: break-all; margin-bottom: 16px;
}
.modal-card .cv-pv-play { width: 100%; justify-content: center; margin-bottom: 10px; }
.modal-copy, .modal-close-btn {
  width: 100%; border-radius: 10px; padding: 12px; font-size: 15px; font-weight: 700;
  cursor: pointer; outline: none; border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05); color: #fff; margin-top: 8px;
}
.modal-copy:focus-visible, .modal-close-btn:focus-visible { box-shadow: 0 0 0 2px var(--crimson, #6366F1); }
.modal-close-btn { background: transparent; color: var(--white-55); }

/* [hidden] precisa vencer .wb-action{display:flex} (senão o botão Guia aparece fora do Ao vivo) */
.wb-action[hidden] { display: none !important; }

/* ===================== AVISO DE VENCIMENTO (nudge insistente) ===================== */
.renew-nudge {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(4px);
  padding: 24px; animation: rnFade .22s ease;
}
.renew-nudge[hidden] { display: none; }
@keyframes rnFade { from { opacity: 0; } to { opacity: 1; } }
.rn-card {
  width: min(460px, 94vw); border-radius: 22px; padding: 22px 22px 20px;
  /* cinto de segurança: com 3 botões, em tela BAIXA (TV/celular deitado) o card
     nunca estoura a viewport — rola por dentro em vez de cortar botão. */
  max-height: 94vh; overflow-y: auto;
  text-align: center; color: #fff;
  background: linear-gradient(180deg, #15161b 0%, #0c0d11 100%);
  border: 2px solid var(--crimson, #6366F1);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255,255,255,.04) inset;
  animation: rnPop .3s cubic-bezier(.18,.9,.3,1.2);
}
/* palco do mascote: 1:1, fundo espacial (#0B1020) = os clipes FUNDEM sem borda/halo */
.rn-stage {
  position: relative; width: 190px; height: 190px; margin: 0 auto 4px;
  border-radius: 18px; overflow: hidden; background: #0B1020;
}
.rn-video, .rn-keyframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rn-video[hidden], .rn-keyframe[hidden] { display: none; }
/* balão de fala apontando pro mascote */
.rn-balloon {
  position: relative; margin-top: 14px; padding: 12px 14px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: 14px;
}
.rn-balloon::before {
  content: ''; position: absolute; top: -7px; left: 50%; transform: translateX(-50%) rotate(45deg);
  width: 12px; height: 12px; background: rgba(255,255,255,.05);
  border-left: 1px solid rgba(255,255,255,.1); border-top: 1px solid rgba(255,255,255,.1);
}
/* número em fonte grande (TV sem navegador pra abrir wa.me) */
.rn-whatsnum {
  margin-top: 12px; padding: 12px; border-radius: 12px;
  background: rgba(99,102,241,.14); border: 1px solid rgba(99,102,241,.45);
  color: #eef2ff; font-size: 20px; font-weight: 800; letter-spacing: .3px;
}
.rn-whatsnum[hidden] { display: none; }
/* tela baixa (paisagem): compacta o card pra caber os 3 botões sem rolagem */
@media (max-height: 600px) {
  .rn-card { padding: 14px 18px 12px; }
  .rn-stage { width: 120px; height: 120px; }
  .rn-title { font-size: 18px; }
  .rn-sub { font-size: 13px; margin-top: 4px; }
  .rn-balloon { padding: 9px 11px; margin-top: 10px; }
  .rn-whatsnum { font-size: 17px; padding: 9px; }
  .rn-actions { gap: 7px; margin-top: 12px; }
  .rn-btn { padding: 11px 14px; font-size: 15px; }
  .rn-btn.ghost { padding: 8px; }
}
@keyframes rnPop { from { transform: scale(.82) translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.rn-title { font-size: 22px; font-weight: 800; letter-spacing: -.3px; }
.rn-sub { font-size: 14.5px; color: rgba(255,255,255,.82); margin-top: 8px; line-height: 1.4; }
.rn-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.rn-btn {
  appearance: none; border: 0; border-radius: 14px; cursor: pointer;
  font-weight: 800; font-size: 16px; padding: 15px 16px; outline: none;
  background: rgba(255,255,255,.08); color: #fff;
}
/* o botão principal é o CTA "Falar com meu revendedor" (roxo do Astro, ícone do WhatsApp em branco) */
.rn-btn.primary { background: var(--accent-400); color: #fff; box-shadow: 0 8px 22px rgba(139,92,246,.4); }
.rn-btn.ghost { background: rgba(255,255,255,.06); color: rgba(255,255,255,.7); border: 1px solid rgba(255,255,255,.12); font-weight: 600; font-size: 14px; padding: 11px; }
.rn-btn:focus-visible, .rn-btn:focus { box-shadow: 0 0 0 3px #fff; }
.rn-btn.primary:active { transform: scale(.97); }
/* níveis de urgência (cor da borda do card) — vencimento e teste */
.rn-card.lvl-3, .rn-card.lvl-t30 { border-color: var(--accent-400); }
.rn-card.lvl-2, .rn-card.lvl-t15 { border-color: #ff7a1a; }
.rn-card.lvl-1, .rn-card.lvl-today, .rn-card.lvl-expired, .rn-card.lvl-tend { border-color: var(--crimson, #6366F1); }
@keyframes rnPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.18); } }


body.world-live .home { background: transparent; }
.row-scroll-wrapper { position: relative; display: flex; align-items: center; width: 100%; }
.row-arrow { position: absolute; z-index: 10; background: rgba(0,0,0,0.7); color: white; border: none; font-size: 28px; padding: 10px; cursor: pointer; border-radius: 50%; width: 50px; height: 50px; display: none; }
.row-arrow.left { left: 0px; }
.row-arrow.right { right: 0px; }
@media(pointer: fine) { .row-scroll-wrapper:hover .row-arrow { display: block; } }

/* ---- WhatsApp Modal (+1h30) ---- */
.wa-modal {
  background: var(--base-800); border-radius: 20px; padding: 24px;
  width: min(400px, 92vw); text-align: center; border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.55);
}
.wa-modal h3 { font-size: 20px; font-weight: 800; color: #fff; margin-bottom: 8px; }
.wa-modal p { font-size: 14px; color: var(--white-65); margin-bottom: 20px; line-height: 1.4; }
.wa-input {
  width: 100%; padding: 12px 14px; font-size: 16px; border-radius: 12px;
  background: var(--base-700); border: 1px solid rgba(255,255,255,0.1); color: #fff;
  margin-bottom: 16px; outline: none; text-align: center;
}
.wa-input:focus { border-color: var(--crimson); box-shadow: 0 0 0 2px rgba(99,102,241,0.3); }
.wa-btn {
  width: 100%; padding: 12px; font-weight: 700; font-size: 16px; border-radius: 12px;
  background: var(--accent-400); color: #fff; border: none; cursor: pointer;
  box-shadow: 0 10px 20px rgba(139,92,246,0.3); transition: transform 0.2s;
}
.wa-btn:active { transform: scale(0.97); }
/* foco ROXO visível nos botões do modal WhatsApp (TV/D-pad) — sem isso o
   WebView usa o anel default laranja, fora da marca */
.wa-card .btn:focus-visible, .wa-card button:focus-visible {
  outline: 3px solid var(--accent, #6366F1); outline-offset: 2px;
}

/* Fundo LIMPO na TV. A arte antiga era 1024x1024 (QUADRADA) -> esticava/cortava feio
   em tela widescreen (Firestick) e mostrava as bordas. Trocado por preto limpo;
   o conteúdo preenche a tela. (Pra arte temática: usar imagem WIDESCREEN, não quadrada.) */
body.world-live .home { background: var(--home-bg); }
.row-scroll-wrapper { position: relative; display: flex; align-items: center; width: 100%; }
.row-arrow { position: absolute; z-index: 10; background: rgba(0,0,0,0.7); color: white; border: none; font-size: 28px; padding: 10px; cursor: pointer; border-radius: 50%; width: 50px; height: 50px; display: none; }
.row-arrow.left { left: 0px; }
.row-arrow.right { right: 0px; }
@media(pointer: fine) { .row-scroll-wrapper:hover .row-arrow { display: block; } }


.float-wa { position: fixed; bottom: 20px; right: 20px; z-index: 99999; background: var(--accent-400); color: white; padding: 12px 20px; border-radius: 50px; font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 8px; border: none; cursor: pointer; box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4); animation: waPulse 2s infinite; }
/* respeita o atributo hidden (senao o display:flex acima mostrava o "Ativar Plano"
   ate no LOGIN, sem conta logada — assustava o lead). So aparece quando o JS libera. */
.float-wa[hidden] { display: none !important; }
@keyframes waPulse { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(139,92,246,0.7); } 70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(139,92,246,0); } 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(139,92,246,0); } }

/* ===================== AO VIVO em LISTA (TV / deitado) =====================
   Esquerda: categorias (accordion) -> canais. Direita: player tocando + EPG.
   Usado só quando world=live E a tela é larga (landscape/TV). Em pé usa #rows. */
.ltv { display: flex; gap: 12px; padding: 8px 14px 14px; height: calc(100vh - 60px); box-sizing: border-box; }
.ltv[hidden] { display: none; }
.ltv-side { flex: 0 0 308px; max-width: 42%; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.ltv-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.ltv-player { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: 48vh; background: #000; border-radius: 14px; overflow: hidden; flex: 0 0 auto; }
.ltv-video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.ltv-livetag { position: absolute; top: 10px; left: 12px; z-index: 4; background: var(--live); color: #fff; font-weight: 800; font-size: 12px; letter-spacing: .3px; padding: 4px 9px; border-radius: 7px; }
.ltv-info { flex: 1 1 auto; overflow-y: auto; }

/* categoria (cabeçalho clicável do accordion) */
.ltv-cat { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: rgba(255,255,255,.05); color: var(--white-90, #eaeaf0); border: none; border-radius: 10px; padding: 11px 13px; font-size: 14px; font-weight: 700; cursor: pointer; }
.ltv-cat:focus-visible, .ltv-cat.focus { outline: 3px solid var(--accent, #6366F1); outline-offset: 1px; }
.ltv-cat .ltv-caret { margin-left: auto; opacity: .7; transition: transform .15s; }
.ltv-cat.open .ltv-caret { transform: rotate(90deg); }
.ltv-cat.open { background: rgba(99,102,241,.16); }
.ltv-cat.ltv-cat-continue { background: rgba(99,102,241,.14); border: 1px solid rgba(165,180,252,.28); color: #fff; }
.ltv-cat.ltv-cat-continue.open { background: rgba(99,102,241,.28); }

/* canais (itens dentro da categoria aberta) */
.ltv-chans { display: flex; flex-direction: column; gap: 2px; padding: 3px 0 6px 8px; }
/* sem isto, o display:flex acima atropela o atributo hidden e a categoria NÃO fecha
   (os canais ficam na tela). Com isto, fechar a categoria (box.hidden=true) some de vez. */
.ltv-chans[hidden] { display: none; }
.ltv-chan { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; background: transparent; color: var(--white-75, #c9c9d4); border: none; border-radius: 9px; padding: 8px 11px; font-size: 13.5px; cursor: pointer; }
.ltv-chan:focus-visible, .ltv-chan.focus { outline: 3px solid var(--accent, #6366F1); outline-offset: 1px; color: #fff; }
.ltv-chan.sel { background: rgba(99,102,241,.22); color: #fff; font-weight: 600; }
.ltv-chan-thumb { width: 30px; height: 30px; border-radius: 6px; object-fit: contain; background: rgba(255,255,255,.06); flex: 0 0 auto; }
.ltv-chan-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ltv-msg { padding: 14px; color: var(--white-50, #8a8a96); font-size: 13px; }

/* info à direita (título + Assistir + EPG) */
.ltv-info-title { font-size: 19px; font-weight: 800; margin: 2px 0 8px; color: #fff; }
.ltv-watch { display: inline-flex; align-items: center; gap: 7px; background: var(--accent, #6366F1); color: #fff; font-weight: 800; font-size: 13.5px; padding: 8px 15px; border: none; border-radius: 9px; cursor: pointer; margin-bottom: 12px; transition: transform .08s ease, filter .12s ease; }
.ltv-watch:focus-visible, .ltv-watch.focus { outline: 3px solid #fff; outline-offset: 2px; }
/* feedback de apertar: "recua" + escurece de leve (toque E OK do controle) */
.ltv-watch:active { transform: scale(0.95); filter: brightness(.94); }
.ltv-player.previewing .ltv-video { opacity: 1; }


/* ===================== 1.0.9.3 — PACOTE A (busca inteira, Ao vivo com nome, Voltar, Continuar) ===================== */
/* Card do Ao vivo: nome sempre visível; logo inteiro (contain) só depois de carregar; iniciais sobre cor do nome. */
.card.live-card { background: #0b0f1d; }
.card.live-card .live-art {
  position: absolute; left: 0; right: 0; top: 0; bottom: 30px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, hsl(var(--live-hue, 230), 45%, 27%), hsl(var(--live-hue, 230), 55%, 12%));
  overflow: hidden;
}
.card.live-card .live-ini {
  font-size: 26px; font-weight: 800; letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.9); text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
.card.live-card .live-logo {
  position: absolute; left: 18px; top: 10px;
  width: calc(100% - 36px); height: calc(100% - 20px);
  object-fit: contain; object-position: center;
  opacity: 0; transition: opacity 0.25s ease; transform: none;
}
.card.live-card .live-art.has-logo { background: radial-gradient(ellipse at center, #1f2645 0%, #0b0f1d 78%); }
.card.live-card .live-art.has-logo .live-logo { opacity: 1; }
.card.live-card .live-art.has-logo .live-ini { display: none; }
.card.live-card:hover img, .card.live-card.focused img { transform: none; }
.card.live-card .live-name {
  position: absolute; left: 0; right: 0; bottom: 0; height: 30px;
  display: flex; align-items: center; padding: 0 10px;
  background: rgba(0, 0, 0, 0.62);
}
.card.live-card .live-name p {
  margin: 0; font-size: 12.5px; font-weight: 600; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card.live-card .card-badge { z-index: 2; }
.card.live-card .card-fav { z-index: 3; }

/* Série sempre ACIMA de Ver tudo/Busca/Favoritos (abre por cima deles; o Voltar fecha ela primeiro). */
#seriesOverlay { z-index: 72; }

/* Busca no catálogo inteiro: situação + seções por mundo + "mostrar mais". */
.search-status { text-align: center; color: var(--white-40); font-size: 13px; padding: 2px 16px 10px; }
.search-sec-h { display: flex; align-items: baseline; gap: 8px; margin: 14px 4px 10px; font-size: 16px; font-weight: 700; color: #fff; }
.search-sec-h .n { color: var(--white-40); font-weight: 600; font-size: 14px; }
.search-grid.wide { grid-template-columns: repeat(auto-fill, minmax(190px, 250px)); }
.search-grid.wide .card.wide { width: 100%; }
.search-more {
  display: block; margin: 14px auto 6px; padding: 10px 20px; border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.06);
  color: #fff; font-size: 14px; font-weight: 600; cursor: pointer;
}
.search-more:focus-visible, .search-more:focus { outline: none; box-shadow: 0 0 0 2px var(--crimson, #6366F1); }

/* Continuar assistindo (Séries): selo com o episódio em que parou. */
.card .card-ep-badge {
  position: absolute; left: 8px; bottom: 8px; z-index: 2;
  border-radius: 8px; background: rgba(0, 0, 0, 0.72); color: #fff;
  font-size: 11px; font-weight: 700; padding: 3px 7px;
}
.sd-ep.resume-here { box-shadow: inset 3px 0 0 var(--accent, #6366F1); }
.sd-ep .sd-ep-resume { font-size: 11px; font-weight: 700; color: var(--accent, #8B5CF6); margin-top: 2px; }

/* ===================== 1.0.9.5 — PACOTE B: tela de detalhe (modelo da Roku) ===================== */
#seriesOverlay .overlay-inner {
  margin-top: 0; max-height: none; height: 100%;
  padding: 72px 40px calc(32px + env(safe-area-inset-bottom));
}
#seriesOverlay .overlay-scrim { background: linear-gradient(90deg, rgba(6, 6, 9, 0.94) 0%, rgba(6, 6, 9, 0.82) 55%, rgba(6, 6, 9, 0.6) 100%); }
.dt { display: flex; gap: 36px; align-items: flex-start; max-width: 1400px; margin: 0 auto; }
.dt-poster {
  flex: 0 0 auto; width: 250px; aspect-ratio: 2 / 3; border-radius: 16px; overflow: hidden;
  background: linear-gradient(135deg, var(--base-700, #1a1f35), #000); box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.7);
}
.dt-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dt-info { flex: 1; min-width: 0; }
.dt-info .sd-title { margin-top: 0; }
.dt-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0 14px; }
.dt-btn {
  appearance: none; border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.08);
  color: #fff; font-size: 16px; font-weight: 700; padding: 12px 22px; border-radius: 12px; cursor: pointer; outline: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.dt-btn.primary { background: var(--accent, #6366F1); border-color: transparent; }
.dt-btn:focus-visible { box-shadow: 0 0 0 3px #fff; transform: scale(1.05); }
.dt-btn:active { transform: scale(0.97); }
.dt-credits { color: var(--white-65); font-size: 14px; margin-top: 12px; line-height: 1.5; }
.dt-loading { color: var(--white-40); font-size: 14px; margin-top: 12px; }
.sd-ep-dur { font-size: 12px; color: var(--white-40); margin-top: 2px; }
@media (max-width: 720px) {   /* celular em pé: capa em cima, menor */
  #seriesOverlay .overlay-inner { padding: 60px 18px calc(28px + env(safe-area-inset-bottom)); }
  .dt { flex-direction: column; gap: 18px; }
  .dt-poster { width: 44vw; max-width: 210px; align-self: center; }
  .dt-actions .dt-btn { flex: 1 1 auto; text-align: center; }
}

#seriesInner:focus { outline: none; }   /* foco neutro do painel não desenha borda */

/* 1.0.9.5: tela inativa SEMPRE escondida. Desde a 1.0.0 a regra ".home { display:flex }" (mais abaixo no arquivo
   que ".view { display:none }") deixava a tela inicial montada EMBAIXO da tela de entrada: qualquer rolagem (foco
   do controle, teclado da TV) mostrava a tela inicial deslogada por baixo do formulário. */
.view:not(.active) { display: none; }

/* 1.0.9.5: janelas por cima da tela inicial com fundo OPACO, nas cores do Astro (achado da TV em 06/10). Antes:
   busca, Ver tudo/categoria, favoritos, guia, lista, conta e avisos usavam rgba(6,6,9,0.96), e 4% da tela de trás
   vazava (na TV dava para ler "Área do Cliente", "AO VIVO", as abas e as capas atrás dos resultados); a tela de
   detalhe (filme e série com os episódios) deixava até 40% da imagem de fundo atrás da lista de episódios.
   Agora: base escura opaca + brilho índigo (a camada de baixo é opaca, então o conjunto é opaco). */
.overlay-scrim.solid,
#seriesOverlay .overlay-scrim {
  background:
    radial-gradient(ellipse 70% 55% at 85% 0%, rgba(99, 102, 241, 0.16) 0%, rgba(99, 102, 241, 0) 70%),
    linear-gradient(180deg, var(--base-800) 0%, var(--base-900) 55%);
}
#seriesOverlay .overlay-backdrop { display: none; }   /* a imagem de fundo não aparece mais: nem baixa */

/* 1.0.9.5: sem verde e amarelo (ordem do Diego, 06/10 — eram da versão da Copa e não são cor do Astro). Botões do
   WhatsApp no roxo do Astro com o ícone do WhatsApp em branco (desenho próprio, sem arquivo externo). */
.btn-primary.wa-cta { background: var(--accent-400); }
.btn-primary.wa-cta:hover { background: var(--accent-600); }
.wa-cta::before, .rn-btn.primary::before {
  content: ''; display: inline-block; width: 1.2em; height: 1.2em; margin-right: .5em; vertical-align: -0.24em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M12 2a10 10 0 0 0-8.6 15.1L2 22l5-1.3A10 10 0 1 0 12 2zm0 1.8a8.2 8.2 0 1 1-4.2 15.3l-.3-.2-3 .8.8-2.9-.2-.3A8.2 8.2 0 0 1 12 3.8z'/%3E%3Cpath fill='%23fff' d='M8.6 7.2c-.2 0-.5 0-.7.3-.3.3-1 1-1 2.4s1 2.8 1.2 3c.1.2 2 3.2 5 4.4 2.5 1 3 .8 3.5.7.6-.1 1.8-.7 2-1.4.3-.7.3-1.3.2-1.4l-.5-.3-1.8-.9c-.2-.1-.4-.1-.6.1l-.8 1c-.1.2-.3.2-.6.1-.3-.1-1.1-.4-2.1-1.3-.8-.7-1.3-1.5-1.5-1.8-.1-.3 0-.4.1-.5l.4-.5.3-.4v-.5l-.8-2c-.2-.5-.4-.5-.6-.5h-.5z'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* 1.0.9.5: Ao vivo em lista — "Minha lista" do canal ao lado do "Assistir em tela cheia" (alcançável pelo controle). */
.ltv-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.ltv-actions .ltv-watch { margin-bottom: 0; }
.ltv-fav { display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, 0.08); color: #fff; font-weight: 700; font-size: 13.5px; padding: 8px 14px; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 9px; cursor: pointer; transition: transform .08s ease; }
.ltv-fav.on { border-color: var(--accent-400); color: #ddd6fe; }
.ltv-fav:focus-visible, .ltv-fav:focus { outline: 3px solid #fff; outline-offset: 2px; }
.ltv-fav:active { transform: scale(0.95); }
/* botões do topo do Ver tudo com anel de foco visível no controle */
.catview-top .overlay-close:focus, .catview-mode:focus { outline: 3px solid #fff; outline-offset: 2px; }

/* 1.0.9.5: revenda sem número de WhatsApp -> só o texto "Entre em contato com o seu revendedor." (sem botão e sem QR). */
.wa-sem-numero { margin-top: 14px; font-size: 15px; font-weight: 600; color: var(--white-80); text-align: center; }
.rn-whatsnum.sem-numero { background: none; border: none; padding: 4px 0 0; font-size: 15px; font-weight: 600; color: var(--white-80); letter-spacing: 0; }
