/* =========================
   Reset básico
========================= */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #111;
  color: #eaeaea;
}

/* =========================
   Contenedor general
========================= */

.quiz-wrapper {
  max-width: 720px;
  margin: 2rem auto;
  padding: 1rem;
}

/* =========================
   Marcadores (header)
========================= */

.quiz-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.score {
  width: 80px;
  height: 110px;
  border: 2px solid;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.score .label {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.score .count {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
}

/* Colores marcadores */

.score.success {
  border-color: #4caf50;
  color: #4caf50;
}

.score.fail {
  border-color: #e57373;
  color: #e57373;
}

/* =========================
   Panel principal
========================= */

.quiz-panel {
  background-color: #1a1a1a;
  border-radius: 8px;
  padding: 1.5rem;
}

/* =========================
   Pregunta
========================= */

.question-box {
  min-height: 4.5em;
  font-size: 1.4rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
}


/* =========================
   Respuestas
========================= */

.answers-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.answer {
  background-color: #eee;
  color: #111;
  border: 2px solid transparent;
  padding: 0.75rem;
  font-size: 0.9rem;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.answer:hover:not(:disabled) {
  border-color: #999;
}

.answer:disabled {
  cursor: default;
}

/* Feedback visual */

.answer.correct {
  background-color: #c8e6c9;
  color: #1b5e20;
  border-color: #4caf50;
}

.answer.wrong {
  background-color: #ffcdd2;
  color: #b71c1c;
  border-color: #e57373;
}

/* =========================
   Control inferior
========================= */

.control-box {
  text-align: center;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.control-btn {
  background-color: #333;
  color: #f2f2f2;
  border: 2px solid #555;
  padding: 0.6rem 1.2rem;
  font-size: 0.95rem;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.control-btn:hover {
  background-color: #444;
}

.control-btn:active {
  background-color: #555;
}

/* =========================
   Responsive
========================= */

@media (max-width: 600px) {

  .quiz-wrapper {
    margin: 1rem auto;
  }

  .question-box {
    min-height: 6em;
    font-size: 1rem;
  }

  .answers-box {
    grid-template-columns: 1fr;
  }

  .score {
    width: 70px;
    height: 100px;
  }

  .score .count {
    font-size: 2.6rem;
  }

  .control-box {
    flex-direction: column;
  }

  .control-btn {
    width: 100%;
  }
}
