/* quiz.css — Estilos para la página del Quiz */

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 100px 20px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
}

.page-title {
  font-family: "Outfit", sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #a5b4fc, #c084fc);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
}

.page-sub {
  color: var(--text-secondary);
  text-align: center;
}

/* ── Barra de progreso ── */
.quiz-progress {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50px;
  height: 6px;
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #c084fc);
  border-radius: 50px;
  transition: width 0.4s ease;
}

.q-counter {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ── Pregunta ── */
.question-card {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 30px;
  width: 100%;
  backdrop-filter: blur(10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.question-text {
  font-family: "Outfit", sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 20px;
  line-height: 1.5;
}

.question-text code {
  font-size: 1rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 8px;
  border-radius: 6px;
  color: #c084fc;
}

/* ── Opciones ── */
.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-btn {
  text-align: left;
  padding: 13px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.25s;
  font-family: "Inter", sans-serif;
}

.option-btn:hover:not(:disabled) {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--accent-primary);
}

.option-btn.correct { background: rgba(16, 185, 129, 0.2); border-color: #10b981; color: #10b981; }
.option-btn.wrong   { background: rgba(239, 68, 68, 0.15);  border-color: #ef4444; color: #ef4444; }
.option-btn:disabled{ cursor: default; }

.explanation {
  margin-top: 15px;
  padding: 12px 16px;
  background: rgba(99, 102, 241, 0.08);
  border-radius: 8px;
  border-left: 3px solid var(--accent-primary);
  font-size: 0.88rem;
  color: var(--text-secondary);
  display: none;
  animation: fadeIn 0.3s ease;
}

.explanation.show { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Navegación quiz ── */
.nav-btns { display: flex; gap: 15px; }

.btn-next {
  padding: 12px 30px;
  background: var(--accent-primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-family: "Outfit", sans-serif;
  display: none;
  box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-next:hover { background: var(--accent-hover); transform: translateY(-2px); }

.topic-badge {
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 50px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-hover);
  border: 1px solid rgba(99, 102, 241, 0.2);
  margin-bottom: 10px;
  display: inline-block;
}

/* ── Resultados ── */
.results {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.score-ring {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 4px solid var(--accent-primary);
  box-shadow: 0 0 30px var(--accent-glow);
  background: var(--card-bg);
}

.score-num {
  font-size: 2.8rem;
  font-weight: 700;
  font-family: "Outfit", sans-serif;
  color: var(--accent-hover);
}

.score-den { color: var(--text-secondary); font-size: 0.9rem; }

.score-msg {
  font-family: "Outfit", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
}

.score-sub { color: var(--text-secondary); }

.btn-retry {
  padding: 12px 30px;
  background: var(--accent-primary);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  font-family: "Outfit", sans-serif;
  box-shadow: 0 4px 15px var(--accent-glow);
  transition: all 0.3s;
}

.btn-retry:hover { transform: translateY(-2px); }
