/* ==========================================================================
   Jogos de Hoje - folha unica, usada por todos os sites.
   As cores/fontes vem do tema de cada site (sites/*.json), injetado como
   <style> no topo da pagina. Os valores do :root abaixo sao so o padrao.
   ========================================================================== */

:root {
  --bg: #07091a;
  --bg-2: #0a0e26;
  --surface: #11173d;
  --surface-2: #161d4a;
  --line: rgba(148, 163, 184, 0.14);
  --line-soft: rgba(148, 163, 184, 0.08);
  --text: #e8ecff;
  --text-soft: #b6bee0;
  --text-mute: #7a85b8;

  --cyan: #22d3ee;
  --violet: #a855f7;
  --magenta: #ec4899;
  --lime: #a3e635;
  --amber: #fbbf24;
  --red: #f43f5e;

  --grad: linear-gradient(135deg, #22d3ee 0%, #a855f7 55%, #ec4899 100%);
  --grad-soft: linear-gradient(135deg, rgba(34, 211, 238, .18) 0%, rgba(168, 85, 247, .18) 55%, rgba(236, 72, 153, .18) 100%);

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;

  --shadow: 0 18px 60px rgba(168, 85, 247, .18);

  /* cor por tipo de canal - trocadas pelo tema do site */
  --c-aberta: #a3e635;
  --c-fechada: #a855f7;
  --c-streaming: #22d3ee;
  --c-youtube: #ec4899;
  --c-radio: #7a85b8;

  /* tipografia e efeitos - tambem vem do tema */
  --fonte-corpo: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --fonte-titulo: 'Space Grotesk', 'Inter', sans-serif;
  --brilho-1: rgba(34, 211, 238, .10);
  --brilho-2: rgba(236, 72, 153, .10);
  --sobre-grad: #06091c;   /* cor do texto por cima do gradiente */
  --topbar-bg: rgba(7, 9, 26, .82);
  --realce: rgba(168, 85, 247, .45);   /* borda no hover do card */
  --sombra-seta: 0 2px 12px rgba(0, 0, 0, .5);
  --foco: rgba(34, 211, 238, .14);
  --topo: 0px; /* altura do header, ajustada por JS */
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--fonte-corpo);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* brilho ambiente do topo, igual ao site */
body::before {
  content: '';
  position: fixed;
  inset: 0 0 auto 0;
  height: 520px;
  background:
    radial-gradient(60% 100% at 15% 0%, var(--brilho-1), transparent 60%),
    radial-gradient(60% 100% at 85% 0%, var(--brilho-2), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; text-decoration: none; }

.wrap {
  position: relative;
  z-index: 1;
  width: min(1120px, 100% - 2rem);
  margin-inline: auto;
}

h1, h2, h3, .num { font-family: var(--fonte-titulo); }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------------------------------------------------------------- topo -- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--topbar-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .7rem 0;
}

/* o logo do site ja traz o nome escrito - nao repetir em texto ao lado */
.marca { display: flex; align-items: center; flex: 0 0 auto; }
.marca img { height: 34px; width: auto; display: block; }

/* site sem arquivo de logo: usa o nome em texto */
.marca-texto {
  font-family: var(--fonte-titulo);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -.02em;
  color: var(--text);
}

.menu { display: flex; gap: 1.4rem; font-size: .88rem; }
.menu a { color: var(--text-soft); transition: .2s; }
.menu a:hover { color: var(--text); }

.voltar {
  font-size: .85rem;
  color: var(--text-mute);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .38rem .85rem;
  transition: .2s;
  white-space: nowrap;
}
.voltar:hover { color: var(--text); border-color: var(--cyan); }

/* ---------------------------------------------------------------- hero -- */

.hero { padding: 2.6rem 0 1.4rem; }

.hero h1 {
  margin: 0 0 .5rem;
  font-size: clamp(1.75rem, 5vw, 2.9rem);
  line-height: 1.08;
  letter-spacing: -.03em;
  font-weight: 700;
}

.hero p { margin: 0; color: var(--text-soft); max-width: 60ch; font-size: .98rem; }

.resumo {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.1rem;
}

.pill-stat {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .4rem .85rem;
  font-size: .82rem;
  color: var(--text-soft);
}
.pill-stat b { color: var(--text); font-family: var(--fonte-titulo); }

/* -------------------------------------------------------------- filtros -- */

.filtros {
  position: sticky;
  top: var(--topo);
  z-index: 40;
  background: var(--topbar-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
  padding: .75rem 0 .6rem;
  margin-bottom: 1.4rem;
}

.linha-filtro {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .55rem;
}
.linha-filtro:last-child { margin-bottom: 0; }

.abas { display: flex; gap: .35rem; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .25rem; }

.aba {
  border: 0;
  background: transparent;
  color: var(--text-mute);
  font: inherit;
  font-size: .85rem;
  font-weight: 600;
  padding: .4rem .95rem;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: .2s;
}
.aba:hover { color: var(--text); }
.aba[aria-selected="true"] { background: var(--grad); color: var(--sobre-grad); }

.busca { position: relative; flex: 1; min-width: 0; }

.busca input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font: inherit;
  font-size: .88rem;
  padding: .55rem 2.2rem .55rem 2.4rem;
  transition: .2s;
}
.busca input::placeholder { color: var(--text-mute); }
.busca input:focus { outline: 0; border-color: var(--cyan); box-shadow: 0 0 0 3px var(--foco); }

.busca svg { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-mute); }

.limpar-busca {
  position: absolute; right: .5rem; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; color: var(--text-mute);
  cursor: pointer; font-size: 1.1rem; line-height: 1; padding: .2rem .35rem; border-radius: 50%;
}
.limpar-busca:hover { color: var(--text); }

/* faixa de canais: rola com o dedo no celular e com as setas no computador */
.canais-area { position: relative; min-width: 0; flex: 1; }

.canais-faixa {
  display: flex;
  gap: .4rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding-bottom: .15rem;
  -webkit-overflow-scrolling: touch;
}
.canais-faixa::-webkit-scrollbar { display: none; }
.canais-faixa:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: var(--r-sm); }

/* setas: so aparecem quando ha o que rolar (o JS controla o atributo hidden) */
.seta {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-soft);
  cursor: pointer;
  transition: .18s;
  box-shadow: var(--sombra-seta);
}
.seta:hover { color: var(--text); border-color: var(--cyan); }
.seta:active { transform: translateY(-50%) scale(.92); }
.seta[hidden] { display: none; }
.seta svg { width: 15px; height: 15px; }

.seta-esq { left: -6px; }
.seta-dir { right: -6px; }

/* sombra na borda avisando que ha mais canais para o lado */
.canais-area::before,
.canais-area::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 46px;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity .18s;
}
.canais-area::before { left: 0;  background: linear-gradient(90deg, var(--bg) 15%, transparent); }
.canais-area::after  { right: 0; background: linear-gradient(270deg, var(--bg) 15%, transparent); }

.canais-area.tem-esq::before { opacity: 1; }
.canais-area.tem-dir::after  { opacity: 1; }

.chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-soft);
  font: inherit;
  font-size: .8rem;
  font-weight: 600;
  padding: .38rem .8rem;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: .18s;
}
.chip:hover { color: var(--text); border-color: rgba(148, 163, 184, .3); }
.chip .qtd { color: var(--text-mute); font-weight: 500; font-size: .74rem; }

.chip[aria-pressed="true"] {
  background: var(--grad-soft);
  border-color: var(--violet);
  color: var(--text);
}
.chip[aria-pressed="true"] .qtd { color: var(--text-soft); }

.chip-limpar { border-style: dashed; }
/* quando "Todos os canais" esta ativo ele vira o estado normal, nao um filtro */
.chip-limpar[aria-pressed="true"] {
  border-style: solid;
  background: var(--surface-2);
  border-color: rgba(148, 163, 184, .3);
  color: var(--text);
}

/* ---------------------------------------------------------------- lista -- */

.secao-hora {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin: 1.8rem 0 .9rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.secao-hora::after { content: ''; flex: 1; height: 1px; background: var(--line-soft); }
.secao-hora.viva { color: var(--red); }

.jogos { display: grid; gap: .6rem; }

.jogo {
  display: grid;
  grid-template-columns: 4.2rem 1fr auto;
  gap: 1rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: .85rem 1rem;
  transition: .18s;
}
.jogo:hover { border-color: var(--realce); background: var(--surface-2); transform: translateY(-1px); }

.jogo.ao-vivo { border-color: rgba(244, 63, 94, .45); background: linear-gradient(135deg, rgba(244, 63, 94, .07), var(--surface) 55%); }
.jogo.fim { opacity: .58; }

/* coluna do horario */
.quando { text-align: center; border-right: 1px solid var(--line-soft); padding-right: .9rem; }

.hora { font-size: 1.28rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

.selo {
  display: inline-flex; align-items: center; gap: .3rem;
  margin-top: .2rem; font-size: .64rem; font-weight: 800;
  letter-spacing: .07em; text-transform: uppercase;
}
.selo.viva { color: var(--red); }
.selo.fim  { color: var(--text-mute); }

.ponto { width: 6px; height: 6px; border-radius: 50%; background: var(--red); animation: pulsa 1.6s ease-in-out infinite; }
@keyframes pulsa { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.82); } }

/* coluna central */
.confronto { min-width: 0; }

.liga {
  font-size: .72rem;
  color: var(--text-mute);
  margin-bottom: .4rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* o limite evita que o placar fique jogado na outra ponta em telas largas */
.time { display: flex; align-items: center; gap: .55rem; min-width: 0; max-width: 30rem; }
.time + .time { margin-top: .3rem; }

.time img {
  width: 22px; height: 22px; flex: 0 0 22px;
  object-fit: contain; border-radius: 50%; background: rgba(255, 255, 255, .06);
}

.time span {
  font-size: .92rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.gols {
  margin-left: auto; padding-left: .6rem;
  font-family: var(--fonte-titulo); font-weight: 700; font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

/* coluna dos canais */
.onde { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: flex-end; max-width: 17rem; }

.canal {
  display: inline-flex; align-items: center; gap: .32rem;
  font-size: .72rem; font-weight: 700;
  padding: .3rem .6rem; border-radius: 999px;
  border: 1px solid; white-space: nowrap;
}
.canal .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

/* Uma cor por tipo; borda e fundo saem dela via color-mix.
   Assim um site de tema claro so precisa trocar as 5 cores. */
.canal.aberta    { color: var(--c-aberta); }
.canal.fechada   { color: var(--c-fechada); }
.canal.streaming { color: var(--c-streaming); }
.canal.youtube   { color: var(--c-youtube); }
.canal.radio     { color: var(--c-radio); }

.canal.aberta, .canal.fechada, .canal.streaming, .canal.youtube, .canal.radio {
  border-color: color-mix(in srgb, currentColor 38%, transparent);
  background: color-mix(in srgb, currentColor 10%, transparent);
}

.canal.provavel { border-style: dashed; opacity: .85; }

/* canal aberto (YouTube/radio): nao esta na lista IPTV porque nao precisa estar.
   Vira link direto e ganha a setinha para deixar claro que sai do site. */
a.canal.gratis { cursor: pointer; }
a.canal.gratis:hover { filter: brightness(1.25); border-color: currentColor; }

.canal .ext { font-style: normal; font-size: .82em; opacity: .75; margin-left: .1rem; }

.canal.gratis::after {
  content: 'grátis';
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  opacity: .7;
  margin-left: .12rem;
}

/* ---------------------------------------------------- aviso de estimado -- */

.aviso {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  margin: 0 0 1.2rem;
  padding: .8rem 1rem;
  border: 1px dashed rgba(251, 191, 36, .45);
  border-radius: var(--r-md);
  background: rgba(251, 191, 36, .07);
  color: var(--text-soft);
  font-size: .84rem;
  line-height: 1.45;
}
.aviso[hidden] { display: none; }
.aviso strong { color: var(--amber); }
.aviso::before { content: '⚠️'; flex: 0 0 auto; }

/* ------------------------------------------------------- balao whatsapp -- */
/* Mesmo botao flutuante da home, para quem quiser falar sem voltar ao site.
   Lado e link vem da config de cada site. Icone em SVG embutido: a pagina nao
   carrega Font Awesome como a home. */

.zap {
  position: fixed;
  bottom: 26px;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  box-shadow: 0 6px 22px rgba(37, 211, 102, .42);
  transition: transform .2s ease, box-shadow .2s ease;
}
.zap:hover { transform: scale(1.07); box-shadow: 0 8px 28px rgba(37, 211, 102, .55); }
.zap:active { transform: scale(.96); }
.zap svg { width: 30px; height: 30px; fill: currentColor; }

.zap-direita { right: 26px; }
.zap-esquerda { left: 26px; }

/* pulso discreto, so para chamar o olho sem incomodar */
.zap::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid #25d366;
  animation: zap-pulso 2.4s ease-out infinite;
  pointer-events: none;
}
@keyframes zap-pulso {
  0%   { transform: scale(1);   opacity: .7; }
  70%  { transform: scale(1.5); opacity: 0; }
  100% { transform: scale(1.5); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .zap::after { animation: none; } }

@media (max-width: 760px) {
  .zap { width: 52px; height: 52px; bottom: 18px; }
  .zap-direita { right: 18px; }
  .zap-esquerda { left: 18px; }
  .zap svg { width: 27px; height: 27px; }
}

/* --------------------------------------------------------------- vazio -- */

.vazio {
  text-align: center;
  padding: 3.5rem 1rem;
  border: 1px dashed var(--line);
  border-radius: var(--r-lg);
  color: var(--text-mute);
}
.vazio strong { display: block; color: var(--text); font-size: 1.05rem; margin-bottom: .35rem; font-family: var(--fonte-titulo); }

/* ----------------------------------------------------------------- cta -- */

.cta {
  margin: 2.4rem 0;
  padding: 1.6rem;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--grad-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  flex-wrap: wrap;
}
.cta h3 { margin: 0 0 .3rem; font-size: 1.15rem; letter-spacing: -.02em; }
.cta p { margin: 0; color: var(--text-soft); font-size: .9rem; max-width: 52ch; }

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--grad); color: var(--sobre-grad);
  font-weight: 700; font-size: .9rem;
  padding: .7rem 1.4rem; border-radius: 999px;
  white-space: nowrap; transition: .2s;
  box-shadow: var(--shadow);
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.08); }

.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--line); box-shadow: none;
}
.btn-ghost:hover { border-color: var(--cyan); }

/* -------------------------------------------------------------- rodape -- */

.rodape {
  margin-top: 3rem;
  padding: 1.8rem 0 3rem;
  border-top: 1px solid var(--line-soft);
  color: var(--text-mute);
  font-size: .8rem;
}
.rodape p { margin: .3rem 0; }
.rodape a { color: var(--text-soft); text-decoration: underline; text-underline-offset: 2px; }

.legenda { display: flex; flex-wrap: wrap; gap: .8rem; margin: .9rem 0 1.1rem; }
.legenda span { display: inline-flex; align-items: center; gap: .35rem; font-size: .74rem; }
.legenda i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* --------------------------------------------------------------- mobile -- */

@media (max-width: 760px) {
  /* No celular o que importa e ver jogo. O topo encolhe e a barra de filtros
     deixa de ser fixa - fixa ela comeria um quarto da tela o tempo todo. */
  .hero { padding: 1.2rem 0 .6rem; }
  .hero h1 { font-size: 1.55rem; }
  .hero p { display: none; }

  .resumo { margin-top: .8rem; gap: .4rem; }
  .pill-stat { font-size: .75rem; padding: .32rem .7rem; }

  .filtros {
    position: static;
    padding: .6rem 0 .5rem;
    margin-bottom: 1rem;
  }

  .menu { display: none; }          /* no celular sobra o logo e o "Voltar" */
  .marca img { height: 28px; }

  .seta { display: none !important; }   /* no celular o dedo ja rola a faixa */

  .secao-hora { margin: 1.3rem 0 .7rem; }

  .jogo {
    grid-template-columns: 3.4rem 1fr;
    gap: .75rem;
    padding: .75rem .8rem;
  }

  .quando { padding-right: .7rem; }
  .hora { font-size: 1.08rem; }

  /* canais passam para baixo, ocupando a largura toda */
  .onde {
    grid-column: 1 / -1;
    justify-content: flex-start;
    max-width: none;
    border-top: 1px solid var(--line-soft);
    padding-top: .6rem;
    margin-top: .1rem;
  }

  .linha-filtro { flex-wrap: wrap; }
  .busca { order: 3; width: 100%; flex-basis: 100%; }

  .cta { flex-direction: column; align-items: flex-start; }
  .btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
