/* ConectaPlay — estilos da interface (palco fixo de 1920x1080, escalado via JS). */

/* Layout desenhado em 1920x1080 e escalado para a tela real (720p, 1080p, 4K).
   Nada de blur/backdrop-filter: GPUs de TV sofrem com isso. */
:root {
  --bg: #07090e;
  --bg-2: #0d1118;
  --panel: #121722;
  --panel-2: #181e2b;
  --line: #222a3a;
  --text: #eef2f8;
  --muted: #8791a7;
  --dim: #545d72;
  --accent: #3f8cff;
  --accent-2: #6aa6ff;
  --accent-3: #8b5cf6;          /* 2ª cor dos degradês (logo, ícone de atualização) */
  --accent-rgb: 63, 140, 255;   /* --accent em R, G, B: brilhos e sombras com rgba() */
  --accent-2-rgb: 106, 166, 255;
  --accent-ink: #ffffff;
  --live: #ff4757;
  --ok: #2ecc8f;
  --warn: #ffb020;
  --red: #e5484d;
  --green: #30a46c;
  --yellow: #f5d90a;
  --blue: #3e8bff;
}

/* Temas (Configurações → Temas). O padrão é o "Azul ConectaPlay" do :root; a escolha
   fica em html[data-theme], aplicada já no <head> do index.html para não piscar. */
html[data-theme="roxo"] {
  --bg: #060409;
  --bg-2: #0c0912;
  --panel: #15101f;
  --panel-2: #1e1729;
  --line: #2d2340;
  --text: #f3effa;
  --muted: #9b90b1;
  --dim: #605674;
  --accent: #8b5cf6;
  --accent-2: #a78bfa;
  --accent-3: #ec4899;
  --accent-rgb: 139, 92, 246;
  --accent-2-rgb: 167, 139, 250;
}
html[data-theme="escuro"] {
  --bg: #000000;
  --bg-2: #050505;
  --panel: #0e0e0e;
  --panel-2: #181818;
  --line: #262626;
  --text: #f2f2f2;
  --muted: #8f8f8f;
  --dim: #565656;
  --accent: #474747;
  --accent-2: #b5b5b5;
  --accent-3: #1c1c1c;
  --accent-rgb: 150, 150, 150;
  --accent-2-rgb: 190, 190, 190;
}

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

/* Tela presa no lugar: a página inteira não rola nem é arrastada pelo dedo.
   A rolagem das listas é feita pelo próprio app (setas, roda do mouse e arraste). */
html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  position: fixed;
  /* Fundo do app na tela inteira (antes ficava só no palco 16:9, com faixas pretas
     em volta): celular 20:9 e TV com proporção diferente ficam preenchidos até as bordas. */
  background:
    radial-gradient(70% 60% at 85% -10%, rgba(var(--accent-rgb), .14), transparent 60%),
    radial-gradient(55% 55% at -10% 110%, rgba(255, 71, 87, .08), transparent 60%),
    var(--bg);
  background-size: cover;
  color: var(--text);
  font-family: "Outfit", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  cursor: default;
  /* Comportamento de app nativo: sem seleção de texto, menu de "copiar" ao segurar,
     realce azul ao tocar nem zoom (a tela fica presa no lugar). */
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  touch-action: none;
  overscroll-behavior: none;
}
/* Celular/tablet (classe is-mobile, posta pelo sensor de zoom do index.html): página
   solta para o zoom de pinça. touch-action: none no html/body anulava a pinça em todos os
   elementos da página (o navegador combina o touch-action de todos os ancestrais), mesmo
   com a viewport em user-scalable=yes. Na TV e no computador continua tudo travado. */
html.is-mobile, html.is-mobile body {
  position: relative;
  overflow: visible;
  touch-action: manipulation;        /* pinça e arraste da tela ampliada; sem zoom de toque duplo */
  overscroll-behavior: auto;
}
/* Listas (rolagem virtual pelo app): um dedo rola a lista, dois dedos dão zoom */
html.is-mobile .vport { touch-action: pinch-zoom; }
html.is-mobile #ep-row { touch-action: pan-x pinch-zoom; }

/* Campos de digitação (ativação) continuam editáveis. */
input, textarea { -webkit-user-select: text; user-select: text; }

#stage {
  position: absolute;
  left: 0;
  top: 0;
  width: 1920px;
  height: 1080px;
  overflow: hidden;
  z-index: 1;
  transform-origin: 0 0;
  background: transparent;   /* o fundo é o do html/body, que cobre a tela toda */
}

.screen { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: none; }
.screen.is-visible { display: block; }

.brand { display: flex; align-items: center; font-weight: 700; letter-spacing: -.01em; }
.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-name { font-size: 30px; }
.brand-name b { color: var(--accent-2); font-weight: 700; }
.brand-tagline { margin-top: 4px; font-size: 18px; font-weight: 400; letter-spacing: 0; color: var(--muted); }

/* Espaço da logo ConectaPlay (.brand-logo-slot): uma <img> quadrada de alta
   resolução (mín. 512x512) preenche o bloco com o mesmo arredondamento.
   Para logo redonda, acrescente a classe is-circle. */
.brand-logo-slot { overflow: hidden; flex-shrink: 0; }
.brand-logo-slot > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand-logo-slot.is-circle { border-radius: 50%; }

/* Logo ConectaPlay ao lado do nome: maior nas telas de ativação/carregamento
   (junto do slogan) e compacta no topo da tela de canais. */
.tv-logo-main {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 15px;
}
.tv-logo-mini {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
  margin-right: 10px;
}
/* o espaço até o nome já vem do margin-right da logo */
.brand > .tv-logo-main + *,
.brand > .tv-logo-mini + * { margin-left: 0; }

/* Logo ConectaPlay (logo.png) na tela de ativação: tamanho controlado e centralizada.
   A arte é circular sobre fundo escuro; o border-radius recorta os cantos quadrados. */
.brand-logo-img {
  max-width: 200px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 20px auto;
  border-radius: 50%;
}

/* ---------- Ativação e carregamento: layout vertical centralizado ---------- */
/* Centralizado de verdade na altura da tela: o meio do bloco (logo + textos + LED + MAC)
   fica no meio dos 1080 px, qualquer que seja a altura do conteúdo. O rodapé
   (validade) reserva ~120 px embaixo, por isso o centro sobe 40 px. */
.splash-box {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1200px;
  margin-left: -600px;
  margin-top: -40px;
  transform: translateY(-50%);
  text-align: center;
}
.splash-logo {
  display: block;
  width: 240px;
  height: 240px;
  margin: 0 auto;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 70px rgba(var(--accent-rgb), .28);
}
.splash-name { margin-top: 26px; font-size: 68px; font-weight: 700; line-height: 1; letter-spacing: -.01em; }
.splash-name b { color: var(--accent-2); font-weight: 700; }
.splash-tagline { margin-top: 14px; font-size: 26px; color: var(--muted); }
.splash-intro { margin-top: 20px; font-size: 22px; color: var(--muted); }

/* LED de status logo abaixo do slogan */
.act-status { margin-top: 44px; }
#screen-activation .act-status { display: none; }          /* modo local: sem LED */
#screen-activation.is-cloud .act-status { display: block; }
.status-line { display: inline-flex; align-items: center; }
.status-line > * + * { margin-left: 18px; }
.status-led {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #545d72;
}
.status-title { font-size: 32px; font-weight: 600; line-height: 1.3; }
.status-detail { margin-top: 10px; min-height: 28px; font-size: 21px; color: var(--muted); font-variant-numeric: tabular-nums; }
@keyframes led-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.82); } }
.st-checking .status-led { background: var(--accent); box-shadow: 0 0 16px rgba(var(--accent-rgb), .8); animation: led-pulse 1.2s ease-in-out infinite; }
.st-pendente .status-led { background: #ffcc00; box-shadow: 0 0 18px rgba(255, 204, 0, .85); animation: led-pulse 1.8s ease-in-out infinite; }
.st-erro .status-led { background: #ff3333; box-shadow: 0 0 18px rgba(255, 51, 51, .9); }
.st-ativo .status-led { background: #00ff66; box-shadow: 0 0 18px rgba(0, 255, 102, .85); }
.st-alerta .status-led { background: #ff9900; box-shadow: 0 0 18px rgba(255, 153, 0, .85); }   /* liberado, vence em breve */
.st-offline .status-led { background: #545d72; }
.st-erro .status-title { color: #ff7b86; }

/* Endereço MAC (o cliente informa ao revendedor) */
.mac-card {
  display: inline-block;
  margin-top: 36px;
  padding: 20px 56px 22px;
  border-radius: 22px;
  background: var(--panel);
  border: 2px solid var(--line);
}
.mac-card.is-highlight { border-color: var(--accent); box-shadow: 0 0 0 6px rgba(var(--accent-rgb), .12); }
.mac-label { font-size: 18px; color: var(--muted); text-transform: uppercase; letter-spacing: .14em; }
.mac-value {
  margin-top: 6px;
  font-size: 54px;
  font-weight: 600;
  letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
  color: var(--accent-2);
}
.mac-meta { margin-top: 6px; font-size: 18px; color: var(--dim); }

/* Rodapé discreto: validade do acesso */
.splash-footer { position: absolute; left: 0; right: 0; bottom: 46px; text-align: center; }
.splash-validity { min-height: 26px; font-size: 20px; color: var(--muted); letter-spacing: .03em; }
.splash-validity.is-expired { color: #ff7b86; }
.splash-validity.is-alert { color: #ff9900; }
.top-validity { font-size: 17px; font-weight: 500; color: #ff9900; letter-spacing: .02em; }
.splash-hint { margin-top: 10px; font-size: 17px; color: var(--dim); }

/* ---------- Bloqueio por atraso (teste gratuito / plano vencido) ----------
   Painel centralizado que substitui a ativação enquanto o status for 'atraso'.
   body.is-blocked esconde de vez o player e a navegação de canais. */
.block-panel { display: none; }
#screen-activation.is-blocked .splash-box { display: none; }
/* Fundo da tela de bloqueio na página inteira (não só no palco 16:9) */
html body.is-blocked {
  background: radial-gradient(ellipse at 50% 30%, rgba(var(--accent-rgb), .16), transparent 60%),
              radial-gradient(ellipse at 50% 100%, rgba(37, 211, 102, .10), transparent 55%), var(--bg);
  background-size: cover;
}
#screen-activation.is-blocked .block-panel {
  display: block;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1320px;
  margin-left: -660px;
  margin-top: -40px;
  transform: translateY(-50%);
  padding: 56px 80px 50px;
  border-radius: 36px;
  text-align: center;
  background: linear-gradient(180deg, #151b28, #0e131c);
  border: 2px solid #232c3e;
  box-shadow: 0 40px 120px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .05);
}
/* Logo principal da tela de boas-vindas/bloqueio (o painel não tem max-height:
   a altura acompanha a logo). border-radius recorta os cantos da arte circular. */
#tv-logo-welcome {
  display: block !important;
  width: 240px !important;
  min-width: 240px !important;
  max-width: none !important;
  height: 240px !important;
  min-height: 240px !important;
  max-height: none !important;
  flex-shrink: 0 !important;
  object-fit: cover !important;
  margin: 0 auto 25px auto !important;
  border-radius: 50% !important;
  box-shadow: 0 0 80px rgba(var(--accent-rgb), .35);
}
.block-badge {
  display: inline-flex;
  align-items: center;
  margin-top: 28px;
  padding: 8px 22px;
  border-radius: 999px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #ff7b86;
  background: rgba(255, 51, 51, .1);
  border: 1px solid rgba(255, 51, 51, .35);
}
.block-badge-led {
  width: 14px;
  height: 14px;
  margin-right: 12px;
  border-radius: 50%;
  background: #ff3333;
  box-shadow: 0 0 12px rgba(255, 51, 51, .9);
}
.block-title { margin-top: 26px; font-size: 56px; font-weight: 700; line-height: 1.15; letter-spacing: -.01em; }
.block-subtitle { margin-top: 16px; font-size: 32px; font-weight: 600; color: var(--accent-2); }
.block-lead { max-width: 1000px; margin: 22px auto 0; font-size: 26px; line-height: 1.45; color: var(--muted); }
/* WhatsApp + MAC lado a lado: o cliente vê os dois de uma vez para mandar a mensagem */
.block-contact { display: flex; align-items: stretch; justify-content: center; margin-top: 34px; }
.block-cta {
  display: inline-flex;
  align-items: center;
  padding: 20px 40px 20px 32px;
  border-radius: 28px;
  text-decoration: none;
  color: #ffffff;
  background: linear-gradient(135deg, #25d366, #128c4a);
  box-shadow: 0 18px 50px rgba(37, 211, 102, .35), 0 0 0 8px rgba(37, 211, 102, .1);
}
.block-whats-icon { width: 58px; height: 58px; flex-shrink: 0; margin-right: 20px; color: #ffffff; }
.block-whats-num { font-size: 40px; font-weight: 700; letter-spacing: .01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.block-mac-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-left: 24px;
  padding: 12px 30px;
  border-radius: 28px;
  text-align: left;
  background: var(--panel-2);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 6px rgba(var(--accent-rgb), .12);
}
.block-mac-label { font-size: 16px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.block-mac-value { margin-top: 4px; font-size: 36px; font-weight: 700; letter-spacing: .05em; color: var(--accent-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.block-lead b { color: var(--text); font-weight: 700; white-space: nowrap; }
/* E-mail de suporte: discreto, no mesmo tom dos contatos de rodapé */
.block-email { margin-top: 26px; font-size: 20px; color: var(--dim); letter-spacing: .02em; }
.block-email a { color: var(--muted); font-weight: 500; text-decoration: none; }
.is-browser .block-email a[href] { cursor: pointer; border-bottom: 1px solid rgba(135, 145, 167, .35); }
.is-browser .block-email a[href]:hover { color: var(--accent-2); border-bottom-color: var(--accent-2); }
.block-subtitle:empty { display: none; }
/* Aparelho novo: selo amarelo "aguardando liberação" em vez do vermelho */
.block-panel.is-novo .block-badge { color: #ffcc00; background: rgba(255, 204, 0, .1); border-color: rgba(255, 204, 0, .4); }
.block-panel.is-novo .block-badge-led { background: #ffcc00; box-shadow: 0 0 12px rgba(255, 204, 0, .9); }
.block-panel.is-novo .block-lead { max-width: 1120px; font-size: 30px; color: var(--text); }
/* Licença Anual do app vencida: bloqueio total, tela vermelha */
html body.is-blocked.is-app-expired {
  background: radial-gradient(ellipse at 50% 30%, rgba(255, 51, 51, .28), transparent 62%),
              radial-gradient(ellipse at 50% 100%, rgba(160, 0, 0, .35), transparent 60%), #140405;
  background-size: cover;
}
.block-panel.is-app {
  background: linear-gradient(180deg, #2a0b0e, #16060a);
  border-color: rgba(255, 70, 70, .55);
  box-shadow: 0 40px 120px rgba(0, 0, 0, .6), 0 0 90px rgba(255, 40, 40, .25), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.block-panel.is-app .block-badge { color: #ff6b6b; background: rgba(255, 51, 51, .14); border-color: rgba(255, 70, 70, .5); }
.block-panel.is-app .block-badge-led { background: #ff3333; box-shadow: 0 0 14px rgba(255, 51, 51, .95); }
.block-panel.is-app .block-title { color: #fff; }
.block-panel.is-app .block-subtitle { color: #ff8a8a; }
.block-panel.is-app .block-lead { max-width: 1120px; font-size: 30px; color: var(--text); }
.block-panel.is-app #tv-logo-welcome { box-shadow: 0 0 80px rgba(255, 51, 51, .45); }
/* Navegador/celular: é um link clicável */
.is-browser .block-cta[href] { cursor: pointer; }
.is-browser .block-cta[href]:hover { box-shadow: 0 18px 60px rgba(37, 211, 102, .5), 0 0 0 10px rgba(37, 211, 102, .16); }

/* Bloqueado: nada de vídeo, controles do player ou lista de canais por trás */
body.is-blocked #video-layer,
body.is-blocked #player-ui > :not(#update-popup):not(#pix-popup),
body.is-blocked #screen-home { display: none !important; }

/* Modo local (desenvolvimento): formulário abaixo do MAC, logo menor para caber */
#screen-activation.is-cloud .local-only { display: none; }
#screen-activation:not(.is-cloud) .splash-logo { width: 140px; height: 140px; }
#screen-activation:not(.is-cloud) .splash-name { margin-top: 14px; font-size: 48px; }
#screen-activation:not(.is-cloud) .mac-card { margin-top: 20px; padding: 12px 40px; }
#screen-activation:not(.is-cloud) .mac-value { font-size: 40px; }
.act-form { width: 760px; margin: 0 auto; text-align: left; }

.field { margin-top: 30px; }
.field label { display: block; font-size: 19px; color: var(--muted); margin-bottom: 10px; letter-spacing: .02em; }
.field input {
  width: 100%;
  height: 76px;
  padding: 0 26px;
  border-radius: 16px;
  border: 3px solid var(--line);
  background: var(--bg-2);
  color: var(--text);
  font: inherit;
  font-size: 28px;
  outline: none;
}
.field input::placeholder { color: var(--dim); }

.act-actions { display: flex; margin-top: 38px; }
.btn {
  height: 76px;
  padding: 0 34px;
  border-radius: 16px;
  border: 3px solid transparent;
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-size: 26px;
  font-weight: 600;
  cursor: pointer;
}
.btn.primary { flex: 1; background: var(--accent); color: var(--accent-ink); }

.is-focused.field input,
.field input:focus { border-color: var(--accent); background: #0f1624; }

/* Mostrar/ocultar senha: botão de olho dentro do campo */
.pass-wrap { position: relative; }
.pass-wrap input { padding-right: 100px; }
.eye-btn {
  position: absolute;
  right: 10px;
  top: 8px;
  width: 64px;
  height: 60px;
  border-radius: 12px;
  border: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.eye-btn svg { width: 32px; height: 32px; }
.eye-btn .eye-off { display: none; }
.eye-btn.is-on .eye-open { display: none; }       /* senha visível: mostra o olho riscado */
.eye-btn.is-on .eye-off { display: block; }
.eye-btn:hover { color: var(--text); }
.eye-btn.is-focused { border-color: #fff; background: var(--panel-2); color: #fff; }
.btn.is-focused { border-color: #fff; transform: scale(1.04); }
.btn.primary.is-focused { background: var(--accent-2); }

.act-msg { margin-top: 26px; min-height: 30px; font-size: 22px; color: var(--muted); }
.act-msg.is-error { color: #ff7b86; }


/* ---------- Carregamento ---------- */
/* Usa o layout .splash; barra de progresso e "X MB · Y itens lidos" ficam ocultas (atributo hidden). */
.loading-bar[hidden], .loading-meta[hidden] { display: none; }

/* ---------- Home ---------- */
.topbar { position: absolute; left: 56px; right: 56px; top: 0; height: 120px; display: flex; align-items: center; }
.topbar .brand { width: 300px; flex-shrink: 0; }   /* 5 abas + Atualizar: sobra espaço para o relógio */

.tabs { display: flex; }
.tab {
  position: relative;
  height: 64px;
  padding: 0 20px;
  border-radius: 32px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  font-size: 23px;
  font-weight: 600;
  color: var(--muted);
  border: 3px solid transparent;
  cursor: pointer;
}
.tab svg { width: 26px; height: 26px; }
.tab .count { font-size: 18px; font-weight: 500; color: var(--dim); font-variant-numeric: tabular-nums; }
.tab.is-selected { color: var(--text); background: var(--panel-2); }
.tab.is-selected .count { color: var(--muted); }
.tabs.is-active .tab.is-selected { background: var(--accent); color: #fff; border-color: #fff; }
.tabs.is-active .tab.is-selected .count { color: rgba(255, 255, 255, .8); }
/* "Atualizar Lista": só o ícone (a barra do topo não comporta mais uma aba inteira);
   o nome aparece quando o botão está focado pelo controle ou com o mouse em cima. */
.tab-refresh { padding: 0 17px; }
.tab-refresh .tab-refresh-label { display: none; }
.tab-refresh.is-focused .tab-refresh-label, .is-browser .tab-refresh:hover .tab-refresh-label {
  display: block; position: absolute; top: 74px; right: 0; margin: 0; padding: 8px 16px; border-radius: 12px; z-index: 5;
  background: var(--accent); color: #fff; font-size: 20px; white-space: nowrap; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }
.is-browser .tab-refresh:hover { color: var(--text); background: var(--panel-2); }
.tabs.is-active .tab-refresh.is-focused { background: var(--accent); color: #fff; border-color: #fff; }
/* Com o foco no botão, a aba selecionada volta ao destaque discreto */
.tabs.is-active.refresh-focus .tab.is-selected { color: var(--text); background: var(--panel-2); border-color: transparent; }
.tabs.is-active.refresh-focus .tab.is-selected .count { color: var(--muted); }

.top-right { margin-left: auto; text-align: right; }
.clock { font-size: 34px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Mini LED do status do acesso, ao lado do relógio. Invisível até o servidor
   informar o status (e no modo local, que não tem servidor). */
.status-led-mini {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  margin: 0 8px;
  vertical-align: middle;
  background: #545d72;
  visibility: hidden;
}
/* A cor vem SÓ do status do Supabase, gravado em data-status pelo tv-script.js.
   Verde nunca é padrão: exige data-status="ativo". O laranja do 'alerta' usa
   !important para que nenhuma outra regra o troque de volta. */
.status-led-mini[data-status="ativo"] { visibility: visible; background: #00ff66; box-shadow: 0 0 8px rgba(0, 255, 102, .75); }
.status-led-mini[data-status="atraso"] { visibility: visible; background: #ff3333; box-shadow: 0 0 8px rgba(255, 51, 51, .85); }
#tv-status-led-mini[data-status="alerta"] {
  visibility: visible !important;
  background: #ff9900 !important;
  box-shadow: 0 0 8px rgba(255, 153, 0, .8) !important;
}
.device { font-size: 17px; color: var(--dim); letter-spacing: .04em; }

/* Viewport virtual: posição via transform no trilho, sem scroll nativo */
.vport { position: absolute; overflow: hidden; }
.vtrack { position: absolute; left: 0; top: 0; right: 0; transition: transform .16s ease-out; will-change: transform; }
.vcell { position: absolute; }
.vbar { position: absolute; right: 2px; top: 14px; bottom: 14px; width: 4px; border-radius: 4px; background: rgba(255, 255, 255, .04); }
.vthumb { position: absolute; left: 0; width: 4px; border-radius: 4px; background: var(--dim); }
.vempty { display: none; position: absolute; left: 0; right: 0; top: 40%; text-align: center; font-size: 24px; color: var(--dim); }
.vport.is-empty .vempty { display: block; }
.vport.is-empty .vbar { display: none; }

/* Categorias (coluna da esquerda, geradas a partir do group-title) */
.gfilter {
  position: absolute;
  left: 56px;
  top: 150px;
  width: 420px;
  height: 64px;
  padding: 0 20px;
  border-radius: 18px;
  background: var(--panel);
  border: 3px solid transparent;
  display: flex;
  align-items: center;
  color: var(--dim);
  overflow: hidden;   /* nada da busca (texto, contador) vaza para a grade à direita */
  z-index: 1;
}
.gfilter svg { width: 24px; height: 24px; flex-shrink: 0; }
.gfilter input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 22px;
}
.gfilter input::placeholder { color: var(--dim); }
.gfilter-count { font-size: 17px; color: var(--dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.gfilter.is-active { border-color: var(--accent); background: #0f1624; color: var(--accent-2); }
/* Barra lateral: ocupa só x 56–476 (a grade começa em 506, 30 px de folga), recorta
   o conteúdo e fica numa camada abaixo das grades de conteúdo. */
#groups { left: 56px; top: 226px; width: 420px; max-width: 420px; height: 744px; border-radius: 22px; background: var(--panel); overflow: hidden; z-index: 1; }
.group {
  width: 392px;
  height: 62px;
  padding: 0 22px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  font-size: 23px;
  color: var(--muted);
  cursor: pointer;
}
.group .g-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.group .g-count { font-size: 18px; color: var(--dim); font-variant-numeric: tabular-nums; }
.group.focused { background: var(--panel-2); color: var(--text); }
.group.focused::before { content: ""; width: 5px; height: 28px; margin-left: -12px; border-radius: 4px; background: var(--accent); }
#groups.is-active .group.focused { background: var(--accent); color: #fff; }
#groups.is-active .group.focused::before { background: #fff; }
#groups.is-active .group.focused .g-count { color: rgba(255, 255, 255, .8); }

/* Painel TV ao vivo: lista + prévia */
#live-list { left: 506px; top: 150px; width: 720px; height: 820px; border-radius: 22px; background: var(--panel); z-index: 2; pointer-events: auto; }
.chan {
  width: 692px;
  height: 76px;
  padding: 0 22px 0 18px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  cursor: pointer;
  border: 3px solid transparent;
}
.chan .c-num { width: 62px; font-size: 20px; color: var(--dim); font-variant-numeric: tabular-nums; text-align: right; }
.chan .c-logo {
  position: relative;
  width: 76px;
  height: 50px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 600;
  color: rgba(255, 255, 255, .75);
}
.chan .c-logo img { position: absolute; top: 4px; left: 4px; width: 68px; height: 42px; object-fit: contain; }
/* Logo do tvg-logo carregado: fundo neutro (logos costumam ser PNG transparente) e some a sigla */
.chan .c-logo.has-img { background-color: #1c2331 !important; }
/* Jogos de Hoje: escudo dos dois times no lugar do logo do canal */
.chan .c-crests { display: none; position: absolute; inset: 3px; align-items: center; justify-content: center; gap: 2px; }
.chan .c-crests img { width: 36px; height: 44px; object-fit: contain; position: static; }
.chan.has-crests .c-crests { display: flex; }
.chan.has-crests .c-logo { background-color: #1c2331 !important; }
.chan.has-crests .c-logo > img, .chan.has-crests .c-logo > .initials { visibility: hidden !important; }
.has-img > .initials { display: none; }
.chan .c-text { flex: 1; min-width: 0; }
.chan .c-name { font-size: 23px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chan .c-epg { margin-top: 2px; font-size: 16px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chan .c-live { display: none; font-size: 15px; font-weight: 700; color: var(--live); letter-spacing: .1em; }
.chan.is-playing .c-live { display: block; }
.chan.focused { background: var(--panel-2); }
#live-list.is-active .chan.focused { background: var(--accent); border-color: #fff; }
#live-list.is-active .chan.focused .c-num,
#live-list.is-active .chan.focused .c-epg { color: rgba(255, 255, 255, .8); }
#live-list.is-active .chan.focused .c-live { color: #fff; }

#preview { position: absolute; left: 1256px; top: 150px; width: 608px; height: 820px; }
.preview-screen {
  width: 608px;
  height: 342px;
  border-radius: 6px;
  background: #000;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dim);
  font-size: 22px;
}
.preview-info { margin-top: 30px; padding: 30px; border-radius: 22px; background: var(--panel); height: 418px; }
.badge { display: inline-block; padding: 6px 14px; border-radius: 8px; font-size: 16px; font-weight: 700; letter-spacing: .12em; }
.badge.live { background: var(--live); color: #fff; }
.badge.idle { background: var(--panel-2); color: var(--muted); }
.preview-title { margin-top: 18px; font-size: 38px; font-weight: 600; line-height: 1.15; max-height: 88px; overflow: hidden; }
.preview-group { margin-top: 10px; font-size: 22px; color: var(--muted); }
.preview-now { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 21px; color: var(--muted); }
.preview-now b { color: var(--text); font-weight: 500; }
.preview-hint { margin-top: 14px; font-size: 19px; color: var(--dim); }

/* Painel de pôsteres (Filmes / Séries) */
.pane-head { position: absolute; left: 520px; top: 150px; width: 1330px; height: 56px; display: flex; align-items: baseline; }
.pane-head h2 { font-size: 34px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 1100px; }
.pane-head span { font-size: 21px; color: var(--muted); font-variant-numeric: tabular-nums; }
/* Grade acima da barra lateral e de qualquer camada vizinha: a 1ª coluna sempre recebe o clique.
   Folga à esquerda: 30 px entre a barra (termina em 476) e a grade + 14 px de pad interno. */
#poster-grid { left: 506px; top: 214px; width: 1358px; height: 756px; z-index: 2; pointer-events: auto; }
#poster-grid .vtrack, #poster-grid .vcell, #live-list .vtrack, #live-list .vcell { pointer-events: auto; }
.card { width: 170px; height: 309px; cursor: pointer; pointer-events: auto; transition: transform .14s ease-out; }
.poster {
  position: relative;
  width: 170px;
  height: 255px;
  border-radius: 14px;
  overflow: hidden;
  border: 3px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}
.poster .initials { font-size: 44px; font-weight: 700; color: rgba(255, 255, 255, .55); }
.poster img { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.poster .eps { position: absolute; right: 8px; top: 8px; padding: 3px 9px; border-radius: 7px; background: rgba(0, 0, 0, .7); font-size: 15px; font-weight: 600; }
/* Continuar Assistindo: mini barra de progresso na base da capa */
.poster .prog { display: none; position: absolute; left: 8px; right: 8px; bottom: 8px; height: 6px; border-radius: 3px; background: rgba(0, 0, 0, .65); overflow: hidden; }
.poster .prog.is-on { display: block; }
.poster .prog span { display: block; height: 100%; width: 0; background: var(--live); }
.card-title { margin-top: 10px; font-size: 18px; line-height: 22px; color: var(--muted); height: 44px; overflow: hidden; }
.card.focused .poster { border-color: var(--dim); }
#poster-grid.is-active .card.focused { transform: scale(1.07); }
#poster-grid.is-active .card.focused .poster { border-color: #fff; }
#poster-grid.is-active .card.focused .card-title { color: var(--text); }

/* Conta */
/* ---------- Configurações (aba "account") ---------- */
#account-pane { position: absolute; left: 56px; top: 150px; width: 1808px; height: 820px; display: none; }
#account-pane.is-visible { display: flex; }

/* Menu lateral: mesma largura da barra de categorias */
.set-menu { width: 420px; flex-shrink: 0; padding: 18px 14px; border-radius: 22px; background: var(--panel); display: flex; flex-direction: column; }
.set-item { height: 76px; padding: 0 22px; border-radius: 16px; display: flex; align-items: center; font-size: 25px; font-weight: 600; color: var(--muted); border: 3px solid transparent; cursor: pointer; }
.set-item + .set-item { margin-top: 8px; }
.set-item svg { width: 28px; height: 28px; flex-shrink: 0; }
.set-item > * + * { margin-left: 16px; }
.set-item.is-selected { color: var(--text); background: var(--panel-2); }
.set-item.is-selected::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); }
.set-item.is-focused { color: #fff; background: var(--accent); border-color: #fff; }
.set-item.is-focused::after { background: #fff; }
.set-version { margin-top: auto; padding: 22px; border-radius: 16px; background: linear-gradient(135deg, rgba(var(--accent-rgb), .22), rgba(var(--accent-rgb), .06)); border: 1px solid rgba(var(--accent-rgb), .35); }
.set-version-label { font-size: 16px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.set-version-value { margin-top: 6px; font-size: 40px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }

/* Painel da seção aberta */
.set-panel { flex: 1; min-width: 0; margin-left: 24px; padding: 46px 54px; border-radius: 22px; background: var(--panel); border: 1px solid var(--line); overflow: hidden; }
.set-sec { display: none; }
.set-sec.is-visible { display: block; }
.set-sec h2 { font-size: 38px; font-weight: 600; }
.set-lead { margin-top: 12px; font-size: 22px; line-height: 1.45; color: var(--muted); max-width: 1100px; }
.acc-rows { margin-top: 24px; }
.acc-row { display: flex; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 24px; }
.acc-row:last-child { border-bottom: none; }
.acc-row dt { width: 300px; color: var(--muted); }
.acc-row dd { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.acc-actions { display: flex; margin-top: 36px; }
.acc-actions .btn.danger.is-focused { background: var(--red); }

/* Opções (temas e idiomas): cartões lado a lado, o em uso marcado com ✓ */
.set-opts { display: flex; margin-top: 34px; }
.set-opts > * + * { margin-left: 26px; }
.set-opt { width: 330px; padding: 20px; border-radius: 20px; background: var(--panel-2); border: 3px solid var(--line); cursor: pointer; }
.theme-swatch { height: 150px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .08); }
.set-opt-name { margin-top: 16px; font-size: 26px; font-weight: 600; }
.set-opt-check { margin-top: 6px; min-height: 26px; font-size: 20px; font-weight: 600; color: var(--ok); visibility: hidden; }
.set-opt.is-on { border-color: var(--accent); }
.set-opt.is-on .set-opt-check { visibility: visible; }
.set-opt.is-focused { border-color: #fff; background: var(--accent); color: #fff; transform: scale(1.04); box-shadow: 0 16px 44px rgba(var(--accent-rgb), .4); }
.set-opt.is-focused .set-opt-check { color: #fff; }
.set-opt-flag { width: 76px; height: 76px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 700; letter-spacing: .04em; background: var(--bg-2); color: var(--accent-2); }
.set-opt.is-focused .set-opt-flag { background: rgba(255, 255, 255, .18); color: #fff; }

/* Ferramentas de suporte */
.set-tools { margin-top: 30px; display: flex; }
.set-tools > * + * { margin-left: 26px; }
.set-tool { width: 560px; padding: 26px 28px; border-radius: 20px; background: var(--panel-2); border: 3px solid var(--line); display: flex; align-items: flex-start; cursor: pointer; }
.set-tool svg { width: 40px; height: 40px; flex-shrink: 0; color: var(--accent-2); }
.set-tool > * + * { margin-left: 20px; }
.set-tool-name { font-size: 26px; font-weight: 600; }
.set-tool-desc { margin-top: 8px; font-size: 20px; line-height: 1.4; color: var(--muted); }
.set-tool.is-focused { border-color: #fff; background: var(--accent); color: #fff; transform: scale(1.03); box-shadow: 0 16px 44px rgba(var(--accent-rgb), .4); }
.set-tool.is-focused svg, .set-tool.is-focused .set-tool-desc { color: rgba(255, 255, 255, .9); }
.speed-box { margin-top: 34px; width: 1146px; padding: 26px 30px; border-radius: 20px; background: var(--bg-2); border: 1px solid var(--line); display: flex; align-items: center; }
.speed-cell { width: 240px; }
.speed-label { font-size: 16px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.speed-value { margin-top: 6px; font-size: 40px; font-weight: 700; font-variant-numeric: tabular-nums; }
.speed-verdict { flex: 1; font-size: 23px; line-height: 1.4; color: var(--muted); }
.speed-verdict.is-good { color: var(--ok); }
.speed-verdict.is-mid { color: var(--warn); }
.speed-verdict.is-bad { color: var(--live); }

.hints { position: absolute; left: 56px; right: 56px; top: 996px; height: 50px; display: flex; align-items: center; font-size: 19px; color: var(--dim); }
.hints span { display: flex; align-items: center; }
.dot { width: 16px; height: 16px; border-radius: 4px; }
.dot.red { background: var(--red); }
.dot.green { background: var(--green); }
.dot.yellow { background: var(--yellow); }
.dot.blue { background: var(--blue); }
.hints .push { margin-left: auto; }

/* ---------- Overlay de série ---------- */
#overlay-series { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 50; display: none; background: var(--bg); }
#overlay-series.is-visible { display: block; }
.series-backdrop { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: radial-gradient(1100px 700px at 20% 20%, rgba(var(--accent-rgb), .16), transparent 70%); }
.series-poster {
  position: absolute;
  left: 110px;
  top: 120px;
  width: 380px;
  height: 570px;
  border-radius: 22px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.series-poster img { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.series-poster .initials { font-size: 90px; font-weight: 700; color: rgba(255, 255, 255, .5); }
.series-head { position: absolute; left: 560px; top: 120px; width: 1250px; }
.series-head .kicker { font-size: 20px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2); }
.series-head h1 { margin-top: 10px; font-size: 58px; font-weight: 700; line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.series-head .meta { margin-top: 14px; font-size: 23px; color: var(--muted); }
.seasons { position: absolute; left: 560px; top: 320px; width: 1300px; display: flex; overflow: hidden; }
.season {
  flex-shrink: 0;
  height: 58px;
  padding: 0 26px;
  border-radius: 29px;
  display: flex;
  align-items: center;
  font-size: 22px;
  font-weight: 600;
  color: var(--muted);
  background: var(--panel);
  border: 3px solid transparent;
  cursor: pointer;
}
.season.is-selected { color: var(--text); background: var(--panel-2); }
.seasons.is-active .season.is-selected { background: var(--accent); color: #fff; border-color: #fff; }
/* Episódios: carrossel horizontal de linha única */
#episodes { position: absolute; left: 546px; top: 410px; width: 1320px; height: 240px; }
.ep-row {
  position: relative;                /* referência do offsetLeft usado para rolar até o foco */
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: flex-start;
  width: 100%;
  height: 100%;
  padding: 16px 20px;                /* folga para o zoom e o brilho do card focado */
  overflow-x: auto !important;
  overflow-y: hidden !important;
  touch-action: pan-x;               /* o body tem touch-action: none; aqui o dedo ainda rola na horizontal */
  scroll-behavior: smooth;
  -ms-overflow-style: none;          /* esconde a barra (Edge antigo) */
  scrollbar-width: none;             /* esconde a barra (Firefox) */
}
.ep-row::-webkit-scrollbar { display: none; width: 0; height: 0; }   /* Chrome/Tizen/webOS */
.ep-row > * + * { margin-left: 20px; }   /* sem flex-gap: o Chromium das TVs antigas não tem */
#episodes.is-empty .vempty { display: block; }
/* Episódios: mini-cards 16:9 (miniatura = capa da série recortada em widescreen) */
.ep { flex-shrink: 0 !important; width: 180px; height: 170px; cursor: pointer; transition: transform .16s ease-out; }
.ep-thumb {
  position: relative;
  width: 180px;
  height: 101px;               /* 16:9 fixo (aspect-ratio não existe no Chromium das TVs antigas) */
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid transparent;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .35);
  transition: border-color .16s, box-shadow .16s;
}
.ep-thumb img { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 25%; border-radius: 6px; }
.ep-thumb .initials { font-size: 32px; font-weight: 700; color: rgba(255, 255, 255, .5); }
/* Escurece a base da miniatura para o número e a barra ficarem legíveis */
.ep-thumb::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 55%; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); }
.ep .e-num {
  position: absolute; left: 8px; bottom: 8px; z-index: 1;
  padding: 2px 9px; border-radius: 6px;
  background: rgba(0, 0, 0, .6);
  font-size: 15px; font-weight: 700; letter-spacing: .04em;
  color: #dbe6ff; font-variant-numeric: tabular-nums;
}
.ep-thumb .prog { display: none; position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; height: 5px; background: rgba(0, 0, 0, .6); }
.ep-thumb .prog.is-on { display: block; }
.ep-thumb .prog span { display: block; height: 100%; width: 0; background: var(--live); }
.ep .e-name {
  margin-top: 10px; padding: 0 2px;
  font-size: 17px; line-height: 22px; height: 44px; overflow: hidden;   /* até 2 linhas */
  color: var(--muted);
}
.ep.focused .e-name { color: var(--text); }
/* Foco (controle) e mouse: borda azul neon + zoom suave */
#episodes.is-active .ep.focused,
.is-browser .ep:hover { transform: scale(1.06); }
#episodes.is-active .ep.focused .ep-thumb,
.is-browser .ep:hover .ep-thumb {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 2px rgba(var(--accent-2-rgb), .35), 0 0 28px rgba(var(--accent-rgb), .65);
}
#episodes.is-active .ep.focused .e-num { background: var(--accent); color: #fff; }
.is-browser .ep:hover .e-name { color: var(--text); }

/* ---------- Painel de prévia/detalhes (Filmes e Séries) ----------
   Fundo escuro quase opaco: funciona em qualquer TV. O desfoque de vidro
   (backdrop-filter) só entra no navegador (.is-browser): nas GPUs das TVs
   ele derruba a fluidez da interface. */
#painel-detalhes-filme {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 60;
  opacity: 0;
  transition: opacity .28s ease-out;
}
#painel-detalhes-filme.is-open { opacity: 1; }
/* Fechado: sai da tela de verdade (sem camada invisível segurando os cliques da grade) */
#painel-detalhes-filme.hidden { display: none !important; pointer-events: none !important; }
.det-scrim { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: rgba(4, 6, 10, .82); }
.det-card {
  position: absolute; left: 50%; top: 50%;
  width: 1560px; height: 820px; margin: -410px 0 0 -780px;
  padding: 56px;
  border-radius: 32px;
  background: rgba(18, 23, 34, .94);
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 40px 120px rgba(0, 0, 0, .6);
  transform: translateY(24px);
  transition: transform .28s ease-out;
}
#painel-detalhes-filme.is-open .det-card { transform: translateY(0); }
.is-browser .det-scrim { background: rgba(4, 6, 10, .55); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.is-browser .det-card { background: rgba(18, 23, 34, .78); -webkit-backdrop-filter: blur(24px) saturate(1.2); backdrop-filter: blur(24px) saturate(1.2); }

.det-poster {
  position: absolute; left: 56px; top: 56px;
  width: 472px; height: 708px;
  border-radius: 22px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
}
.det-poster img { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.det-poster .initials { font-size: 110px; font-weight: 700; color: rgba(255, 255, 255, .5); }

.det-info { position: absolute; left: 592px; top: 56px; right: 56px; bottom: 56px; }
.det-kicker { font-size: 20px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2); }
.det-title { margin-top: 12px; font-size: 60px; font-weight: 700; line-height: 1.08; color: #fff; max-height: 132px; overflow: hidden; }
.det-meta { margin-top: 18px; font-size: 26px; color: #c9d1de; }
.det-meta > * + * { margin-left: 18px; }
.det-year { display: inline-block; padding: 4px 16px; border-radius: 10px; background: rgba(255, 255, 255, .1); font-weight: 600; color: #fff; }
.det-year:empty, .det-extra:empty { display: none; }
.det-plot { margin-top: 30px; font-size: 26px; line-height: 1.5; color: #d7dde8; max-height: 195px; overflow: hidden; }
.det-plot.is-empty { color: #9aa4b6; font-style: italic; }
.det-cast-label { margin-top: 28px; font-size: 18px; letter-spacing: .14em; text-transform: uppercase; color: #9aa4b6; }
.det-cast { margin-top: 8px; font-size: 23px; line-height: 1.45; color: #c9d1de; max-height: 68px; overflow: hidden; }

.det-actions { position: absolute; left: 0; bottom: 0; display: flex; align-items: center; }
.det-actions > * + * { margin-left: 22px; }
.det-btn {
  height: 84px; padding: 0 40px;
  border-radius: 20px;
  display: flex; align-items: center;
  font-size: 26px; font-weight: 700; letter-spacing: .04em;
  color: #e6ebf3; background: rgba(255, 255, 255, .08);
  border: 3px solid transparent;
  cursor: pointer;
  transition: transform .14s ease-out, background .14s;
}
.det-btn.det-play { height: 104px; padding: 0 64px; font-size: 34px; color: #fff; background: var(--accent); }
.det-btn.is-focused { border-color: #fff; background: rgba(255, 255, 255, .2); transform: scale(1.06); }
.det-btn.det-play.is-focused { background: var(--accent-2); box-shadow: 0 16px 50px rgba(var(--accent-rgb), .45); }

/* ---------- Player (prévia e tela cheia) ----------
   O <video> vive em #video-layer, fora do palco escalado, posicionado em pixels
   reais pelo JS. Nada de transform/overflow/border-radius nele ou nos ancestrais:
   nas TVs isso tira o vídeo do plano de hardware e só o áudio sai. */
#video-layer { position: fixed; z-index: 2; left: 0; top: 0; width: 0; height: 0; display: none; }
#video-layer video { display: block; width: 100%; height: 100%; object-fit: contain; background: transparent; }
.is-browser #video-layer { background: #000; }     /* nas TVs o fundo fica transparente para o plano de vídeo */
/* Tela cheia: esconde o palco e deixa html/body transparentes para o plano de vídeo da TV */
html.is-video-full #stage { visibility: hidden; }
html.is-video-full, html.is-video-full body { background: transparent; }
html.is-browser.is-video-full, html.is-browser.is-video-full body { background: #000; }
/* APK com o player do Android atrás do app (Nativo, 21/10/2026): a página fica transparente onde
   o vídeo aparece. Na prévia, o fundo passa para #fundo-app, que ganha um furo do tamanho do vídeo. */
html.nativo-ativo, html.nativo-ativo body,
html.is-browser.nativo-ativo, html.is-browser.nativo-ativo body,
html.is-browser.nativo-ativo #video-layer { background: transparent; }
html.nativo-ativo #video-layer video { visibility: hidden; }
html.nativo-ativo .preview-screen { background: transparent; }
html.nativo-ativo .preview-screen > * { visibility: hidden; }
html.nativo-ativo .preview-screen { color: transparent; }
/* Tela cheia: nada do palco por cima do vídeo (logos com visibility própria escapavam) */
html.nativo-ativo.is-video-full #stage, html.nativo-ativo.is-video-full #stage * { visibility: hidden !important; }
#fundo-app { display: none; }
html.nativo-ativo:not(.is-video-full) #fundo-app {
  display: block; position: fixed; left: 0; top: 0; right: 0; bottom: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(70% 60% at 85% -10%, rgba(var(--accent-rgb), .14), transparent 60%),
    radial-gradient(55% 55% at -10% 110%, rgba(255, 71, 87, .08), transparent 60%),
    var(--bg);
}

#player-ui { position: absolute; z-index: 3; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0; pointer-events: none; }
#player-frame { position: absolute; display: none; }
#player-frame.mode-preview, #player-frame.mode-full { display: block; }
.player-spinner { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; border: 5px solid rgba(255, 255, 255, .15); border-top-color: #fff; animation: spin .9s linear infinite; display: none; }
#player-frame.is-buffering .player-spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
/* Controles personalizados (#tv-custom-controls): rodapé preto translúcido.
   Fundo em degradê sólido, sem blur (GPU das TVs). */
.infobar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 150px 90px 56px;
  background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, .78) 45%, rgba(0, 0, 0, .94));
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
}
#player-frame.mode-full.show-info .infobar { opacity: 1; pointer-events: auto; }   /* #player-ui não recebe clique; a barra sim */
/* Botão Voltar no canto superior esquerdo da tela cheia: aparece junto com a barra
   de controles e fica fixo quando o vídeo dá erro (nunca prende o usuário no player). */
.player-back {
  position: absolute; left: 60px; top: 50px;
  background: rgba(0, 0, 0, .6); border-color: rgba(255, 255, 255, .25);
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .14s ease-out, background .14s, border-color .14s;
}
.player-back svg { width: 30px; height: 30px; }
#player-frame.mode-full.show-info .player-back,
#player-frame.mode-full.has-error .player-back { opacity: 1; pointer-events: auto; }
html.hide-cursor, html.hide-cursor * { cursor: none !important; }
.ib-kicker { font-size: 20px; color: var(--accent-2); letter-spacing: .12em; text-transform: uppercase; }
.ib-title { margin-top: 8px; font-size: 46px; font-weight: 600; color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, .6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-progress { display: flex; align-items: center; margin-top: 26px; font-size: 24px; color: #e6ebf3; font-variant-numeric: tabular-nums; }
/* Linha do tempo: clicável; com foco do controle engrossa e mostra o marcador */
.ib-bar { position: relative; flex: 1; height: 8px; border-radius: 8px; background: rgba(255, 255, 255, .22); cursor: pointer; transition: height .15s; }
.ib-bar span { display: block; height: 100%; width: 0; border-radius: 8px; background: var(--accent); }
.ib-knob { position: absolute; top: 50%; left: 0; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 5px rgba(var(--accent-rgb), .45); opacity: 0; transition: opacity .15s; }
.ib-bar.is-focused { height: 12px; }
.ib-bar.is-focused .ib-knob, .is-browser .ib-bar:hover .ib-knob { opacity: 1; }
.ib-bar.is-focused span { background: var(--accent-2); }

.ib-controls { display: flex; align-items: center; margin-top: 26px; }
.ib-controls > * + * { margin-left: 18px; }
.ib-spacer { flex: 1; }
.ctl {
  position: relative;
  height: 72px;
  min-width: 72px;
  padding: 0 18px;
  border-radius: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(255, 255, 255, .1);
  border: 3px solid transparent;
  cursor: pointer;
  transition: transform .14s ease-out, background .14s, border-color .14s;
}
.ctl svg { width: 34px; height: 34px; flex-shrink: 0; }
.ctl-num { position: absolute; font-size: 11px; font-weight: 700; top: 50%; left: 50%; margin: -7px 0 0 -7px; width: 14px; text-align: center; }
.ctl-main { height: 88px; min-width: 88px; border-radius: 44px; background: rgba(255, 255, 255, .92); color: #0b0f17; }
.ctl-main svg { width: 40px; height: 40px; }
.ctl-text { padding: 0 26px; font-size: 22px; font-weight: 600; }
.ctl-text > * + * { margin-left: 12px; }
.ctl.is-focused { border-color: #fff; background: var(--accent); color: #fff; transform: scale(1.08); box-shadow: 0 0 26px rgba(var(--accent-rgb), .6); }
.is-browser .ctl:hover { background: rgba(255, 255, 255, .22); }
.is-browser .ctl-main:hover { background: #fff; }
.ctl.is-on { color: var(--accent-2); }
.ctl.is-on.is-focused { color: #fff; }
.ctl.is-disabled { opacity: .45; }
.ctl.is-hidden { display: none; }
/* Play/Pause alternável: mostra o ícone da ação disponível */
.ctl .ico-play { display: none; }
#player-frame.is-paused .ctl .ico-play { display: block; }
#player-frame.is-paused .ctl .ico-pause { display: none; }
.ib-hint { margin-top: 20px; font-size: 19px; color: #9aa4b6; }
#player-frame.is-live .ib-progress,
#player-frame.is-live .ib-controls { display: none; }

/* Próximo episódio: cartão no canto inferior direito com contagem regressiva */
.next-ep {
  position: absolute;
  right: 90px;
  bottom: 90px;
  width: 620px;
  padding: 34px 38px;
  border-radius: 24px;
  background: rgba(0, 0, 0, .86);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .25s, transform .25s;
  pointer-events: none;
}
.next-ep.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.next-ep-kicker { font-size: 18px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2); }
.next-ep-title { margin-top: 8px; font-size: 30px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.next-ep-count { margin-top: 10px; font-size: 22px; color: #c9d1de; }
.next-ep-actions { display: flex; margin-top: 24px; }
.next-ep-actions > * + * { margin-left: 16px; }
.next-ep .ctl-main { height: 72px; border-radius: 36px; }
.player-error { position: absolute; left: 0; right: 0; top: 45%; padding: 0 30px; text-align: center; font-size: 26px; color: #ff7b86; display: none; }
#player-frame.has-error .player-error { display: block; }
#player-frame.mode-preview .player-error { font-size: 18px; }
/* Ajuda do Firefox (conteúdo misto): só com o erro e só quando o Player marca .ff-misto */
.player-ajuda { position: absolute; left: 50%; top: calc(45% + 56px); transform: translateX(-50%); display: none; max-width: 90%;
  padding: 14px 26px; border-radius: 14px; background: #ff8800; color: #fff; font-size: 24px; font-weight: 700; text-align: center;
  text-decoration: none; pointer-events: auto; box-shadow: 0 6px 24px rgba(0,0,0,.4); }
.player-ajuda:hover, .player-ajuda:focus { background: #ff9a26; outline: 3px solid #fff; }
#player-frame.has-error.ff-misto .player-ajuda { display: block; }
#player-frame.mode-preview .player-ajuda { font-size: 16px; padding: 10px 16px; top: calc(45% + 36px); }

/* Espaçamento sem flex-gap (ausente no Chromium das TVs mais antigas) */
.tab > * + * { margin-left: 12px; }
.group > * + * { margin-left: 12px; }
.chan > * + * { margin-left: 18px; }
.hints span > * + * { margin-left: 10px; }
.brand > * + * { margin-left: 14px; }
.act-actions > * + * { margin-left: 20px; }
.tabs > * + * { margin-left: 10px; }
.pane-head > * + * { margin-left: 16px; }
.acc-actions > * + * { margin-left: 20px; }
.hints > * + * { margin-left: 34px; }
.seasons > * + * { margin-left: 12px; }
.ib-progress > * + * { margin-left: 22px; }
.group::before { margin-right: 12px; }
.gfilter > * + * { margin-left: 12px; }

#toast {
  position: absolute;
  left: 50%;
  bottom: 110px;
  z-index: 200;
  max-width: 1100px;
  padding: 20px 34px;
  border-radius: 16px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  font-size: 24px;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
}
#toast.is-visible { opacity: 1; }



/* ---------- Aviso de atualização (APK) ---------- */
#update-popup { position: absolute; inset: 0; left: 0; top: 0; width: 1920px; height: 1080px; z-index: 300; display: none; align-items: center; justify-content: center; background: rgba(4, 6, 10, .72); pointer-events: auto; }
#update-popup.is-visible { display: flex; }
.upd-card { width: 900px; padding: 56px 64px 52px; border-radius: 28px; background: var(--panel); border: 2px solid rgba(var(--accent-rgb), .45); box-shadow: 0 30px 90px rgba(0, 0, 0, .6), 0 0 0 8px rgba(var(--accent-rgb), .08); text-align: center; }
.upd-icon { width: 96px; height: 96px; margin: 0 auto 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--accent), var(--accent-3)); color: #fff; }
.upd-icon svg { width: 48px; height: 48px; }
.upd-title { font-size: 40px; font-weight: 700; line-height: 1.25; color: var(--text); }
.upd-text { margin-top: 18px; font-size: 24px; line-height: 1.45; color: var(--muted); }
.upd-actions { display: flex; justify-content: center; margin-top: 40px; }
.upd-actions > * + * { margin-left: 22px; }
.upd-btn { height: 76px; padding: 0 44px; border-radius: 38px; display: flex; align-items: center; font-size: 28px; font-weight: 700; border: 3px solid transparent; cursor: pointer; }
.upd-now { background: var(--accent); color: #fff; box-shadow: 0 14px 40px rgba(var(--accent-rgb), .4); }
.upd-later { background: var(--panel-2); color: var(--muted); }
/* Botão focado pelo controle: borda amarela piscando (o cliente só aperta OK) */
.upd-btn.is-focused { border-color: #ffd21f; transform: scale(1.06); animation: upd-pulse 1.2s ease-in-out infinite; }
.upd-now.is-focused { background: var(--accent-2); }
@keyframes upd-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 210, 31, .75), 0 14px 40px rgba(var(--accent-rgb), .4); }
  50% { box-shadow: 0 0 0 12px rgba(255, 210, 31, 0), 0 14px 40px rgba(var(--accent-rgb), .4); }
}
.upd-later.is-focused { color: var(--text); }

/* Idioma salvo diferente do português: a página só aparece depois de traduzida */
html.i18n-pending body { visibility: hidden; }

/* ---------- Barra do player: logo do canal + Guia de Programação (EPG) ---------- */
.ib-head { display: flex; align-items: center; }
.ib-head-text { flex: 1; min-width: 0; }
.ib-logo { position: relative; display: none; width: 132px; height: 88px; margin-right: 26px; flex-shrink: 0; border-radius: 14px; overflow: hidden; align-items: center; justify-content: center; }
.ib-logo.has-img { background-color: rgba(255, 255, 255, .08) !important; }
.ib-logo .initials { font-size: 30px; font-weight: 700; color: rgba(255, 255, 255, .7); }
.ib-logo img { position: absolute; top: 8px; left: 8px; width: 116px; height: 72px; object-fit: contain; }
#player-frame.is-live .ib-logo { display: flex; }
.ib-epg { display: none; margin-top: 18px; }
#player-frame.is-live .ib-epg { display: block; }
.ib-epg-line { display: flex; align-items: baseline; font-size: 26px; line-height: 1.35; color: #fff; white-space: nowrap; }
.ib-epg-line + .ib-epg-line { margin-top: 4px; }
.ib-epg-line.is-next { font-size: 22px; color: #b9c2d3; }
.ib-epg-tag { width: 132px; flex-shrink: 0; margin-right: 26px; font-size: 17px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-2); }
.ib-epg-line.is-next .ib-epg-tag { color: #8792a6; }
.ib-epg-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.ib-epg-time { flex-shrink: 0; margin-left: 16px; font-size: 20px; color: #9aa4b6; font-variant-numeric: tabular-nums; }
.ib-epg-none { display: none; font-size: 21px; color: #8792a6; }
.ib-epg.is-empty .ib-epg-line { display: none; }
.ib-epg.is-empty .ib-epg-none { display: block; }
.ib-epg.is-loading .ib-epg-title { color: #8792a6; font-weight: 400; }

/* ---------- Controle dos Pais: teclado do PIN ---------- */
#pin-pad { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; z-index: 250; display: none; align-items: center; justify-content: center; background: rgba(4, 6, 10, .78); pointer-events: auto; }
#pin-pad.is-visible { display: flex; }
.pin-card { width: 620px; padding: 44px 56px 48px; border-radius: 28px; background: var(--panel); border: 2px solid rgba(var(--accent-rgb), .45); box-shadow: 0 30px 90px rgba(0, 0, 0, .6); text-align: center; }
.pin-card.is-shake { animation: pin-shake .4s; }
@keyframes pin-shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-14px); } 40%, 80% { transform: translateX(14px); } }
.pin-lock { width: 84px; height: 84px; margin: 0 auto 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--accent), var(--accent-3)); color: #fff; }
.pin-lock svg { width: 40px; height: 40px; }
.pin-title { font-size: 34px; font-weight: 700; }
.pin-text { margin-top: 10px; min-height: 30px; font-size: 22px; line-height: 1.4; color: var(--muted); }
.pin-dots { display: flex; justify-content: center; margin-top: 28px; }
.pin-dots i { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--dim); }
.pin-dots i + i { margin-left: 24px; }
.pin-dots i.is-on { background: var(--accent-2); border-color: var(--accent-2); }
.pin-msg { margin-top: 16px; min-height: 28px; font-size: 21px; font-weight: 600; color: var(--live); }
.pin-keys { width: 420px; margin: 18px auto 0; overflow: hidden; }
.pin-key { float: left; width: 124px; height: 84px; margin: 8px; border-radius: 18px; display: flex; align-items: center; justify-content: center; font-size: 36px; font-weight: 600; background: var(--panel-2); border: 3px solid var(--line); cursor: pointer; font-variant-numeric: tabular-nums; }
.pin-key.pin-fn { font-size: 30px; color: var(--muted); }
.pin-key.is-focused { background: var(--accent); border-color: #ffd21f; color: #fff; transform: scale(1.06); box-shadow: 0 0 0 4px rgba(255, 210, 31, .25), 0 12px 30px rgba(var(--accent-rgb), .45); }
.pin-rows { max-width: 900px; }

/* ---------- Foco do controle nos recursos novos: borda amarela piscando ---------- */
@keyframes foco-tv { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 210, 31, .8); } 50% { box-shadow: 0 0 0 10px rgba(255, 210, 31, 0); } }
.radio-item.is-focused, #radio-menu .set-item.is-focused, #ib-live-actions .ctl.is-focused, #sync-panel .ctl.is-focused, .diag-btn.is-focused {
  border-color: #ffd21f !important; animation: foco-tv 1.2s ease-in-out infinite; }

/* ---------- Rádios & Podcasts ---------- */
#radio-pane { position: absolute; left: 56px; top: 150px; width: 1808px; height: 820px; display: none; }
#radio-pane.is-visible { display: flex; }
#radio-menu { overflow: hidden; }
#radio-menu .set-item { height: 62px; font-size: 22px; }
#radio-menu .set-item + .set-item { margin-top: 6px; }
#radio-menu .set-item .ri-art { width: 38px; height: 38px; border-radius: 8px; flex-shrink: 0; position: relative; overflow: hidden; background-size: cover; background-position: center; }
#radio-menu .set-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#radio-menu .set-item.radio-stop { color: #ff8a8f; }
.radio-panel { display: flex; flex-direction: column; padding-bottom: 130px; }
.radio-head { display: flex; align-items: center; }
.radio-art { width: 110px; height: 110px; margin-right: 28px; border-radius: 18px; flex-shrink: 0; background: linear-gradient(135deg, var(--accent), var(--accent-3)) center / cover; }
.radio-head-text { min-width: 0; }
.radio-list { margin-top: 24px; flex: 1; min-height: 0; overflow: hidden; }
.radio-item { display: flex; align-items: center; height: 74px; padding: 0 22px; border-radius: 16px; border: 3px solid transparent; background: var(--panel-2); cursor: pointer; }
.radio-item + .radio-item { margin-top: 8px; }
.radio-item .ri-name { flex: 1; min-width: 0; font-size: 23px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.radio-item .ri-info { margin-left: 18px; font-size: 18px; color: var(--muted); white-space: nowrap; }
.radio-item .ri-live { margin-left: 18px; font-size: 15px; font-weight: 700; letter-spacing: .1em; color: var(--live); }
.radio-item.is-playing { background: rgba(var(--accent-rgb), .18); }
.radio-item.is-playing .ri-name::before { content: "♪ "; color: var(--accent-2); }
.radio-item.is-focused { background: var(--accent); color: #fff; }
.radio-item.is-focused .ri-info { color: rgba(255, 255, 255, .85); }
.radio-msg { color: var(--muted); font-size: 22px; }
.radio-now { position: absolute; left: 444px; right: 0; bottom: 0; height: 104px; display: none; align-items: center; padding: 0 34px;
  border-radius: 0 0 22px 22px; background: linear-gradient(90deg, rgba(var(--accent-rgb), .28), rgba(var(--accent-rgb), .08)); border-top: 1px solid var(--line); }
.radio-now.is-on { display: flex; }
.radio-now-text { flex: 1; min-width: 0; margin-left: 22px; }
.radio-now-text small { display: block; font-size: 15px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-2); }
.radio-now-text b { display: block; font-size: 26px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.radio-now-hint { font-size: 17px; color: var(--muted); }
.radio-eq { display: flex; align-items: flex-end; height: 34px; }
.radio-eq i { width: 7px; margin-right: 4px; border-radius: 3px; background: var(--accent-2); animation: eq 1s ease-in-out infinite; }
.radio-eq i:nth-child(2) { animation-delay: .2s; } .radio-eq i:nth-child(3) { animation-delay: .4s; } .radio-eq i:nth-child(4) { animation-delay: .1s; }
@keyframes eq { 0%, 100% { height: 8px; } 50% { height: 34px; } }
.radio-now.is-paused .radio-eq i { animation-play-state: paused; }
.top-radio { font-size: 16px; color: var(--accent-2); white-space: nowrap; max-width: 360px; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Player ao vivo: ações e Modo Futebol ---------- */
.ib-live-actions { display: none; margin-top: 18px; }
#player-frame.is-live .ib-live-actions { display: flex; }
.ib-live-actions > * + * { margin-left: 16px; }
.sync-panel { position: absolute; left: 50%; top: 90px; width: 900px; margin-left: -450px; padding: 26px 34px; border-radius: 22px; display: none;
  background: rgba(7, 9, 14, .92); border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 20px 60px rgba(0, 0, 0, .6); text-align: center; pointer-events: auto; }
.sync-panel.is-visible { display: block; }
.sync-kicker { font-size: 18px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-2); }
.sync-row { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; }
.sync-value small { display: block; font-size: 16px; color: #9aa4b6; }
.sync-value b { display: block; font-size: 58px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.sync-hint { margin-top: 12px; font-size: 18px; color: #9aa4b6; }

/* ---------- Pop-up do Diagnóstico / Suporte ---------- */
#diag-popup { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; z-index: 260; display: none; align-items: center; justify-content: center;
  background: rgba(4, 6, 10, .8); pointer-events: auto; }
#diag-popup.is-visible { display: flex; }
.diag-card { width: 1320px; padding: 44px 54px; border-radius: 28px; background: var(--panel); border: 2px solid rgba(var(--accent-rgb), .45); box-shadow: 0 30px 90px rgba(0, 0, 0, .6); }
.diag-title { font-size: 38px; font-weight: 700; }
.diag-stats { display: flex; margin-top: 22px; }
.diag-stat { flex: 1; padding: 16px 22px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line); }
.diag-stat + .diag-stat { margin-left: 16px; }
.diag-stat small { display: block; font-size: 15px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.diag-stat b { display: block; margin-top: 4px; font-size: 36px; font-variant-numeric: tabular-nums; }
.diag-stat b.is-bad { color: var(--live); } .diag-stat b.is-good { color: var(--ok); }
.diag-body { display: flex; align-items: center; margin-top: 26px; }
.diag-text { flex: 1; font-size: 25px; line-height: 1.5; }
.diag-text.is-loading { color: var(--muted); }
.diag-qr { display: flex; flex-direction: column; align-items: center; width: 330px; margin-left: 36px; flex-shrink: 0; text-align: center; color: var(--text); text-decoration: none; font-size: 19px; }
.diag-qr img { width: 310px; height: 310px; padding: 14px; border-radius: 18px; background: #fff; image-rendering: pixelated; margin-bottom: 12px; }
.diag-qr small { color: var(--muted); }
.diag-actions { display: flex; justify-content: center; margin-top: 30px; }
.diag-actions > * + * { margin-left: 22px; }
.diag-btn { background: var(--panel-2); color: var(--text); }
.diag-btn.is-focused { background: var(--accent); color: #fff; transform: scale(1.06); }
body.is-blocked #player-ui > #diag-popup { display: none; }

/* Tela de ativação: MAC + Senha Única e a mensagem neutra do suporte (3 linhas) */
.mac-label-2 { margin-top: 14px; }
.act-intro-suporte { white-space: pre-line; line-height: 1.5; }

/* Configurações → Listas: cartões quebram linha quando há muitas listas */
.set-listas { flex-wrap: wrap; }
.set-listas > * + * { margin-left: 0; }
.set-listas > .set-opt { margin: 0 26px 26px 0; }
.set-listas .set-opt-name { margin-top: 0; word-break: break-word; }
/* Lista + lixeira ao lado (Configurações → Listas) */
.set-listas > .set-lista-linha { display: flex; margin: 0 26px 26px 0; }
.set-lista-linha > .set-opt { margin: 0; }
.set-lixo { width: 84px; margin-left: 12px; border-radius: 20px; display: flex; align-items: center; justify-content: center;
  background: var(--panel-2); border: 3px solid var(--line); color: var(--muted); cursor: pointer; transition: transform .14s ease-out; }
.set-lixo svg { width: 36px; height: 36px; }
.set-lixo.is-focused, .is-browser .set-lixo:hover { border-color: #fff; background: #e5484d; color: #fff; transform: scale(1.06); }

/* Confirmação (apagar lista) */
#confirma-popup { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; z-index: 290; display: none; align-items: center; justify-content: center;
  background: rgba(4, 6, 10, .8); pointer-events: auto; }
#confirma-popup.is-visible { display: flex; }
#confirma-popup .cfm-card { border-color: #e5484d; }
#confirma-popup .cfm-title { color: #ff7b7f; }
#confirma-popup .cfm-sim.is-focused { background: #e5484d; color: #fff; }

/* ---------- PIX da Licença Anual (Mercado Pago) ---------- */
.block-pix { display: none; margin: 34px auto 0; padding: 22px 44px; border-radius: 20px; background: #fff; color: #b3121b; text-align: center; max-width: 900px;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, .35), 0 18px 50px rgba(0, 0, 0, .45); }
#tela-bloqueio-vendas.is-app .block-pix { display: block; }
.block-pix b { display: block; font-size: 34px; font-weight: 800; }
.block-pix small { display: block; margin-top: 6px; font-size: 20px; font-weight: 600; color: #6b0a10; }
#pix-popup { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; z-index: 270; display: none; align-items: center; justify-content: center;
  background: rgba(4, 6, 10, .85); pointer-events: auto; }
#pix-popup.is-visible { display: flex; }
.pix-card { width: 1360px; padding: 40px 54px; border-radius: 28px; background: var(--panel); color: var(--text); border: 2px solid rgba(var(--accent-rgb), .45); box-shadow: 0 30px 90px rgba(0, 0, 0, .6); }
.pix-title { font-size: 38px; font-weight: 700; }
.pix-sub { margin-top: 6px; font-size: 22px; color: var(--muted); }
.pix-body { display: flex; align-items: center; margin-top: 26px; }
.pix-qr { width: 400px; height: 400px; flex-shrink: 0; border-radius: 22px; background: #fff; display: flex; align-items: center; justify-content: center; color: #333; font-size: 22px; text-align: center; padding: 18px; }
.pix-qr img { width: 364px; height: 364px; image-rendering: pixelated; }
.pix-info { flex: 1; margin-left: 46px; }
.pix-valor { font-size: 64px; font-weight: 800; color: var(--ok); font-variant-numeric: tabular-nums; }
.pix-passos { margin-top: 14px; padding-left: 34px; font-size: 25px; line-height: 1.55; }
.pix-status { margin-top: 20px; min-height: 36px; font-size: 26px; font-weight: 700; color: var(--muted); }
.pix-status.is-ok { color: var(--ok); } .pix-status.is-bad { color: var(--live); }
.pix-copia { margin-top: 24px; padding: 14px 20px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); }
.pix-copia small { display: block; font-size: 15px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.pix-copia span { display: block; margin-top: 4px; font-family: monospace; font-size: 15px; line-height: 1.4; word-break: break-all; color: var(--text); }
.pix-hint { margin-top: 18px; text-align: center; font-size: 19px; color: var(--muted); }

/* Lembrete de renovação (antes de vencer) */
#lembrete-popup { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; z-index: 265; display: none; align-items: center; justify-content: center;
  background: rgba(4, 6, 10, .8); pointer-events: auto; }
#lembrete-popup.is-visible { display: flex; }
.lem-card { width: 1100px; padding: 46px 56px; border-radius: 28px; background: var(--panel); color: var(--text); text-align: center;
  border: 2px solid var(--warn); box-shadow: 0 30px 90px rgba(0, 0, 0, .6); }
.lem-title { font-size: 40px; font-weight: 700; color: var(--warn); }
.lem-text { margin-top: 18px; font-size: 30px; font-weight: 600; }
.lem-sub { margin-top: 12px; font-size: 23px; line-height: 1.5; color: var(--muted); }
.lem-actions { display: flex; justify-content: center; margin-top: 34px; }
.lem-actions > * + * { margin-left: 24px; }
.lem-btn { background: var(--panel-2); color: var(--text); }
.lem-btn.is-focused { background: var(--accent); color: #fff; transform: scale(1.06); }

/* Apps das lojas (LG/Samsung): botão "Ver demonstração" na tela de ativação */
.store-only { display: none; }
html.is-loja .store-only { display: inline-block; flex: none; margin-bottom: 18px; padding: 14px 36px; position: relative; z-index: 5; }
.store-only-hint { display: none; }
html.is-loja .store-only-hint { display: block; }
html.is-loja .tab[data-tab="radio"] { display: none; }

/* Apps de loja (LG, Samsung, Play Store): o botão "Ver demonstração" + a linha do suporte
   empurravam o rodapé por cima dos cartões do MAC (visto no print da Play Store, 21/10/2026) */
html.is-loja #screen-activation .splash-box { margin-top: -60px; }
html.is-loja .splash-footer { bottom: 16px; }
html.is-loja .store-only { margin-bottom: 8px; padding: 10px 32px; }
/* Aparelho novo: QR que abre /minha-tv no celular com o MAC preenchido (25/10/2026) */
.block-qr-card { display: none; flex-direction: column; align-items: center; justify-content: center; margin-left: 24px; padding: 12px 18px; border-radius: 28px; background: var(--panel-2); border: 2px solid var(--accent); box-shadow: 0 0 0 6px rgba(var(--accent-rgb), .12); }
.block-panel.is-novo .block-qr-card { display: flex; }
.block-qr img { display: block; width: 150px; height: 150px; border-radius: 12px; background: #fff; image-rendering: pixelated; }
.block-qr-card .block-mac-label { margin-top: 8px; font-size: 14px; }

/* Cobrança do plano de canais (26/10/2026): aviso chamativo que não tapa a navegação; vencido, tela travada */
@keyframes cob-pisca { 0%, 100% { border-color: #f59e0b; box-shadow: 0 0 0 0 rgba(245, 158, 11, .55); } 50% { border-color: #ef4444; box-shadow: 0 0 34px 6px rgba(239, 68, 68, .45); } }
.cob-qr { flex-shrink: 0; border-radius: 16px; background: #fff; display: flex; align-items: center; justify-content: center; }
.cob-qr img { image-rendering: pixelated; }
#cob-prev { position: absolute; left: 0; top: 372px; width: 608px; height: 448px; box-sizing: border-box; padding: 26px; border-radius: 22px;
  background: linear-gradient(160deg, #2a1206, #170a0a); border: 4px solid #f59e0b; animation: cob-pisca 2.4s ease-in-out infinite;
  display: none; flex-direction: column; align-items: center; z-index: 5; pointer-events: none; }
#cob-prev.is-visible { display: flex; }
.cob-prev-qr { width: 226px; height: 226px; }
.cob-prev-qr img { width: 210px; height: 210px; }
.cob-prev-info { margin-top: 12px; text-align: center; }
.cob-prev-titulo { font-size: 34px; font-weight: 800; color: #fbbf24; }
.cob-prev-valor { margin-top: 4px; font-size: 40px; font-weight: 800; color: #fff; }
.cob-prev-lista, .cob-lado-lista { font-size: 18px; color: #fcd34d; opacity: .85; }
.cob-prev-txt { margin-top: 4px; font-size: 20px; color: #fde68a; line-height: 1.25; }
body.cob-lado #groups { height: 484px; }
#cob-lado { position: absolute; left: 56px; top: 726px; width: 420px; height: 244px; box-sizing: border-box; padding: 18px; border-radius: 22px;
  background: linear-gradient(160deg, #2a1206, #170a0a); border: 4px solid #f59e0b; animation: cob-pisca 2.4s ease-in-out infinite;
  display: none; align-items: center; gap: 18px; z-index: 5; pointer-events: none; color: #fff; }
#cob-lado.is-visible { display: flex; }
.cob-lado-qr { width: 196px; height: 196px; }
.cob-lado-qr img { width: 184px; height: 184px; }
.cob-lado-titulo { font-size: 24px; font-weight: 800; color: #fbbf24; line-height: 1.2; }
.cob-lado-valor { margin-top: 8px; font-size: 34px; font-weight: 800; }
.cob-lado-txt { margin-top: 6px; font-size: 18px; color: #fde68a; }
#cob-trava { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; z-index: 300; display: none; align-items: center; justify-content: center;
  background: rgba(7, 9, 14, .97); }
#cob-trava.is-visible { display: flex; }
#cob-pagar { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; z-index: 272; display: none; align-items: center; justify-content: center; background: rgba(0, 0, 0, .78); }
#cob-pagar.is-visible { display: flex; }
.cob-trava-card { width: 1500px; padding: 56px 70px; border-radius: 32px; background: var(--panel); color: var(--text); text-align: center; border: 4px solid #ef4444; }
.cob-trava-titulo { font-size: 64px; font-weight: 800; color: #fff; }
.cob-trava-sub { margin-top: 12px; font-size: 32px; color: #fca5a5; }
.cob-trava-body { margin-top: 40px; display: flex; align-items: center; gap: 60px; text-align: left; }
.cob-trava-qr { width: 520px; height: 520px; border-radius: 26px; }
.cob-trava-qr img { width: 480px; height: 480px; }
.cob-trava-valor { font-size: 72px; font-weight: 800; color: #3f8cff; margin-bottom: 20px; }
.cob-trava-ajuda { margin-top: 26px; font-size: 28px; color: #8791a7; }
