/* ========================================================
   MCQ Exam Pro - Premium Frontend Styles
   ======================================================== */
@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400;500;600;700;800&family=Noto+Sans+Devanagari:wght@400;500;600;700&display=swap');

:root {
  --mcq-primary:    #1a56db;
  --mcq-secondary:  #ff6b35;
  --mcq-success:    #10b981;
  --mcq-danger:     #ef4444;
  --mcq-warning:    #f59e0b;
  --mcq-dark:       #0f172a;
  --mcq-mid:        #334155;
  --mcq-light:      #f1f5f9;
  --mcq-white:      #ffffff;
  --mcq-border:     #e2e8f0;
  --mcq-radius:     14px;
  --mcq-shadow:     0 4px 24px rgba(0,0,0,.10);
  --mcq-shadow-lg:  0 16px 48px rgba(0,0,0,.18);
  --mcq-font:       'Baloo 2', 'Noto Sans Devanagari', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

.mcq-exam-wrap, .mcq-quiz-list-wrap, .mcq-plans-wrap, .mcq-dashboard, .mcq-leaderboard-wrap {
  font-family: var(--mcq-font);
  color: var(--mcq-dark);
  line-height: 1.6;
}

/* ── Screens ─────────────────────────────────────────── */
.mcq-screen {
  max-width: 860px;
  margin: 32px auto;
  padding: 0 16px;
}

/* ── Start Screen Card ───────────────────────────────── */
.mcq-exam-card {
  background: var(--mcq-white);
  border-radius: 24px;
  box-shadow: var(--mcq-shadow-lg);
  overflow: hidden;
}

.mcq-exam-hero {
  background: linear-gradient(135deg, var(--mcq-primary) 0%, #3b82f6 100%);
  color: #fff;
  padding: 48px 40px 36px;
  text-align: center;
}
.mcq-exam-icon {
  font-size: 56px;
  margin-bottom: 16px;
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}
.mcq-exam-title {
  font-size: clamp(22px, 5vw, 34px);
  font-weight: 800;
  margin-bottom: 10px;
}
.mcq-exam-desc {
  opacity: .85;
  font-size: 15px;
}

.mcq-exam-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 12px;
  padding: 28px 32px;
  background: #f8faff;
  border-bottom: 1px solid var(--mcq-border);
}
.mcq-info-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 10px;
  background: #fff;
  border-radius: var(--mcq-radius);
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  text-align: center;
}
.mcq-info-item.warn { background: #fff7ed; }
.mcq-info-icon { font-size: 22px; }
.mcq-info-label { font-size: 11px; color: #64748b; text-transform: uppercase; letter-spacing: .5px; }
.mcq-info-val   { font-weight: 700; font-size: 15px; color: var(--mcq-primary); }

/* Guest Form */
.mcq-guest-form {
  padding: 24px 32px 0;
}
.mcq-guest-form h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--mcq-mid);
}
.mcq-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--mcq-border);
  border-radius: 10px;
  font-family: var(--mcq-font);
  font-size: 15px;
  margin-bottom: 12px;
  transition: border-color .2s;
  outline: none;
}
.mcq-input:focus { border-color: var(--mcq-primary); }

.mcq-access-section {
  padding: 24px 32px 36px;
  text-align: center;
}
.mcq-price-box {
  margin-bottom: 20px;
}
.mcq-price {
  font-size: 42px;
  font-weight: 800;
  color: var(--mcq-primary);
}
.mcq-price-label {
  font-size: 14px;
  color: #64748b;
  margin-left: 8px;
}
.mcq-secure-note {
  font-size: 13px;
  color: #64748b;
  margin-top: 10px;
}

/* ── Buttons ──────────────────────────────────────────── */
.mcq-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 12px;
  font-family: var(--mcq-font);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  transition: all .2s;
}
.mcq-btn-primary {
  background: var(--mcq-primary);
  color: #fff;
}
.mcq-btn-primary:hover { background: #1740a8; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(26,86,219,.35); }
.mcq-btn-outline {
  background: transparent;
  border-color: var(--mcq-primary);
  color: var(--mcq-primary);
}
.mcq-btn-outline:hover { background: var(--mcq-primary); color: #fff; }
.mcq-btn-danger {
  background: var(--mcq-danger);
  color: #fff;
}
.mcq-btn-danger:hover { background: #dc2626; transform: translateY(-2px); }
.mcq-btn-lg {
  padding: 16px 40px;
  font-size: 18px;
  border-radius: 14px;
}

/* ── Badges / Tags ────────────────────────────────────── */
.mcq-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}
.mcq-badge.free  { background: #d1fae5; color: #065f46; }
.mcq-badge.paid  { background: #fee2e2; color: #991b1b; }
.mcq-tag {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(255,255,255,.2);
  border-radius: 20px;
  font-size: 12px;
  margin-right: 5px;
}
.diff-easy   { color: var(--mcq-success); font-weight: 700; }
.diff-medium { color: var(--mcq-warning); font-weight: 700; }
.diff-hard   { color: var(--mcq-danger);  font-weight: 700; }

/* ── Quiz List ────────────────────────────────────────── */
.mcq-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}
.mcq-select {
  padding: 10px 16px;
  border: 2px solid var(--mcq-border);
  border-radius: 10px;
  font-family: var(--mcq-font);
  font-size: 14px;
  min-width: 180px;
  outline: none;
  background: #fff;
}
.mcq-select:focus { border-color: var(--mcq-primary); }
.mcq-quiz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}
.mcq-quiz-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--mcq-shadow);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 2px solid transparent;
  transition: all .25s;
}
.mcq-quiz-card:hover { border-color: var(--mcq-primary); transform: translateY(-4px); box-shadow: var(--mcq-shadow-lg); }
.mcq-card-header { display: flex; justify-content: space-between; align-items: center; }
.mcq-card-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.mcq-card-title { font-size: 18px; font-weight: 700; color: var(--mcq-dark); }
.mcq-card-desc { font-size: 14px; color: #64748b; flex: 1; }
.mcq-card-footer {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: #64748b;
  border-top: 1px solid var(--mcq-border);
  padding-top: 12px;
}
.mcq-card-btn { width: 100%; justify-content: center; margin-top: 4px; }
.mcq-loading { text-align: center; padding: 40px; font-size: 18px; color: #94a3b8; }
.mcq-empty   { text-align: center; padding: 40px; font-size: 16px; color: #94a3b8; }

/* ── Exam Header ──────────────────────────────────────── */
.mcq-exam-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--mcq-dark);
  color: #fff;
  padding: 14px 24px;
  border-radius: 16px 16px 0 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.mcq-quiz-name { font-weight: 700; font-size: 15px; max-width: 300px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mcq-timer-wrap { flex: 1; text-align: center; }
.mcq-timer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.12);
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 2px;
  transition: all .3s;
}
.mcq-timer.danger { background: rgba(239,68,68,.3); animation: pulse-timer 1s infinite; }
@keyframes pulse-timer { 0%,100%{transform:scale(1)} 50%{transform:scale(1.05)} }

.mcq-progress-bar-wrap {
  height: 6px;
  background: #e2e8f0;
}
.mcq-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--mcq-primary), var(--mcq-secondary));
  transition: width .5s;
}

/* ── Question Area ────────────────────────────────────── */
.mcq-question-area {
  background: #fff;
  padding: 36px 32px 24px;
  min-height: 300px;
}
.mcq-q-number {
  font-size: 13px;
  font-weight: 700;
  color: var(--mcq-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}
.mcq-question-text {
  font-size: clamp(16px, 3vw, 20px);
  font-weight: 600;
  color: var(--mcq-dark);
  margin-bottom: 28px;
  line-height: 1.7;
}
.mcq-q-img {
  max-width: 100%;
  border-radius: 10px;
  margin-bottom: 20px;
  box-shadow: var(--mcq-shadow);
}
.mcq-q-img-sm { max-width: 200px; border-radius: 8px; margin: 8px 0; }

/* ── Options ──────────────────────────────────────────── */
.mcq-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mcq-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border: 2px solid var(--mcq-border);
  border-radius: 12px;
  cursor: pointer;
  transition: all .2s;
  background: #fafbfc;
}
.mcq-option:hover { border-color: var(--mcq-primary); background: #eff6ff; transform: translateX(4px); }
.mcq-option.selected { border-color: var(--mcq-primary); background: #dbeafe; }
.mcq-opt-key {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  background: var(--mcq-primary);
  color: #fff;
  border-radius: 50%;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
}
.mcq-option.selected .mcq-opt-key { background: var(--mcq-primary); box-shadow: 0 0 0 3px rgba(26,86,219,.3); }
.mcq-opt-text { font-size: 15px; font-weight: 500; color: var(--mcq-dark); }

/* ── Hint ─────────────────────────────────────────────── */
.mcq-hint-wrap { margin-top: 20px; }
.mcq-hint-btn {
  background: none;
  border: 1px dashed var(--mcq-warning);
  color: var(--mcq-warning);
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--mcq-font);
  font-size: 14px;
}
.mcq-hint-text {
  background: #fffbeb;
  border-left: 4px solid var(--mcq-warning);
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  margin-top: 10px;
  font-size: 14px;
  color: var(--mcq-mid);
}

/* ── Navigation ───────────────────────────────────────── */
.mcq-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: #f8faff;
  border-top: 1px solid var(--mcq-border);
  gap: 16px;
}
.mcq-submit-row {
  padding: 16px 24px 24px;
  text-align: center;
  background: #fff;
  border-radius: 0 0 16px 16px;
}

/* ── Palette ──────────────────────────────────────────── */
.mcq-q-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  max-width: 400px;
}
.mcq-palette-item {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
}
.mcq-palette-item.answered { background: var(--mcq-success); color: #fff; }
.mcq-palette-item.current  { background: var(--mcq-primary); color: #fff; box-shadow: 0 0 0 3px rgba(26,86,219,.3); }

/* ── Result ───────────────────────────────────────────── */
.mcq-result-card {
  background: #fff;
  border-radius: 24px;
  box-shadow: var(--mcq-shadow-lg);
  overflow: hidden;
}
.mcq-result-hero {
  padding: 48px 32px;
  text-align: center;
  background: linear-gradient(135deg, #1e3a8a, #1d4ed8);
  color: #fff;
}
.mcq-result-hero.passed { background: linear-gradient(135deg, #065f46, #10b981); }
.mcq-result-hero.failed { background: linear-gradient(135deg, #7f1d1d, #ef4444); }
.mcq-score-circle {
  font-size: 72px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 12px;
}
.mcq-pass-badge {
  display: inline-block;
  padding: 8px 28px;
  border-radius: 50px;
  font-size: 20px;
  font-weight: 800;
  background: rgba(255,255,255,.2);
  margin-top: 8px;
}

.mcq-result-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.mcq-stat {
  padding: 24px 16px;
  text-align: center;
  border-right: 1px solid var(--mcq-border);
}
.mcq-stat:last-child { border-right: none; }
.mcq-stat-num {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: var(--mcq-primary);
}
.mcq-stat.correct .mcq-stat-num  { color: var(--mcq-success); }
.mcq-stat.wrong .mcq-stat-num    { color: var(--mcq-danger); }
.mcq-stat.skipped .mcq-stat-num  { color: #94a3b8; }
.mcq-stat-label { font-size: 13px; color: #64748b; margin-top: 4px; }
.mcq-time-taken { text-align: center; padding: 12px; font-size: 15px; color: #64748b; border-top: 1px solid var(--mcq-border); }

.mcq-result-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 24px;
  border-top: 1px solid var(--mcq-border);
}

/* ── Review ───────────────────────────────────────────── */
.mcq-review { padding: 24px 32px; }
.mcq-review h3 { font-size: 20px; margin-bottom: 20px; }
.mcq-review-item {
  background: #f8faff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  border-left: 4px solid var(--mcq-border);
}
.mcq-review-item.correct { border-left-color: var(--mcq-success); background: #f0fdf4; }
.mcq-review-item.wrong   { border-left-color: var(--mcq-danger);  background: #fff1f2; }
.mcq-review-q { font-size: 15px; font-weight: 600; margin-bottom: 14px; }
.mcq-review-opt {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 6px;
  background: #fff;
  border: 1px solid #e2e8f0;
}
.mcq-review-opt.correct-ans { background: #d1fae5; border-color: var(--mcq-success); font-weight: 700; }
.mcq-review-opt.wrong-ans   { background: #fee2e2; border-color: var(--mcq-danger); }
.mcq-explanation {
  margin-top: 12px;
  padding: 12px;
  background: #fffbeb;
  border-radius: 8px;
  font-size: 14px;
  color: #92400e;
}

/* ── Leaderboard ──────────────────────────────────────── */
.mcq-leaderboard-wrap, .mcq-leaderboard { padding: 24px 0; }
.mcq-leaderboard-wrap h3, .mcq-leaderboard h3 { font-size: 22px; font-weight: 800; margin-bottom: 16px; }
.mcq-lb-table { width: 100%; border-collapse: collapse; }
.mcq-lb-table th { background: var(--mcq-dark); color: #fff; padding: 12px 16px; text-align: left; font-size: 13px; text-transform: uppercase; }
.mcq-lb-table td { padding: 12px 16px; border-bottom: 1px solid var(--mcq-border); font-size: 14px; }
.mcq-lb-table tr.top-1 td { background: #fffbeb; font-weight: 700; }
.mcq-lb-table tr.top-2 td { background: #f8faff; }
.mcq-lb-table tr.top-3 td { background: #fff7ed; }

/* ── Plans ────────────────────────────────────────────── */
.mcq-plans-wrap { padding: 32px 0; }
.mcq-plans-title { font-size: 30px; font-weight: 800; text-align: center; margin-bottom: 32px; }
.mcq-plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}
.mcq-plan-card {
  background: #fff;
  border-radius: 20px;
  padding: 32px 28px;
  text-align: center;
  box-shadow: var(--mcq-shadow);
  border: 2px solid var(--mcq-border);
  position: relative;
  transition: all .25s;
}
.mcq-plan-card.popular {
  border-color: var(--mcq-primary);
  transform: scale(1.04);
  box-shadow: var(--mcq-shadow-lg);
}
.mcq-popular-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--mcq-primary);
  color: #fff;
  padding: 5px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.mcq-plan-name     { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.mcq-plan-price    { font-size: 48px; font-weight: 900; color: var(--mcq-primary); line-height: 1; }
.mcq-plan-duration { font-size: 14px; color: #64748b; margin-bottom: 24px; }
.mcq-plan-features { list-style: none; text-align: left; margin-bottom: 28px; display: flex; flex-direction: column; gap: 10px; }
.mcq-plan-features li { font-size: 15px; }
.mcq-plan-buy-btn  { width: 100%; justify-content: center; }

/* ── Dashboard ────────────────────────────────────────── */
.mcq-dashboard { max-width: 960px; margin: 0 auto; padding: 24px 16px; }
.mcq-dash-header { display: flex; align-items: center; gap: 20px; background: var(--mcq-dark); color: #fff; padding: 24px 28px; border-radius: 16px; margin-bottom: 24px; }
.mcq-dash-avatar { font-size: 48px; }
.mcq-dash-header h2 { font-size: 22px; font-weight: 700; }
.mcq-dash-header p  { opacity: .7; font-size: 14px; }
.mcq-sub-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-radius: 12px;
  margin-bottom: 24px;
  font-weight: 600;
}
.mcq-sub-status.active   { background: #d1fae5; color: #065f46; }
.mcq-sub-status.inactive { background: #fee2e2; color: #991b1b; }
.mcq-section-title { font-size: 20px; font-weight: 700; margin-bottom: 16px; }
.mcq-history-table { width: 100%; border-collapse: collapse; }
.mcq-history-table th { background: var(--mcq-dark); color: #fff; padding: 10px 14px; text-align: left; font-size: 13px; }
.mcq-history-table td { padding: 12px 14px; border-bottom: 1px solid var(--mcq-border); font-size: 14px; }
.mcq-btn-sm { padding: 6px 14px; font-size: 13px; }

/* ── Overlays ─────────────────────────────────────────── */
.mcq-submitting {
  text-align: center;
  padding: 80px;
  font-size: 22px;
  color: var(--mcq-primary);
  font-weight: 700;
}
.mcq-alert-overlay {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--mcq-danger);
  color: #fff;
  padding: 14px 30px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 16px;
  z-index: 99999;
  box-shadow: var(--mcq-shadow-lg);
  animation: slideDown .3s ease;
}
@keyframes slideDown { from{transform:translateX(-50%) translateY(-20px);opacity:0} to{transform:translateX(-50%) translateY(0);opacity:1} }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 600px) {
  .mcq-exam-hero  { padding: 32px 20px; }
  .mcq-question-area { padding: 24px 16px; }
  .mcq-nav-row { flex-wrap: wrap; }
  .mcq-result-stats { grid-template-columns: repeat(2, 1fr); }
  .mcq-result-stats .mcq-stat:nth-child(2) { border-right: none; }
  .mcq-exam-header { padding: 10px 14px; }
  .mcq-quiz-name { max-width: 130px; font-size: 13px; }
  .mcq-timer { font-size: 16px; padding: 6px 14px; }
  .mcq-plan-card.popular { transform: none; }
  .mcq-review { padding: 16px; }
  .mcq-result-actions { flex-direction: column; }
  .mcq-result-actions .mcq-btn { width: 100%; justify-content: center; }
}
