:root {
  --fundo: #0a0f1c;
  --fundo2: #121a2e;
  --texto: #eef2fb;
  --suave: #93a0bd;
  --destaque: #2f7cf6;
  --foco: #ffc23d;
  --raio: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--fundo); color: var(--texto); }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  min-height: 100vh;
  display: flex; flex-direction: column;
}
button { font: inherit; color: inherit; }

/* Topo */
.topo {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 24px;
  padding: 14px 4vw;
  background: linear-gradient(180deg, rgba(10,15,28,.98), rgba(10,15,28,.85));
  backdrop-filter: blur(6px);
}
.marca { display: flex; align-items: center; gap: 10px; font-size: 1.35rem; white-space: nowrap; }
.marca b { color: var(--destaque); }
.filtros { display: flex; gap: 8px; overflow-x: auto; flex: 1; scrollbar-width: none; }
.filtros::-webkit-scrollbar { display: none; }
.filtro {
  border: 0; border-radius: 999px; padding: 8px 16px;
  background: var(--fundo2); color: var(--suave); white-space: nowrap; cursor: pointer;
}
.filtro.ativo { background: var(--destaque); color: #fff; }
.relogio { font-variant-numeric: tabular-nums; color: var(--suave); font-size: 1.1rem; }

/* Conteúdo */
.conteudo { flex: 1; padding: 8px 4vw 40px; }
.carregando { color: var(--suave); }
.linha { margin: 22px 0 6px; }
.linha h2 { font-size: 1.25rem; margin: 0 0 12px; font-weight: 600; }
.trilho {
  display: flex; gap: 16px; overflow-x: auto; padding: 16px 18px 22px; margin: -8px -18px 0;
  scroll-padding-inline: 18px;
  scroll-snap-type: x proximity; scrollbar-width: thin;
}
.card {
  flex: 0 0 auto; width: 230px; border: 0; padding: 0; text-align: left;
  background: var(--fundo2); border-radius: var(--raio); overflow: hidden; cursor: pointer;
  scroll-snap-align: start; transition: transform .15s ease, box-shadow .15s ease;
  outline: none;
}
.card .capa {
  aspect-ratio: 16 / 9; display: grid; place-items: center;
  font-size: 1.3rem; font-weight: 700; padding: 10px; text-align: center;
  background-size: cover; background-position: center; position: relative;
}
.card .capa .ao-vivo {
  position: absolute; top: 8px; left: 8px; font-size: .7rem; font-weight: 700;
  background: #e0242f; color: #fff; padding: 3px 7px; border-radius: 6px; letter-spacing: .04em;
}
.card .txt { padding: 10px 12px 12px; }
.card .txt strong { display: block; font-size: .98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .txt small { color: var(--suave); font-size: .8rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.filme { width: 170px; }
.card.filme .capa { aspect-ratio: 2 / 3; background-color: #1b2440; font-size: .95rem; }

/* Foco (controle remoto e teclado) */
.foco:focus, .foco.focado {
  outline: none;
  box-shadow: 0 0 0 4px var(--foco), 0 10px 30px rgba(0,0,0,.5);
}
.card:focus, .card.focado { transform: scale(1.07); }
@media (hover: hover) { .card:hover { transform: scale(1.04); } }

.rodape {
  padding: 18px 4vw 26px; color: var(--suave); font-size: .82rem;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}

/* Player */
.player {
  position: fixed; inset: 0; z-index: 20; background: #000;
  display: flex; flex-direction: column;
}
.player[hidden] { display: none; }
.player-tela { flex: 1; position: relative; }
.player-tela iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-barra {
  display: flex; align-items: center; gap: 12px; padding: 12px 3vw;
  background: rgba(10,15,28,.96); transition: opacity .3s;
}
.player-barra.oculta { opacity: 0; pointer-events: none; }
.player-info { flex: 1; min-width: 0; }
.player-info strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-info small { color: var(--suave); }
.btn {
  border: 0; border-radius: 10px; padding: 10px 16px; background: var(--fundo2); cursor: pointer; white-space: nowrap;
}

/* Celular */
@media (max-width: 640px) {
  .topo { flex-wrap: wrap; gap: 10px; padding: 10px 4vw; }
  .filtros { order: 3; flex-basis: 100%; }
  .card { width: 64vw; }
  .card.filme { width: 38vw; }
  .player-barra { flex-wrap: wrap; }
  .player-info { order: -1; flex-basis: 100%; }
  #btnTela { display: none; }
}
/* TV (telas grandes) */
@media (min-width: 1600px) {
  body { font-size: 20px; }
  .card { width: 300px; }
  .card.filme { width: 210px; }
}
