/* =========================
   VARIÁVEIS GLOBAIS (TEMA)
========================= */

:root {
  --bg: #020617;
  --card: rgba(255,255,255,0.03);
  --border: rgba(255,255,255,0.08);
  --accent: #3b82f6;
  --muted: #9ca3af;
}

/* =========================
   RESET / BASE
========================= */

body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: var(--bg);
  color: #e5e7eb;
}

/* =========================
   CONTAINER PRINCIPAL
========================= */

.practice {
  max-width: 860px;
  margin: auto;
  padding: 80px 24px 120px;
}

/* =========================
   HEADER DA PÁGINA
========================= */

.practice-header h1 {
  font-size: 2.4rem;
  margin-bottom: 12px;
}

.practice-header p {
  color: var(--muted);
  max-width: 620px;
  line-height: 1.6;
}

/* =========================
   BARRA DE PROGRESSO
========================= */

.progress-wrapper {
  margin: 40px 0;
}

.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width .4s ease;
}

/* =========================
   CENÁRIO (CONTEXTO DO PROBLEMA)
========================= */

.scenario {
  position: relative;
  margin-top: 40px;
  padding: 28px 28px 26px;
  background: linear-gradient(
    180deg,
    rgba(59,130,246,0.06),
    rgba(255,255,255,0.02)
  );
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow:
    inset 0 0 0 1px rgba(59,130,246,0.08),
    0 10px 32px rgba(0,0,0,0.35);
}

/* Barra lateral de contexto */
.scenario::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    var(--accent),
    rgba(59,130,246,0.3)
  );
}

/* Título do cenário */
.scenario h2 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: #e5e7eb;
  letter-spacing: 0.2px;
}

/* Texto do cenário */
.scenario p {
  color: var(--muted);
  line-height: 1.65;
  max-width: 680px;
}


/* =========================
   STEPS (PERGUNTAS)
========================= */

.step {
  display: none;
  margin-top: 48px;
}

.step.active {
  display: block;
  animation: fadeUp .4s ease;
}

.step h3 {
  margin-bottom: 20px;
}

/* =========================
   OPÇÕES (BOTÕES DE ESCOLHA)
========================= */

.options {
  display: grid;
  gap: 14px;
}

.options button {
  position: relative;
  padding: 16px;
  border-radius: 14px;
  background: transparent;
  border: 1px solid var(--border);
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: all .25s ease;
  overflow: hidden;
}

.options button:hover {
  border-color: var(--accent);
  transform: translateX(4px);
}

/* Reflexo sutil no hover */
.options button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(59,130,246,0.12),
    transparent
  );
  opacity: 0;
  transition: opacity .3s;
}

.options button:hover::after {
  opacity: 1;
}

/* Estado selecionado */
.options button.selected {
  border-color: var(--accent);
  background: rgba(59,130,246,0.08);
  box-shadow: 0 0 0 1px rgba(59,130,246,0.4);
}

/* =========================
   RESPOSTA / FEEDBACK
========================= */

.response {
  position: relative;
  margin-top: 28px;
  padding: 26px 28px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  opacity: 0;
  transform: translateY(12px);
  transition: all .35s ease;
}

.response.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   ESTADOS DA CAIXA
========================= */

.response.is-correct {
  border-color: rgba(59,130,246,0.55);
  background: linear-gradient(
    180deg,
    rgba(59,130,246,0.12),
    rgba(255,255,255,0.02)
  );
  box-shadow:
    0 0 0 1px rgba(59,130,246,0.25),
    0 14px 36px rgba(59,130,246,0.35);
}

.response.is-wrong {
  border-color: rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.025);
}

/* =========================
   TEXTO DAS RESPOSTAS
========================= */

.response p {
  display: none;
  line-height: 1.65;
  color: var(--muted);
}

.response p.active {
  display: block;
}

/* =========================
   RESPOSTA CORRETA
========================= */

.response p.best {
  color: #e5e7eb;
  font-weight: 500;
  padding-left: 26px;
  position: relative;
}

.response p.best::before {
  content: "✔";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-weight: 700;
}

/* =========================
   RESPOSTA ALTERNATIVA
========================= */

.response p.alt {
  opacity: 0.85;
}


/* =========================
   NAVEGAÇÃO (VOLTAR / CONTINUAR)
========================= */

.nav-controls {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  width: min(860px, 90%);
  display: flex;
  justify-content: space-between;
}

/* Base dos botões */
.nav-controls button {
  padding: 14px 26px;
  border-radius: 999px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all .25s ease;
}

/* Botão Voltar */
#prev {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
}

#prev:hover {
  border-color: var(--accent);
  color: #e5e7eb;
  box-shadow: 0 0 12px rgba(59,130,246,0.25);
}

/* Botão Continuar (CTA) */
#next {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  border: none;
  color: #fff;
  box-shadow: 0 8px 24px rgba(59,130,246,0.35);
}

#next:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(59,130,246,0.5);
}

/* =========================
   ANIMAÇÕES
========================= */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
