/* EXPIA PALAVRAS — cores da bandeira de MT + vidro estilo Apple */
@font-face {
  font-family: 'Inter';
  src: url('fonts/InterVariable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --azul: #1a3e8c;
  --azul-escuro: #0a2259;
  --verde: #009b3a;
  --verde-claro: #2fd16b;
  --amarelo: #fedd00;
  --navy: #0b1e4d;
  --seguro-topo: env(safe-area-inset-top, 0px);
  --seguro-base: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
  font-optical-sizing: auto;
  font-feature-settings: 'cv11', 'ss01';
  color: #fff;
  background: var(--azul-escuro);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* ── fundo animado ── */
.fundo {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background: linear-gradient(160deg, #0d2c73 0%, var(--azul) 45%, var(--azul-escuro) 100%);
}
.losango {
  position: absolute; left: 50%; top: 42%; width: 124vmax; height: 72vmax;
  transform: translate(-50%, -50%);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.02));
}
.luz { position: absolute; border-radius: 50%; filter: blur(60px); will-change: transform; }
.l1 { width: 80vmax; height: 80vmax; left: -30vmax; top: -30vmax; background: radial-gradient(circle, rgba(0,155,58,.55), transparent 65%); animation: flutua 24s ease-in-out infinite; }
.l2 { width: 65vmax; height: 65vmax; right: -30vmax; top: 15%; background: radial-gradient(circle, rgba(254,221,0,.40), transparent 65%); animation: flutua 28s ease-in-out infinite reverse; }
.l3 { width: 75vmax; height: 75vmax; left: -25vmax; bottom: -35vmax; background: radial-gradient(circle, rgba(0,192,96,.35), transparent 65%); animation: flutua 30s ease-in-out infinite; }
.l4 { width: 55vmax; height: 55vmax; right: -15vmax; bottom: -30vmax; background: radial-gradient(circle, rgba(255,255,255,.25), transparent 65%); animation: flutua 26s ease-in-out infinite reverse; }
.l5 { width: 40vmax; height: 40vmax; left: 35%; top: 5%; background: radial-gradient(circle, rgba(255,255,255,.18), transparent 65%); animation: flutua 22s ease-in-out infinite; }
@keyframes flutua {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(6vmax, 4vmax); }
  66% { transform: translate(-4vmax, 6vmax); }
}

/* ── vidro ── */
.vidro {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,.20), rgba(255,255,255,.08));
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid rgba(255,255,255,.28);
  border-top-color: rgba(255,255,255,.55);
  box-shadow: 0 10px 30px rgba(3, 14, 45, .25), inset 0 1px 0 rgba(255,255,255,.25);
}
.vidro.forte { background: linear-gradient(180deg, rgba(255,255,255,.26), rgba(255,255,255,.10)); }

/* ── telas ── */
#app { max-width: 520px; margin: 0 auto; padding: calc(var(--seguro-topo) + 14px) 18px calc(var(--seguro-base) + 22px); }
.tela { display: none; }
.tela.ativa { display: block; animation: entra .35s ease both; }
@keyframes entra { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ── início ── */
.emblema { display: block; margin: 14px auto 0; width: 96px; height: 96px; filter: drop-shadow(0 8px 18px rgba(0,0,0,.35)); }
.emblema.pequeno { width: 80px; height: 80px; margin-top: 0; }
.sobretitulo { margin: 18px 0 0; text-align: center; color: var(--amarelo); font-weight: 600; font-size: 13px; letter-spacing: .24em; }
.titulo { margin: 8px 0 0; text-align: center; font-weight: 800; font-size: clamp(38px, 11vw, 50px); letter-spacing: -.035em; line-height: 1.02; }
.subtitulo { margin: 10px 0 0; text-align: center; color: rgba(255,255,255,.8); font-weight: 500; font-size: 16px; }

.segmentado { display: flex; margin-top: 28px; padding: 4px; border-radius: 14px; height: 46px; }
.segmentado button { flex: 1; border-radius: 10px; font-weight: 600; font-size: 15px; color: rgba(255,255,255,.9); transition: background .2s, color .2s, box-shadow .2s; }
.segmentado button.sel { background: #fff; color: var(--navy); box-shadow: 0 3px 10px rgba(0,0,0,.18); }

.rotulo { margin: 28px 6px 10px; font-size: 12px; font-weight: 600; letter-spacing: .12em; color: rgba(255,255,255,.6); }
.temas { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tema { text-align: left; border-radius: 22px; padding: 16px; display: flex; flex-direction: column; transition: transform .15s ease, opacity .15s; }
.tema:active { transform: scale(.96); opacity: .85; }
.tema .emoji { font-size: 30px; line-height: 1; }
.tema .nome { margin-top: 12px; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.tema .desc { margin-top: 4px; font-size: 13px; font-weight: 500; color: rgba(255,255,255,.7); }
.tema .rec { margin-top: 10px; font-size: 12px; font-weight: 600; color: var(--amarelo); font-variant-numeric: tabular-nums; }
.tema.largo { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 14px;
  background: linear-gradient(180deg, rgba(254,221,0,.24), rgba(254,221,0,.09)); }
.tema.largo .txt { flex: 1; }
.tema.largo .nome { margin-top: 0; }
.tema.largo .seta { font-size: 28px; color: rgba(255,255,255,.6); }

.instrucao { margin: 26px 0 0; text-align: center; font-size: 13px; line-height: 1.45; color: rgba(255,255,255,.6); font-weight: 500; }

.creditos { margin-top: 22px; border-radius: 22px; padding: 14px 10px; display: flex; align-items: center; }
.credito { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 5px; }
.cred-rot { font-size: 9.5px; font-weight: 600; letter-spacing: .12em; color: rgba(255,255,255,.55); }
.cred-nome { font-size: 13.5px; font-weight: 700; letter-spacing: -.01em; }
.cred-nome.g4 b { color: #ff3b30; font-weight: 800; }
.cred-sep { width: 1px; align-self: stretch; background: rgba(255,255,255,.2); }
.rodape-site { margin: 14px 0 4px; text-align: center; font-size: 12px; font-weight: 600; letter-spacing: .03em; color: rgba(255,255,255,.55); }

/* ── jogo ── */
.topo { display: flex; align-items: center; gap: 10px; height: 48px; }
.redondo { width: 44px; height: 44px; border-radius: 50%; font-size: 30px; line-height: 1; padding-bottom: 4px; flex: none; }
.topo-meio { flex: 1; min-width: 0; text-align: center; }
.jogo-tema { font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jogo-nivel { margin-top: 3px; font-size: 11px; font-weight: 600; letter-spacing: .15em; color: var(--amarelo); }
.pilula { height: 44px; min-width: 66px; padding: 0 12px; border-radius: 22px; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; flex: none; }

.progresso { display: flex; align-items: center; gap: 12px; margin: 18px 4px 0; }
.trilho { flex: 1; height: 6px; border-radius: 3px; background: rgba(255,255,255,.18); overflow: hidden; }
.barra { height: 100%; width: 100%; background: var(--amarelo); border-radius: 3px; transform-origin: left; transform: scaleX(0); transition: transform .4s ease; }
#contador { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.9); font-variant-numeric: tabular-nums; }

.cartao-grade { margin-top: 14px; border-radius: 26px; padding: 8px; }
#grade { display: block; width: 100%; aspect-ratio: 1; touch-action: none; cursor: pointer; user-select: none; -webkit-user-select: none; }

.lista { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.chip { padding: 8px 13px; border-radius: 999px; font-size: 14px; font-weight: 600; transition: background .25s, color .25s; }
.chip.achada { text-decoration: line-through; border-color: transparent; box-shadow: none; animation: pula .4s cubic-bezier(.3,1.8,.5,1); }
@keyframes pula { from { transform: scale(1.18); } to { transform: scale(1); } }

.botoes { display: flex; gap: 12px; margin-top: 20px; }
.botao { flex: 1; height: 50px; border-radius: 16px; font-size: 16px; font-weight: 600; transition: transform .12s, opacity .12s; }
.botao:active, .redondo:active { transform: scale(.96); opacity: .85; }
.botao.primario { background: var(--amarelo); color: var(--navy); border: 0; box-shadow: 0 8px 22px rgba(254,221,0,.25); }

.assinatura { margin: 18px 0 0; text-align: center; font-size: 11.5px; line-height: 1.5; color: rgba(255,255,255,.55); }
.assinatura b, .vit-cred b { white-space: nowrap; }
.assinatura b { color: rgba(255,255,255,.85); font-weight: 600; }

/* ── vitória ── */
.veu { position: fixed; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(6, 22, 56, .45);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  animation: aparece .25s ease both; }
.veu[hidden] { display: none; }
@keyframes aparece { from { opacity: 0; } to { opacity: 1; } }
.cartao-vitoria { width: 100%; max-width: 400px; border-radius: 30px; padding: 28px 24px 22px; display: flex; flex-direction: column; align-items: center; text-align: center;
  animation: salta .5s cubic-bezier(.3,1.5,.5,1) both; }
@keyframes salta { from { transform: scale(.85); } to { transform: scale(1); } }
.cartao-vitoria h2 { margin: 16px 0 0; font-size: 32px; font-weight: 800; letter-spacing: -.035em; }
.vit-sub { margin: 8px 0 0; font-size: 15px; line-height: 1.35; color: rgba(255,255,255,.8); font-weight: 500; }
.vit-tempo { margin-top: 16px; font-size: 56px; font-weight: 800; letter-spacing: -.04em; font-variant-numeric: tabular-nums; line-height: 1; }
.vit-recorde { margin: 8px 0 0; color: var(--amarelo); font-weight: 600; font-size: 15px; }
.cartao-vitoria .botao { width: 100%; flex: none; height: 52px; margin-top: 10px; }
.cartao-vitoria .botao.primario { margin-top: 22px; }
.vit-cred { margin: 16px 0 0; font-size: 11.5px; line-height: 1.55; color: rgba(255,255,255,.6); }
.vit-cred b { color: rgba(255,255,255,.9); font-weight: 600; }

.aviso { position: fixed; left: 50%; bottom: calc(var(--seguro-base) + 90px); transform: translateX(-50%); z-index: 20;
  background: rgba(255,255,255,.95); color: var(--navy); padding: 10px 16px; border-radius: 999px; font-weight: 600; font-size: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25); animation: aparece .2s ease both; white-space: nowrap; }

@media (min-width: 700px) {
  #app { padding-top: 32px; }
}
