/* =========================================================
   TELAS: layout específico de cada tela
   ========================================================= */

/* ========== 1. SPLASH ========== */
#tela-splash { justify-content: space-between; padding-bottom: 1rem; }

.splash-centro {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 0.4rem; min-height: 0;
}

.logo { position: relative; width: 8.5rem; height: 8.5rem; display: grid; place-items: center; margin-bottom: 0.4rem; }
.logo-anel {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--ouro), #fff6c9, var(--ouro-escuro), var(--ouro), #fff6c9, var(--ouro));
  -webkit-mask: radial-gradient(circle, transparent 58%, #000 60%);
          mask: radial-gradient(circle, transparent 58%, #000 60%);
  animation: girar 8s linear infinite;
  filter: drop-shadow(0 0 1rem rgba(245, 197, 24, 0.6));
}
.logo::before {
  content: ""; position: absolute; inset: 0.9rem; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #2aa055, var(--gramado-escuro) 70%);
  box-shadow: inset 0 0 1.2rem rgba(0, 0, 0, 0.6);
}
.logo-trofeu { position: relative; font-family: var(--fonte-emoji); font-size: 4rem; animation: flutuar 3s ease-in-out infinite; }
.logo-bola {
  position: absolute; font-family: var(--fonte-emoji); font-size: 1.8rem;
  top: 50%; left: 50%; margin: -0.9em 0 0 -0.5em;
  animation: orbitar 4s linear infinite;
}
@keyframes flutuar { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-0.4rem); } }
@keyframes orbitar { from { transform: rotate(0deg) translateX(5rem) rotate(0deg); } to { transform: rotate(360deg) translateX(5rem) rotate(-360deg); } }

.titulo { display: flex; flex-direction: column; align-items: center; font-weight: 400; line-height: 0.85; }
.titulo-anglo {
  font-family: var(--fonte-display); font-size: 3.4rem; letter-spacing: 0.55em; margin-right: -0.55em;
  color: var(--branco); text-shadow: 0 0.2rem 0.8rem rgba(0, 0, 0, 0.6);
  animation: entrar-cima 0.8s ease both;
}
.titulo-copa {
  font-family: var(--fonte-display); font-size: 9.5rem; letter-spacing: 0.03em;
  background: linear-gradient(100deg, #E0A800 0%, var(--ouro) 30%, #FFF6C9 45%, var(--ouro) 60%, #E0A800 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0.35rem 0 #6b4f00) drop-shadow(0 0.6rem 1.4rem rgba(0, 0, 0, 0.6));
  animation: brilho 4s linear infinite, entrar-zoom 0.9s cubic-bezier(.2, 1.4, .4, 1) both;
}
@keyframes brilho { from { background-position: 125% 0; } to { background-position: -125% 0; } }
@keyframes entrar-cima { from { opacity: 0; transform: translateY(-1.5rem); } to { opacity: 1; transform: none; } }
@keyframes entrar-zoom { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: none; } }

.faixa {
  margin-top: 0.4rem;
  padding: 0.3em 1.4em 0.2em;
  font-family: var(--fonte-display); font-size: 2rem; letter-spacing: 0.25em;
  background: linear-gradient(90deg, transparent, var(--erro) 12%, #b81d2a 88%, transparent);
  clip-path: polygon(3% 0, 97% 0, 100% 50%, 97% 100%, 3% 100%, 0 50%);
  text-shadow: 0 0.1rem 0 rgba(0, 0, 0, 0.4);
  animation: entrar-cima 0.8s 0.25s ease both;
}
.slogan { font-weight: 800; font-size: 1.25rem; margin-top: 0.5rem; text-shadow: 0 0.1rem 0.4rem rgba(0, 0, 0, 0.7); }
.slogan span { font-weight: 600; color: var(--texto-suave); }

.splash-botoes { display: flex; align-items: center; gap: 1.5rem; margin-top: 1.6rem; animation: entrar-cima 0.8s 0.45s ease both; }

/* Desfile de bandeiras */
.desfile {
  width: calc(100% + 4rem); overflow: hidden; padding: 0.8rem 0;
  -webkit-mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
          mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.desfile-trilho { display: flex; gap: 1.6rem; width: max-content; animation: desfilar 40s linear infinite; }
.desfile-item {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.35rem 0.9rem 0.35rem 0.35rem; border-radius: 99rem;
  background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(255, 255, 255, 0.15);
  font-family: var(--fonte-display); font-size: 1.3rem; letter-spacing: 0.06em; white-space: nowrap;
}
.desfile-item img { width: 2.6rem; height: 1.75rem; object-fit: cover; border-radius: 0.3rem; }
@keyframes desfilar { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.rodape { display: flex; gap: 0.8rem; align-items: center; font-size: 0.95rem; color: var(--texto-suave); text-align: center; }
.rodape strong { color: var(--ouro); font-weight: 800; }
.rodape span:not(:empty)::before { content: "•"; margin-right: 0.8rem; color: rgba(255, 255, 255, 0.4); }

/* ========== 2. SELEÇÃO ========== */
#tela-selecao { gap: 1rem; padding-top: 1rem; padding-bottom: 1rem; }

.grade-times {
  flex: 1; min-height: 0; width: 100%; max-width: 92rem;
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.card-time {
  --cor: #1B7F3A;
  position: relative; min-height: 0;
  display: flex; flex-direction: column; align-items: stretch; gap: 0.35rem;
  padding: 0.8rem 0.8rem 0.9rem;
  text-align: left;
  border-radius: var(--raio);
  background: var(--vidro); /* fallback p/ navegadores antigos */
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--cor) 55%, transparent) 0%, transparent 55%),
    var(--vidro);
  border: 2px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 0.5rem 1.4rem rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, opacity 0.2s ease, filter 0.2s;
  animation: card-entra 0.45s ease both;
}
@keyframes card-entra { from { opacity: 0; transform: translateY(1.2rem) scale(0.95); } to { opacity: 1; transform: none; } }
.card-time:hover { transform: translateY(-0.4rem) scale(1.03); border-color: rgba(255, 255, 255, 0.55); box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.5), 0 0 1.4rem var(--cor); z-index: 2; }

.card-bandeira {
  flex: 1 1 auto; min-height: 0; width: 100%;
  border-radius: 0.6rem; overflow: hidden;
  box-shadow: 0 0.3rem 0.8rem rgba(0, 0, 0, 0.5);
  background: #000;
}
.card-bandeira img { width: 100%; height: 100%; object-fit: cover; }
.card-nome { font-family: var(--fonte-display); font-size: 1.85rem; letter-spacing: 0.04em; line-height: 1; margin-top: 0.25rem; }
.card-pt { font-size: 0.82rem; font-weight: 800; color: var(--ouro); text-transform: uppercase; letter-spacing: 0.06em; }
.card-fato {
  font-size: 0.8rem; line-height: 1.32; color: var(--texto-suave);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 3.2em;
}
.card-check {
  position: absolute; top: -0.7rem; right: -0.7rem;
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 900; font-size: 1.3rem; color: #1a1300;
  background: var(--ouro); box-shadow: 0 0.3rem 0.8rem rgba(0, 0, 0, 0.5);
  transform: scale(0); transition: transform 0.25s cubic-bezier(.2, 1.6, .4, 1);
}

/* Estado: há um time escolhido → os outros ficam um pouco apagados */
.grade-times.tem-escolha .card-time:not(.escolhido) { opacity: 0.6; filter: saturate(0.6); }
.grade-times.tem-escolha .card-time:not(.escolhido):hover { opacity: 1; filter: none; }
.card-time.escolhido {
  border-color: var(--ouro);
  transform: translateY(-0.4rem) scale(1.05);
  box-shadow: 0 0 0 0.25rem rgba(245, 197, 24, 0.35), 0 1rem 2.4rem rgba(0, 0, 0, 0.55), 0 0 2rem rgba(245, 197, 24, 0.45);
  z-index: 3;
}
.card-time.escolhido .card-check { transform: scale(1); }

.selecao-rodape { display: flex; justify-content: center; }
.btn-confirmar { min-width: 26rem; font-size: 2.3rem; }
.btn-confirmar:not(:disabled) { animation: pulsar 1.6s ease-in-out infinite; }

/* Telas mais "quadradas" (4:3, 5:4): grade 4 × 3 */
@media (max-aspect-ratio: 3/2) {
  .grade-times { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); }
  .card-fato { -webkit-line-clamp: 2; min-height: 2.6em; }
}

/* ========== 3. PRÉ-PARTIDA ========== */
#tela-prepartida { padding: 0; overflow: hidden; }

.vs-lado {
  --cor: #1B7F3A;
  position: absolute; top: 0; bottom: 0; width: 58%;
  display: flex; align-items: center;
  background: var(--cor); /* fallback */
  background:
    radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, 0.18), transparent 60%),
    linear-gradient(135deg, color-mix(in srgb, var(--cor) 92%, #000) 0%, color-mix(in srgb, var(--cor) 55%, #000) 100%);
}
.vs-jogador { left: 0; clip-path: polygon(0 0, 100% 0, 72% 100%, 0 100%); justify-content: flex-start; padding-left: 8%; }
.vs-cpu { right: 0; clip-path: polygon(28% 0, 100% 0, 100% 100%, 0 100%); justify-content: flex-end; padding-right: 8%; }
.vs-conteudo { display: flex; flex-direction: column; align-items: center; gap: 1rem; text-shadow: 0 0.2rem 0.8rem rgba(0, 0, 0, 0.6); }
.vs-rotulo {
  font-family: var(--fonte-display); font-size: 2rem; letter-spacing: 0.2em;
  padding: 0.2em 1em 0.1em; border-radius: 99rem; background: rgba(0, 0, 0, 0.45);
}
.vs-bandeira {
  width: 20rem; height: 13.3rem; object-fit: cover; border-radius: 1rem;
  border: 0.35rem solid var(--branco);
  box-shadow: 0 1.2rem 3rem rgba(0, 0, 0, 0.6);
}
.vs-nome { font-family: var(--fonte-display); font-size: 4.2rem; letter-spacing: 0.04em; line-height: 1; }

#tela-prepartida.ativa .vs-jogador { animation: entra-esq 0.6s cubic-bezier(.2, 1, .3, 1) both; }
#tela-prepartida.ativa .vs-cpu { animation: entra-dir 0.6s cubic-bezier(.2, 1, .3, 1) both; }
#tela-prepartida.ativa .vs-bandeira { animation: flutuar 2.4s 0.6s ease-in-out infinite; }
@keyframes entra-esq { from { transform: translateX(-100%); } to { transform: none; } }
@keyframes entra-dir { from { transform: translateX(100%); } to { transform: none; } }

.vs-centro { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.vs-texto, .contagem { grid-area: 1 / 1; font-family: var(--fonte-display); line-height: 1; }
.vs-texto {
  width: 11rem; height: 11rem; border-radius: 50%;
  display: grid; place-items: center; padding-top: 0.15em;
  font-size: 6.5rem; color: #1a1300;
  background: radial-gradient(circle at 35% 30%, #FFF6C9, var(--ouro) 55%, #C99700);
  border: 0.4rem solid var(--branco);
  box-shadow: 0 0 0 0.6rem rgba(0, 0, 0, 0.35), 0 0 4rem rgba(245, 197, 24, 0.7);
  opacity: 0;
}
#tela-prepartida.ativa .vs-texto { animation: vs-slam 0.5s 0.45s cubic-bezier(.2, 1.6, .4, 1) both; }
#tela-prepartida.contando .vs-texto { animation: sumir 0.25s ease both; }
@keyframes vs-slam { from { opacity: 0; transform: scale(3) rotate(-20deg); } to { opacity: 1; transform: none; } }
@keyframes sumir { from { opacity: 1; } to { opacity: 0; transform: scale(0.5); } }

.contagem {
  font-size: 16rem; color: var(--branco);
  -webkit-text-stroke: 0.25rem #000;
  text-shadow: 0 0.6rem 0 rgba(0, 0, 0, 0.5), 0 0 3rem rgba(255, 255, 255, 0.5);
  opacity: 0;
}
.contagem.tique { animation: tique 0.8s ease-out both; }
.contagem.go { color: var(--ouro); font-size: 18rem; animation: tique-go 0.9s ease-out both; }
@keyframes tique { 0% { opacity: 0; transform: scale(2.5); } 25% { opacity: 1; transform: scale(1); } 75% { opacity: 1; transform: scale(0.95); } 100% { opacity: 0; transform: scale(0.6); } }
@keyframes tique-go { 0% { opacity: 0; transform: scale(0.3) rotate(-8deg); } 30% { opacity: 1; transform: scale(1.15) rotate(3deg); } 70% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.6); } }

.vs-regras {
  position: absolute; left: 50%; bottom: 2.2rem; transform: translateX(-50%);
  display: flex; gap: 1.2rem; white-space: nowrap;
  animation: entrar-baixo 0.5s 0.8s ease both;
}
.vs-regras span {
  padding: 0.6rem 1.2rem; border-radius: 99rem;
  background: rgba(0, 0, 0, 0.7); border: 1px solid rgba(255, 255, 255, 0.25);
  font-weight: 600; font-size: 1.15rem;
}
.vs-regras b { color: var(--ouro); font-weight: 900; }
@keyframes entrar-baixo { from { opacity: 0; transform: translate(-50%, 1.5rem); } to { opacity: 1; transform: translateX(-50%); } }

/* ========== 4. PARTIDA ========== */
#tela-jogo { gap: 0.9rem; padding-top: 1rem; justify-content: flex-start; }

.placar {
  display: flex; align-items: center; gap: 1.2rem;
  padding: 0.5rem 1.2rem;
  border-radius: 1.2rem;
  background: linear-gradient(180deg, rgba(10, 30, 18, 0.92), rgba(3, 12, 7, 0.92));
  border: 2px solid rgba(245, 197, 24, 0.45);
  box-shadow: var(--sombra), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.placar-time { display: flex; align-items: center; gap: 0.9rem; }
.placar-band { width: 4.2rem; height: 2.8rem; object-fit: cover; border-radius: 0.4rem; box-shadow: 0 0.2rem 0.5rem rgba(0, 0, 0, 0.6); }
.placar-cod { font-family: var(--fonte-display); font-size: 2.2rem; letter-spacing: 0.06em; min-width: 3.4rem; text-align: center; }
.placar-num {
  display: inline-block; min-width: 4.2rem; padding: 0.05em 0.2em 0;
  font-family: var(--fonte-display); font-size: 4.2rem; line-height: 1; text-align: center;
  border-radius: 0.6rem; background: rgba(255, 255, 255, 0.08);
}
.placar-time-jogador .placar-num { color: var(--ouro); }
.placar-time-cpu .placar-cod::after { content: " 🤖"; font-family: var(--fonte-emoji); font-size: 0.7em; }

/* Relógio circular */
.relogio { --cor-tempo: var(--sucesso); position: relative; width: 5.2rem; height: 5.2rem; display: grid; place-items: center; }
.relogio svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.relogio-fundo { fill: rgba(0, 0, 0, 0.4); stroke: rgba(255, 255, 255, 0.12); stroke-width: 8; }
.relogio-arco { fill: none; stroke: var(--cor-tempo); stroke-width: 8; stroke-linecap: round; stroke-dasharray: 276.46; stroke-dashoffset: 0; }
#relogio-num { position: relative; font-family: var(--fonte-display); font-size: 2.6rem; line-height: 1; padding-top: 0.1em; color: var(--cor-tempo); }
.relogio.urgente { animation: pulsar 0.5s ease-in-out infinite; }

/* Progresso */
.progresso { display: flex; align-items: center; gap: 1rem; }
.progresso-segmentos { display: flex; gap: 0.38rem; }
.seg {
  width: 1.75rem; height: 0.7rem; border-radius: 99rem;
  background: rgba(255, 255, 255, 0.18);
  transition: background 0.3s, transform 0.3s;
}
.seg.atual { background: var(--branco); box-shadow: 0 0 0.8rem rgba(255, 255, 255, 0.8); transform: scaleY(1.3); }
.seg.certo { background: var(--sucesso); }
.seg.errado { background: var(--erro); }
.progresso-texto { font-family: var(--fonte-display); font-size: 1.5rem; letter-spacing: 0.08em; color: var(--texto-suave); }

/* Cartão da pergunta */
.cartao-pergunta {
  position: relative; width: 100%; max-width: 64rem;
  flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.7rem;
  padding: 1.6rem 2.4rem 1.4rem;
  border-radius: 1.5rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(236, 246, 239, 0.97));
  color: #0b1f12;
  box-shadow: 0 1.2rem 3rem rgba(0, 0, 0, 0.5), inset 0 -0.35rem 0 rgba(14, 92, 42, 0.18);
  overflow: hidden;
}
.cartao-pergunta.entrando { animation: cartao-entra 0.45s cubic-bezier(.2, 1.2, .4, 1) both; }
@keyframes cartao-entra { from { opacity: 0; transform: translateX(3rem) rotate(1deg); } to { opacity: 1; transform: none; } }

.barra-tempo { position: absolute; top: 0; left: 0; right: 0; height: 0.55rem; background: rgba(0, 0, 0, 0.08); }
.barra-tempo-fill { height: 100%; width: 100%; background: var(--cor-tempo, var(--sucesso)); transform-origin: left center; }

.categoria {
  padding: 0.35em 1em 0.3em; border-radius: 99rem;
  font-size: 0.9rem; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--branco); background: var(--gramado-escuro);
}
.categoria[data-cat="culture"] { background: #1d4ed8; }
.categoria[data-cat="grammar"] { background: #7c3aed; }
.categoria[data-cat="emoji"] { background: #c2410c; }
.categoria[data-cat="worldcup"] { background: #b45309; }

.pergunta-visual { display: flex; align-items: center; justify-content: center; gap: 1rem; min-height: 0; }
.pergunta-emoji { font-family: var(--fonte-emoji); font-size: 4.2rem; line-height: 1.15; letter-spacing: 0.08em; }
.pergunta-bandeira { height: 4.4rem; width: 6.6rem; object-fit: cover; border-radius: 0.5rem; box-shadow: 0 0.3rem 0.8rem rgba(0, 0, 0, 0.35); }
.pergunta-texto {
  max-width: 54rem; text-align: center;
  font-weight: 800; font-size: 2.15rem; line-height: 1.25; letter-spacing: -0.01em;
  text-wrap: balance;
}
.pergunta-texto.longa { font-size: 1.75rem; }

/* Lance (GOL / GOL DA CPU) por cima do cartão */
.lance {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.3rem;
  opacity: 0; visibility: hidden; pointer-events: none;
}
.lance.mostrar { opacity: 1; visibility: visible; }
.lance.jogador { background: radial-gradient(ellipse at center, rgba(245, 197, 24, 0.97) 0%, rgba(27, 127, 58, 0.97) 75%); }
.lance.cpu { background: radial-gradient(ellipse at center, rgba(230, 57, 70, 0.96) 0%, rgba(90, 10, 20, 0.97) 80%); }
.lance-bola { font-family: var(--fonte-emoji); font-size: 4.5rem; line-height: 1; }
.lance.jogador .lance-bola { animation: bola-gol 0.8s cubic-bezier(.2, 1, .3, 1) both; }
.lance.cpu .lance-bola { animation: bola-cpu 0.8s ease both; }
.lance-titulo {
  font-family: var(--fonte-display); font-size: 7.5rem; line-height: 0.9; letter-spacing: 0.03em;
  color: var(--branco); -webkit-text-stroke: 0.18rem rgba(0, 0, 0, 0.55);
  text-shadow: 0 0.4rem 0 rgba(0, 0, 0, 0.35);
}
.lance.mostrar .lance-titulo { animation: gol-texto 0.7s cubic-bezier(.2, 1.6, .4, 1) both; }
.lance-sub {
  max-width: 50rem; padding: 0.5rem 1.2rem; border-radius: 0.8rem;
  background: rgba(0, 0, 0, 0.35);
  font-weight: 800; font-size: 1.35rem; color: var(--branco); text-align: center; line-height: 1.35;
}
.lance-sub:empty { display: none; }
.lance-sub .ok { color: #9dffdf; }
.lance-sub .dica-txt { display: block; font-weight: 600; font-size: 1.1rem; opacity: 0.95; margin-top: 0.15rem; }
.lance.mostrar .lance-sub { animation: entrar-cima 0.4s 0.25s ease both; }
@keyframes gol-texto { from { opacity: 0; transform: scale(2.6) rotate(-8deg); } to { opacity: 1; transform: rotate(-3deg); } }
@keyframes bola-gol { 0% { transform: translate(-30rem, 6rem) rotate(-720deg) scale(0.5); } 100% { transform: none; } }
@keyframes bola-cpu { 0% { transform: translateY(-4rem) scale(0.5); opacity: 0; } 60% { transform: translateY(0.4rem); opacity: 1; } 100% { transform: none; } }

/* Respostas */
.respostas { width: 100%; max-width: 64rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.resposta {
  position: relative;
  display: flex; align-items: center; gap: 0.9rem;
  min-height: 6.2rem; padding: 0.8rem 1.1rem;
  border-radius: 1.1rem; text-align: left;
  background: linear-gradient(180deg, #1f8f45, var(--gramado-escuro));
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 0.4rem 0 #073d1b, 0 0.8rem 1.6rem rgba(0, 0, 0, 0.4);
  transition: transform 0.15s ease, background 0.2s, box-shadow 0.2s, opacity 0.25s, filter 0.25s;
  animation: resposta-entra 0.4s ease both;
}
.resposta:nth-child(2) { animation-delay: 0.06s; }
.resposta:nth-child(3) { animation-delay: 0.12s; }
@keyframes resposta-entra { from { opacity: 0; transform: translateY(1.2rem); } to { opacity: 1; transform: none; } }
.resposta:hover:not(:disabled) { transform: translateY(-0.25rem) scale(1.02); border-color: var(--ouro); background: linear-gradient(180deg, #27a352, #10682f); }
.resposta:active:not(:disabled) { transform: translateY(0.2rem); box-shadow: 0 0.15rem 0 #073d1b; }
.resposta:disabled { cursor: default; }
.resposta-letra {
  flex: none; width: 2.8rem; height: 2.8rem; border-radius: 0.7rem;
  display: grid; place-items: center; padding-top: 0.1em;
  font-family: var(--fonte-display); font-size: 2rem; color: #1a1300;
  background: var(--ouro);
}
.resposta-texto { flex: 1; font-weight: 800; font-size: 1.4rem; line-height: 1.2; overflow-wrap: anywhere; }
.resposta-texto.emoji { font-family: var(--fonte-emoji); font-size: 2.2rem; letter-spacing: 0.1em; }
.resposta kbd { position: absolute; right: 0.6rem; bottom: 0.45rem; font-size: 0.75rem; opacity: 0.7; }

.resposta.certa { background: linear-gradient(180deg, #2ff0b6, #04a77c); border-color: var(--branco); box-shadow: 0 0.4rem 0 #037456, 0 0 2rem rgba(6, 214, 160, 0.7); color: #00231a; animation: bump-leve 0.5s ease; }
.resposta.certa .resposta-letra { background: var(--branco); }
.resposta.errada { background: linear-gradient(180deg, #ff5a66, #b71c2a); border-color: var(--branco); box-shadow: 0 0.4rem 0 #7d0f19; animation: tremer 0.45s ease; }
.resposta.apagada { opacity: 0.35; filter: grayscale(0.7); }
@keyframes bump-leve { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.06); } }

.dica { font-size: 1rem; font-weight: 600; color: var(--texto-suave); padding-bottom: 0.3rem; }

/* Tela inteira "pisca" quando há gol */
#tela-jogo.flash-gol::after, #tela-jogo.flash-cpu::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  animation: flash 0.6s ease-out both;
}
#tela-jogo.flash-gol::after { background: radial-gradient(circle, rgba(245, 197, 24, 0.55), transparent 70%); }
#tela-jogo.flash-cpu::after { background: radial-gradient(circle, rgba(230, 57, 70, 0.45), transparent 70%); }
@keyframes flash { from { opacity: 1; } to { opacity: 0; } }

/* Faixa "FIM DE JOGO" */
#tela-jogo .apito-final {
  position: absolute; inset: 0; z-index: 5;
  display: grid; place-items: center;
  background: rgba(0, 0, 0, 0.6);
  font-family: var(--fonte-display); font-size: 9rem; letter-spacing: 0.05em; color: var(--ouro);
  text-shadow: 0 0.5rem 0 rgba(0, 0, 0, 0.5);
  animation: aparecer 0.3s ease both;
}
#tela-jogo .apito-final span { animation: gol-texto 0.7s cubic-bezier(.2, 1.6, .4, 1) both; display: block; text-align: center; line-height: 0.9; }
#tela-jogo .apito-final small { display: block; font-size: 0.35em; color: var(--branco); letter-spacing: 0.3em; }

/* ========== 5. RESULTADO ========== */
#tela-resultado { justify-content: center; gap: 1.1rem; text-align: center; }

.resultado-topo { display: flex; flex-direction: column; align-items: center; }
.resultado-kicker {
  font-family: var(--fonte-display); font-size: 1.6rem; letter-spacing: 0.35em;
  padding: 0.15em 1em 0.05em; border-radius: 99rem; background: rgba(0, 0, 0, 0.45); color: var(--texto-suave);
}
.resultado-titulo {
  font-family: var(--fonte-display); font-weight: 400; font-size: 7.5rem; line-height: 0.95; letter-spacing: 0.03em;
  margin-top: 0.3rem;
  filter: drop-shadow(0 0.35rem 0 rgba(0, 0, 0, 0.45));
}
#tela-resultado.ativa .resultado-titulo { animation: gol-texto-reto 0.8s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes gol-texto-reto { from { opacity: 0; transform: scale(2.4); } to { opacity: 1; transform: none; } }
.res-vitoria .resultado-titulo {
  background: linear-gradient(180deg, #FFF6C9, var(--ouro) 50%, #D49B00);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.res-empate .resultado-titulo { color: var(--branco); }
.res-derrota .resultado-titulo { color: #ffb3b9; }
.resultado-msg { font-size: 1.35rem; font-weight: 800; margin-top: 0.3rem; }
.resultado-msg span { display: block; font-weight: 600; font-size: 1.05rem; color: var(--texto-suave); margin-top: 0.15rem; }

.placar-final {
  display: flex; align-items: center; gap: 2.2rem;
  padding: 0.9rem 2.2rem; border-radius: 1.4rem;
  background: rgba(3, 12, 7, 0.75); border: 2px solid rgba(245, 197, 24, 0.45);
  box-shadow: var(--sombra);
}
.pf-time { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; font-family: var(--fonte-display); font-size: 1.8rem; letter-spacing: 0.08em; }
.pf-time img { width: 6rem; height: 4rem; object-fit: cover; border-radius: 0.5rem; box-shadow: 0 0.3rem 0.8rem rgba(0, 0, 0, 0.6); }
.pf-num { font-family: var(--fonte-display); font-size: 6.5rem; line-height: 1; display: flex; align-items: center; gap: 1.2rem; padding-top: 0.08em; }
.pf-num small { font-size: 0.55em; color: var(--texto-suave); }
.pf-num span:first-child { color: var(--ouro); }

.estatisticas { display: flex; gap: 1rem; }
.estat {
  min-width: 10.5rem; padding: 0.7rem 1.2rem; border-radius: 1rem;
  background: var(--vidro); border: 1px solid var(--vidro-borda);
  display: flex; flex-direction: column; align-items: center;
}
.estat-valor { font-family: var(--fonte-display); font-size: 2.8rem; line-height: 1; padding-top: 0.08em; }
.estat-rotulo { font-size: 0.85rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--texto-suave); }
.estat-destaque { border-color: var(--ouro); background: rgba(245, 197, 24, 0.14); }
.estat-destaque .estat-valor { color: var(--ouro); }

.form-nome { display: flex; flex-direction: column; align-items: center; gap: 0.45rem; }
.form-nome label { font-weight: 800; font-size: 1.05rem; }
.form-nome label small { font-weight: 600; color: var(--texto-suave); }
.form-nome-linha { display: flex; gap: 0.7rem; }
.form-nome input {
  width: 19rem; padding: 0.6rem 1rem; border-radius: 0.8rem;
  font-size: 1.45rem; font-weight: 800; text-align: center; letter-spacing: 0.04em;
  background: rgba(0, 0, 0, 0.45); border: 2px solid rgba(255, 255, 255, 0.35);
}
.form-nome input::placeholder { color: rgba(255, 255, 255, 0.5); font-weight: 600; }
.form-nome input:focus-visible { outline: none; border-color: var(--ouro); box-shadow: 0 0 0 0.25rem rgba(245, 197, 24, 0.3); }
.form-nome-status { min-height: 1.3em; font-weight: 800; font-size: 0.95rem; color: var(--sucesso); }

.resultado-botoes { display: flex; gap: 1.2rem; flex-wrap: wrap; justify-content: center; }

/* ========== 6. RANKING ========== */
#tela-ranking { gap: 1rem; padding-top: 1rem; padding-bottom: 1rem; }

.ranking-tabela { width: 100%; max-width: 64rem; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 0.35rem; }
#ranking-corpo { display: flex; flex-direction: column; gap: 0.35rem; min-height: 0; }
.rk-linha {
  display: grid; grid-template-columns: 4rem 1.6fr 1.5fr 7rem 6.5rem 7rem; align-items: center; gap: 0.8rem;
  padding: 0 1.2rem; height: 3.05rem;
  border-radius: 0.8rem;
  background: var(--vidro); border: 1px solid var(--vidro-borda);
  font-weight: 800; font-size: 1.15rem;
  animation: card-entra 0.35s ease both;
}
.rk-cabecalho {
  height: 2.2rem; background: none; border: 0;
  font-size: 0.85rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.12em; color: var(--texto-suave);
  animation: none;
}
.rk-linha > span:nth-child(n+4) { text-align: center; }
.rk-pos { font-family: var(--fonte-display); font-size: 1.9rem; line-height: 1; padding-top: 0.1em; text-align: center; }
.rk-nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-time { display: flex; align-items: center; gap: 0.6rem; font-weight: 600; font-size: 1rem; white-space: nowrap; overflow: hidden; }
.rk-time img { width: 2.4rem; height: 1.6rem; object-fit: cover; border-radius: 0.25rem; flex: none; }
.rk-pontos { font-family: var(--fonte-display); font-size: 1.7rem; letter-spacing: 0.04em; color: var(--ouro); padding-top: 0.1em; }

.rk-linha.ouro { background: linear-gradient(90deg, rgba(245, 197, 24, 0.38), rgba(8, 24, 14, 0.7)); border-color: var(--ouro); }
.rk-linha.prata { background: linear-gradient(90deg, rgba(210, 220, 230, 0.32), rgba(8, 24, 14, 0.7)); border-color: #cfd8e3; }
.rk-linha.bronze { background: linear-gradient(90deg, rgba(205, 127, 50, 0.38), rgba(8, 24, 14, 0.7)); border-color: #cd7f32; }
.rk-linha.ouro .rk-pos, .rk-linha.prata .rk-pos, .rk-linha.bronze .rk-pos { font-family: var(--fonte-emoji); font-size: 1.7rem; }
.rk-linha.voce { outline: 0.2rem solid var(--sucesso); outline-offset: 0.1rem; animation: card-entra 0.35s ease both, brilho-voce 1.4s ease-in-out infinite; }
.rk-linha.voce .rk-nome::after { content: "  ← você"; color: var(--sucesso); font-size: 0.85em; }
@keyframes brilho-voce { 0%, 100% { box-shadow: 0 0 0 rgba(6, 214, 160, 0); } 50% { box-shadow: 0 0 1.4rem rgba(6, 214, 160, 0.7); } }
.rk-separador { text-align: center; color: var(--texto-suave); font-weight: 900; letter-spacing: 0.4em; line-height: 1; }

.ranking-vazio {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem;
  padding: 3rem 1rem; text-align: center;
  border-radius: var(--raio); background: var(--vidro); border: 2px dashed var(--vidro-borda);
}
.ranking-vazio .grande { font-family: var(--fonte-emoji); font-size: 4rem; }
.ranking-vazio p { font-weight: 800; font-size: 1.4rem; }
.ranking-vazio span { color: var(--texto-suave); }

.ranking-rodape { width: 100%; max-width: 64rem; display: flex; justify-content: center; align-items: center; position: relative; }
.ranking-rodape #btn-limpar { position: absolute; right: 0; opacity: 0.75; }
.ranking-rodape #btn-limpar:hover { opacity: 1; }

/* ========== RESPONSIVIDADE MOBILE / VERTICAL (Cloudflare Pages) ========== */
@media (max-width: 768px), (max-aspect-ratio: 4/5) {
  .tela { padding: 1rem; overflow-y: auto; }
  .cabecalho { grid-template-columns: auto 1fr auto; padding-right: 5.5rem; }
  .cabecalho-titulo h2 { font-size: 2.3rem; }
  .titulo-anglo { font-size: 2.2rem; }
  .titulo-copa { font-size: 5.2rem; }
  .faixa { font-size: 1.35rem; letter-spacing: 0.14em; }
  .btn-gigante { font-size: 2.6rem; }
  .splash-botoes { flex-wrap: wrap; justify-content: center; gap: 0.9rem; }
  .rodape { flex-direction: column; gap: 0.2rem; }
  .rodape span:not(:empty)::before { display: none; }

  .grade-times {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-rows: minmax(11.5rem, auto);
    overflow-y: auto;
    padding: 0.3rem;
  }
  .btn-confirmar { min-width: 0; width: 100%; font-size: 1.8rem; }

  .vs-jogador { width: 100%; height: 52%; bottom: auto; clip-path: polygon(0 0, 100% 0, 100% 82%, 0 100%); justify-content: center; padding: 0; }
  .vs-cpu { width: 100%; height: 52%; top: auto; clip-path: polygon(0 18%, 100% 0, 100% 100%, 0 100%); justify-content: center; padding: 0; }
  .vs-bandeira { width: 12rem; height: 8rem; }
  .vs-nome { font-size: 2.8rem; }
  .vs-texto { width: 7.5rem; height: 7.5rem; font-size: 4.2rem; }
  .vs-regras { width: 94%; flex-wrap: wrap; justify-content: center; white-space: normal; bottom: 0.8rem; gap: 0.4rem; }
  .vs-regras span { font-size: 0.9rem; padding: 0.35rem 0.8rem; }

  .placar { width: 100%; justify-content: space-between; padding: 0.4rem 0.8rem; gap: 0.5rem; }
  .placar-band { width: 3rem; height: 2rem; }
  .placar-cod { font-size: 1.6rem; min-width: 2.4rem; }
  .placar-num { font-size: 2.8rem; min-width: 2.8rem; }
  .relogio { width: 4rem; height: 4rem; }
  #relogio-num { font-size: 2rem; }
  .progresso { flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
  .seg { width: 1.15rem; height: 0.55rem; }

  .cartao-pergunta { padding: 1.2rem 1rem 1rem; }
  .pergunta-emoji { font-size: 3rem; }
  .pergunta-bandeira { width: 5rem; height: 3.3rem; }
  .pergunta-texto, .pergunta-texto.longa { font-size: 1.45rem; }
  .lance-titulo { font-size: 4.5rem; }
  .respostas { grid-template-columns: 1fr; gap: 0.65rem; }
  .resposta { min-height: 4.3rem; padding: 0.6rem 0.9rem; }
  .resposta-texto { font-size: 1.2rem; }

  .resultado-titulo { font-size: 4.8rem; }
  .placar-final { gap: 1.2rem; padding: 0.7rem 1.4rem; }
  .pf-num { font-size: 4.4rem; }
  .estatisticas { flex-wrap: wrap; justify-content: center; gap: 0.6rem; }
  .estat { min-width: 8.5rem; padding: 0.5rem 0.8rem; }

  .rk-linha { grid-template-columns: 2.6rem 1.3fr 1.1fr 4.4rem 4.2rem 4.6rem; gap: 0.35rem; padding: 0 0.6rem; font-size: 0.95rem; }
  .rk-time img { width: 1.8rem; height: 1.2rem; }
  .ranking-rodape { flex-direction: column; gap: 0.7rem; }
  .ranking-rodape #btn-limpar { position: static; }
}
