/* =========================================================
   THEME VARIABLES — Light is default
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* No-transition helper — prevents color flash on theme switch */
.no-transition, .no-transition * {
  transition: none !important;
}

:root, [data-theme="dark"] {
  --primary: #00e5ff;
  --primary-rgb: 0, 229, 255;
  --primary-light: #80f2ff;
  --primary-dark: #009eb3;
  --accent: #ff0b5b;
  --accent-2: #2563eb;
  --accent-2-light: #93c5fd;
  --accent-3: #ffaa00;
  --danger: #ff3366;
  --bg: #09090e;
  --bg-2: #0d0d14;
  --surface: #13131c;
  --surface-2: #1c1c28;
  --border: #29293d;
  --text: #f0f0f5;
  --text-muted: #a0a0b8;
  --text-light: #70708c;
  --sidebar-w: 240px;
  --topbar-h: 56px;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow: 0 4px 20px rgba(0, 229, 255, 0.06);
  --shadow-sm: 0 2px 6px rgba(0,0,0,0.2);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.4);
  --shadow-card: 0 4px 10px rgba(0,0,0,0.3);
  --transition: 0.15s ease;
  --gradient: linear-gradient(135deg, #00e5ff 0%, #7b2fff 100%);
  --gradient-banner: linear-gradient(135deg, #0a0a1a 0%, #11113a 50%, #0d102e 100%);
}

[data-theme="light"] {
  --primary: #5b3ef5;
  --primary-rgb: 91, 62, 245;
  --primary-light: #7c62f7;
  --primary-dark: #3d24d0;
  --accent: #f97316;
  --accent-2: #2563eb;
  --accent-2-light: #93c5fd;
  --accent-3: #f59e0b;
  --danger: #ef4444;
  --bg: #f8f9fe;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #f3f4f9;
  --border: #eef0f7;
  --text: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --shadow: 0 4px 24px rgba(91,62,245,0.06);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 40px rgba(91,62,245,0.1);
  --shadow-card: 0 4px 20px rgba(0,0,0,0.04);
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --gradient: linear-gradient(135deg, #7c3aed 0%, #4f46e5 50%, #2563eb 100%);
  --gradient-banner: linear-gradient(135deg, #4f46e5 0%, #7c3aed 60%, #a855f7 100%);
}

.fade-in {
  animation: fadeIn 0.1s ease-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0.95; }
  to { opacity: 1; }
}

.dashboard-fade-in {
  animation: dashboardFade 0.25s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes dashboardFade {
  from { opacity: 0; }
  to { opacity: 1; }
}



body {
  font-family: 'Inter', 'Plus Jakarta Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

a { cursor: pointer; text-decoration: none; color: inherit; }
.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

/* =========================================================
   SCROLLBAR
   ========================================================= */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-light); }

/* =========================================================
   AUTH SCREEN
   ========================================================= */
.auth-screen {
  min-height: 100vh;
  background: linear-gradient(rgba(240, 239, 255, 0.3), rgba(255, 255, 255, 0.6)), url('../images/BACKGROUND.jpg') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: auto;
}
[data-theme="dark"] .auth-screen {
  background: linear-gradient(rgba(9, 9, 14, 0.6), rgba(9, 9, 14, 0.85)), url('../images/BACKGROUND.jpg') center/cover no-repeat;
}


.auth-bg-blobs { display: none; }
.blob { display: none; }

.auth-card {
  background: var(--surface);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 24px;
  width: 380px;
  max-width: 95vw;
  position: relative;
  z-index: 10;
  animation: fadeUp 0.5s ease;
}
[data-theme="dark"] .auth-card {
  background: rgba(12, 12, 22, 0.85);
  box-shadow: 0 0 0 1px rgba(0,229,255,0.08), 0 30px 80px rgba(0,0,0,0.5), 0 0 60px rgba(0,229,255,0.06);
  border: 1px solid rgba(0, 229, 255, 0.3);
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* -------------------------
   Auth page - login/register overrides
   ------------------------- */
/* Make the login card wider for desktop */
#login-card {
  width: 520px;
  max-width: 92vw;
}

/* Make the register card fixed and slightly larger so it appears as a centered modal */
#register-card {
  position: fixed !important;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: none !important;
  transition: none !important;
  width: 520px; /* reduced for compact registration */
  max-width: 92vw;
  max-height: calc(100vh - 120px);
  overflow-y: auto; /* keep inner features accessible */
  z-index: 1200;
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--shadow-lg);
}

/* Responsive fallback: on small screens keep cards relative and fluid */
@media (max-width: 900px) {
  #login-card { width: min(92vw, 480px); }
  #register-card {
    position: relative !important;
    width: min(92vw, 420px);
    transform: none !important;
    left: auto; top: auto; margin: 0 auto;
  }
}

.auth-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.auth-logo-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--gradient); display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.auth-logo-name { font-size: 15px; font-weight: 700; color: var(--text); letter-spacing: -0.3px; }
.auth-logo-sub { font-size: 11px; color: var(--text-muted); font-weight: 500; }
.auth-title { font-size: 22px; font-weight: 800; color: var(--text); letter-spacing: -0.5px; margin-bottom: 4px; }
.auth-subtitle { color: var(--text-muted); font-size: 13px; margin-bottom: 24px; line-height: 1.5; }

.btn-google {
  width: 100%; padding: 13px 20px;
  border: 1.5px solid var(--border); border-radius: 12px;
  background: var(--surface); cursor: pointer; font-size: 15px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  color: var(--text); transition: var(--transition);
  font-family: inherit;
}
.btn-google:hover { background: var(--surface-2); border-color: #c4b8ff; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,0.08);}

.auth-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  margin: 18px 0;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1 1 0;
  height: 1px;
  background: var(--border);
  margin: 0 12px;
}

.form-group { margin-bottom: 18px; }
.form-label { font-size: 11px; font-weight: 700; letter-spacing: 0.5px; color: var(--text-muted); display: block; margin-bottom: 8px; text-transform: uppercase; }
.form-label-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.form-input-wrap { position: relative; display: flex; align-items: center; }
.form-icon { position: absolute; left: 14px; font-size: 16px; color: var(--text-muted); }
.form-icon-right { position: absolute; right: 14px; cursor: pointer; font-size: 16px; color: var(--text-muted); }
.form-input {
  width: 100%; padding: 14px 42px 14px 42px;
  border: 1.5px solid var(--border); border-radius: 12px;
  font-size: 15px; background: var(--surface-2); color: var(--text);
  font-family: inherit; transition: var(--transition);
}
.form-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.15); background: var(--bg-2); }
.form-input::placeholder { color: var(--text-muted); opacity: 1; }
.form-input option { background: var(--surface-2); color: var(--text); }

.forgot-link { font-size: 12px; font-weight: 800; color: var(--primary); letter-spacing: 0.3px; }
.forgot-link:hover { text-decoration: underline; color: var(--primary-light); }
.auth-footer-text { text-align: center; font-size: 14px; color: var(--text-muted); margin-top: 22px; }
.link-accent { color: var(--primary); font-weight: 900; cursor: pointer; }
.link-accent:hover { text-decoration: underline; color: var(--primary-light); }


/* =========================================================
   BUTTONS
   ========================================================= */
.btn-primary {
  background: var(--gradient); color: #fff; border: none; border-radius: 8px;
  padding: 12px 24px; font-size: 13px; font-weight: 700; cursor: pointer;
  font-family: inherit; transition: var(--transition); display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.2);
  letter-spacing: 0.1px;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0, 229, 255, 0.3); }
.btn-primary:active { transform: translateY(0); }
.btn-full { width: 100%; justify-content: center; }

.btn-secondary {
  background: var(--surface); color: var(--primary); border: 1.5px solid var(--primary);
  border-radius: 10px; padding: 10px 20px; font-size: 14px; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: var(--transition); display: inline-flex; align-items: center; gap: 6px;
}
.btn-secondary:hover { background: var(--bg); }

.btn-icon {
  background: var(--surface-2); border: 1.5px solid var(--border);
  border-radius: 10px; padding: 8px 14px; font-size: 14px; cursor: pointer;
  font-family: inherit; transition: var(--transition); color: var(--text-muted);
}
.btn-icon:hover { border-color: var(--primary); color: var(--primary); }

/* Theme switch (toggle) */
.theme-switch { display:inline-flex; align-items:center; cursor:pointer; position:relative; }
.theme-switch input { position:absolute; opacity:0; width:0; height:0; pointer-events:none; }
.theme-switch .switch-slider { position:relative; display:inline-block; width:44px; height:24px; background:var(--surface-2); border:1.5px solid var(--border); border-radius:99px; transition: background var(--transition), border-color var(--transition); box-sizing: border-box; }
.theme-switch .switch-slider::after { content:''; position:absolute; width:18px; height:18px; left:3px; top:50%; transform:translateY(-50%); background:var(--surface); border-radius:50%; transition: left var(--transition), background var(--transition), box-shadow var(--transition); box-shadow:0 2px 8px rgba(0,0,0,0.08); }
.theme-switch input:checked + .switch-slider { background: linear-gradient(135deg,var(--primary),var(--primary-dark)); border-color: var(--primary); }
.theme-switch input:checked + .switch-slider::after { left: calc(100% - 21px); background: #ffffff; }

/* small variant for tighter places (topbar) */
.theme-switch.small .switch-slider { width:36px; height:20px; }
.theme-switch.small .switch-slider::after { width:14px; height:14px; left:3px; }
.theme-switch.small input:checked + .switch-slider::after { left: calc(100% - 17px); }

.btn-signout {
  width: 100%; padding: 9px; border: 1.5px solid var(--border); border-radius: 10px;
  background: transparent; color: var(--text-muted); cursor: pointer; font-size: 13px;
  font-family: inherit; margin-top: 10px; transition: var(--transition);
}
.btn-signout:hover { border-color: var(--danger); color: var(--danger); background: #fff1f1; }

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

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-w); min-height: 100vh;
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0;
  overflow-y: auto; z-index: 1000; transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0 0 20px 0;
}
.sidebar.closed { transform: translateX(-100%); }

#sidebar-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(2px);
  z-index: 900; display: none; opacity: 0; transition: opacity 0.3s ease;
}
#sidebar-overlay.active { display: block; opacity: 1; }

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px;
  margin-bottom: 8px;
}
.sidebar-logo-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--gradient); display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.sidebar-logo-name { font-size: 15px; font-weight: 800; color: var(--text); letter-spacing: -0.3px; }
.sidebar-logo-sub { font-size: 11px; color: var(--text-muted); font-weight: 500; }

.sidebar-section-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.8px;
  color: var(--text-light); padding: 20px 20px 8px 20px;
  text-transform: uppercase;
}
.sidebar-nav { padding: 0 12px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 12px; font-size: 14px; font-weight: 600;
  color: var(--text-muted); cursor: pointer; transition: var(--transition);
  margin-bottom: 4px; position: relative;
}
.nav-item:hover { background: var(--surface-2); color: var(--primary); }
.nav-item.active { 
  background: rgba(var(--primary-rgb), 0.08); 
  color: var(--primary); 
  font-weight: 700; 
}
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; 
  background: var(--primary); border-radius: 0 4px 4px 0;
}
.nav-icon { font-size: 18px; width: 22px; display: flex; align-items: center; justify-content: center; }
.nav-icon svg, .form-icon svg, .form-icon-right svg, .topbar-notify svg { width:18px; height:18px; display:block; }
.form-icon svg, .form-icon-right svg { color: var(--text-muted); }
.topbar-notify svg { color: var(--primary); margin-right:6px; }
.badge-new {
  margin-left: auto; background: var(--accent-2); color: #fff;
  font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 99px; letter-spacing: 0.5px;
}
.badge-pro {
  margin-left: auto; background: linear-gradient(135deg,#f59e0b,#f97316); color: #fff;
  font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 99px; letter-spacing: 0.5px;
}

.sidebar-footer { 
  margin-top: auto; 
  padding: 20px 16px; 
  border-top: 1px solid var(--border);
}
.sidebar-user { 
  display: flex; 
  align-items: center; 
  gap: 12px; 
  background: var(--surface-2); 
  padding: 12px; 
  border-radius: 16px;
  margin-bottom: 12px;
}
.sidebar-user-avatar {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--gradient); color: #fff; font-weight: 700; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
}
.sidebar-user-name { font-size: 14px; font-weight: 700; color: var(--text); }
.sidebar-user-meta { font-size: 11px; color: var(--text-muted); font-weight: 500; }

/* MAIN CONTENT */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* TOPBAR */
.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; padding: 0 28px;
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px);
}
.hamburger { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--text-muted); display: none; }
.topbar-right { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.verified-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: #eafaf1;
  color: #056641;
  padding: 5px 14px 5px 10px;
  border-radius: 99px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.verified-badge svg {
  color: #056641;
  flex-shrink: 0;
}
[data-theme="dark"] .verified-badge {
  background-color: rgba(5, 102, 65, 0.2);
  color: #4ade80;
}
[data-theme="dark"] .verified-badge svg {
  color: #4ade80;
}
[data-theme="dark"] .verified-badge path {
  stroke: var(--surface);
}
.topbar-notify {
  padding: 7px 14px; border-radius: 99px;
  background: linear-gradient(135deg,#f59e0b,#f97316); color: #fff;
  font-size: 12px; font-weight: 700; cursor: pointer; transition: var(--transition);
}
.topbar-notify:hover { transform: scale(1.04); }

/* PAGE CONTENT */
#page-content { padding: 20px; flex: 1; }
.page-title { font-size: 16px; font-weight: 800; color: var(--text); margin-bottom: 16px; letter-spacing: -0.3px; text-transform: uppercase; opacity: 0.8; }

/* =========================================================
   PREMIUM UI ENHANCEMENTS
   ========================================================= */
.premium-hero {
  margin: 18px 0 26px; padding: 28px; border-radius: 14px;
  background: linear-gradient(120deg, rgba(91,62,245,0.12), rgba(0,229,255,0.06));
  border: 1px solid rgba(255,255,255,0.04);
  box-shadow: 0 12px 40px rgba(16,24,40,0.35);
  display: flex; gap: 20px; align-items: center; justify-content: space-between;
}
.premium-hero .hero-left { flex: 1; }
.premium-hero h1 { margin: 0; font-size: 28px; font-weight: 900; letter-spacing: -0.6px; color: var(--text); }
.premium-hero p { margin-top: 8px; color: var(--text-muted); font-size: 14px; }
.premium-hero .cta { display:flex; gap:10px; align-items:center }

.pricing-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.pricing-card { background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)); border-radius: 14px; padding: 18px; border: 1px solid var(--border); box-shadow: var(--shadow-card); transition: transform 0.22s var(--transition), box-shadow 0.22s var(--transition); }
.pricing-card.popular { transform: translateY(-6px); box-shadow: 0 20px 60px rgba(91,62,245,0.12); border: 1px solid rgba(var(--primary-rgb), 0.12); }
.pricing-card:hover { transform: translateY(-6px); }
.pricing-plan { font-size: 13px; font-weight: 900; color: var(--primary); letter-spacing: -0.2px; }
.pricing-price { font-size: 24px; font-weight: 900; margin: 8px 0; }
.pricing-desc { color: var(--text-muted); font-size: 13px; margin-bottom: 10px; }
.pricing-features { list-style: none; padding-left: 0; margin: 10px 0 12px; color: var(--text); font-size: 13px; }
.pricing-features li { padding: 6px 0; border-bottom: 1px dashed rgba(255,255,255,0.02); }
.pricing-features li.off { color: var(--text-muted); opacity: 0.7; }

.badge-popular { display:inline-block; background: linear-gradient(90deg,#ffb86b,#ff6bcb); color:#fff; padding:6px 10px; border-radius:999px; font-weight:800; font-size:12px; box-shadow: 0 6px 24px rgba(123,63,255,0.12); }

/* Card base used throughout */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
.card .card-body { padding: 14px; }

/* Confetti canvas (simple lightweight celebratory effect) */
.confetti-canvas { position: fixed; inset: 0; pointer-events: none; z-index: 99999; display: none; }

/* QUIZ UI enhancements */
.quiz-progress { height: 12px; background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02)); border-radius: 999px; overflow: hidden; border: 1px solid rgba(255,255,255,0.02); }
.quiz-progress > .fill { height: 100%; width: 0%; background: linear-gradient(90deg,var(--primary),var(--accent)); transition: width 0.6s cubic-bezier(.2,.9,.2,1); }
.quiz-feedback { padding: 12px; border-radius: 10px; margin-top: 10px; font-weight: 700; }
.quiz-feedback.correct { background: rgba(16,185,129,0.08); color: #05de8a; border: 1px solid rgba(16,185,129,0.12); }
.quiz-feedback.wrong { background: rgba(255,77,77,0.06); color: #ff6b6b; border: 1px solid rgba(255,77,77,0.08); }

/* subtle micro-interactions */
.pulse { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.02); } 100% { transform: scale(1); } }

/* small utility */
.muted { color: var(--text-muted); font-size: 13px }

/* Gradient text utility */
.text-gradient { background: linear-gradient(90deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }


/* =========================================================
   DASHBOARD
   ========================================================= */
.banner {
  background: var(--gradient-banner); border-radius: 12px;
  padding: 16px 20px; color: #fff; display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 16px; position: relative; overflow: hidden;
}
.banner::before {
  content:''; position: absolute; right: -30px; top: -30px;
  width: 200px; height: 200px; border-radius: 50%; background: rgba(255,255,255,0.07);
}
.banner::after {
  content:''; position: absolute; right: 80px; bottom: -50px;
  width: 140px; height: 140px; border-radius: 50%; background: rgba(255,255,255,0.06);
}
.banner-left .welcome-sub { font-size: 12px; opacity: 0.8; font-weight: 500; letter-spacing: 0.5px; }
.banner-left h2 { font-size: 20px; font-weight: 800; margin: 2px 0 4px; letter-spacing: -0.4px; }
.banner-left p { font-size: 13px; opacity: 0.85; }
.banner-right { display: flex; align-items: center; gap: 24px; z-index: 2; }
.banner-stat { text-align: center; }
.banner-stat-label { font-size: 11px; opacity: 0.75; font-weight: 600; letter-spacing: 0.5px; }
.xp-box {
  background: rgba(255,255,255,0.18); border-radius: 12px; padding: 12px 20px; text-align: center;
}
.xp-box .xp-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.xp-num { font-size: 18px; font-weight: 800; }
.lvl-badge { background: #f59e0b; padding: 3px 10px; border-radius: 99px; font-size: 11px; font-weight: 800; }
.xp-bar { height: 6px; background: rgba(255,255,255,0.25); border-radius: 99px; overflow:hidden; }
.xp-bar-fill { height:100%; background:#fff; border-radius:99px; transition: width 1s ease; }
.xp-sub { font-size: 10px; opacity: 0.7; margin-top: 5px; }
.streak-box {
  background: rgba(255,255,255,0.12); border-radius: 10px; padding: 10px 16px; text-align: center;
}
.streak-num { font-size: 24px; font-weight: 900; }
.streak-label { font-size: 10px; opacity: 0.75; font-weight: 700; letter-spacing: 0.5px; }
.btn-banner { background: rgba(255,255,255,0.2); border: 1.5px solid rgba(255,255,255,0.4); color:#fff; border-radius: 10px; padding: 10px 20px; font-size: 14px; font-weight: 700; cursor:pointer; font-family:inherit; margin-top:14px; transition: var(--transition); }
.btn-banner:hover { background: rgba(255,255,255,0.35); }

/* STATS GRID */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.stat-card {
  background: var(--surface); border-radius: 10px; padding: 14px 12px;
  border: 1px solid var(--border); transition: var(--transition);
  position: relative; overflow: hidden;
}
.stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--gradient); opacity: 0;
  transition: opacity 0.3s ease;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: rgba(0,229,255,0.3); }
.stat-card:hover::before { opacity: 1; }
.stat-card-icon { font-size: 18px; margin-bottom: 6px; }
.stat-card-val { font-size: 18px; font-weight: 800; color: var(--text); }
.stat-card-sub { font-size: 9px; color: var(--text-muted); font-weight: 600; letter-spacing: 0.5px; margin-top: 1px; text-transform: uppercase; }

/* STAT ICON BOX — UPSA Smart Tutors colored icon containers */
.stat-icon-box {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.sib-blue   { background: rgba(59,130,246,0.15); color: #3b82f6; }
.sib-green  { background: rgba(37,99,235,0.08); color: var(--accent-2); }
.sib-purple { background: rgba(139,92,246,0.15); color: #8b5cf6; }
.sib-yellow { background: rgba(245,158,11,0.15); color: #f59e0b; }

/* SVG nav-icon sizing */
.nav-icon svg { display: block; }

/* DASHBOARD GRID */
.dash-grid { display: grid; grid-template-columns: 1fr 280px; gap: 20px; align-items: start; }
.dash-main { display: flex; flex-direction: column; gap: 20px; }

.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-title { font-size: 16px; font-weight: 700; }
.view-all { font-size: 13px; font-weight: 600; color: var(--primary); }
.view-all:hover { text-decoration: underline; }

/* QUICK ACTIONS */
.quick-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 14px; }
.quick-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 16px; cursor: pointer; transition: var(--transition);
}
.quick-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--primary-light); }
.quick-card-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
  margin-bottom: 10px;
}
.qc-purple { background: rgba(176,0,255,0.1); color: #b000ff; border: 1px solid rgba(176,0,255,0.15); }
.qc-green  { background: rgba(0,255,136,0.1); color: #00ff88; border: 1px solid rgba(0,255,136,0.15); }
.qc-red    { background: rgba(255,11,91,0.1); color: #ff0b5b; border: 1px solid rgba(255,11,91,0.15); }
.qc-yellow { background: rgba(255,170,0,0.1); color: #ffaa00; border: 1px solid rgba(255,170,0,0.15); }
.quick-card h4 { font-size: 12px; font-weight: 700; margin-bottom: 2px; }
.quick-card p  { font-size: 10px; color: var(--text-muted); }

/* CARD */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.card-body { padding: 16px; }

/* RIGHT PANEL */
.dash-right { display: flex; flex-direction: column; gap: 16px; }
.right-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.right-card-title { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.right-card-sub { font-size: 12px; color: var(--text-muted); }
.badges-earned { font-size: 13px; font-weight: 700; color: var(--text-muted); float:right; }

.explore-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 0;
  border-bottom: 1px solid var(--border); cursor: pointer; transition: var(--transition);
}
.explore-item:last-child { border-bottom: none; padding-bottom: 0; }
.explore-item:hover { color: var(--primary); }
.explore-icon { font-size: 18px; }
.explore-label { font-size: 13px; font-weight: 600; }

/* EMPTY STATE */
.empty-state { text-align: center; padding: 48px 20px; }
.empty-state-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }
.empty-state h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.empty-state p  { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }

/* =========================================================
   AI TUTOR PAGE
   ========================================================= */
.ai-tutor-layout { display: grid; grid-template-columns: 240px 1fr; gap: 0; height: calc(100vh - var(--topbar-h) - 56px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }

.ai-tutor-sidebar { background: var(--surface-2); border-right: 1px solid var(--border); display: flex; flex-direction: column; }
.ai-tutor-sidebar-header { padding: 16px; border-bottom: 1px solid var(--border); }
.ai-tutor-sidebar-header h3 { font-size: 14px; font-weight: 700; }
.ai-tutor-sidebar-header p { font-size: 12px; color: var(--text-muted); }
.model-list { padding: 10px; overflow-y: auto; flex: 1; }
.model-card {
  padding: 12px; border-radius: 10px; cursor: pointer; margin-bottom: 6px;
  border: 1.5px solid transparent; transition: var(--transition);
}
.model-card:hover { background: var(--surface); box-shadow: 0 0 10px rgba(0,229,255,0.1); }
.model-card.active { border-color: var(--primary); background: rgba(0,229,255,0.1); box-shadow: 0 0 15px rgba(0,229,255,0.2); }
.model-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.model-avatar { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.m-gpt { background: rgba(0,255,136,0.15); color: #00ff88; border: 1px solid currentColor; }
.m-gemini { background: rgba(0,229,255,0.15); color: #00e5ff; border: 1px solid currentColor; }
.m-claude { background: rgba(255,170,0,0.15); color: #ffaa00; border: 1px solid currentColor; }
.m-llama { background: rgba(255,11,91,0.15); color: #ff0b5b; border: 1px solid currentColor; }
.model-name { font-size: 13px; font-weight: 700; }
.model-desc { font-size: 11px; color: var(--text-muted); }

.chat-area { display: flex; flex-direction: column; flex: 1; overflow: hidden; }
.chat-header { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.chat-header-avatar { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.chat-header h4 { font-size: 15px; font-weight: 700; }
.chat-header p { font-size: 12px; color: var(--accent-2); }
.chat-toolbar { display: flex; gap: 8px; margin-left: auto; }

.chat-messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; gap: 10px; max-width: 80%; animation: msgIn 0.3s ease; }
@keyframes msgIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
.msg.user { flex-direction: row-reverse; align-self: flex-end; }
.msg-avatar { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.msg-ai-avatar { background: var(--gradient); color: #fff; }
.msg-user-avatar { background: #ede9ff; }
.msg-bubble { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; border-top-left-radius: 4px; padding: 12px 16px; font-size: 14px; line-height: 1.6; }
.markdown-body h1, .markdown-body h2, .markdown-body h3 { margin: 12px 0 8px; font-size: 16px; font-weight: 800; color: var(--primary); }
.markdown-body p { margin-bottom: 10px; }
.markdown-body ul, .markdown-body ol { margin: 8px 0 12px 20px; }
.markdown-body li { margin-bottom: 4px; }
.markdown-body p:last-child { margin-bottom: 0; }
.msg.user .msg-bubble { background: var(--gradient); color: #fff; border: none; border-top-left-radius: 14px; border-top-right-radius: 4px; }
.msg.user .markdown-body h1, .msg.user .markdown-body h2, .msg.user .markdown-body h3 { color: #fff; }
.msg.user .markdown-body { color: #fff; }
.msg-time { font-size: 10px; color: var(--text-light); margin-top: 5px; }
.msg.user .msg-time { text-align: right; }
.typing-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); margin: 0 2px; animation: typingBounce 1.2s infinite; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce { 0%,60%,100%{transform:translateY(0)} 30%{transform:translateY(-6px)} }

.chat-input-area { border-top: 1px solid var(--border); padding: 14px 16px; }
.chat-input-row { display: flex; gap: 10px; align-items: flex-end; }
.chat-input-box {
  flex: 1; border: 1.5px solid var(--border); border-radius: 12px; padding: 12px 16px;
  font-size: 14px; font-family: inherit; resize: none; max-height: 120px;
  background: var(--surface-2); transition: var(--transition); color: var(--text);
}
.chat-input-box:focus { outline: none; border-color: var(--primary); background: var(--bg-2); }
.chat-send-btn {
  width: 44px; height: 44px; border-radius: 12px; background: var(--gradient); border: none;
  color: #fff; font-size: 18px; cursor: pointer; transition: var(--transition);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.chat-send-btn:hover { transform: scale(1.05); box-shadow: 0 4px 12px rgba(91,62,245,0.4); }
.chat-actions-row { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.chat-action-chip {
  padding: 6px 12px; border-radius: 99px; font-size: 12px; font-weight: 600;
  border: 1.5px solid var(--border); background: var(--surface); cursor: pointer;
  transition: var(--transition); color: var(--text-muted);
}
.chat-action-chip:hover { border-color: var(--primary); color: var(--primary); background: rgba(0,229,255,0.1); box-shadow: 0 0 10px rgba(0,229,255,0.2); }

/* =========================================================
   NEW EXAM (Document Upload)
   ========================================================= */
.upload-zone {
  border: 2.5px dashed var(--border); border-radius: var(--radius);
  padding: 60px 40px; text-align: center; cursor: pointer; transition: var(--transition);
  background: var(--surface-2);
}
.upload-zone:hover, .upload-zone.drag-over { border-color: var(--primary); background: rgba(0,229,255,0.05); box-shadow: inset 0 0 20px rgba(0,229,255,0.1); }
.upload-icon { font-size: 52px; margin-bottom: 14px; }
.upload-zone h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.upload-zone p { font-size: 14px; color: var(--text-muted); margin-bottom: 20px; }
.upload-types { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.upload-type-badge { padding: 5px 14px; border-radius: 99px; font-size: 12px; font-weight: 700; border: 1px solid currentColor; background: rgba(255,255,255,0.05); }
.ut-pdf { color: #ff3366; }
.ut-ppt { color: #ffaa00; }
.ut-doc { color: #00e5ff; }
.ut-txt { color: #00ff88; }

/* =========================================================
   WIZARD STEPPER (Multi-step Flow)
   ========================================================= */
.wizard-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
  gap: 12px;
}
.wiz-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 2;
}
.wiz-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  color: var(--text-muted);
  transition: var(--transition);
}
.wiz-label {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}
.wiz-line {
  height: 2px;
  width: 60px;
  background: var(--border);
  margin-bottom: 18px; /* Offset for label */
  transition: var(--transition);
}

.wiz-step.active .wiz-num {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.3);
}
.wiz-step.active .wiz-label {
  color: var(--primary);
}
.wiz-line.active {
  background: var(--primary);
}

.wizard-card {
  padding: 0 !important;
  border: none !important;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.wiz-content {
  padding: 32px;
}
.wiz-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.wiz-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.wiz-header h3 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 2px;
}
.wiz-header p {
  font-size: 13px;
  color: var(--text-muted);
}

.exam-config { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-top: 20px; }
.exam-config h3 { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.config-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.config-item label { font-size: 12px; font-weight: 700; letter-spacing: 0.5px; color: var(--text-muted); display: block; margin-bottom: 6px; }
.config-item select, .config-item input {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: 8px;
  font-size: 14px; font-family: inherit; background: var(--surface-2); color: var(--text);
}
.config-item select:focus, .config-item input:focus { outline: none; border-color: var(--primary); }

/* EXAM QUESTION UI */
.exam-interface { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.exam-topbar { background: var(--gradient); color: #fff; padding: 16px 24px; display: flex; align-items: center; justify-content: space-between; }
.exam-topbar h3 { font-size: 15px; font-weight: 700; }
.exam-timer { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.exam-progress-bar { height: 4px; background: rgba(255,255,255,0.3); }
.exam-progress-fill { height:100%; background:#fff; transition: width 0.5s ease; }

.exam-body { padding: 20px; }
.question-num { font-size: 11px; font-weight: 700; color: var(--primary); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 8px; }
.question-text { font-size: 16px; font-weight: 700; line-height: 1.5; margin-bottom: 20px; color: var(--text); }
.options-list { display: flex; flex-direction: column; gap: 12px; }
.option-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; border: 1.5px solid var(--border); border-radius: 12px;
  cursor: pointer; transition: var(--transition); font-size: 14px; font-weight: 500;
}
.option-item:hover { border-color: var(--primary); background: rgba(0, 229, 255, 0.1); }
.option-item.selected { border-color: var(--primary); background: rgba(0, 229, 255, 0.2); color: var(--primary); font-weight: 700; }
.option-item.correct { border-color: var(--accent-2); background: rgba(0, 255, 136, 0.15); color: var(--accent-2); }
.option-item.wrong { border-color: var(--danger); background: rgba(255, 51, 102, 0.15); color: var(--danger); }
.option-letter {
  width: 28px; height: 28px; border-radius: 6px; border: 1.5px solid currentColor;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; flex-shrink: 0;
}
.exam-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }

/* =========================================================
   GPA CALCULATOR
   ========================================================= */
.gpa-grid { display: grid; grid-template-columns: 1fr 300px; gap: 20px; }
.gpa-table { width: 100%; border-collapse: collapse; }
.gpa-table th { font-size: 12px; font-weight: 700; color: var(--text-muted); letter-spacing: 0.5px; text-transform: uppercase; border-bottom: 1.5px solid var(--border); padding: 10px 14px; text-align: left; }
.gpa-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 14px; }
.gpa-table input, .gpa-table select { width: 100%; border: 1.5px solid var(--border); border-radius: 8px; padding: 8px 10px; font-family:inherit; font-size: 13px; background: var(--surface-2); }
.gpa-table input:focus, .gpa-table select:focus { outline:none; border-color: var(--primary); }
.gpa-result-card { background: var(--gradient); border-radius: var(--radius); padding: 28px; color: #fff; text-align: center; }
.gpa-result-num { font-size: 64px; font-weight: 900; letter-spacing: -2px; }
.gpa-result-label { font-size: 14px; opacity: 0.8; margin-top: 4px; }
.gpa-result-grade { font-size: 28px; font-weight: 800; margin-top: 10px; }
.gpa-breakdown { background: rgba(255,255,255,0.15); border-radius: 10px; padding: 14px; margin-top: 16px; }
.gpa-break-item { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; }

/* =========================================================
   STUDY PLANNER
   ========================================================= */
.planner-grid { display: grid; grid-template-columns: 1fr 300px; gap: 20px; }
.calendar-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.calendar-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.calendar-head h3 { font-size: 16px; font-weight: 700; }
.cal-nav { background: none; border: 1px solid var(--border); border-radius: 8px; padding: 6px 12px; cursor: pointer; font-size: 16px; }
.calendar-grid-header { display: grid; grid-template-columns: repeat(7,1fr); text-align: center; padding: 10px 16px 4px; }
.calendar-grid-header span { font-size: 11px; font-weight: 700; color: var(--text-muted); }
.calendar-days { display: grid; grid-template-columns: repeat(7,1fr); gap: 4px; padding: 8px 16px 16px; }
.cal-day {
  aspect-ratio: 1; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 500; cursor: pointer; transition: var(--transition); position: relative;
}
.cal-day:hover { background: var(--bg); }
.cal-day.today { background: var(--gradient); color: #fff; font-weight: 800; }
.cal-day.has-event::after { content:''; position:absolute; bottom:3px; left:50%; transform:translateX(-50%); width:5px; height:5px; border-radius:50%; background: var(--accent); }
.cal-day.today::after { background:#fff; }
.cal-day.other-month { opacity: 0.35; }

.planner-sidebar { display: flex; flex-direction: column; gap: 16px; }
.add-event-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.add-event-card h4 { font-size: 14px; font-weight: 700; margin-bottom: 14px; }
.events-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.events-list h4 { font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.event-item { display: flex; gap: 10px; padding: 10px; border-radius: 8px; margin-bottom: 8px; }
.event-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.event-title { font-size: 13px; font-weight: 600; }
.event-time { font-size: 11px; color: var(--text-muted); }

/* =========================================================
   LEADERBOARD
   ========================================================= */
.leaderboard-podium { display: flex; align-items: flex-end; justify-content: center; gap: 12px; padding: 20px; margin-bottom: 10px; }
.podium-item { text-align: center; }
.podium-avatar { width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; color: #fff; margin: 0 auto 8px; }
.p-1 { background: linear-gradient(135deg,#f59e0b,#fbbf24); }
.p-2 { background: linear-gradient(135deg,#9ca3af,#d1d5db); }
.p-3 { background: linear-gradient(135deg,#f97316,#fb923c); }
.podium-name { font-size: 12px; font-weight: 700; }
.podium-score { font-size: 11px; color: var(--text-muted); }
.podium-rank { font-size: 22px; }
.podium-base { background: var(--bg); border-radius: 10px; padding: 10px 20px; margin-top: 8px; font-size: 13px; font-weight: 700; }
.pb-1 { height: 60px; } .pb-2 { height: 44px; } .pb-3 { height: 32px; }

.leaderboard-list { display: flex; flex-direction: column; gap: 6px; }
.lb-item { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; transition: var(--transition); }
.lb-item:hover { border-color: var(--primary-light); transform: translateX(3px); }
.lb-item.me { border-color: var(--primary); background: #ede9ff; }
.lb-rank { font-size: 16px; font-weight: 800; width: 28px; text-align: center; color: var(--text-muted); }
.lb-avatar { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; color: #fff; }
.lb-info { flex: 1; }
.lb-name { font-size: 14px; font-weight: 700; }
.lb-school { font-size: 12px; color: var(--text-muted); }
.lb-score { font-size: 15px; font-weight: 800; color: var(--primary); }
.lb-badge { font-size: 18px; }

/* =========================================================
   SUBSCRIPTION / PAYSTACK
   ========================================================= */
.pricing-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin-bottom: 28px; }
.pricing-card {
  background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 28px 24px; position: relative; transition: var(--transition);
}
.pricing-card:hover { border-color: var(--primary-light); transform: translateY(-4px); box-shadow: var(--shadow); }
.pricing-card.popular { border-color: var(--primary); }
.popular-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--gradient); color: #fff; font-size: 11px; font-weight: 800; padding: 4px 16px; border-radius: 99px; white-space: nowrap;
}
.pricing-plan { font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; }
.pricing-price { font-size: 34px; font-weight: 900; letter-spacing: -1px; }
.pricing-price span { font-size: 16px; font-weight: 500; color: var(--text-muted); }
.pricing-desc { font-size: 13px; color: var(--text-muted); margin: 8px 0 18px; }
.pricing-features { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.pricing-features li { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.pricing-features li::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 10px 10px;
  /* default: green filled circle with white check */
  background-color: var(--accent-2);
  border: 1px solid transparent;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%23ffffff' d='M20.285 6.708l-11.025 11.026-5.544-5.545 1.414-1.414 4.13 4.131 9.611-9.611z'/></svg>");
}
.pricing-features li.off { color: var(--text-light); }
.pricing-features li.off::before {
  /* empty circle with subtle border + red cross */
  background-color: transparent;
  border: 1px solid var(--border);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path stroke='%23ef4444' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none' d='M18 6L6 18M6 6l12 12'/></svg>");
  background-size: 10px 10px;
}

/* MY EXAMS */
.exam-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; transition: var(--transition); }
.exam-card:hover { border-color: var(--primary-light); transform: translateY(-2px); box-shadow: var(--shadow-card); }
.exam-card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 10px; }
.exam-card-title { font-size: 15px; font-weight: 700; }
.exam-card-date { font-size: 12px; color: var(--text-muted); }
.exam-card-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.tag { padding: 4px 10px; border-radius: 99px; font-size: 11px; font-weight: 700; border: 1px solid currentColor; background: rgba(255,255,255,0.05); }
.tag-blue { color: #00e5ff; }
.tag-purple { color: #b000ff; }
.tag-green { color: #00ff88; }
.tag-orange { color: #ffaa00; }
.exam-card-score-bar { height: 6px; background: var(--bg); border-radius: 99px; overflow:hidden; margin-bottom: 6px; }
.exam-card-score-fill { height:100%; border-radius:99px; transition: width 1s ease; }
.score-good { background: var(--accent-2); } .score-mid { background: var(--accent-3); } .score-low { background: var(--danger); }
.exam-card-footer { display: flex; align-items: center; justify-content: space-between; }
.exam-score-txt { font-size: 16px; font-weight: 800; }

/* STUDY TOOLS */
.study-tabs { display: flex; gap: 6px; border-bottom: 1.5px solid var(--border); padding-bottom: 12px; margin-bottom: 20px; }
.study-tab { padding: 8px 18px; border-radius: 99px; font-size: 13px; font-weight: 600; cursor: pointer; border: 1.5px solid var(--border); background: var(--surface); color: var(--text-muted); transition: var(--transition); }
.study-tab.active { border-color: var(--primary); background: var(--gradient); color: #fff; }

.flashcard-wrap { perspective: 1200px; }
.flashcard {
  width: 100%; max-width: 560px; margin: 0 auto; height: 300px;
  position: relative; transform-style: preserve-3d; transition: transform 0.6s ease; cursor: pointer;
}
.flashcard.flipped { transform: rotateY(180deg); }
.flashcard-face {
  position: absolute; inset: 0; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 32px;
  backface-visibility: hidden;
}
.flashcard-front { background: var(--gradient); color: #fff; }
.flashcard-back { background: #d1fae5; color: #065f46; transform: rotateY(180deg); border: 2px solid var(--accent-2); }
.flashcard-face h3 { font-size: 20px; font-weight: 700; line-height: 1.5; }
.flashcard-hint { font-size: 12px; margin-top: 12px; opacity: 0.7; }
.flashcard-nav { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 20px; }
.card-counter { font-size: 14px; font-weight: 700; color: var(--text-muted); }

/* =========================================================
   MODAL
   ========================================================= */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
  z-index: 999; display: flex; align-items: center; justify-content: center;
}
.modal-box { background: var(--surface); border-radius: 20px; padding: 32px; width: 560px; max-width: 95vw; max-height: 90vh; overflow-y: auto; animation: fadeUp 0.3s ease; }

/* =========================================================
   TOAST
   ========================================================= */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: #1a1a2e; color: #fff; padding: 12px 24px; border-radius: 99px;
  font-size: 14px; font-weight: 600; z-index: 9999; animation: fadeUp 0.3s ease; white-space: nowrap;
}

/* =========================================================
   MISC & UTILITIES
   ========================================================= */
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 13px; }
.fw-7 { font-weight: 700; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }

/* Progress bar generic */
.progress-bar { height: 8px; background: var(--bg); border-radius: 99px; overflow:hidden; }
.progress-fill { height:100%; background: var(--gradient); border-radius:99px; transition: width 1s ease; }

/* =========================================================
   LANDING PAGE STYLES
   ========================================================= */
.landing-page {
  background: var(--bg);
  min-height: 100vh;
  color: var(--text);
  scroll-behavior: smooth;
}

/* Nav */
.topbar {
  height: var(--topbar-h);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}
.verified-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
  padding: 6px 12px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.topbar-notify {
  background: var(--surface-2);
  color: var(--text);
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: var(--transition);
}
.topbar-notify:hover { background: var(--border); }

.lp-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 8%;
  background: var(--surface);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border);
}
.lp-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: var(--primary); }
.lp-logo img { width: 32px; height: 32px; border-radius: 8px; }
.lp-nav-btns { display: flex; gap: 12px; }

/* Hero */
.lp-hero {
  padding: 80px 8% 120px 8%;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
  overflow: hidden;
}
.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(0, 229, 255, 0.1);
  color: var(--primary);
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 20px;
  border: 1px solid var(--primary);
}
.hero-title {
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -2px;
  margin-bottom: 24px;
}

/* Scroll Reveal */
.reveal-item {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal-active {
  opacity: 1;
  transform: translateY(0);
}
.text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 540px;
  margin-bottom: 36px;
}
.hero-btns { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.btn-primary-lg {
  background: var(--gradient);
  color: #fff;
  border: none;
  padding: 18px 36px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(91,62,245,0.3);
  transition: var(--transition);
}
.btn-primary-lg:hover { transform: translateY(-3px); box-shadow: 0 15px 40px rgba(91,62,245,0.4); }

.hero-users { display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 600; color: var(--text-muted); }
.user-avatars { display: flex; }
.user-avatars span {
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid var(--bg);
  margin-left: -10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px; font-weight: 800;
}
.user-avatars span:first-child { margin-left: 0; }

/* Hero Visual */
.hero-visual { position: relative; height: 400px; }
.glass-card {
  position: absolute;
  background: rgba(var(--surface), 0.7);
  backdrop-filter: blur(14px);
  padding: 16px 20px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}
.g-1 { top: 10%; left: 0; animation-delay: 0s; }
.g-2 { top: 50%; right: 0; animation-delay: 1s; }
.g-3 { bottom: 0; left: 20%; animation-delay: 2s; }
.g-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.g-text strong { display: block; font-size: 14px; color: var(--text); }
.g-text span { font-size: 12px; color: var(--text-muted); }

/* Features */
.lp-features { padding: 100px 8%; text-align: center; }
.section-tag { font-size: 14px; font-weight: 800; color: var(--primary); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 40px; }
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.quick-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}
.quick-card:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.quick-card-icon {
  width: 48px; height: 48px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px; font-size: 20px;
}
.quick-card h4 { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.quick-card p { font-size: 11px; color: var(--text-muted); font-weight: 500; }

.qc-purple { background: rgba(123, 47, 255, 0.1); color: #7b2fff; }
.qc-green { background: rgba(37, 99, 235, 0.08); color: var(--accent-2); }
.qc-red { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.qc-yellow { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }

.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.section-title { font-size: 16px; font-weight: 800; color: var(--text); letter-spacing: -0.3px; }
.view-all { font-size: 12px; font-weight: 700; color: var(--primary); cursor: pointer; }
.bento-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: auto auto;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}
.bento-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px;
  text-align: left;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  min-height: 200px;
}
.bento-item:hover { border-color: var(--primary); transform: translateY(-5px); box-shadow: var(--shadow); }
.b-large { grid-column: 1; grid-row: 1; background: linear-gradient(135deg, rgba(0,229,255,0.05), rgba(0,119,255,0.08)); border-color: rgba(0,229,255,0.2); }
.b-medium { grid-column: 2; grid-row: 1 / 3; background: linear-gradient(135deg, rgba(91,62,245,0.05), rgba(159,122,234,0.08)); border-color: rgba(91,62,245,0.2); }
.b-small { grid-column: 1; }
.bento-icon { font-size: 32px; margin-bottom: 20px; }
.bento-item h3 { font-size: 20px; font-weight: 800; margin-bottom: 12px; }
.bento-item p { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

/* Footer */
.lp-footer {
  padding: 60px 8%;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
}
.banner {
  background: var(--gradient-banner);
  border-radius: 20px;
  padding: 40px;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.banner-left h2 { font-size: 28px; font-weight: 800; margin-bottom: 12px; letter-spacing: -0.5px; }
.banner-left p { font-size: 15px; opacity: 0.85; margin-bottom: 24px; max-width: 400px; line-height: 1.6; }
.welcome-sub { 
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px; 
  color: rgba(255,255,255,0.6); margin-bottom: 8px; 
}
.footer-links { display: flex; gap: 24px; }
.footer-links a:hover { color: var(--primary); }

.btn-text { background: none; border: none; font-weight: 700; font-size: 14px; color: var(--text-muted); cursor: pointer; padding: 10px; }
.btn-primary-sm { background: var(--gradient); border: none; color: #fff; padding: 10px 20px; border-radius: 10px; font-weight: 700; cursor: pointer; }

/* =========================================================
   PAST QUESTIONS & MY COURSE
   ========================================================= */
.study-tabs-wrap { display: flex; gap: 8px; border-bottom: 1px solid var(--border); padding-bottom: 12px; margin-bottom: 24px; overflow-x: auto; scrollbar-width: none; }
.study-tab { padding: 8px 16px; border-radius: 99px; font-size: 13px; font-weight: 700; background: var(--surface); border: 1.5px solid var(--border); color: var(--text-muted); cursor: pointer; transition: var(--transition); white-space: nowrap; }
.study-tab:hover { background: var(--surface-2); color: var(--text); }
.study-tab.active { background: var(--gradient); border-color: transparent; color: #fff; }

.pq-upload-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 32px; max-width: 680px; margin: 0 auto; }
.pq-upload-card h3 { font-size: 20px; font-weight: 800; margin-bottom: 24px; }
.pq-form-row { display: flex; gap: 16px; margin-bottom: 16px; }
.pq-form-group { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.pq-label { font-size: 12px; font-weight: 700; color: var(--text); letter-spacing: 0.5px; text-transform: uppercase; }
.pq-label span { color: var(--danger); }
.pq-input { width: 100%; padding: 12px 16px; border: 1.5px solid var(--border); border-radius: 10px; font-size: 14px; background: var(--surface-2); color: var(--text); font-family: inherit; transition: var(--transition); }
.pq-input:focus { outline: none; border-color: var(--primary); }

.pq-dropzone { border: 2px dashed var(--border); border-radius: 16px; padding: 40px 20px; text-align: center; cursor: pointer; transition: var(--transition); background: rgba(91,62,245,0.02); margin-bottom: 24px; }
.pq-dropzone:hover { border-color: var(--primary); background: rgba(91,62,245,0.05); }
.pq-drop-icon { font-size: 40px; color: var(--primary); margin-bottom: 12px; }
.pq-drop-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.pq-drop-sub { font-size: 13px; color: var(--text-muted); }

.pq-loader { text-align: center; padding: 48px 32px; max-width: 560px; margin: 20px auto; background: var(--surface); border-radius: 24px; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.pq-spinner-wrap { position: relative; width: 100px; height: 100px; margin: 0 auto 32px; display: flex; align-items: center; justify-content: center; }
.pq-spinner-center { font-size: 32px; z-index: 2; animation: float-sm 3s ease-in-out infinite; }
.pq-arc { position: absolute; border-radius: 50%; border: 3px solid transparent; }
.pq-arc-1 { width: 100%; height: 100%; border-top-color: var(--primary); border-left-color: var(--primary-light); animation: spin 2s linear infinite; opacity: 0.6; }
.pq-arc-2 { width: 80%; height: 80%; border-bottom-color: var(--accent-2); border-right-color: var(--accent-2-light); animation: spinReverse 2.5s linear infinite; opacity: 0.8; }

.pq-loader h3 { font-size: 22px; font-weight: 900; color: var(--text); margin-bottom: 12px; letter-spacing: -0.5px; }
.pq-loader p { font-size: 14px; color: var(--text-muted); line-height: 1.6; max-width: 400px; margin: 0 auto 24px; }

.pq-file-badge { background: rgba(91,62,245,0.08); color: var(--primary); padding: 8px 18px; border-radius: 12px; font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; gap: 8px; margin-bottom: 32px; text-transform: uppercase; border: 1px solid rgba(91,62,245,0.1); }

.pq-steps-row { display: flex; justify-content: space-between; margin-bottom: 10px; padding: 0 4px; }
.pq-step-label { font-size: 11px; font-weight: 800; color: var(--text-muted); letter-spacing: 1px; transition: var(--transition); }
.pq-step-label.active { color: var(--primary); }

.pq-progress-bar { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-bottom: 20px; border: 1px solid var(--border); }
.pq-progress-inner { height: 100%; background: var(--gradient); border-radius: 99px; transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1); }

.pq-loading-subtext { font-size: 13px; font-weight: 600; color: var(--text-muted); display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 32px; }
.pq-loading-subtext span { color: var(--accent-2); }

.pq-tip-box { background: var(--surface-2); border-radius: 16px; padding: 20px; display: flex; gap: 16px; text-align: left; border: 1px solid var(--border); }
.pq-tip-icon { font-size: 24px; }
.pq-tip-content h4 { font-size: 14px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.pq-tip-content p { font-size: 12px; color: var(--text-muted); line-height: 1.5; margin: 0; }
/* AI TUTOR MODERN LAYOUT */
.ai-tutor-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  height: calc(100vh - 120px);
  gap: 20px;
  max-width: 100%;
  margin: 0 20px;
}

.ai-tutor-sidebar {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.ai-tutor-sidebar-header {
  padding: 24px;
  border-bottom: 1.5px solid var(--border);
  background: linear-gradient(to bottom, var(--surface-2), var(--surface));
}

.model-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.model-card {
  padding: 12px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.model-card:hover {
  border-color: var(--primary);
  background: var(--surface-2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.model-card.active {
  border-color: var(--primary);
  background: rgba(var(--primary-rgb), 0.04);
  box-shadow: 0 4px 20px rgba(var(--primary-rgb), 0.1);
}

.model-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.model-avatar {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background: var(--surface-2);
}
.model-avatar.m-gemini { background: rgba(59, 130, 246, 0.1); }
.model-avatar.m-claude { background: rgba(245, 158, 11, 0.1); }
.model-avatar.m-llama { background: rgba(139, 92, 246, 0.1); }

.model-name {
  font-weight: 800;
  font-size: 14px;
  color: var(--text);
}

.model-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  font-weight: 500;
}

.sidebar-footer-tip {
  padding: 16px 24px;
  background: var(--surface-2);
  border-top: 1.5px solid var(--border);
}

/* CHAT AREA */
.chat-area {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.chat-header {
  padding: 16px 24px;
  border-bottom: 1.5px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface);
  z-index: 10;
}

.chat-header-main {
  display: flex;
  align-items: center;
  gap: 16px;
}

.chat-header-avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 800;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(37, 99, 235, 0.08);
  padding: 2px 8px;
  border-radius: 99px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-dot.online {
  background: var(--accent-2);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}

.online-dot-pulse {
  margin-left: auto;
  width: 8px;
  height: 8px;
  background: var(--accent-2);
  border-radius: 50%;
  box-shadow: 0 0 0 rgba(37, 99, 235, 0.28);
  animation: pulse-ring 1.5s infinite;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.chat-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toolbar-btn {
  background: transparent;
  border: 1px solid var(--border);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.2s;
  color: var(--text);
}

.toolbar-btn:hover {
  background: var(--surface-2);
  border-color: var(--primary);
  color: var(--primary);
}

.toolbar-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 4px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  background-image: radial-gradient(var(--border) 1px, transparent 1px);
  background-size: 20px 20px;
  background-position: center;
}

/* MESSAGE BUBBLES */
.msg {
  display: flex;
  gap: 16px;
  max-width: 85%;
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.msg.user {
  flex-direction: row-reverse;
  align-self: flex-end;
}

.msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
  box-shadow: var(--shadow-sm);
}

.msg-ai-avatar {
  background: var(--primary);
  color: #fff;
}

.msg-user-avatar {
  background: var(--surface-2);
  border: 1.5px solid var(--border);
}

.msg-bubble {
  padding: 16px 20px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.6;
  position: relative;
  box-shadow: var(--shadow-sm);
  word-break: break-word;
  overflow-wrap: break-word;
}

.msg:not(.user) .msg-bubble {
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text);
  border-top-left-radius: 4px;
}

.msg.user .msg-bubble {
  background: var(--primary);
  color: #fff;
  border-top-right-radius: 4px;
}

.msg-time {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 700;
}

.msg.user .msg-time { text-align: right; }

/* INPUT AREA */
.chat-input-area {
  padding: 12px 24px;
  border-top: 1.5px solid var(--border);
  background: var(--surface);
}

.quick-prompts {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.quick-prompts::-webkit-scrollbar { display: none; }

.prompt-chip {
  padding: 8px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
  cursor: pointer;
  transition: 0.2s;
}

.prompt-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.05);
}

.input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 6px 10px;
  transition: 0.2s;
}

.input-wrapper:focus-within {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1);
}

.chat-input-box {
  flex: 1;
  background: transparent;
  border: none;
  padding: 8px 4px;
  font-size: 14px;
  color: var(--text);
  resize: none;
  font-family: inherit;
  outline: none;
  max-height: 150px;
}

.send-btn {
  background: var(--primary);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  transition: 0.2s;
}

.send-btn:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}

.chat-footer-note {
  font-size: 10px;
  color: var(--text-light);
  text-align: center;
  margin-top: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* TYPING INDICATOR */
.typing-dot {
  width: 6px;
  height: 6px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
}

@keyframes float-sm { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes spinReverse { 0% { transform: rotate(360deg); } 100% { transform: rotate(0deg); } }

.pq-detail-card { background: var(--surface); border-radius: 16px; border: 1px solid var(--border); overflow: hidden; margin-bottom: 24px; }
.pq-detail-header { background: var(--gradient); color: #fff; padding: 24px; display: flex; align-items: center; gap: 20px; }
.pq-file-icon { width: 64px; height: 64px; background: rgba(255,255,255,0.2); border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 32px; flex-shrink: 0; }
.pq-detail-title { font-size: 24px; font-weight: 800; margin-bottom: 6px; letter-spacing: -0.5px; }
.pq-detail-meta { font-size: 13px; font-weight: 500; opacity: 0.9; display: flex; gap: 16px; flex-wrap: wrap; }
.pq-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); padding: 20px 24px; gap: 16px; background: rgba(91,62,245,0.03); }
.pq-stat-box { text-align: center; border-right: 1px solid var(--border); }
.pq-stat-box:last-child { border-right: none; }
.pq-stat-val { font-size: 28px; font-weight: 900; color: var(--text); }
.pq-stat-label { font-size: 11px; font-weight: 700; color: var(--text-muted); letter-spacing: 1px; text-transform: uppercase; margin-top: 4px; }

.pq-options-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px; }
.pq-options-card h4 { font-size: 14px; font-weight: 800; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.pq-timer-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 24px; }
.pq-timer-btn { background: var(--surface-2); border: 1.5px solid var(--border); border-radius: 12px; padding: 16px; display: flex; align-items: center; gap: 12px; cursor: pointer; transition: var(--transition); text-align: left; }
.pq-timer-btn:hover { border-color: var(--primary-light); }
.pq-timer-btn.active { border-color: var(--primary); background: rgba(91,62,245,0.05); }
.pq-timer-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--gradient); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.pq-timer-title { font-size: 14px; font-weight: 800; color: var(--text); }
.pq-timer-sub { font-size: 11px; color: var(--text-muted); font-weight: 500; }

.pq-quiz-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; max-width: 800px; margin: 0 auto; overflow: hidden; }
.pq-quiz-top { padding: 16px 24px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; background: var(--surface-2); }
.pq-quiz-top-left { font-weight: 800; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.pq-quiz-top-right { display: flex; align-items: center; gap: 16px; }
.pq-timer-badge { background: rgba(91,62,245,0.1); color: var(--primary); padding: 6px 12px; border-radius: 99px; font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 6px; }
.pq-progress-text { font-size: 13px; font-weight: 700; color: var(--text-muted); }
.pq-quiz-header { background: var(--gradient); color: #fff; padding: 24px; display: flex; gap: 16px; align-items: flex-start; }
.pq-qnum { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 800; flex-shrink: 0; }
.pq-qtype { background: rgba(255,255,255,0.15); padding: 4px 12px; border-radius: 99px; font-size: 11px; font-weight: 800; letter-spacing: 1px; display: inline-block; margin-bottom: 12px; }
.pq-qtext { font-size: 18px; font-weight: 700; line-height: 1.5; margin: 0; }
.pq-quiz-body { padding: 32px 24px; }
.pq-opt { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border: 1.5px solid var(--border); border-radius: 12px; margin-bottom: 12px; cursor: pointer; transition: var(--transition); }
.pq-opt:hover { border-color: var(--primary-light); background: rgba(91,62,245,0.02); }
.pq-opt.selected { border-color: var(--primary); background: rgba(91,62,245,0.05); font-weight: 700; }
.pq-opt.correct { border-color: var(--accent-2); background: rgba(16,185,129,0.05); }
.pq-opt.wrong { border-color: var(--danger); background: rgba(239,68,68,0.05); }
.pq-opt-letter { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; color: var(--text-muted); }
.pq-opt.selected .pq-opt-letter { background: var(--primary); color: #fff; }
.pq-opt.correct .pq-opt-letter { background: var(--accent-2); color: #fff; }
.pq-opt.wrong .pq-opt-letter { background: var(--danger); color: #fff; }
.pq-opt-text { font-size: 15px; color: var(--text); flex: 1; }

.pq-explanation { background: #e8faeb; border-left: 4px solid var(--accent-2); border-radius: 0 12px 12px 0; padding: 20px; margin-top: 24px; display: none; }
.pq-explanation.wrong { background: #fee2e2; border-left-color: var(--danger); }
[data-theme="dark"] .pq-explanation { background: rgba(16,185,129,0.1); }
[data-theme="dark"] .pq-explanation.wrong { background: rgba(239,68,68,0.1); }
.pq-exp-title { font-size: 14px; font-weight: 800; color: var(--accent-2); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.pq-explanation.wrong .pq-exp-title { color: var(--danger); }
.pq-exp-text { font-size: 14px; line-height: 1.6; color: var(--text); }

.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.course-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px; transition: var(--transition); cursor: pointer; display: flex; flex-direction: column; }
.course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--primary-light); }
.course-card-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.course-icon { width: 44px; height: 44px; border-radius: 12px; background: rgba(var(--primary-rgb), 0.1); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.course-week { font-size: 11px; font-weight: 800; color: var(--primary); letter-spacing: 1px; text-transform: uppercase; background: rgba(91,62,245,0.1); padding: 4px 10px; border-radius: 99px; margin-left: auto; }
.course-title { font-size: 15px; font-weight: 800; color: var(--text); margin-bottom: 6px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.course-date { font-size: 12px; color: var(--text-muted); font-weight: 500; margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--border); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
  .lp-hero { grid-template-columns: 1fr; text-align: center; padding-top: 40px; }
  .hero-content { display: flex; flex-direction: column; align-items: center; }
  .hero-visual { display: none; }
  .bento-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
  .b-large, .b-medium, .b-small { grid-column: 1; grid-row: auto; }
  /* Tablet: keep AI tutor header/input compact and fixed */
  .ai-tutor-layout { grid-template-columns: 1fr; height: calc(100vh - var(--topbar-h) - 16px); }
  .ai-tutor-sidebar { display: none; }
  .chat-area { height: 100%; display: flex; flex-direction: column; }
  .chat-header { position: sticky; top: 0; z-index: 18; padding: 11px 14px; background: var(--surface); border-bottom: 1px solid var(--border); }
  .chat-header-avatar { width: 36px; height: 36px; font-size: 17px; }
  .chat-header-info h4 { font-size: 15px !important; font-weight: 700 !important; }
  .chat-messages { padding: 14px 14px 88px; -webkit-overflow-scrolling: touch; }
  .chat-input-area { position: sticky; bottom: 0; z-index: 24; padding: 9px 12px; background: var(--surface); border-top: 1px solid var(--border); }
  .chat-input-box { max-height: 88px; }
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); box-shadow: 10px 0 30px rgba(0,0,0,0.2); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; width: 100%; }
  .hamburger { display: block; }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .gpa-grid, .planner-grid { grid-template-columns: 1fr; }
  /* AI Tutor: make chat fill viewport and keep header/input fixed on tablet/phone */
  .ai-tutor-layout { grid-template-columns: 1fr; height: calc(100vh - var(--topbar-h) - 12px); }
  .ai-tutor-sidebar { display: none; }
  .chat-area { height: 100%; display: flex; flex-direction: column; }
  .chat-header {
    position: sticky; top: 0; z-index: 20;
    padding: 10px 12px; background: var(--surface); border-bottom: 1px solid var(--border);
  }
  .chat-header-avatar { width: 34px; height: 34px; font-size: 16px; }
  .chat-header-info h4 { font-size: 14px !important; font-weight: 700 !important; }
  .chat-header-info p {
    font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px;
  }
  .chat-messages { padding: 12px 12px 92px; -webkit-overflow-scrolling: touch; }
  .chat-input-area {
    position: sticky; bottom: 0; z-index: 25; padding: 8px 10px; background: var(--surface); border-top: 1px solid var(--border);
  }
  .chat-input-box { max-height: 72px; padding: 10px 12px; font-size: 14px; border-radius: 10px; }
  .send-btn { width: 40px; height: 40px; }
  .chat-footer-note { display: none; }
  .config-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .quick-actions { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .banner { flex-direction: column; gap: 18px; align-items: flex-start; }
  .banner-right { width: 100%; justify-content: space-around; }
  #page-content { padding: 16px; }
  .lp-nav { padding: 15px 5%; flex-wrap: wrap; gap: 10px; justify-content: center; }
  .lp-footer { flex-direction: column; gap: 20px; text-align: center; padding: 40px 5%; }
  .hero-title { font-size: 32px; }
  .hero-subtitle { font-size: 14px; }
  
  .auth-card { padding: 32px 24px; border-radius: 16px; width: 100%; }
  .auth-title { font-size: 24px; }
  .form-input { padding: 12px 16px 12px 38px; font-size: 14px; }
  .btn-primary { padding: 12px 24px; font-size: 14px; }
}

@media (max-width: 400px) {
  .stats-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 24px 16px; }
  .lp-nav-btns { width: 100%; justify-content: space-between; }
}
/* =========================================================
   FLASHCARD SYSTEM
   ========================================================= */
.flashcard-container {
  perspective: 2000px;
  cursor: pointer;
  width: 100%;
  margin: 0 auto;
}

.flashcard-3d {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.flashcard-3d.flipped {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.card-front {
  background: var(--gradient-banner);
  border: none;
  color: #fff;
}

.card-back {
  background: var(--surface);
  border: 2px solid var(--primary);
  color: var(--text);
  transform: rotateY(180deg);
}

.btn-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-circle:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.btn-circle:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Animations */
.slide-out-left { transform: translateX(-100%) rotate(-10deg); opacity: 0; }
.slide-out-right { transform: translateX(100%) rotate(10deg); opacity: 0; }
.slide-in { animation: slideIn 0.4s ease-out; }

@keyframes slideIn {
  0% { transform: translateY(20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* duplicate @keyframes spin removed — see line 1011 */

/* Dropzone Hover */
#flash-dropzone:hover {
  border-color: var(--primary) !important;
  background: rgba(var(--primary-rgb), 0.08) !important;
  transform: scale(1.02);
}

/* Generation Progress */
#gen-progress-bar {
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1), background 0.5s ease;
}

/* =========================================================
   PAST QUESTIONS ENGINE
   ========================================================= */
.pq-hero {
  background: var(--gradient-banner);
  border-radius: 32px;
  padding: 60px 40px;
  color: #fff;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pq-hero::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

.pq-group-header {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  padding: 10px 24px;
  border-radius: 99px;
  border: 1.5px solid var(--border);
  margin-bottom: 24px;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
}

.pq-paper-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.pq-paper-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 24px;
  padding: 24px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.pq-paper-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.pq-paper-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: #eaf2ff;
  color: #1e40af;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.pq-score-bar {
  color: #1e40af;
  background: var(--border);
  border-radius: 99px;
  background-color: rgba(30,64,175,0.15);
  color: #93c5fd;
}

  color: #93c5fd;
  height: 100%;
  background: var(--accent-2);
  border-radius: 99px;
  transition: width 1s ease;
}

/* Timer Selection */
.timer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.timer-option {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 16px;
}

.timer-option:hover {
  border-color: var(--primary-light);
  background: rgba(var(--primary-rgb), 0.02);
}

.timer-option.active {
  border-color: var(--primary);
  background: rgba(var(--primary-rgb), 0.05);
}

.timer-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--primary);
}

.timer-option.active .timer-icon {
  background: var(--primary);
  color: #fff;
}

/* Processing View */
.proc-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-light);
}

.proc-step.active {
  color: var(--primary);
}

.proc-bar-bg {
  height: 10px;
  background: var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 32px;
}

.proc-bar-fill {
  height: 100%;
  background: var(--gradient);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.proc-tip {
  background: rgba(var(--primary-rgb), 0.05);
  border: 1.5px solid rgba(var(--primary-rgb), 0.1);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  gap: 16px;
  text-align: left;
}

/* =========================================================
   SUBJECT HEALTH INDICATORS — Blinking Dots
   ========================================================= */
@keyframes danger-blink {
  0%, 100% { opacity: 1; box-shadow: 0 0 7px 2px #ef4444; }
  50% { opacity: 0.2; box-shadow: none; }
}
@keyframes warning-pulse {
  0%, 100% { box-shadow: 0 0 6px 2px #f59e0b; opacity: 1; }
  50% { box-shadow: none; opacity: 0.5; }
}
@keyframes success-glow {
  0%, 100% { box-shadow: 0 0 8px 2px var(--accent-2); opacity: 1; }
  50% { box-shadow: 0 0 3px 0px var(--accent-2); opacity: 0.6; }
}
.health-dot {
  width: 10px; height: 10px; border-radius: 50%;
  display: inline-block; flex-shrink: 0;
}
.health-dot.danger  { background: #ef4444; animation: danger-blink 1.1s ease-in-out infinite; }
.health-dot.warning { background: #f59e0b; animation: warning-pulse 1.8s ease-in-out infinite; }
.health-dot.success { background: var(--accent-2); animation: success-glow 2.4s ease-in-out infinite; }

/* Subject health badge */
.health-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; padding: 3px 10px;
  border-radius: 99px;
}
.health-badge.danger  { background: #fee2e2; color: #b91c1c; }
.health-badge.warning { background: #fef3c7; color: #92400e; }
.health-badge.success { background: #e6f2ff; color: #1e40af; }
[data-theme="dark"] .health-badge.danger  { background: rgba(239,68,68,0.15); color: #fca5a5; }
[data-theme="dark"] .health-badge.warning { background: rgba(245,158,11,0.15); color: #fcd34d; }
[data-theme="dark"] .health-badge.success { background: rgba(16,185,129,0.15); color: #6ee7b7; }

/* =========================================================
   PRINT MEDIA — Certificate printing
   ========================================================= */
@media print {
  .sidebar, .topbar, #sidebar-overlay, .toast,
  .modal-overlay, .page-title { display: none !important; }
  .main-content { margin-left: 0 !important; }
  #page-content { padding: 0 !important; background: #fff; }
  body { background: #fff; color: #000; }
}

/* =========================================================
   PAGE MAX WIDTH — Prevents over-stretch on 4K
   ========================================================= */
.page-content-inner {
  max-width: 1400px;
  margin: 0 auto;
}

/* =========================================================
   MY EXAMS — Filter Tabs Active State
   ========================================================= */
.exam-filter-tab { cursor: pointer; transition: var(--transition); }
.exam-filter-tab.active { background: var(--primary) !important; color: #fff !important; border-color: var(--primary) !important; }

/* =========================================================
   AI TUTOR MOBILE — Model Switcher
   ========================================================= */
.ai-model-tabs-mobile {
  display: none; gap: 6px; overflow-x: auto; padding: 10px 14px;
  border-bottom: 1px solid var(--border); scrollbar-width: none;
}
.ai-model-tab-mobile {
  padding: 7px 14px; border-radius: 99px; font-size: 12px; font-weight: 700;
  border: 1.5px solid var(--border); background: var(--surface-2);
  white-space: nowrap; cursor: pointer; transition: var(--transition); color: var(--text-muted);
}
.ai-model-tab-mobile.active { background: var(--gradient); border-color: transparent; color: #fff; }
@media (max-width: 900px) {
  .ai-model-tabs-mobile { display: flex; }
  .ai-tutor-sidebar { display: none; }
  .ai-tutor-layout { grid-template-columns: 1fr; }
}

/* =========================================================
   RESPONSIVE EXTRAS
   ========================================================= */
@media (max-width: 600px) {
  .pq-hero { padding: 32px 20px; border-radius: 16px; }
  .banner { padding: 20px; }
  .pq-paper-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .study-tabs-wrap { gap: 4px; }
}

/* =========================================================
   PAST QUESTIONS (PQ) OPTIONS
   ========================================================= */
.pq-option-item {
  display: flex; align-items: center; gap: 20px; padding: 20px 24px; border: 2px solid var(--border); border-radius: 20px; cursor: pointer; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); background: var(--surface);
}
.pq-option-item:hover { border-color: var(--primary-light); background: rgba(var(--primary-rgb), 0.02); transform: translateX(8px); }
.pq-option-item.selected { border-color: var(--primary); background: rgba(var(--primary-rgb), 0.05); box-shadow: 0 10px 25px rgba(var(--primary-rgb), 0.1); }
.pq-opt-indicator { width: 40px; height: 40px; border-radius: 12px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 16px; color: var(--text-muted); transition: 0.2s; }
.pq-option-item.selected .pq-opt-indicator { background: var(--primary); color: #fff; transform: scale(1.1); }
.pq-opt-content { flex: 1; font-size: 16px; font-weight: 600; color: var(--text); }
.pq-option-item.selected .pq-opt-content { color: var(--primary); }
.pq-opt-check { width: 24px; font-size: 20px; color: var(--primary); font-weight: 900; }

/* STUDY TOOLS MODERN LAYOUT */
.study-header-sticky {
  position: sticky;
  top: -24px;
  z-index: 100;
  background: var(--surface);
  padding: 16px 28px 12px 28px;
  border-bottom: 1.5px solid var(--border);
  margin: -24px -28px 20px -28px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}

.study-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.study-title-modern {
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -0.5px;
  margin: 0;
  text-transform: uppercase;
}

.study-tabs-wrap {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.study-tabs-wrap::-webkit-scrollbar { display: none; }

.study-tab {
  padding: 10px 22px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
}

.study-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--surface);
}

.study-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
}

/* Stable 3D Flashcards */
.flashcard-container {
  perspective: 1200px;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.flashcard-3d {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.flashcard-3d.flipped {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px;
  border-radius: 24px;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed) !important;
  border: none;
  box-shadow: 0 10px 30px rgba(124, 58, 237, 0.3);
  color: #ffffff !important;
}

.card-front {
  z-index: 2;
  transform: rotateY(0deg);
}

.card-back {
  transform: rotateY(180deg);
  background: #ffffff !important;
  border: 2px solid var(--primary) !important;
  color: #000000 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
  z-index: 1;
}

/* Glassmorphism Design System */
.glass-card {
  background: rgba(255, 255, 255, 0.6) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.06) !important;
}

[data-theme="dark"] .glass-card {
  background: rgba(30, 30, 40, 0.5) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2) !important;
}



