/* =================================================================
   QUIZ QUESTION ENGINE (qe- prefix)
   Separate file from quiz-registration.css on purpose — the
   registration section is frozen; this file is where all future
   question-UI iteration happens without risk to that design.
   ================================================================= */

.qe-hidden { display: none !important; }

/* ---------- LEAN QUIZ HEADER (replaces hero once quiz starts) ---------- */
.qe-quiz-header {
  background: #f4f0fc;
  padding: 10px 20px 12px;
  border-bottom: 1px solid #eef0f6;
  position: sticky;
  top: 0;
  z-index: 5;
}

.qe-header-topline {
  text-align: center;
  margin-bottom: 7px;
}

.qe-cat-line {
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: #6d28d9;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.qe-cat-diamond {
  color: var(--quiz-gold);
  font-size: 11px;
}

.qe-progress-bar {
  width: 100%;
  height: 6px;
  background: #eef0f6;
  border-radius: 10px;
  overflow: hidden;
}

.qe-header-bottomline {
  text-align: center;
  margin-top: 6px;
}

.qe-cnt-line {
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--qc-body-grey, #6b6478);
}

.qe-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--quiz-gold), var(--quiz-gold2));
  border-radius: 10px;
  transition: width 0.3s ease;
}

/* ---------- QUESTION ---------- */
.qe-question-wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 20px 6px;
}

.qe-question-text {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.4;
  color: var(--qc-ink, #1a1330);
  margin: 0 0 16px;
}

.qe-options {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.qe-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  font-family: 'Manrope', sans-serif;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.35;
  color: var(--qc-ink, #1a1330);
  background: var(--quiz-white);
  border: 1.5px solid #e2e8f0;
  border-radius: 11px;
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}

.qe-option-letter {
  flex-shrink: 0;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 800;
  background: #f1eff6;
  color: #6d28d9;
}

.qe-option:hover {
  border-color: #c4b5fd;
}

.qe-option.qe-selected {
  border-color: #7c3aed;
  background: #f7f2ff;
  font-weight: 600;
}
.qe-option.qe-selected .qe-option-letter {
  background: #7c3aed;
  color: var(--quiz-white);
}
.qe-option:active { transform: scale(0.99); }

/* ---------- NAV ---------- */
.qe-nav {
  max-width: 480px;
  margin: 0 auto;
  padding: 14px 20px 36px;
  display: flex;
  gap: 12px;
}

.qe-btn-back {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--qc-ink, #1a1330);
  background: var(--quiz-light);
  border: none;
  border-radius: 50px;
  padding: 13px 26px;
  cursor: pointer;
}
.qe-btn-back:disabled { opacity: 0.4; cursor: default; }

.qe-btn-next {
  flex: 1;
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 16px;
  color: #000000;
  background: linear-gradient(135deg, var(--quiz-gold) 0%, var(--quiz-gold2) 100%);
  border: none;
  border-radius: 50px;
  padding: 13px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(201,168,76,0.4);
  transition: opacity 0.2s;
}
.qe-btn-next:disabled {
  background: #e2e5eb;
  color: #9a94ab;
  box-shadow: none;
  cursor: default;
}

/* Last question — Finish button switches from gold to green */
.qe-btn-next.qe-btn-finish {
  background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
  box-shadow: 0 6px 16px rgba(22,163,74,0.4);
}

/* Disabled must always win, even on the Finish button — otherwise an
   unanswered last question shows grey text on a green background. */
.qe-btn-next.qe-btn-finish:disabled {
  background: #e2e5eb;
  color: #9a94ab;
  box-shadow: none;
}

/* ---------- RESULTS ---------- */
.qe-results-wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 20px 40px;
}

.qe-results-heading {
  text-align: center;
  margin-bottom: 14px;
}

.qe-results-category {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 22px;
  color: var(--qc-ink, #1a1330);
  margin-bottom: 4px;
}

.qe-results-level {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 13.5px;
  color: #6d28d9;
}

.qe-score-card {
  text-align: center;
  background: #3b0764;
  border-radius: 18px;
  padding: 22px 20px;
  margin-bottom: 18px;
}

.qe-score-label {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}

.qe-score-number {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 42px;
  color: var(--quiz-white);
}

.qe-score-message {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 0.3px;
  margin-top: 10px;
}
.qe-score-message.qe-msg-great { color: #4ade80; }
.qe-score-message.qe-msg-pass  { color: var(--quiz-gold, #c9a84c); }
.qe-score-message.qe-msg-retry { color: rgba(255,255,255,0.7); }

/* ---------- RESULTS ACTIONS ---------- */
.qe-results-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.qe-action-btn {
  flex: 1;
  text-align: center;
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 15px;
  border: none;
  border-radius: 50px;
  padding: 13px;
  text-decoration: none;
  cursor: pointer;
  display: block;
  transition: opacity 0.2s, transform 0.15s;
}
.qe-action-btn:active { transform: scale(0.97); }

.qe-action-primary {
  color: #000000;
  background: linear-gradient(135deg, var(--quiz-gold) 0%, var(--quiz-gold2) 100%);
  box-shadow: 0 6px 16px rgba(201,168,76,0.4);
}
.qe-action-primary:hover { opacity: 0.94; }

.qe-action-secondary {
  color: #000000;
  background: transparent;
  border: 2px solid var(--quiz-gold);
}
.qe-action-secondary:hover { background: rgba(201,168,76,0.08); }

.qe-review-heading {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 16px;
  color: var(--qc-ink, #1a1330);
  margin: 0 0 10px;
}

.qe-review-item {
  background: var(--quiz-white);
  border: 1px solid #eef0f6;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
}

.qe-review-q {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--qc-ink, #1a1330);
  margin-bottom: 8px;
}

.qe-review-ans {
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  margin-bottom: 3px;
}

.qe-review-ans.qe-correct { color: #166534; font-weight: 700; }
.qe-review-ans.qe-incorrect { color: #dc2626; font-weight: 700; }
.qe-review-ans.qe-muted { color: var(--qc-body-grey, #6b6478); }
