
/* FPSC CSS MPT Exam Paper Simulator Theme */
:root {
  --mpt-bg: #0b1329;
  --mpt-surface: #111c38;
  --mpt-card: #162447;
  --mpt-border: #233554;
  --mpt-text-main: #f8fafc;
  --mpt-text-muted: #94a3b8;
  --mpt-primary: #2563eb;
  --mpt-primary-hover: #1d4ed8;
  --mpt-success: #059669;
  --mpt-warning: #d97706;
  --mpt-danger: #dc2626;
  --mpt-cyan: #0284c7;
}

#mpt-exam-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--mpt-text-main);
  background: var(--mpt-bg);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  border: 1px solid var(--mpt-border);
}

/* Official FPSC Header */
.fpsc-header-banner {
  background: linear-gradient(135deg, #09142b 0%, #172554 100%);
  border-bottom: 2px solid #2563eb;
  padding: 32px 28px 24px;
  text-align: center;
  position: relative;
}

.fpsc-emblem-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.4);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #60a5fa;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.fpsc-main-title {
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #f8fafc;
  margin: 0 0 6px 0;
  line-height: 1.25;
}

.fpsc-subtitle {
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  color: #cbd5e1;
  font-weight: 500;
  margin: 0 0 20px 0;
}

/* Paper Specifications Matrix */
.fpsc-rubric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--mpt-border);
  border-radius: 12px;
  padding: 14px 18px;
  text-align: left;
}

.fpsc-rubric-item {
  display: flex;
  flex-direction: column;
}

.fpsc-rubric-label {
  font-size: 0.72rem;
  color: var(--mpt-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.fpsc-rubric-val {
  font-size: 1.05rem;
  color: #38bdf8;
  font-weight: 700;
  margin-top: 2px;
}

/* Sticky Exam Navigation & HUD */
.mpt-hud-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(17, 28, 56, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--mpt-border);
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.mpt-timer-box {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: #091329;
  border: 1.5px solid #2563eb;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mpt-timer-urgent {
  border-color: #ef4444 !important;
  color: #f87171 !important;
  animation: pulseTimer 1.2s infinite ease-in-out;
}

@keyframes pulseTimer {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.03); opacity: 0.85; }
}

/* Section Tabs */
.mpt-section-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 24px;
  background: #0e1731;
  border-bottom: 1px solid var(--mpt-border);
  scrollbar-width: thin;
}

.mpt-sec-btn {
  white-space: nowrap;
  background: #162447;
  color: #cbd5e1;
  border: 1px solid #2d3f66;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.mpt-sec-btn:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #3b82f6;
}

.mpt-sec-active {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #60a5fa !important;
}

/* Question Palette Drawer */
#mpt-palette-drawer {
  background: #0d1630;
  border-bottom: 1px solid var(--mpt-border);
  padding: 20px 24px;
  max-height: 280px;
  overflow-y: auto;
}

.mpt-palette-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
  gap: 6px;
  margin-top: 12px;
}

.mpt-palette-btn {
  padding: 8px 2px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid #2d3f66;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}

/* Main Question Stage */
.mpt-stage-container {
  padding: 32px 24px;
}

.mpt-question-sheet {
  background: var(--mpt-surface);
  border: 1px solid var(--mpt-border);
  border-radius: 16px;
  padding: 28px;
  position: relative;
}

.mpt-q-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  border-bottom: 1px solid var(--mpt-border);
  padding-bottom: 18px;
  margin-bottom: 22px;
}

.mpt-q-tag {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  letter-spacing: 0.05em;
  color: #ffffff;
}

.mpt-q-text {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  font-weight: 600;
  color: #f8fafc;
  line-height: 1.6;
  margin: 0;
}

/* Option Cards */
.mpt-options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.mpt-option-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #091329;
  border: 1.5px solid var(--mpt-border);
  border-radius: 12px;
  padding: 16px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.mpt-option-card:hover {
  border-color: #3b82f6;
  background: #111e40;
}

.mpt-option-selected {
  border-color: #38bdf8 !important;
  background: #172554 !important;
  box-shadow: 0 0 0 1px #38bdf8;
}

.mpt-radio-circle {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  border: 2px solid #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #94a3b8;
  transition: all 0.2s;
}

.mpt-option-selected .mpt-radio-circle {
  border-color: #38bdf8;
  background: #2563eb;
  color: #ffffff;
}

.mpt-option-label {
  font-size: 1.02rem;
  line-height: 1.45;
  color: #e2e8f0;
}

.mpt-option-selected .mpt-option-label {
  color: #ffffff;
  font-weight: 600;
}

/* Flashcard Answer Box */
.mpt-flashcard-box {
  display: none;
  margin-top: 24px;
  padding: 20px;
  background: #081226;
  border-left: 5px solid #10b981;
  border-radius: 10px;
}

/* Exam Controls */
.mpt-nav-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.mpt-btn {
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mpt-btn-primary { background: #2563eb; color: #ffffff; }
.mpt-btn-primary:hover { background: #1d4ed8; }
.mpt-btn-success { background: #059669; color: #ffffff; }
.mpt-btn-success:hover { background: #047857; }
.mpt-btn-secondary { background: #1e293b; color: #cbd5e1; border: 1px solid #334155; }
.mpt-btn-secondary:hover { background: #334155; color: #ffffff; }
.mpt-btn-amber { background: #d97706; color: #ffffff; }
.mpt-btn-amber:hover { background: #b45309; }

/* Scorecard Results Page */
.mpt-scorecard-wrap {
  display: none;
  padding: 40px 24px;
  text-align: center;
}

.mpt-verdict-badge {
  display: inline-block;
  padding: 10px 32px;
  border-radius: 999px;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 20px;
}

.mpt-big-score {
  font-size: clamp(2.5rem, 6vw, 4.2rem);
  font-weight: 900;
  color: #f8fafc;
  margin: 8px 0;
}

.mpt-subject-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 32px 0;
  text-align: left;
}

.mpt-sub-card {
  background: var(--mpt-surface);
  border: 1px solid var(--mpt-border);
  border-radius: 12px;
  padding: 16px;
}

/* Review Accordion */
.mpt-review-container {
  max-height: 520px;
  overflow-y: auto;
  background: #091329;
  border: 1px solid var(--mpt-border);
  border-radius: 14px;
  padding: 20px;
  text-align: left;
}

.mpt-review-card {
  background: #111c38;
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 14px;
  border-left: 4px solid #334155;
}

.mpt-review-correct { border-left-color: #10b981; }
.mpt-review-incorrect { border-left-color: #ef4444; }
.mpt-review-unanswered { border-left-color: #f59e0b; }
