/* ================= QUIZ CONTAINER ================= */
#quizForm {
  margin-top: 48px;
}

/* ================= QUESTION BLOCK ================= */
.question {
  background: var(--bg);           /* #ffffff */
  border: 1px solid var(--border); /* #e2e8f0 */
  border-radius: var(--radius-md); /* 12px */
  padding: 28px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-md);    /* soft modern shadow */
  transition: box-shadow 0.25s ease, transform 0.2s ease;
}

.question:hover {
  box-shadow: 0 14px 32px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

/* Question title */
.question h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);           /* blue title */
  margin-bottom: 20px;
  padding-left: 4px;
  position: relative;
}

.question h3::before {
  content: 'Q';
  display: inline-block;
  width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  font-size: 0.9rem;
  font-weight: bold;
  margin-right: 12px;
  vertical-align: middle;
}

/* ================= OPTIONS ================= */
.question label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  border-radius: var(--radius-sm); /* 8px */
  cursor: pointer;
  transition: all 0.22s ease;
  user-select: none;
  border: 1px solid transparent;
  background: var(--bg-soft);      /* very light bg */
}

.question label:hover {
  background: #f0f7ff;
  border-color: #bfdbfe;
}

.question input[type="radio"],
.question input[type="checkbox"] {
  accent-color: var(--primary);
  width: 20px;
  height: 20px;
}

/* Selected / checked state */
.question input:checked + span {
  font-weight: 600;
  color: var(--primary);
}

.option-text {
  font-size: 1.05rem;
  color: var(--text-body);
  flex: 1;
}

/* ================= EXPLANATION ================= */
.explanation {
  display: none;
  margin-top: 20px;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.98rem;
  line-height: 1.65;
  border-left: 5px solid;
  position: relative;
}

.explanation::before {
  content: '';
  position: absolute;
  left: 18px;
  top: -10px;
  width: 20px;
  height: 20px;
  background: inherit;
  transform: rotate(45deg);
  border-left: inherit;
  border-top: inherit;
  z-index: -1;
}

.correct-answer {
  background: #f0fdf4;
  color: #166534;
  border-color: #22c55e;
}

.correct-answer::after {
  content: '✓ Correct';
  display: inline-block;
  background: #22c55e;
  color: white;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  margin-left: 12px;
}

.incorrect-answer {
  background: #fef2f2;
  color: #991b1b;
  border-color: #ef4444;
}

.incorrect-answer::after {
  content: '✗ Incorrect';
  display: inline-block;
  background: #ef4444;
  color: white;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  margin-left: 12px;
}

.unanswered-answer {
  background: #fffbeb;
  color: #92400e;
  border-color: #f59e0b;
}

/* ================= RESULT SUMMARY ================= */
#result {
  margin-top: 40px;
  padding: 28px;
  background: var(--bg-soft);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

#result h2 {
  color: var(--primary);
  font-size: 2rem;
  margin-bottom: 16px;
}

#result .score {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--primary);
  margin: 12px 0;
}

/* ================= BUTTONS ================= */
.quiz-btn-wrapper {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.quiz-btn-wrapper button,
.retake-btn {
  font-weight: 600;
  font-size: 1.05rem;
  padding: 16px 36px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.quiz-btn-wrapper button {
  background: var(--primary);
  color: white;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.25);
}

.quiz-btn-wrapper button:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.35);
}

.retake-btn {
  background: #6b7280;
  color: white;
}

.retake-btn:hover {
  background: #4b5563;
  transform: translateY(-3px);
}

/* Disabled state (if needed) */
.quiz-btn-wrapper button:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}