:root {
  --bg: #0b1020;
  --bg-2: #111832;
  --card: #161f3d;
  --card-2: #1c2750;
  --borda: #2c3a6e;
  --texto: #e8ecff;
  --texto-2: #9aa7d0;
  --ciano: #22d3ee;
  --violeta: #a78bfa;
  --verde: #34d399;
  --vermelho: #f87171;
  --amarelo: #fbbf24;
  --laranja: #fb923c;
  --sombra: 0 10px 30px rgba(0, 0, 0, 0.45);
  --raio: 14px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Ubuntu, sans-serif;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(167, 139, 250, 0.16), transparent 60%),
    radial-gradient(900px 420px at 10% 110%, rgba(34, 211, 238, 0.12), transparent 60%),
    var(--bg);
  color: var(--texto);
  min-height: 100vh;
}

.game-shell {
  max-width: 860px;
  margin: 0 auto;
  padding: 16px 14px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 100vh;
}

/* ---------- HUD ---------- */
.hud {
  position: sticky;
  top: 8px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(180deg, rgba(22, 31, 61, 0.97), rgba(17, 24, 50, 0.97));
  border: 1px solid var(--borda);
  border-radius: var(--raio);
  box-shadow: var(--sombra);
  padding: 10px 14px;
  backdrop-filter: blur(6px);
}

.hud-player { display: flex; align-items: center; gap: 10px; min-width: 0; }

.hud-avatar {
  font-size: 1.4rem;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.25), rgba(167, 139, 250, 0.25));
  border: 1px solid var(--borda);
  border-radius: 10px;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  flex-shrink: 0;
}

.hud-player-info { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.hud-player-info strong { font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.hud-player-info span { font-size: 0.75rem; color: var(--ciano); text-transform: uppercase; letter-spacing: 0.06em; }

.hud-xp { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.xp-labels { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--texto-2); letter-spacing: 0.08em; }
.xp-labels #xp-contador { color: var(--amarelo); font-weight: 700; }

.xp-bar {
  height: 12px;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--borda);
  overflow: hidden;
}
.xp-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ciano), var(--violeta), var(--amarelo));
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.55);
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.xp-percent { align-self: flex-end; font-size: 0.72rem; color: var(--texto-2); }

.btn-icon {
  background: var(--card-2);
  border: 1px solid var(--borda);
  color: var(--texto);
  font-size: 1.15rem;
  border-radius: 10px;
  width: 42px; height: 42px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
  flex-shrink: 0;
}
.btn-icon:hover { transform: scale(1.08); border-color: var(--ciano); }

/* ---------- Telas / cartões ---------- */
.tela { flex: 1; display: flex; flex-direction: column; gap: 16px; animation: entrar 0.35s ease both; }
@keyframes entrar { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.card {
  background: linear-gradient(180deg, var(--card), var(--bg-2));
  border: 1px solid var(--borda);
  border-radius: var(--raio);
  box-shadow: var(--sombra);
  padding: 22px;
}

.card h1 { font-size: 1.6rem; margin-bottom: 6px; }
.card h2 { font-size: 1.2rem; margin-bottom: 10px; }
.subtitulo { color: var(--texto-2); font-size: 0.95rem; line-height: 1.5; }

.tag-fase {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.tag-warm-up { background: rgba(52, 211, 153, 0.15); color: var(--verde); border: 1px solid rgba(52, 211, 153, 0.4); }
.tag-level-up { background: rgba(34, 211, 238, 0.15); color: var(--ciano); border: 1px solid rgba(34, 211, 238, 0.4); }
.tag-boss { background: rgba(248, 113, 113, 0.15); color: var(--vermelho); border: 1px solid rgba(248, 113, 113, 0.4); }

/* ---------- Intro ---------- */
.splash-intro h1 { margin-bottom: 4px; }

.aviso-retomar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.45);
  color: var(--texto);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.9rem;
}
.btn-mini { padding: 8px 14px; font-size: 0.82rem; margin: 0; width: auto; }

.btn-thumb {
  display: block;
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  cursor: zoom-in;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
}
.btn-thumb img {
  width: 100%;
  max-height: 340px;
  object-fit: cover;
  object-position: top;
  display: block;
  border: 1px solid var(--borda);
  border-radius: 10px;
  transition: transform 0.3s ease;
}
.btn-thumb:hover img { transform: scale(1.02); }
.thumb-dica {
  position: absolute;
  bottom: 10px; right: 10px;
  background: rgba(5, 8, 18, 0.75);
  border: 1px solid var(--borda);
  color: var(--texto);
  font-size: 0.72rem;
  padding: 5px 10px;
  border-radius: 999px;
}

.intro-capa img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--borda);
  display: block;
}
.intro-regras { list-style: none; display: flex; flex-direction: column; gap: 8px; margin: 14px 0; }
.intro-regras li {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--card-2);
  border: 1px solid var(--borda);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.92rem;
  line-height: 1.45;
}
.intro-regras .icone { font-size: 1.1rem; flex-shrink: 0; }

.form-jogador { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 6px; }
.campo { display: flex; flex-direction: column; gap: 5px; }
.campo label { font-size: 0.8rem; color: var(--texto-2); letter-spacing: 0.04em; }
.campo input, .campo select {
  background: var(--bg-2);
  border: 1px solid var(--borda);
  border-radius: 10px;
  color: var(--texto);
  padding: 11px 12px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
}
.campo input:focus, .campo select:focus { border-color: var(--ciano); box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.18); }

.aviso-erro {
  display: none;
  margin-top: 12px;
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.45);
  color: var(--vermelho);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.88rem;
}
.aviso-erro.visivel { display: block; animation: tremer 0.4s ease; }
@keyframes tremer {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); } 40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); } 80% { transform: translateX(4px); }
}

/* ---------- Botões ---------- */
.btn {
  border: none;
  border-radius: 12px;
  padding: 13px 22px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }
.btn:not(:disabled):hover { transform: translateY(-2px); filter: brightness(1.1); }
.btn-primario {
  background: linear-gradient(90deg, var(--ciano), var(--violeta));
  color: #071018;
  box-shadow: 0 6px 20px rgba(34, 211, 238, 0.35);
}
.btn-verde { background: linear-gradient(90deg, var(--verde), #10b981); color: #052018; box-shadow: 0 6px 20px rgba(52, 211, 153, 0.3); }
.btn-fantasma { background: var(--card-2); color: var(--texto); border: 1px solid var(--borda); }
.btn-perigo { background: linear-gradient(90deg, var(--vermelho), #ef4444); color: #fff; box-shadow: 0 6px 20px rgba(248, 113, 113, 0.3); }
.btn-bloco { width: 100%; margin-top: 16px; }

.acoes-questao { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }

/* ---------- Splash de nível ---------- */
.splash {
  text-align: center;
  padding: 46px 22px;
  position: relative;
  overflow: hidden;
}
.splash .nivel-num { font-size: 0.85rem; letter-spacing: 0.3em; color: var(--texto-2); text-transform: uppercase; }
.splash h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); margin: 8px 0; }
.splash p { color: var(--texto-2); max-width: 480px; margin: 0 auto; line-height: 1.5; }
.splash .emoji-grande { font-size: 3rem; display: block; margin-bottom: 10px; animation: flutuar 2.4s ease-in-out infinite; }
@keyframes flutuar { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.splash-warm { border-color: rgba(52, 211, 153, 0.5); }
.splash-level { border-color: rgba(34, 211, 238, 0.5); }
.splash-boss { border-color: rgba(248, 113, 113, 0.55); box-shadow: 0 0 40px rgba(248, 113, 113, 0.15); }

/* ---------- Questão ---------- */
.questao-topo { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.questao-num { font-size: 0.78rem; color: var(--texto-2); letter-spacing: 0.1em; text-transform: uppercase; }
.questao-xp {
  font-size: 0.78rem; font-weight: 700; color: var(--amarelo);
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.4);
  padding: 3px 10px; border-radius: 999px;
}
.enunciado { font-size: 1.05rem; line-height: 1.55; margin-bottom: 16px; }

/* Múltipla escolha */
.opcoes { display: flex; flex-direction: column; gap: 10px; }
.opcao {
  display: flex; align-items: center; gap: 12px;
  background: var(--card-2);
  border: 1px solid var(--borda);
  border-radius: 12px;
  padding: 13px 14px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
  font-size: 0.95rem; line-height: 1.4;
  text-align: left;
  color: var(--texto);
  font-family: inherit;
  width: 100%;
}
.opcao:hover { border-color: var(--ciano); transform: translateX(3px); }
.opcao.selecionada { border-color: var(--ciano); background: rgba(34, 211, 238, 0.1); box-shadow: 0 0 0 1px var(--ciano) inset; }
.opcao .letra {
  width: 30px; height: 30px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--bg-2);
  border: 1px solid var(--borda);
  font-weight: 700; font-size: 0.85rem;
}
.opcao.selecionada .letra { background: var(--ciano); color: #071018; border-color: var(--ciano); }
.opcao.correta { border-color: var(--verde); background: rgba(52, 211, 153, 0.12); }
.opcao.correta .letra { background: var(--verde); color: #052018; border-color: var(--verde); }
.opcao.errada { border-color: var(--vermelho); background: rgba(248, 113, 113, 0.1); }
.opcao.errada .letra { background: var(--vermelho); color: #fff; border-color: var(--vermelho); }
.opcao.bloqueada { pointer-events: none; opacity: 0.85; }

/* V ou F */
.grupo-vf { display: flex; flex-direction: column; gap: 10px; }
.linha-vf {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--card-2);
  border: 1px solid var(--borda);
  border-radius: 12px;
  padding: 12px 14px;
  flex-wrap: wrap;
}
.linha-vf .afirmacao { flex: 1; min-width: 200px; font-size: 0.93rem; line-height: 1.45; }
.par-vf { display: flex; gap: 8px; }
.btn-vf {
  min-width: 52px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--borda);
  background: var(--bg-2);
  color: var(--texto-2);
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}
.btn-vf:hover { border-color: var(--ciano); color: var(--texto); }
.btn-vf.ativo-v { background: rgba(52, 211, 153, 0.2); border-color: var(--verde); color: var(--verde); }
.btn-vf.ativo-f { background: rgba(248, 113, 113, 0.2); border-color: var(--vermelho); color: var(--vermelho); }
.linha-vf.vf-correta { border-color: var(--verde); }
.linha-vf.vf-errada { border-color: var(--vermelho); }

/* Associação (matching) */
.match-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.match-coluna { display: flex; flex-direction: column; gap: 10px; }
.match-coluna h4 { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--texto-2); margin-bottom: 2px; }
.match-item {
  background: var(--card-2);
  border: 1px solid var(--borda);
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 0.86rem;
  line-height: 1.4;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
  color: var(--texto);
  font-family: inherit;
  min-height: 48px;
}
.match-item:hover { border-color: var(--ciano); }
.match-item.selecionado { border-color: var(--amarelo); background: rgba(251, 191, 36, 0.12); box-shadow: 0 0 0 1px var(--amarelo) inset; }
.match-item.pareado { cursor: default; }
.match-item.correta { border-color: var(--verde); background: rgba(52, 211, 153, 0.12); }
.match-item.errada { border-color: var(--vermelho); background: rgba(248, 113, 113, 0.1); }
.match-chip {
  display: inline-block;
  font-size: 0.68rem; font-weight: 700;
  padding: 2px 8px; border-radius: 999px;
  margin-bottom: 5px;
  background: rgba(167, 139, 250, 0.18);
  color: var(--violeta);
  border: 1px solid rgba(167, 139, 250, 0.4);
}

/* Ordenação */
.lista-ordem { display: flex; flex-direction: column; gap: 8px; }
.item-ordem {
  display: flex; align-items: center; gap: 10px;
  background: var(--card-2);
  border: 1px solid var(--borda);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: grab;
  transition: border-color 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
  touch-action: none;
}
.item-ordem.arrastando { opacity: 0.4; border-style: dashed; border-color: var(--ciano); }
.item-ordem.sobre { border-color: var(--ciano); transform: scale(1.01); }
.item-ordem .pos-num {
  width: 28px; height: 28px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--bg-2);
  border: 1px solid var(--borda);
  font-weight: 700; font-size: 0.82rem;
}
.item-ordem .texto-item { flex: 1; font-size: 0.88rem; line-height: 1.4; }
.controles-ordem { display: flex; flex-direction: column; gap: 4px; }
.btn-seta {
  width: 30px; height: 26px;
  border-radius: 7px;
  border: 1px solid var(--borda);
  background: var(--bg-2);
  color: var(--texto-2);
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.15s ease;
}
.btn-seta:hover { border-color: var(--ciano); color: var(--ciano); }
.dica-dnd { font-size: 0.78rem; color: var(--texto-2); margin-top: 10px; font-style: italic; }
.item-ordem.correta { border-color: var(--verde); }
.item-ordem.errada { border-color: var(--vermelho); }

/* Classificação */
.pool-classificar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  background: var(--bg-2);
  border: 1px dashed var(--borda);
  border-radius: 12px;
  padding: 12px;
  min-height: 56px;
  margin-bottom: 14px;
}
.chip-item {
  background: var(--card-2);
  border: 1px solid var(--borda);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: grab;
  color: var(--texto);
  font-family: inherit;
  transition: all 0.15s ease;
  touch-action: none;
}
.chip-item:hover { border-color: var(--ciano); }
.chip-item.selecionado { border-color: var(--amarelo); background: rgba(251, 191, 36, 0.12); }
.chip-item.correta { border-color: var(--verde); background: rgba(52, 211, 153, 0.12); }
.chip-item.errada { border-color: var(--vermelho); background: rgba(248, 113, 113, 0.1); }
.bins-classificar { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bin {
  background: var(--card-2);
  border: 1px dashed var(--borda);
  border-radius: 12px;
  padding: 12px;
  min-height: 120px;
  transition: border-color 0.15s ease, background 0.15s ease;
  display: flex; flex-direction: column; gap: 8px;
}
.bin.sobre { border-color: var(--ciano); background: rgba(34, 211, 238, 0.06); }
.bin h4 { font-size: 0.8rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ciano); }
.bin .bin-itens { display: flex; flex-wrap: wrap; gap: 8px; }
.bin-vazio { font-size: 0.78rem; color: var(--texto-2); font-style: italic; }

/* Boss Fight — dissertativas */
.textarea-wrap { position: relative; }
textarea.essay {
  width: 100%;
  min-height: 150px;
  resize: vertical;
  background: var(--bg-2);
  border: 1px solid var(--borda);
  border-radius: 12px;
  color: var(--texto);
  padding: 14px;
  font-size: 0.95rem;
  line-height: 1.55;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea.essay:focus { border-color: var(--violeta); box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.18); }
.contador-chars {
  display: flex; justify-content: space-between;
  font-size: 0.78rem; color: var(--texto-2);
  margin-top: 6px;
}
.contador-chars .ok { color: var(--verde); font-weight: 700; }
.salvo-indicador { color: var(--verde); opacity: 0; transition: opacity 0.4s ease; }
.salvo-indicador.visivel { opacity: 1; }

/* ---------- Feedback ---------- */
.feedback {
  margin-top: 16px;
  border-radius: 12px;
  padding: 14px 16px;
  animation: entrar 0.3s ease both;
  line-height: 1.5;
  font-size: 0.93rem;
}
.feedback.sucesso {
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.45);
}
.feedback.erro {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.45);
}
.feedback .feedback-titulo { font-weight: 800; font-size: 1rem; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.feedback.sucesso .feedback-titulo { color: var(--verde); }
.feedback.erro .feedback-titulo { color: var(--vermelho); }
.feedback .xp-ganho { color: var(--amarelo); font-weight: 700; }
.feedback .explicacao { color: var(--texto-2); margin-top: 6px; }
.feedback .explicacao strong { color: var(--texto); }

@keyframes pop { 0% { transform: scale(0.6); opacity: 0; } 70% { transform: scale(1.15); } 100% { transform: scale(1); opacity: 1; } }
.pop { animation: pop 0.45s cubic-bezier(0.22, 1, 0.36, 1) both; }

/* ---------- Dashboard final ---------- */
.placar-final { text-align: center; padding: 30px 22px; }
.placar-final .trofeu { font-size: 3.2rem; display: block; animation: flutuar 2.4s ease-in-out infinite; }
.placar-final h1 { margin: 8px 0 4px; }
.xp-final {
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  font-weight: 800;
  background: linear-gradient(90deg, var(--amarelo), var(--laranja));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.ranking-msg { color: var(--texto-2); margin-top: 4px; }

.grade-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-top: 18px; }
.stat {
  background: var(--card-2);
  border: 1px solid var(--borda);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}
.stat .stat-valor { font-size: 1.3rem; font-weight: 800; }
.stat .stat-rotulo { font-size: 0.72rem; color: var(--texto-2); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 2px; }
.stat.verde .stat-valor { color: var(--verde); }
.stat.ciano .stat-valor { color: var(--ciano); }
.stat.amarelo .stat-valor { color: var(--amarelo); }

.badges-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.badge {
  background: var(--card-2);
  border: 1px solid var(--borda);
  border-radius: 12px;
  padding: 14px 10px;
  text-align: center;
  opacity: 0.35;
  filter: grayscale(0.9);
  transition: all 0.3s ease;
}
.badge.liberada {
  opacity: 1; filter: none;
  border-color: var(--amarelo);
  background: rgba(251, 191, 36, 0.08);
  box-shadow: 0 0 18px rgba(251, 191, 36, 0.15);
  animation: pop 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.badge .badge-emoji { font-size: 1.8rem; display: block; margin-bottom: 6px; }
.badge .badge-nome { font-size: 0.82rem; font-weight: 700; }
.badge .badge-desc { font-size: 0.7rem; color: var(--texto-2); margin-top: 3px; line-height: 1.35; }

.resumo-questoes { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.resumo-linha {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  background: var(--card-2);
  border: 1px solid var(--borda);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 0.85rem;
}
.resumo-linha .status { font-weight: 700; }
.resumo-linha.ok .status { color: var(--verde); }
.resumo-linha.nao .status { color: var(--vermelho); }
.resumo-linha .resposta-aluno {
  color: var(--texto-2); font-size: 0.78rem;
  max-width: 55%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.acoes-finais { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.acoes-finais .btn { flex: 1; min-width: 180px; }

/* ---------- Modal infográfico ---------- */
.modal-fundo {
  position: fixed; inset: 0;
  background: rgba(5, 8, 18, 0.8);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  align-items: center; justify-content: center;
  padding: 18px;
}
.modal-fundo.aberto { display: flex; }
.modal-caixa {
  background: var(--card);
  border: 1px solid var(--borda);
  border-radius: var(--raio);
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  padding: 16px;
  box-shadow: var(--sombra);
}
.modal-caixa img { width: 100%; border-radius: 10px; }
.modal-fechar { margin-top: 12px; width: 100%; }

.link-infografico {
  background: none; border: none;
  color: var(--ciano);
  font-family: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}
.link-infografico:hover { color: var(--violeta); }

/* ---------- Gabarito ---------- */
.gab-linha {
  background: var(--card-2);
  border: 1px solid var(--borda);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.gab-topo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.gab-topo .tag-fase { margin-bottom: 0; }
.gab-pergunta { font-size: 0.9rem; line-height: 1.45; margin-bottom: 6px; }
.gab-resposta { font-size: 0.88rem; line-height: 1.55; color: var(--verde); }
.gab-explicacao { font-size: 0.82rem; line-height: 1.5; color: var(--texto-2); margin-top: 6px; }

.creditos { text-align: center; color: var(--texto-2); font-size: 0.75rem; padding-top: 8px; }

/* ---------- Responsivo ---------- */
@media (max-width: 640px) {
  .hud { flex-wrap: wrap; }
  .hud-xp { order: 3; flex-basis: 100%; }
  .form-jogador { grid-template-columns: 1fr; }
  .match-grid { grid-template-columns: 1fr; gap: 10px; }
  .bins-classificar { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  .acoes-finais .btn { min-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- Correção IA ---------- */
.parecer {
  background: var(--bg-2);
  border-left: 3px solid var(--violeta);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--texto-2);
  margin-top: 8px;
  line-height: 1.5;
}

.loading {
  text-align: center;
  padding: 14px;
  color: var(--texto-2);
  font-style: italic;
}
