/* ===== THEME VARIABLES ===== */
:root {
  --bg-base: #0a0e1a;
  --bg-surface: #0f1629;
  --bg-raised: #1a2140;
  --border: #1e2a4a;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #475569;
  --text-dim: #334155;
  --accent: #3b82f6;
  --accent2: #6366f1;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
}
[data-theme="light"] {
  /* Retinted 2026-07-20 to match the new brand (landing/trial/login) —
     warm off-white instead of blue-tinted, indigo accent instead of blue. */
  --bg-base: #f5f7f2;
  --bg-surface: #ffffff;
  --bg-raised: #eef1e9;
  --border: #e2e8d8;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --accent: #4f46e5;
  --accent2: #6366f1;
  --shadow: 0 4px 24px rgba(15,23,42,0.08);
}
[data-theme="blue"] {
  --bg-base: #04111f;
  --bg-surface: #061828;
  --bg-raised: #0a2238;
  --border: #0e3254;
  --text-primary: #e0f0ff;
  --text-secondary: #7ab8e8;
  --text-muted: #4d8ab5;
  --text-dim: #2a5a80;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  transition: background 0.25s, color 0.25s;
}
a { color: #3b82f6; text-decoration: none; }
a:hover { color: #60a5fa; }
.hidden { display: none !important; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-surface); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #3b82f6; }

/* ===== AUTH SCREEN ===== */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at top left, #1e3a5f 0%, #0a0e1a 50%, #1a0e2e 100%);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
[data-theme="light"] .auth-wrapper {
  background: radial-gradient(ellipse at top left, #dbeafe 0%, #f0f4ff 50%, #ede9fe 100%);
}
[data-theme="blue"] .auth-wrapper {
  background: radial-gradient(ellipse at top left, #0a2238 0%, #04111f 50%, #061225 100%);
}
.auth-wrapper::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at 30% 30%, rgba(59,130,246,0.08) 0%, transparent 50%),
              radial-gradient(circle at 70% 70%, rgba(139,92,246,0.08) 0%, transparent 50%);
  animation: bgShift 8s ease-in-out infinite alternate;
}
@keyframes bgShift { 0% { transform: translate(0,0); } 100% { transform: translate(20px,20px); } }

.auth-card {
  background: var(--bg-surface);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 24px;
  padding: 48px 40px;
  width: 100%; max-width: 460px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  position: relative; z-index: 1;
}
.auth-logo { text-align: center; margin-bottom: 8px; }
.auth-logo h1 {
  font-size: 2.2rem; font-weight: 800;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6, #f59e0b);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  letter-spacing: -0.5px;
}
.auth-logo p { color: var(--text-muted); font-size: 0.95rem; margin-top: 6px; }

.auth-tabs {
  display: flex; background: var(--bg-base); border-radius: 12px;
  padding: 4px; margin: 28px 0 24px; border: 1px solid var(--border);
}
.auth-tab {
  flex: 1; padding: 10px; border: none; background: transparent;
  color: var(--text-muted); font-size: 0.95rem; font-weight: 600;
  border-radius: 9px; cursor: pointer; transition: all 0.2s;
}
.auth-tab.active { background: linear-gradient(135deg, #3b82f6, #6366f1); color: white; }

.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; color: var(--text-secondary); font-size: 0.875rem; font-weight: 600;
  margin-bottom: 8px; letter-spacing: 0.3px;
}
.form-group input {
  width: 100%; padding: 12px 16px;
  background: var(--bg-base); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text-primary); font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s; font-family: inherit;
}
.form-group input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
.form-group input::placeholder { color: var(--text-dim); }

.btn-auth {
  width: 100%; padding: 13px;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  border: none; border-radius: 12px; color: white;
  font-size: 1rem; font-weight: 700; cursor: pointer;
  transition: all 0.2s; margin-top: 8px; letter-spacing: 0.3px;
}
.btn-auth:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 8px 25px rgba(59,130,246,0.4); }
.auth-switch { text-align: center; margin-top: 16px; font-size: 0.875rem; color: var(--text-muted); }
.auth-switch a { color: #3b82f6; font-weight: 600; cursor: pointer; }

.social-btns { display: flex; flex-direction: column; gap: 10px; margin-bottom: 4px; }
.social-btns #googleSignInBtn, .social-btns #googleSignUpBtn { width: 100%; }
.social-btns #googleSignInBtn > div, .social-btns #googleSignUpBtn > div { width: 100% !important; }
.btn-social-fb {
  width: 100%; padding: 10px 16px; border-radius: 8px; border: none; cursor: pointer;
  background: #1877f2; color: #fff; font-size: 0.9rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: background 0.2s;
}
.btn-social-fb:hover { background: #166fe5; }
.social-divider {
  display: flex; align-items: center; gap: 12px; margin: 14px 0 10px;
  color: var(--text-muted); font-size: 0.78rem;
}
.social-divider::before, .social-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ===== APP LAYOUT ===== */
.app-layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 260px; background: var(--bg-surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 100; transition: transform 0.3s, background 0.25s;
}
.sidebar-logo {
  padding: 22px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  cursor: pointer; text-decoration: none;
}
.sidebar-logo:hover { opacity: 0.85; }
.logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 800; color: white;
}
.logo-text {
  font-size: 1.2rem; font-weight: 800;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.sidebar-nav { flex: 1; padding: 14px 12px; overflow-y: auto; }
.nav-section-label {
  font-size: 0.68rem; font-weight: 700; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 1px;
  padding: 10px 8px 4px; margin-top: 4px;
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px; cursor: pointer;
  color: var(--text-muted); font-weight: 500; font-size: 0.9rem;
  transition: all 0.15s; margin-bottom: 2px;
  border: none; background: transparent; width: 100%; text-align: left;
}
.nav-item:hover { background: var(--bg-raised); color: var(--text-primary); }
.nav-item.active { background: rgba(59,130,246,0.12); color: var(--accent); }
.nav-icon { font-size: 1rem; width: 20px; text-align: center; }

.sidebar-footer { padding: 14px 12px; border-top: 1px solid var(--border); }
.user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; background: var(--bg-base);
  border-radius: 10px; border: 1px solid var(--border);
}
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem; color: white; flex-shrink: 0;
}
.user-chip-info { flex: 1; min-width: 0; }
.user-chip-name { font-size: 0.83rem; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip-role { font-size: 0.72rem; color: var(--text-muted); }
.user-chip-role.pro { color: #f59e0b; font-weight: 700; }

.plan-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 20px;
  font-size: 0.75rem; font-weight: 700;
}
.plan-badge.free { background: rgba(148,163,184,0.15); color: #94a3b8; }
.plan-badge.pro { background: rgba(245,158,11,0.15); color: #f59e0b; }

.exam-pick-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; margin-bottom: 10px;
  background: var(--bg-surface); border: 1.5px solid var(--border); border-radius: 12px;
  cursor: pointer; transition: all 0.15s;
}
.exam-pick-row:hover { border-color: #3b82f6; background: rgba(59,130,246,0.05); }
.exam-pick-name { font-weight: 700; color: var(--text-primary); font-size: 0.95rem; }
.exam-pick-tags { font-size: 0.75rem; color: var(--text-muted); margin-top: 3px; }
.exam-pick-arrow { color: #3b82f6; font-weight: 700; }

.report-question-link {
  display: inline-block; margin-top: 10px; font-size: 0.78rem;
  color: var(--text-muted); cursor: pointer; text-decoration: underline;
  text-decoration-style: dotted;
}
.report-question-link:hover { color: #ef4444; }
.review-report-link {
  display: inline-block; margin-top: 8px; font-size: 0.76rem;
  color: var(--text-muted); cursor: pointer; text-decoration: underline;
  text-decoration-style: dotted;
}
.review-report-link:hover { color: #ef4444; }
#reportQuestionModal { z-index: 350; }
.logout-btn { background: none; border: none; color: #ef4444; cursor: pointer; font-size: 1rem; padding: 4px; transition: color 0.2s; }
.logout-btn:hover { color: #fca5a5; }

.main-content { margin-left: 260px; flex: 1; min-height: 100vh; background: var(--bg-base); }

.topbar {
  background: var(--bg-surface); border-bottom: 1px solid var(--border);
  padding: 14px 28px; display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
}
.topbar-title { font-size: 1.2rem; font-weight: 700; color: var(--text-primary); }
.topbar-sub { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }

/* Theme switcher */
.theme-switcher { display: flex; gap: 6px; align-items: center; }
.theme-btn {
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--border);
  cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; background: var(--bg-raised);
}
.theme-btn:hover { border-color: var(--accent); transform: scale(1.1); }
.theme-btn.active { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(59,130,246,0.3); }

.page { padding: 28px; display: none; }
.page.active { display: block; }

/* ===== STATS ROW ===== */
.stats-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 28px; }
.stat-card {
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px;
  transition: all 0.2s;
}
.stat-card:hover { border-color: rgba(59,130,246,0.35); transform: translateY(-2px); }
.stat-icon {
  width: 42px; height: 42px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; margin-bottom: 12px;
}
.stat-value { font-size: 1.8rem; font-weight: 800; color: var(--text-primary); line-height: 1; }
.stat-label { font-size: 0.75rem; color: var(--text-muted); margin-top: 5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

/* ===== SECTION TITLE ===== */
.section-title {
  font-size: 1rem; font-weight: 700; color: var(--text-primary);
  margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
}
.section-sub { color: var(--text-muted); font-size: 0.83rem; font-weight: 500; }

/* ===== EXAM CARDS ===== */
.exam-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; margin-bottom: 32px; }
.exam-card {
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: 18px;
  padding: 24px; cursor: pointer; transition: all 0.25s; position: relative; overflow: hidden;
}
.exam-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; border-radius: 18px 18px 0 0;
}
.exam-card.it::before { background: linear-gradient(90deg,#3b82f6,#6366f1); }
.exam-card.banking::before { background: linear-gradient(90deg,#10b981,#059669); }
.exam-card.government::before { background: linear-gradient(90deg,#f59e0b,#d97706); }
.exam-card:hover { transform: translateY(-4px); box-shadow: 0 16px 48px rgba(0,0,0,0.3); border-color: rgba(59,130,246,0.3); }
.exam-card-icon { font-size: 2rem; margin-bottom: 12px; }
.exam-card-title { font-size: 1.05rem; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.exam-card-desc { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 12px; }
.exam-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.exam-tag {
  background: var(--bg-base); border: 1px solid var(--border);
  color: var(--text-secondary); font-size: 0.72rem; padding: 3px 9px;
  border-radius: 20px; font-weight: 500;
}
.exam-card-footer {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  color: var(--accent); font-size: 0.83rem; font-weight: 600;
}

/* ===== MODAL ===== */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(4px);
  z-index: 200; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-card {
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: 22px;
  padding: 36px; width: 100%; max-width: 500px;
  box-shadow: 0 40px 100px rgba(0,0,0,0.6);
  animation: slideUp 0.25s ease;
}
@keyframes slideUp { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:translateY(0); } }
.modal-title { font-size: 1.4rem; font-weight: 800; color: var(--text-primary); margin-bottom: 4px; }
.modal-sub { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 28px; }

.opt-group { margin-bottom: 22px; }
.opt-group-label {
  font-size: 0.75rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 10px; display: block;
}
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  padding: 8px 16px; border-radius: 50px; border: 1.5px solid var(--border);
  background: var(--bg-base); color: var(--text-muted); font-size: 0.83rem; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
}
.pill:hover { border-color: var(--accent); color: var(--accent); }
.pill.selected { background: var(--accent); border-color: var(--accent); color: white; }

.btn-start-exam {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg,#3b82f6,#6366f1);
  border: none; border-radius: 12px; color: white;
  font-size: 1rem; font-weight: 700; cursor: pointer;
  transition: all 0.2s; margin-top: 4px;
}
.btn-start-exam:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 8px 25px rgba(59,130,246,0.35); }
.btn-cancel-modal {
  width: 100%; padding: 11px; background: transparent;
  border: 1px solid var(--border); border-radius: 12px;
  color: var(--text-muted); font-size: 0.875rem; font-weight: 600;
  cursor: pointer; margin-top: 8px; transition: all 0.2s;
}
.btn-cancel-modal:hover { border-color: #ef4444; color: #ef4444; }

/* ===== MOCK EXAM SCREEN ===== */
.exam-screen {
  display: none; position: fixed; inset: 0;
  background: var(--bg-base); z-index: 300; flex-direction: column;
}
.exam-screen.open { display: flex; }

.exam-topbar {
  background: var(--bg-surface); border-bottom: 1px solid var(--border);
  padding: 0 24px; height: 62px;
  display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
.exam-topbar-left { display: flex; align-items: center; gap: 14px; }
.exam-name { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); }
.exam-qcount { font-size: 0.8rem; color: var(--text-muted); }

.exam-timer {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-base); border: 1px solid var(--border);
  border-radius: 10px; padding: 7px 16px;
  font-size: 1.05rem; font-weight: 700; color: #10b981;
  font-variant-numeric: tabular-nums; letter-spacing: 1px;
}
.exam-timer.warning { color: #f59e0b; border-color: rgba(245,158,11,0.3); animation: pulse 1s infinite; }
.exam-timer.danger { color: #ef4444; border-color: rgba(239,68,68,0.3); animation: pulse 0.5s infinite; }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.6; } }

.btn-submit-exam {
  padding: 8px 18px; background: linear-gradient(135deg,#3b82f6,#6366f1);
  border: none; border-radius: 8px; color: white;
  font-weight: 700; font-size: 0.83rem; cursor: pointer; transition: all 0.2s;
}
.btn-submit-exam:hover { opacity: 0.9; }

.exam-progress-bar { height: 3px; background: var(--border); flex-shrink: 0; }
.exam-progress-fill {
  height: 100%; background: linear-gradient(90deg,#3b82f6,#8b5cf6); transition: width 0.4s ease;
}

.exam-body { flex: 1; display: flex; overflow: hidden; }

/* Navigator — fixed size, no overflow bleed */
.q-navigator {
  width: 220px; min-width: 220px; background: var(--bg-surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; flex-shrink: 0; overflow: hidden;
}
.q-nav-header {
  padding: 12px 14px; border-bottom: 1px solid var(--border);
  font-size: 0.68rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.8px; flex-shrink: 0;
}
.q-nav-grid {
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  align-content: start;
}
.q-nav-btn {
  width: 100%;
  height: 32px;
  border: 1.5px solid var(--border); border-radius: 6px;
  background: var(--bg-base); color: var(--text-muted);
  font-size: 0.7rem; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.12s; flex-shrink: 0;
}
.q-nav-btn:hover { border-color: var(--accent); color: var(--accent); }
.q-nav-btn.current { border-color: var(--accent); background: rgba(59,130,246,0.15); color: var(--accent); }
.q-nav-btn.answered { background: rgba(16,185,129,0.12); border-color: #10b981; color: #10b981; }
.q-nav-btn.marked { background: rgba(245,158,11,0.12); border-color: #f59e0b; color: #f59e0b; }
.q-nav-btn.answered.marked { background: rgba(245,158,11,0.18); border-color: #f59e0b; color: #f59e0b; }

.q-nav-legend {
  padding: 10px 12px; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 5px; flex-shrink: 0;
}
.legend-row { display: flex; align-items: center; gap: 7px; font-size: 0.7rem; color: var(--text-muted); }
.legend-dot { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }

/* Question Panel */
.question-panel { flex: 1; overflow-y: auto; padding: 28px 36px; }
.q-meta-row { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.q-badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 20px;
  font-size: 0.72rem; font-weight: 700;
}
.q-badge.blue { background: rgba(59,130,246,0.12); color: #3b82f6; }
.q-badge.green { background: rgba(16,185,129,0.12); color: #10b981; }
.q-badge.yellow { background: rgba(245,158,11,0.12); color: #f59e0b; }
.q-badge.red { background: rgba(239,68,68,0.12); color: #ef4444; }
.q-num { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; }

.question-text { font-size: 1.05rem; color: var(--text-primary); line-height: 1.8; margin-bottom: 20px; font-weight: 500; }

.options-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.option-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 16px; background: var(--bg-surface);
  border: 1.5px solid var(--border); border-radius: 10px;
  cursor: pointer; transition: all 0.12s;
}
.option-item:hover { border-color: #3b82f6; background: rgba(59,130,246,0.05); }
.option-item.selected { border-color: #3b82f6; background: rgba(59,130,246,0.1); }
.option-item.correct { border-color: #10b981; background: rgba(16,185,129,0.1); pointer-events: none; }
.option-item.wrong { border-color: #ef4444; background: rgba(239,68,68,0.1); pointer-events: none; }
.option-item.disabled { pointer-events: none; }

.opt-label {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--bg-base); border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; color: var(--text-muted); flex-shrink: 0;
}
.option-item.selected .opt-label { background: #3b82f6; border-color: #3b82f6; color: white; }
.option-item.correct .opt-label { background: #10b981; border-color: #10b981; color: white; }
.option-item.wrong .opt-label { background: #ef4444; border-color: #ef4444; color: white; }
.opt-text { font-size: 0.92rem; color: var(--text-primary); line-height: 1.5; padding-top: 3px; }

.explanation-box {
  background: rgba(16,185,129,0.07); border: 1px solid rgba(16,185,129,0.2);
  border-radius: 12px; padding: 14px 18px; margin-bottom: 20px; display: none;
}
.explanation-box.show { display: block; }
.ex-label { font-size: 0.72rem; font-weight: 700; color: #10b981; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.explanation-box p { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.6; margin: 0; }

.q-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.btn-q {
  padding: 10px 20px; border-radius: 10px;
  font-size: 0.875rem; font-weight: 600; cursor: pointer;
  transition: all 0.15s; border: none;
}
.btn-q.prev { background: var(--border); color: var(--text-secondary); }
.btn-q.prev:hover { background: var(--bg-raised); color: var(--text-primary); }
.btn-q.next { background: linear-gradient(135deg,#3b82f6,#6366f1); color: white; }
.btn-q.next:hover { opacity: 0.9; }
.btn-q.mark { background: rgba(245,158,11,0.12); color: #f59e0b; border: 1px solid rgba(245,158,11,0.3); }
.btn-q.mark:hover { background: rgba(245,158,11,0.2); }
.btn-q.mark.active { background: #f59e0b; color: #0a0e1a; border-color: #f59e0b; }

/* ===== RESULTS ===== */
.results-screen {
  display: none; position: fixed; inset: 0;
  background: var(--bg-base); z-index: 300; overflow-y: auto;
}
.results-screen.open { display: block; }
.results-wrap { max-width: 780px; margin: 0 auto; padding: 40px 24px; }
.results-header { text-align: center; margin-bottom: 36px; }
.results-header h2 { font-size: 1.9rem; font-weight: 800; color: var(--text-primary); margin-bottom: 6px; }
.results-header p { color: var(--text-muted); }

.score-ring {
  width: 150px; height: 150px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 28px; position: relative;
  background: conic-gradient(#3b82f6 var(--pct,0%), var(--border) 0%);
}
.score-ring-inner {
  width: 120px; height: 120px; border-radius: 50%; background: var(--bg-base);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.score-ring-pct { font-size: 1.8rem; font-weight: 800; color: #3b82f6; }
.score-ring-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

.result-badge {
  display: inline-block; padding: 5px 18px; border-radius: 50px;
  font-size: 0.875rem; font-weight: 700; margin: 0 auto 28px; text-align: center;
}
.result-badge.excellent { background: rgba(16,185,129,0.15); color: #10b981; }
.result-badge.good { background: rgba(59,130,246,0.15); color: #3b82f6; }
.result-badge.average { background: rgba(245,158,11,0.15); color: #f59e0b; }
.result-badge.poor { background: rgba(239,68,68,0.15); color: #ef4444; }

.results-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 28px; }
.results-stats.cols-5 { grid-template-columns: repeat(5,1fr); }
.rs-card {
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 18px; text-align: center;
}
.rs-value { font-size: 1.5rem; font-weight: 800; color: var(--text-primary); }
.rs-label { font-size: 0.72rem; color: var(--text-muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }

.breakdown-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 16px; padding: 22px; margin-bottom: 22px; }
.breakdown-card h3 { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); margin-bottom: 16px; }
.cat-row { margin-bottom: 12px; }
.cat-row-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.cat-name { font-size: 0.83rem; color: var(--text-secondary); font-weight: 500; }
.cat-pct { font-size: 0.83rem; color: var(--text-primary); font-weight: 700; }
.cat-bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.cat-fill { height: 100%; border-radius: 3px; min-width: 4px; background: linear-gradient(90deg,#ef4444,#ef4444); transition: width 1s ease, background 0.3s ease; }
.cat-fill.cat-fill-weak { background: linear-gradient(90deg,#ef4444,#f87171); }
.cat-fill.cat-fill-average { background: linear-gradient(90deg,#f59e0b,#fbbf24); }
.cat-fill.cat-fill-strong { background: linear-gradient(90deg,#10b981,#34d399); }

.weak-exam-group { margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.weak-exam-group:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.weak-exam-title { font-size: 0.78rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; }

.results-actions { display: flex; gap: 12px; }
.btn-lg {
  flex: 1; padding: 13px; border-radius: 12px;
  font-size: 0.95rem; font-weight: 700; cursor: pointer; transition: all 0.2s;
  border: none; min-width: 130px;
}
.btn-lg.primary { background: linear-gradient(135deg,#3b82f6,#6366f1); color: white; }
.btn-lg.primary:hover { opacity: 0.9; }
.btn-lg.secondary { background: transparent; border: 1.5px solid var(--border); color: var(--text-secondary); }
.btn-lg.secondary:hover { border-color: #3b82f6; color: #3b82f6; }

/* ===== LEADERBOARD ===== */
.lb-list { display: flex; flex-direction: column; gap: 8px; }
.lb-item {
  display: flex; align-items: center; gap: 13px;
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 13px 16px;
}
.lb-rank { font-size: 1rem; font-weight: 800; color: var(--text-muted); width: 28px; text-align: center; }
.lb-rank.r1 { color: #f59e0b; }
.lb-rank.r2 { color: var(--text-secondary); }
.lb-rank.r3 { color: #d97706; }
.lb-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg,#3b82f6,#8b5cf6);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: white; font-size: 0.875rem;
}
.lb-name { flex: 1; font-weight: 600; color: var(--text-primary); font-size: 0.875rem; }
.lb-score-wrap { text-align: right; }
.lb-pts { font-weight: 800; color: #3b82f6; font-size: 0.9rem; }
.lb-tests { font-size: 0.72rem; color: var(--text-muted); }

/* ===== CARDS ===== */
.info-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; margin-bottom: 20px; }
.info-card-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.info-card-title { font-size: 0.9rem; font-weight: 700; color: var(--text-primary); }
.info-card-body { padding: 18px 20px; }

/* ===== RECENT TESTS ===== */
.test-item {
  display: flex; align-items: center; gap: 13px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.test-item:last-child { border-bottom: none; }
.test-icon {
  width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0;
}
.test-info { flex: 1; }
.test-type { font-size: 0.83rem; font-weight: 700; color: var(--text-primary); }
.test-date { font-size: 0.72rem; color: var(--text-muted); }
.test-score { text-align: right; }
.test-pct { font-size: 1rem; font-weight: 800; }
.test-raw { font-size: 0.72rem; color: var(--text-muted); }
.pct-good { color: #10b981; }
.pct-avg { color: #f59e0b; }
.pct-poor { color: #ef4444; }

/* ===== EMPTY & LOADING ===== */
.empty-state { text-align: center; padding: 40px 20px; color: #334155; }
.empty-icon { font-size: 2.5rem; margin-bottom: 12px; }
.loading-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 50px; color: #475569; }
.spinner { width: 28px; height: 28px; border: 2.5px solid var(--border); border-top-color: #3b82f6; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== HAMBURGER & SIDEBAR OVERLAY ===== */
.hamburger-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--text-primary);
  font-size: 22px;
  line-height: 1;
  border-radius: 6px;
  transition: background 0.2s;
}
.hamburger-btn:hover { background: var(--bg-raised); }
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 99;
}
.sidebar-overlay.open { display: block; }

/* ===== ANSWER REVIEW ===== */
.review-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 16px;
}
.review-card.correct { border-left: 4px solid var(--success); }
.review-card.wrong { border-left: 4px solid var(--danger); }
.review-card.skipped { border-left: 4px solid var(--text-muted); }
.review-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.review-qnum { font-weight: 700; color: var(--accent); font-size: 0.9rem; }
.review-status { font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); }
.review-question { color: var(--text-primary); font-weight: 500; margin-bottom: 12px; line-height: 1.5; }
.review-opts { display: flex; flex-direction: column; gap: 6px; }
.review-opt { padding: 8px 12px; border-radius: 6px; font-size: 0.9rem; color: var(--text-secondary); background: var(--bg-raised); }
.review-opt.review-correct { background: rgba(16,185,129,0.15); color: #10b981; font-weight: 600; }
.review-opt.review-wrong { background: rgba(239,68,68,0.15); color: #ef4444; }
.review-your-ans { margin-top: 8px; font-size: 0.82rem; color: var(--danger); }
.review-explanation { margin-top: 10px; padding: 10px 12px; background: rgba(59,130,246,0.1); border-radius: 6px; font-size: 0.88rem; color: var(--text-secondary); line-height: 1.5; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .stats-row { grid-template-columns: repeat(2,1fr); }
  .exam-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.25s ease; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .exam-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2,1fr); }
  .q-navigator { display: none; }
  .results-stats, .results-stats.cols-5 { grid-template-columns: repeat(2,1fr); }
  .page { padding: 16px; }
  .topbar { padding: 12px 16px; }
  .question-panel { padding: 20px; }
  .hamburger-btn { display: block; }
}
@media (max-width: 480px) {
  .auth-card { padding: 28px 20px; }
  .results-stats, .results-stats.cols-5 { grid-template-columns: 1fr 1fr; }
  .rs-card { padding: 12px; }
  .rs-value { font-size: 1.25rem; }
}

/* ===== IT PLACEMENT PAGE ===== */
.placement-hero {
  background: linear-gradient(135deg, #1a1060 0%, #0f1629 100%);
  border: 1px solid #2d1b8a;
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 32px;
}
.placement-hero h2 { font-size: 1.4rem; color: #fff; margin-bottom: 8px; }
.placement-hero p { color: #94a3b8; font-size: 0.92rem; line-height: 1.6; }
.placement-hero strong { color: #a78bfa; }

.company-section-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.company-mocks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.mock-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
  position: relative;
  overflow: hidden;
}
.mock-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #6c63ff, #a78bfa);
}
.mock-card:hover { border-color: #6c63ff; transform: translateY(-2px); }
.mock-card-company { font-size: 0.75rem; color: #6c63ff; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 6px; }
.mock-card-name { font-size: 1rem; font-weight: 600; color: #e2e8f0; margin-bottom: 10px; }
.mock-card-desc { font-size: 0.82rem; color: #64748b; margin-bottom: 16px; line-height: 1.5; }
.mock-card-meta { display: flex; gap: 12px; font-size: 0.8rem; color: #475569; margin-bottom: 14px; }
.mock-card-meta span { display: flex; align-items: center; gap: 4px; }
.btn-start-mock {
  width: 100%;
  padding: 9px;
  background: #6c63ff;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn-start-mock:hover { opacity: 0.88; }

.coming-soon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.coming-soon-card {
  background: var(--bg-raised);
  border: 1px dashed #1e2d4a;
  border-radius: 10px;
  padding: 16px;
  font-size: 0.88rem;
  color: #475569;
  text-align: center;
}

/* ===== FEEDBACK WIDGET ===== */
#feedbackFab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent, #6c63ff);
  color: #fff;
  font-size: 1.3rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(108,99,255,0.45);
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, box-shadow 0.15s;
}
#feedbackFab:hover { transform: scale(1.1); box-shadow: 0 6px 24px rgba(108,99,255,0.6); }

.feedback-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1000;
  display: none;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 0 28px 92px 0;
}
.feedback-modal-overlay.show { display: flex; }

.feedback-modal {
  background: var(--bg-surface, #0f1629);
  border: 1px solid var(--border, #1e2d4a);
  border-radius: 16px;
  width: 340px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.45);
  overflow: hidden;
}
.feedback-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--bg-raised, #1a2140);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary, #e2e8f0);
}
.feedback-close {
  background: none; border: none; color: var(--text-secondary, #94a3b8);
  font-size: 1rem; cursor: pointer; padding: 2px 6px; border-radius: 4px;
}
.feedback-close:hover { color: #ef4444; }

.feedback-modal-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; }

.feedback-stars span { font-size: 0.82rem; color: var(--text-secondary, #94a3b8); }
.star-row { display: flex; gap: 6px; margin-top: 6px; }
.star-btn {
  background: none; border: none; font-size: 1.6rem; cursor: pointer;
  color: #334155; transition: color 0.1s;
}
.star-btn.active, .star-btn:hover { color: #f59e0b; }

#feedbackMessage {
  width: 100%; padding: 10px 12px; border-radius: 8px;
  background: var(--bg-base, #0a0e1a);
  border: 1px solid var(--border, #1e2d4a);
  color: var(--text-primary, #e2e8f0);
  font-size: 0.88rem; resize: vertical; min-height: 90px;
  font-family: inherit;
}
#feedbackMessage:focus { outline: none; border-color: var(--accent, #6c63ff); }

.btn-submit-feedback {
  width: 100%; padding: 10px; border-radius: 8px;
  background: var(--accent, #6c63ff); color: #fff;
  border: none; font-weight: 600; font-size: 0.9rem; cursor: pointer;
  transition: opacity 0.15s;
}
.btn-submit-feedback:hover { opacity: 0.88; }
.btn-submit-feedback:disabled { opacity: 0.5; cursor: not-allowed; }
