/* =========================
   KUIZ PAGE
========================= */

.quiz-root {
  width: 100%;
  height: 100%;
}

.quiz-box {
  width: 100%;
  height: 100%;

  display: flex;
  flex-direction: column;

  background: #ffffff;
  border-radius: 8px;
  padding: 24px;

  overflow: hidden;
}

/* =========================
   HEADER
========================= */

.quiz-header {
  flex: 0 0 auto;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;

  margin-bottom: 16px;
}

.quiz-header h2 {
  color: #25306b;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.15;
}

.quiz-header p {
  color: #000000;
  font-size: 15px;
  font-weight: 500;
}

.quiz-timer-wrap {
  min-width: 100px;
  padding: 10px 14px;

  text-align: center;

  background: #25306b;
  color: #ffffff;
  border-radius: 8px;
}

.quiz-timer-wrap span {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.quiz-timer-wrap strong {
  display: block;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
}

#quizTimer.is-warning {
  color: #ff4d4d;
}

/* =========================
   PROGRESS
========================= */

.quiz-progress-wrap {
  flex: 0 0 auto;
  margin-bottom: 22px;
}

.quiz-progress-text {
  display: flex;
  justify-content: space-between;
  gap: 12px;

  margin-bottom: 8px;

  color: #25306b;
  font-size: 14px;
  font-weight: 700;
}

.quiz-progress-track {
  width: 100%;
  height: 12px;

  overflow: hidden;
  border-radius: 999px;

  background: #dff4fa;
}

.quiz-progress-bar {
  width: 0%;
  height: 100%;

  border-radius: 999px;
  background: #fbac18;

  transition: width 0.25s ease;
}

/* =========================
   QUESTION AREA
========================= */

.quiz-question-area {
  flex: 1;
  min-height: 0;

  display: flex;
  flex-direction: column;
  justify-content: flex-start;

  overflow: visible;
  padding: 4px 4px 0;
}

.quiz-question-card {
  width: 100%;

  padding: 20px;
  border-radius: 14px;

  background: #eef7fb;
  border: 1px solid #d7eaf2;
}

.quiz-question-title {
  display: flex;
  align-items: flex-start;
  gap: 14px;

  margin-bottom: 22px;
}

.quiz-question-title span {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background: #16c4e3;
  color: #ffffff;

  font-size: 18px;
  font-weight: 700;
}

.quiz-question-title h3 {
  color: #25306b;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
}

/* =========================
   OPTIONS
========================= */

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 12px;

  width: 100%;

  padding: 14px 16px;
  border-radius: 10px;

  background: #ffffff;
  border: 2px solid #d9e7ee;

  cursor: pointer;
  transition: 0.2s ease;
}

.quiz-option:hover {
  background: #fff8e8;
  border-color: #fbac18;
}

.quiz-option input {
  display: none;
}

.quiz-option-letter {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background: #25306b;
  color: #ffffff;

  font-size: 15px;
  font-weight: 700;
}

.quiz-option-text {
  color: #000000;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.35;
}

.quiz-option input:checked + .quiz-option-letter {
  background: #fbac18;
  color: #25306b;
}

/* =========================
   NAV BUTTONS
========================= */

.quiz-nav-buttons {
  flex: 0 0 auto;

  display: flex;
  justify-content: space-between;
  gap: 14px;

  margin-top: 22px;
}

.quiz-nav-btn,
.quiz-submit-btn,
.quiz-retry-btn,
.quiz-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 150px;

  padding: 13px 26px;
  border: none;
  border-radius: 50px;

  background: #fbac18;
  color: #25306b;

  font-family: 'Quicksand', sans-serif;
  font-size: 16px;
  font-weight: 700;

  cursor: pointer;
  text-decoration: none;

  box-shadow: 0 5px 8px rgba(0,0,0,0.18);
  transition: 0.25s ease;
}

.quiz-nav-btn:hover,
.quiz-submit-btn:hover,
.quiz-retry-btn:hover,
.quiz-menu-btn:hover {
  transform: translateY(-2px);
}

.quiz-nav-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.quiz-next-btn,
.quiz-submit-btn {
  background: #16c4e3;
  color: #ffffff;
}

/* =========================
   RESULT
========================= */

.quiz-result-box {
  width: 100%;
  height: 100%;

  overflow-y: auto;

  background: #ffffff;
  border-radius: 8px;
  padding: 24px;
}

.quiz-result-summary {
  text-align: center;
  margin-bottom: 24px;
}

.quiz-result-summary h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 10px;
}

.quiz-result-summary.is-pass h2 {
  color: #2ecc71;
}

.quiz-result-summary.is-fail h2 {
  color: #e74c3c;
}

.quiz-score {
  color: #25306b;
  font-size: 38px;
  font-weight: 700;
  margin: 8px 0;
}

.quiz-percent {
  color: #25306b;
  font-size: 20px;
  font-weight: 700;
}

.quiz-status,
.quiz-timeup {
  margin-top: 8px;
  color: #000000;
  font-size: 15px;
  font-weight: 500;
}

/* =========================
   WRONG ANSWERS
========================= */

.quiz-wrong-section {
  margin-top: 20px;
}

.quiz-wrong-section h3 {
  margin-bottom: 14px;
  color: #25306b;
  font-size: 22px;
}

.quiz-wrong-card {
  margin-bottom: 12px;
  padding: 16px;

  background: #fff5f5;
  border: 1px solid #ffc9c9;
  border-radius: 10px;
}

.quiz-wrong-card h4 {
  margin-bottom: 10px;
  color: #25306b;
  font-size: 16px;
  line-height: 1.35;
}

.quiz-wrong-card p {
  margin-bottom: 6px;
  color: #000000;
  font-size: 15px;
}

.wrong-answer {
  color: #e74c3c;
  font-weight: 700;
}

.correct-answer {
  color: #2ecc71;
  font-weight: 700;
}

.quiz-perfect {
  padding: 18px;

  text-align: center;
  color: #25306b;
  font-size: 18px;
  font-weight: 700;

  background: #eef7fb;
  border-radius: 10px;
}

.quiz-result-actions {
  margin-top: 24px;
  text-align: center;
}

/* =========================
   TABLET / MOBILE
========================= */

@media (max-width: 767px) {

  /* 
     Universal untuk semua halaman kuiz.
     Pastikan <main> ada class warm-quiz-page.
  */
  .warm-quiz-page .quiz-media {
    aspect-ratio: auto;
    height: auto;
    min-height: 760px;
    padding: 10px;
    overflow: visible;
  }

  .warm-quiz-page .quiz-root {
    height: auto;
    min-height: 720px;
    overflow: visible;
  }

  .warm-quiz-page .quiz-box {
    height: auto;
    min-height: 720px;
    overflow: visible;
    padding: 18px;
  }

  .quiz-header {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .quiz-header h2 {
    font-size: 23px;
  }

  .quiz-header p {
    font-size: 14px;
  }

  .quiz-timer-wrap {
    min-width: 92px;
    padding: 8px 12px;
  }

  .quiz-timer-wrap strong {
    font-size: 22px;
  }

  .quiz-progress-text {
    font-size: 13px;
  }

  .quiz-question-area {
    justify-content: flex-start;
    overflow: visible;
  }

  .quiz-question-card {
    padding: 18px;
  }

  .quiz-question-title {
    gap: 10px;
    margin-bottom: 18px;
  }

  .quiz-question-title span {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
    font-size: 15px;
  }

  .quiz-question-title h3 {
    font-size: 18px;
    line-height: 1.3;
  }

  .quiz-option {
    padding: 12px;
  }

  .quiz-option-letter {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
    font-size: 13px;
  }

  .quiz-option-text {
    font-size: 15px;
    line-height: 1.35;
  }

  .quiz-nav-buttons {
    flex-direction: column;
  }

  .quiz-nav-btn,
  .quiz-submit-btn,
  .quiz-retry-btn,
  .quiz-menu-btn {
    width: 100%;
    min-width: 0;
  }
}