/* ─── PYQ Mock Config ──────────────────────────────────────────── */
.pyq-config-row {
  display: flex;
  gap: 20px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.pyq-config-group {
  flex: 1;
  min-width: 160px;
}

.pyq-config-label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 600;
}

.pyq-select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-color, #2a2a2a);
  background: var(--surface-dark, #1a1a1a);
  color: var(--text-primary, #e8e4e0);
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s;
  appearance: auto;
}

.pyq-select:focus {
  border-color: var(--accent-gold, #d4a853);
  outline: none;
}

.pyq-info-box {
  margin-top: 20px;
  padding: 14px 18px;
  background: var(--surface-dark, #141312);
  border-radius: 8px;
  border: 1px solid var(--border-color, #2a2a2a);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.pyq-info-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pyq-info-row span:first-child {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted, #8a8682);
}

.pyq-info-row span:last-child {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary, #e8e4e0);
}

.config-subtitle {
  color: var(--text-muted, #8a8682);
  font-size: 0.85rem;
  margin-top: 4px;
}

/* ─── Topbar Section Indicators ────────────────────────────────── */
.exam-topbar-section-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
}

.section-indicator {
  padding: 3px 10px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.7rem;
  opacity: 0.35;
  transition: opacity 0.3s;
}

.section-indicator.active {
  opacity: 1;
}

.section-indicator.varc {
  background: #2d4a3e;
  color: #7dd4a4;
}

.section-indicator.dilr {
  background: #3d2d5e;
  color: #b794f4;
}

.section-indicator.qa {
  background: #2d3d5e;
  color: #7da4f4;
}

.section-arrow {
  color: var(--text-muted, #5a5652);
  font-size: 0.8rem;
}

/* ─── Palette Section Headers ──────────────────────────────────── */
.palette-section-header {
  grid-column: 1 / -1;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 4px 2px;
  color: var(--text-muted, #8a8682);
  border-bottom: 1px solid var(--border-color, #2a2a2a);
}

/* ─── Section Color Tags in Questions ──────────────────────────── */
.exam-question-section-tag {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 3px;
  margin-bottom: 8px;
}

.exam-question-section-tag.varc {
  background: #2d4a3e;
  color: #7dd4a4;
}

.exam-question-section-tag.dilr {
  background: #3d2d5e;
  color: #b794f4;
}

.exam-question-section-tag.qa {
  background: #2d3d5e;
  color: #7da4f4;
}

/* ─── Results Section Summary ──────────────────────────────────── */
.pyq-section-summary {
  margin-bottom: 16px;
}

.pyq-section-summary h4 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pyq-section-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--surface-dark, #1a1a1a);
  overflow: hidden;
  display: flex;
}

.pyq-section-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
}

.pyq-section-bar-fill.correct { background: #2e7d5e; }
.pyq-section-bar-fill.incorrect { background: #b33a3a; }
.pyq-section-bar-fill.unattempted { background: #3a3a3a; }

/* ─── PYQ Results: Section Breakdown ────────────────────────────── */
.pyq-results-section-breakdown {
  margin-bottom: 32px;
}
.pyq-results-section-breakdown h3 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #cac4d0;
  margin-bottom: 16px;
}

/* ─── PYQ Results: Question Cards ───────────────────────────────── */
.pyq-results-question-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pyq-results-question-list h3 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #cac4d0;
  margin-bottom: 8px;
}

.pyq-result-card {
  background: #242328;
  border: 1px solid #3b3a3f;
  border-radius: 10px;
  padding: 14px 18px;
  transition: border-color 0.2s;
}
.pyq-result-card.correct { border-left: 3px solid #2e7d5e; }
.pyq-result-card.incorrect { border-left: 3px solid #b33a3a; }
.pyq-result-card.unattempted { border-left: 3px solid #3a3a3a; }

.pyq-result-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.pyq-result-num {
  font-weight: 700;
  font-size: 0.85rem;
  color: #e6e1e5;
  min-width: 32px;
}
.pyq-result-status {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.04em;
}
.pyq-result-status.correct { background: rgba(45,212,160,0.12); color: #2dd4a0; }
.pyq-result-status.incorrect { background: rgba(251,111,122,0.12); color: #fb6f7a; }
.pyq-result-status.unattempted { background: rgba(160,155,168,0.12); color: #a09ba8; }

.pyq-result-time {
  margin-left: auto;
  font-size: 0.7rem;
  color: #8a8682;
  font-family: 'JetBrains Mono', monospace;
}

.pyq-result-stem {
  font-size: 0.85rem;
  line-height: 1.6;
  color: #e6e1e5;
  margin-bottom: 10px;
}
.pyq-result-stem img {
  max-width: 100%;
  border-radius: 6px;
  margin: 8px 0;
}

.pyq-result-answers {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.pyq-result-answer-label {
  font-size: 0.8rem;
  color: #cac4d0;
}
.pyq-result-answer-label strong {
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
}
.pyq-result-answer-label.correct-answer strong {
  color: #2dd4a0;
}

/* ─── Images in questions ───────────────────────────────────────── */
.exam-question-text img,
.exam-instructions-pane img {
  max-width: 100%;
  border-radius: 6px;
  margin: 8px 0;
}

/* ─── Section Marks Row ──────────────────────────────────────────── */
.pyq-section-marks-row {
  display: flex;
  gap: 12px;
  margin: 16px 0;
}
.pyq-section-mark-card {
  flex: 1;
  padding: 14px 16px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.pyq-section-mark-card.varc {
  background: rgba(45, 160, 100, 0.08);
  border: 1px solid rgba(45, 160, 100, 0.2);
}
.pyq-section-mark-card.dilr {
  background: rgba(160, 100, 220, 0.08);
  border: 1px solid rgba(160, 100, 220, 0.2);
}
.pyq-section-mark-card.qa {
  background: rgba(80, 140, 220, 0.08);
  border: 1px solid rgba(80, 140, 220, 0.2);
}
.pyq-section-mark-label {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.pyq-section-mark-card.varc .pyq-section-mark-label { color: #7dd4a4; }
.pyq-section-mark-card.dilr .pyq-section-mark-label { color: #b794f4; }
.pyq-section-mark-card.qa .pyq-section-mark-label { color: #7da4f4; }
.pyq-section-mark-score {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
}
.pyq-section-mark-card.varc .pyq-section-mark-score { color: #7dd4a4; }
.pyq-section-mark-card.dilr .pyq-section-mark-score { color: #b794f4; }
.pyq-section-mark-card.qa .pyq-section-mark-score { color: #7da4f4; }
.pyq-section-mark-sub {
  font-size: 0.7rem;
  color: #a09ba8;
}

/* ─── Section Block in Question Breakdown ────────────────────────── */
.pyq-section-block {
  margin-bottom: 20px;
}
.pyq-section-block-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}
.pyq-section-block-header.varc {
  background: rgba(45, 160, 100, 0.06);
  border-left: 3px solid #2da064;
}
.pyq-section-block-header.dilr {
  background: rgba(160, 100, 220, 0.06);
  border-left: 3px solid #a064dc;
}
.pyq-section-block-header.qa {
  background: rgba(80, 140, 220, 0.06);
  border-left: 3px solid #508cdc;
}

/* ─── Section Tab Bar ──────────────────────────────────────────────── */
.pyq-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 1px solid #3b3a3f;
  padding-bottom: 0;
}
.pyq-tab {
  padding: 10px 20px;
  border: none;
  background: transparent;
  color: #a09ba8;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  border-radius: 8px 8px 0 0;
  font-family: inherit;
}
.pyq-tab:hover {
  color: #e6e1e5;
  background: rgba(255,255,255,0.03);
}
.pyq-tab.active {
  color: #e6e1e5;
  border-bottom-color: #d0bcff;
}
.pyq-tab.varc.active { border-bottom-color: #7dd4a4; }
.pyq-tab.dilr.active { border-bottom-color: #b794f4; }
.pyq-tab.qa.active { border-bottom-color: #7da4f4; }
.pyq-tab-count {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 400;
  margin-left: 6px;
  color: #8a8682;
}
.pyq-tab.active .pyq-tab-count { color: inherit; }

.pyq-tab-content {
  display: none;
}
.pyq-tab-content.active {
  display: block;
}

/* ─── Question Number Grid ──────────────────────────────────────── */
.pyq-qgrid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}
.pyq-qgrid-btn {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid #3b3a3f;
  background: #1e1d20;
  color: #cac4d0;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pyq-qgrid-btn:hover {
  background: #2a292e;
  border-color: #5a5760;
  transform: scale(1.08);
}
.pyq-qgrid-btn.correct {
  border-color: #2e7d5e;
  background: #1a3a2e;
  color: #7dd4a4;
}
.pyq-qgrid-btn.wrong {
  border-color: #8f3a4a;
  background: #3a1a24;
  color: #fb6f7a;
}
.pyq-qgrid-btn.skipped {
  border-color: #3b3a3f;
  background: #1e1d20;
  color: #5a5760;
}
.pyq-qgrid-btn.active {
  border-color: #d0bcff;
  background: #4a3f6a;
  color: #fff;
  transform: scale(1.1);
  box-shadow: 0 0 12px rgba(208, 188, 255, 0.3);
}

/* ─── Question Detail Panel ─────────────────────────────────────── */
.pyq-qdetail {
  background: #141312;
  border: 1px solid #3b3a3f;
  border-radius: 10px;
  padding: 20px;
  min-height: 60px;
}
.pyq-qdetail:empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5a5760;
  font-size: 0.85rem;
}
.pyq-qdetail:empty::after {
  content: 'Select a question number above to view analysis';
}

/* ─── Solution text KaTeX fallback ─────────────────────────────────── */
.exam-exp-sol-text .katex-error {
  color: #fb6f7a;
  font-size: 0.8rem;
}

/* ─── Responsive ────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .pyq-config-row {
    flex-direction: column;
    gap: 12px;
  }

  .pyq-info-box {
    grid-template-columns: 1fr;
  }

  .exam-topbar-section-info {
    display: none;
  }

  .pyq-section-marks-row {
    flex-wrap: wrap;
  }
  .pyq-section-mark-card {
    min-width: 100px;
  }
}
