/* ===== DHJS PREP — PREMIUM UI v2 ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Playfair+Display:wght@700;800&display=swap');

:root {
  --primary: #1e3a8a;
  --primary-light: #2563eb;
  --primary-dark: #0f1f5c;
  --primary-glow: rgba(37,99,235,0.25);
  --accent: #f59e0b;
  --accent-light: #fbbf24;
  --accent-glow: rgba(245,158,11,0.3);
  --success: #10b981;
  --success-light: #d1fae5;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --warning: #f59e0b;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --bg: #f0f4ff;
  --bg-card: #ffffff;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow: 0 4px 16px rgba(30,58,138,0.08), 0 1px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 20px 40px rgba(30,58,138,0.15), 0 4px 12px rgba(0,0,0,0.08);
  --shadow-glow: 0 0 30px rgba(37,99,235,0.2);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --transition: 0.25s cubic-bezier(0.4,0,0.2,1);
  --transition-slow: 0.4s cubic-bezier(0.4,0,0.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text); background: var(--bg);
  line-height: 1.65; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}

/* ===== TYPOGRAPHY ===== */
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 900; line-height: 1.1; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 800; letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { color: var(--text-muted); }
a { color: var(--primary-light); text-decoration: none; transition: color var(--transition); }
.highlight {
  background: linear-gradient(135deg, var(--accent), #ef4444);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.text-center { text-align: center; }
.mt-40 { margin-top: 40px; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ===== SCROLL ANIMATIONS ===== */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-left { opacity: 0; transform: translateX(-32px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal-left.visible { opacity: 1; transform: translateX(0); }
.reveal-right { opacity: 0; transform: translateX(32px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal-right.visible { opacity: 1; transform: translateX(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 0 24px; height: 68px;
  background: rgba(15,31,92,0.85); backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: all var(--transition);
}
.navbar.scrolled {
  background: rgba(15,31,92,0.97);
  box-shadow: 0 4px 30px rgba(0,0,0,0.3);
  height: 60px;
}
.nav-container { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 100%; }
.nav-brand { display: flex; align-items: center; gap: 10px; }
.brand-icon { font-size: 1.6rem; filter: drop-shadow(0 0 8px rgba(245,158,11,0.6)); }
.brand-text { font-size: 1.5rem; font-weight: 900; color: white; letter-spacing: -0.02em; }
.brand-accent { color: var(--accent); }
.nav-menu { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-link {
  color: rgba(255,255,255,0.75); padding: 7px 16px; border-radius: 8px;
  font-weight: 500; font-size: 0.9rem; transition: all var(--transition); letter-spacing: 0.01em;
}
.nav-link:hover, .nav-link.active { color: white; background: rgba(255,255,255,0.12); }
.nav-link.cta-btn {
  background: linear-gradient(135deg, var(--accent), #f97316);
  color: white; font-weight: 700; padding: 8px 20px;
  box-shadow: 0 4px 15px rgba(245,158,11,0.4);
}
.nav-link.cta-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(245,158,11,0.5); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 4px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: white; border-radius: 2px; transition: all var(--transition); }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; background: rgba(10,20,70,0.98);
    backdrop-filter: blur(20px); padding: 16px; gap: 4px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .nav-menu.open { display: flex; }
  .nav-link { width: 100%; }
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; border-radius: var(--radius-sm); font-size: 0.9rem;
  font-weight: 700; cursor: pointer; border: none; font-family: inherit;
  transition: all var(--transition); text-decoration: none; white-space: nowrap;
  background: white; color: var(--text); border: 1px solid var(--border);
}
.btn:hover { background: var(--bg); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: white; border: none; box-shadow: 0 4px 14px rgba(30,58,138,0.3); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(30,58,138,0.4); color: white; }
.btn-secondary { background: linear-gradient(135deg, var(--accent), #f97316); color: white; border: none; box-shadow: 0 4px 14px rgba(245,158,11,0.3); }
.btn-secondary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(245,158,11,0.4); color: white; }
.btn-success { background: linear-gradient(135deg, var(--success), #059669); color: white; border: none; box-shadow: 0 4px 14px rgba(16,185,129,0.3); }
.btn-success:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(16,185,129,0.4); color: white; }
.btn-sm { padding: 7px 16px; font-size: 0.82rem; }
.btn-lg { padding: 14px 32px; font-size: 1.05rem; }

/* ===== SECTIONS ===== */
.section { padding: 96px 0; }
.section-header { text-align: center; margin-bottom: 64px; }
.section-tag {
  display: inline-block; background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: white; padding: 5px 16px; border-radius: 100px; font-size: 0.72rem;
  font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 16px;
}
.section-header h2 { margin-bottom: 14px; }
.section-header p { max-width: 580px; margin: 0 auto; font-size: 1.05rem; }

/* ===== HERO ===== */
.hero {
  min-height: 100vh; padding: 100px 24px 80px;
  background: linear-gradient(135deg, #050d2e 0%, #0f1f5c 35%, #1e3a8a 65%, #1e40af 100%);
  position: relative; overflow: hidden; display: flex; align-items: center;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero-orb {
  position: absolute; border-radius: 50%; filter: blur(80px); pointer-events: none;
  animation: floatOrb 8s ease-in-out infinite;
}
.hero-orb-1 { width: 500px; height: 500px; background: rgba(37,99,235,0.3); top: -100px; right: -100px; animation-delay: 0s; }
.hero-orb-2 { width: 300px; height: 300px; background: rgba(245,158,11,0.2); bottom: -50px; left: 10%; animation-delay: 3s; }
@keyframes floatOrb { 0%,100%{transform:translateY(0) scale(1)} 50%{transform:translateY(-30px) scale(1.05)} }
.hero-inner { max-width: 1200px; margin: 0 auto; width: 100%; position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(10px); color: white; padding: 8px 18px; border-radius: 100px;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.5px; margin-bottom: 32px;
}
.hero-badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.5;transform:scale(0.8)} }
.hero h1 { color: white; max-width: 800px; margin-bottom: 24px; }
.hero h1 span { color: var(--accent); }
.hero p { font-size: 1.15rem; color: rgba(255,255,255,0.75); max-width: 560px; margin-bottom: 40px; line-height: 1.75; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 72px; }
.hero-stats { display: flex; gap: 16px; flex-wrap: wrap; }
.stat-card {
  background: rgba(255,255,255,0.08); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.15); border-radius: var(--radius);
  padding: 20px 28px; text-align: center; min-width: 110px;
  animation: floatCard 6s ease-in-out infinite;
}
.stat-card:nth-child(2) { animation-delay: 1s; }
.stat-card:nth-child(3) { animation-delay: 2s; }
.stat-card:nth-child(4) { animation-delay: 3s; }
@keyframes floatCard { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-6px)} }
.stat-number { font-size: 2.2rem; font-weight: 900; color: white; display: block; line-height: 1; }
.stat-label { font-size: 0.72rem; color: rgba(255,255,255,0.6); font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; margin-top: 8px; }

/* ===== SUBJECT CARDS ===== */
.subjects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.subject-card {
  background: white; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 20px; text-align: center; cursor: pointer;
  transition: all var(--transition); box-shadow: var(--shadow-sm); text-decoration: none; display: block;
}
.subject-card:hover { border-color: var(--primary-light); box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.subject-icon { font-size: 2.2rem; margin-bottom: 12px; display: block; }
.subject-card h3 { color: var(--text); font-size: 0.95rem; margin-bottom: 6px; }
.subject-card p { font-size: 0.78rem; }
.subject-count { display: inline-block; background: var(--bg); color: var(--primary); padding: 2px 10px; border-radius: 100px; font-size: 0.72rem; font-weight: 700; margin-top: 10px; border: 1px solid var(--border); }

/* ===== OVERVIEW CARDS ===== */
.overview-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.overview-card {
  background: white; border-radius: var(--radius); padding: 32px 28px;
  box-shadow: var(--shadow); border: 1px solid var(--border); transition: all var(--transition);
}
.overview-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.overview-icon { font-size: 2.5rem; margin-bottom: 16px; display: block; }
.overview-card h3 { margin-bottom: 10px; }

/* ===== TIER CARDS ===== */
.tiers-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; max-width: 900px; margin: 0 auto; }
.tier-card {
  background: white; border: 2px solid var(--border); border-radius: var(--radius);
  padding: 32px 24px; text-align: center; transition: all var(--transition); box-shadow: var(--shadow-sm);
}
.tier-card:hover { border-color: var(--primary-light); box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.tier-card.featured { border-color: var(--accent); background: linear-gradient(135deg, #fffbeb, #fef3c7); }
.tier-icon { font-size: 3rem; margin-bottom: 16px; display: block; }
.tier-name { font-weight: 800; font-size: 1.1rem; color: var(--text); margin-bottom: 10px; }

/* ===== PLAN TEASER ===== */
.plan-teaser { background: linear-gradient(135deg, #050d2e, #0f1f5c, #1e3a8a); border-radius: var(--radius); overflow: hidden; }
.plan-teaser-inner { display: flex; }
.plan-info { flex: 1; padding: 48px; color: white; }
.plan-info h2 { color: white; margin-bottom: 16px; }
.plan-info p { color: rgba(255,255,255,0.75); margin-bottom: 28px; }
.plan-visual { width: 360px; background: rgba(0,0,0,0.2); padding: 36px; border-left: 1px solid rgba(255,255,255,0.1); }
.plan-visual h3 { color: white; margin-bottom: 24px; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 1px; }
.month-progress { display: flex; flex-direction: column; gap: 14px; }
.mp-item { display: flex; align-items: center; gap: 12px; }
.mp-month { width: 52px; font-size: 0.78rem; font-weight: 800; color: var(--accent); flex-shrink: 0; }
.mp-bar { flex: 1; height: 10px; background: rgba(255,255,255,0.1); border-radius: 5px; overflow: hidden; }
.mp-fill {
  height: 100%; border-radius: 5px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  transform: scaleX(0); transform-origin: left;
  transition: transform 1.2s cubic-bezier(0.4,0,0.2,1);
}
.mp-fill.animated { transform: scaleX(1); }
.mp-label { width: 120px; font-size: 0.73rem; color: rgba(255,255,255,0.55); flex-shrink: 0; }
@media (max-width: 768px) { .plan-teaser-inner { flex-direction: column; } .plan-visual { width: 100%; } }

/* ===== FAQ ===== */
.faq-section { background: var(--bg); }
.faq-grid { display: flex; flex-direction: column; gap: 12px; max-width: 800px; margin: 0 auto; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: white; box-shadow: var(--shadow-sm); transition: box-shadow var(--transition); }
.faq-item:hover { box-shadow: var(--shadow); }
.faq-q {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: 18px 22px; background: transparent; border: none; cursor: pointer;
  font-size: 0.97rem; font-weight: 700; color: var(--text); text-align: left; gap: 12px;
  transition: all var(--transition); font-family: inherit;
}
.faq-q:hover { color: var(--primary-light); }
.faq-q.open { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: white; }
.faq-icon {
  width: 28px; height: 28px; border-radius: 50%; background: var(--bg); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  font-size: 1.1rem; font-weight: 700; transition: all var(--transition); color: var(--primary);
}
.faq-q.open .faq-icon { background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.4); color: white; transform: rotate(45deg); }
.faq-a { display: none; padding: 18px 22px; background: white; font-size: 0.875rem; color: var(--text-muted); line-height: 1.75; border-top: 1px solid var(--border-light); }
.faq-a.show { display: block; animation: slideDown 0.3s ease; }
.faq-a a { color: var(--primary-light); font-weight: 700; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* ===== FOOTER ===== */
.footer { background: #060d2a; color: rgba(255,255,255,0.6); padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer-brand .brand-text { font-size: 1.3rem; font-weight: 900; color: white; }
.footer-brand p { margin-top: 12px; font-size: 0.85rem; line-height: 1.8; }
.footer-links h4 { color: white; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 18px; }
.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-links a { color: rgba(255,255,255,0.55); font-size: 0.875rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--accent); }
.footer-note { margin-top: 18px; background: rgba(255,255,255,0.05); border-radius: 8px; padding: 12px; border: 1px solid rgba(255,255,255,0.08); }
.footer-note p { font-size: 0.8rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 24px; text-align: center; }
.footer-bottom p { font-size: 0.78rem; margin-bottom: 4px; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* ===== QUIZ PAGE ===== */
.quiz-page { padding-top: 68px; min-height: 100vh; background: var(--bg); }
.quiz-header {
  background: white; border-bottom: 1px solid var(--border); padding: 16px 24px;
  position: sticky; top: 68px; z-index: 100; box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.quiz-header-inner { max-width: 900px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.quiz-meta { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.q-badge { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: white; padding: 5px 14px; border-radius: 100px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.5px; }
.q-score { font-size: 0.875rem; color: var(--text-muted); font-weight: 500; }
.q-score span { font-weight: 800; color: var(--success); font-size: 1rem; }
.timer-display {
  display: flex; align-items: center; gap: 8px; font-size: 1.05rem; font-weight: 800;
  background: var(--bg); padding: 7px 18px; border-radius: 10px;
  border: 2px solid var(--border); font-variant-numeric: tabular-nums; transition: all var(--transition);
}
.timer-display.warning { border-color: var(--danger); color: var(--danger); background: var(--danger-light); animation: timerPulse 0.8s infinite; }
@keyframes timerPulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.03)} }

.quiz-body { max-width: 900px; margin: 0 auto; padding: 36px 24px; }

.progress-bar-wrap { margin-bottom: 28px; }
.progress-label { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 8px; text-align: right; font-weight: 600; }
.progress-bar-track { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.progress-bar-fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--primary-light), var(--accent));
  transition: width 0.5s cubic-bezier(0.4,0,0.2,1); position: relative;
}
.progress-bar-fill::after { content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 20px; background: rgba(255,255,255,0.4); filter: blur(4px); }

.question-card {
  background: white; border-radius: 20px; box-shadow: 0 4px 24px rgba(30,58,138,0.08);
  padding: 36px; margin-bottom: 20px; border: 1px solid rgba(30,58,138,0.08);
  animation: cardSlideIn 0.35s cubic-bezier(0.4,0,0.2,1);
}
@keyframes cardSlideIn { from{opacity:0;transform:translateX(20px)} to{opacity:1;transform:translateX(0)} }

.q-number { font-size: 0.75rem; color: var(--text-light); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 10px; font-weight: 700; }
.q-meta-tags { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.q-tag { font-size: 0.7rem; padding: 3px 10px; border-radius: 100px; font-weight: 700; background: var(--bg); border: 1px solid var(--border); color: var(--text-muted); }
.q-tag.difficulty-easy { background: #f0fdf4; color: #059669; border-color: #a7f3d0; }
.q-tag.difficulty-medium { background: #fffbeb; color: #d97706; border-color: #fde68a; }
.q-tag.difficulty-hard { background: #fef2f2; color: #dc2626; border-color: #fecaca; }

.question-text { font-size: 1.1rem; font-weight: 600; color: var(--text); margin-bottom: 28px; line-height: 1.65; }
.options-grid { display: flex; flex-direction: column; gap: 11px; }
.option-btn {
  display: flex; align-items: flex-start; gap: 14px; padding: 15px 20px;
  background: var(--bg); border: 2px solid var(--border); border-radius: 12px;
  cursor: pointer; transition: all var(--transition); text-align: left; width: 100%;
  font-size: 0.94rem; color: var(--text); font-family: inherit;
}
.option-btn:hover:not(:disabled) { border-color: var(--primary-light); background: #eff6ff; transform: translateX(6px); box-shadow: 0 4px 12px rgba(37,99,235,0.1); }
.opt-label {
  font-weight: 800; color: var(--primary-light); flex-shrink: 0;
  width: 28px; height: 28px; background: rgba(37,99,235,0.1); border-radius: 6px;
  display: flex; align-items: center; justify-content: center; font-size: 0.82rem;
  transition: all var(--transition);
}
.option-btn:hover:not(:disabled) .opt-label { background: var(--primary-light); color: white; }
.option-btn.correct { border-color: var(--success); background: var(--success-light); animation: correctPop 0.4s cubic-bezier(0.34,1.56,0.64,1); }
.option-btn.correct .opt-label { background: var(--success); color: white; }
@keyframes correctPop { 0%{transform:scale(0.97)} 60%{transform:scale(1.02)} 100%{transform:scale(1)} }
.option-btn.wrong { border-color: var(--danger); background: var(--danger-light); animation: wrongShake 0.4s ease; }
.option-btn.wrong .opt-label { background: var(--danger); color: white; }
@keyframes wrongShake { 0%,100%{transform:translateX(0)} 20%,60%{transform:translateX(-6px)} 40%,80%{transform:translateX(6px)} }
.option-btn.revealed { border-color: var(--success); background: var(--success-light); }
.option-btn.revealed .opt-label { background: var(--success); color: white; }
.option-btn:disabled { cursor: default; }
.opt-text { flex: 1; line-height: 1.55; }

.explanation-box {
  margin-top: 22px; padding: 18px 22px;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 1px solid #a7f3d0; border-radius: 12px; border-left: 5px solid var(--success);
  display: none; animation: slideDown 0.3s ease;
}
.explanation-box.show { display: block; }
.explanation-box strong { color: var(--success); font-size: 0.85rem; letter-spacing: 0.5px; }
.explanation-box p { color: var(--text); font-size: 0.895rem; line-height: 1.7; margin-top: 6px; }
.explanation-year { font-size: 0.75rem; color: var(--text-muted); margin-top: 10px; font-weight: 600; }

.quiz-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }

/* Mode selector */
.mode-selector { max-width: 900px; margin: 48px auto; padding: 0 24px; }
.mode-selector h2 { text-align: center; margin-bottom: 36px; }
.mode-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.mode-card {
  background: white; border: 2px solid var(--border); border-radius: var(--radius);
  padding: 28px 24px; text-align: center; cursor: pointer; transition: all var(--transition); box-shadow: var(--shadow-sm);
}
.mode-card:hover { border-color: var(--primary-light); box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.mode-card.selected { border-color: var(--primary-light); background: #eff6ff; box-shadow: 0 0 0 4px rgba(37,99,235,0.1); }
.mode-icon { font-size: 2.8rem; margin-bottom: 14px; }
.mode-card h3 { color: var(--text); margin-bottom: 10px; }
.mode-card p { font-size: 0.85rem; line-height: 1.6; }

/* Subject selector */
.subject-selector { max-width: 900px; margin: 0 auto 40px; padding: 0 24px; }
.subject-selector h3 { margin-bottom: 14px; }
.subject-filter-grid { display: flex; flex-wrap: wrap; gap: 9px; }
.filter-btn {
  padding: 7px 16px; border-radius: 100px; font-size: 0.82rem; font-weight: 700;
  border: 2px solid var(--border); background: white; cursor: pointer; transition: all var(--transition);
  color: var(--text-muted); font-family: inherit;
}
.filter-btn:hover { border-color: var(--primary-light); color: var(--primary-light); transform: translateY(-1px); }
.filter-btn.active { background: var(--primary); color: white; border-color: var(--primary); box-shadow: 0 4px 12px rgba(30,58,138,0.25); }

/* Results screen */
.results-screen { max-width: 680px; margin: 60px auto; padding: 0 24px; text-align: center; }
.results-card {
  background: white; border-radius: 24px; box-shadow: 0 24px 60px rgba(30,58,138,0.12);
  padding: 52px 44px; margin-bottom: 20px;
  animation: resultsPop 0.5s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes resultsPop { from{opacity:0;transform:scale(0.9)} to{opacity:1;transform:scale(1)} }
.score-circle {
  width: 170px; height: 170px; border-radius: 50%; margin: 0 auto 28px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 10px solid var(--border); position: relative;
}
.score-circle.excellent { border-color: var(--success); background: var(--success-light); }
.score-circle.good { border-color: var(--accent); background: #fffbeb; }
.score-circle.needs-work { border-color: var(--danger); background: var(--danger-light); }
.score-pct { font-size: 3rem; font-weight: 900; line-height: 1; }
.score-circle.excellent .score-pct { color: var(--success); }
.score-circle.good .score-pct { color: var(--accent); }
.score-circle.needs-work .score-pct { color: var(--danger); }
.score-label-sm { font-size: 0.78rem; color: var(--text-muted); font-weight: 600; }
.results-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 28px 0; }
.result-stat { background: var(--bg); border-radius: 12px; padding: 18px 12px; }
.result-stat .number { font-size: 2rem; font-weight: 900; }
.result-stat .label { font-size: 0.78rem; color: var(--text-muted); font-weight: 600; margin-top: 4px; }
.results-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Confetti */
.confetti-piece { position: fixed; width: 10px; height: 10px; border-radius: 2px; animation: confettiFall linear forwards; pointer-events: none; z-index: 9999; }
@keyframes confettiFall { 0%{transform:translateY(-20px) rotate(0deg);opacity:1} 100%{transform:translateY(100vh) rotate(720deg);opacity:0} }

/* ===== STUDY PLAN PAGE ===== */
.studyplan-page { padding-top: 68px; }
.plan-hero { background: linear-gradient(135deg, #050d2e 0%, #0f1f5c 50%, #1e3a8a 100%); color: white; padding: 70px 24px; text-align: center; position: relative; overflow: hidden; }
.plan-hero::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px); background-size: 40px 40px; }
.plan-hero h1 { color: white; position: relative; }
.plan-hero p { color: rgba(255,255,255,0.75); max-width: 600px; margin: 12px auto 0; font-size: 1.05rem; position: relative; }
.plan-content { max-width: 1000px; margin: 0 auto; padding: 48px 24px; }
.month-section { margin-bottom: 52px; }
.month-header { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: white; border-radius: var(--radius) var(--radius) 0 0; padding: 18px 28px; display: flex; align-items: center; justify-content: space-between; box-shadow: 0 4px 16px rgba(30,58,138,0.25); }
.month-header h3 { color: white; font-size: 1.05rem; }
.month-header span { background: rgba(255,255,255,0.15); padding: 4px 14px; border-radius: 100px; font-size: 0.75rem; font-weight: 700; }
.month-weeks { background: white; border: 1px solid var(--border); border-top: none; border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow); }
.week-row { display: grid; grid-template-columns: 130px 1fr; border-bottom: 1px solid var(--border-light); }
.week-row:last-child { border-bottom: none; }
.week-label { background: linear-gradient(180deg, var(--bg) 0%, #e8edff 100%); padding: 18px; font-weight: 800; font-size: 0.8rem; color: var(--primary); border-right: 1px solid var(--border); display: flex; align-items: flex-start; line-height: 1.4; }
.week-content { padding: 18px 24px; }
.week-content h4 { color: var(--text); font-size: 0.95rem; margin-bottom: 10px; }
.week-tasks { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.week-tasks li { font-size: 0.85rem; color: var(--text-muted); padding-left: 20px; position: relative; line-height: 1.5; }
.week-tasks li::before { content: '✦'; position: absolute; left: 0; color: var(--accent); font-size: 0.6rem; top: 4px; }
.milestone-badge { display: inline-block; background: linear-gradient(135deg, var(--accent), #f97316); color: white; font-size: 0.68rem; font-weight: 800; padding: 2px 10px; border-radius: 4px; margin-left: 8px; letter-spacing: 0.5px; }

/* ===== TOPICS PAGE ===== */
.topics-page { padding-top: 68px; }
.topics-hero { background: linear-gradient(135deg, #060d2a, #0f1f5c, #1e3a8a); color: white; padding: 70px 24px; text-align: center; }
.topics-hero h1 { color: white; }
.topics-hero p { color: rgba(255,255,255,0.75); max-width: 600px; margin: 12px auto 0; }
.topics-content { max-width: 1000px; margin: 0 auto; padding: 48px 24px; }
.cases-section { margin-bottom: 52px; }
.cases-section h2 { margin-bottom: 24px; padding-bottom: 14px; border-bottom: 3px solid var(--accent); display: inline-block; }
.cases-table { width: 100%; border-collapse: collapse; background: white; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.cases-table th { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: white; padding: 14px 18px; text-align: left; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.5px; }
.cases-table td { padding: 13px 18px; border-bottom: 1px solid var(--border-light); font-size: 0.875rem; vertical-align: top; transition: background var(--transition); }
.cases-table tr:hover td { background: #f8faff; }
.cases-table tr:last-child td { border-bottom: none; }
.cases-table td:first-child { font-weight: 700; color: var(--primary); white-space: nowrap; }
.new-law-card { background: white; border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 28px; margin-bottom: 20px; border-left: 5px solid var(--accent); transition: all var(--transition); }
.new-law-card:hover { transform: translateX(4px); box-shadow: var(--shadow-lg); }
.new-law-card h3 { margin-bottom: 14px; color: var(--text); }
.new-law-card ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.new-law-card li { font-size: 0.875rem; color: var(--text-muted); padding-left: 22px; position: relative; line-height: 1.6; }
.new-law-card li::before { content: '→'; position: absolute; left: 0; color: var(--primary-light); font-weight: 800; }

/* ===== ANIMATIONS ===== */
@keyframes fadeIn { from{opacity:0;transform:translateY(16px)} to{opacity:1;transform:translateY(0)} }
.fade-in { animation: fadeIn 0.4s ease forwards; }
@keyframes spin { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .section { padding: 60px 0; }
  .hero-stats { gap: 10px; }
  .stat-card { min-width: 80px; padding: 12px 14px; }
  .stat-number { font-size: 1.6rem; }
  .question-card { padding: 22px 18px; }
  .question-text { font-size: 0.98rem; }
  .results-card { padding: 36px 20px; }
  .week-row { grid-template-columns: 80px 1fr; }
  .week-label { font-size: 0.72rem; padding: 14px 10px; }
}

/* ===== AUTH UI ===== */
#authNavItem { display: flex; align-items: center; gap: 6px; }

.auth-signin-btn {
  display: flex; align-items: center; gap: 8px; padding: 7px 16px; border-radius: 100px;
  background: white; color: #3c4043; border: none; font-family: inherit; font-size: 0.85rem;
  font-weight: 700; cursor: pointer; transition: all 0.2s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15); white-space: nowrap;
}
.auth-signin-btn:hover { box-shadow: 0 2px 10px rgba(0,0,0,0.2); transform: translateY(-1px); }
.auth-signin-btn:disabled { cursor: not-allowed; }

.auth-user-pill {
  display: flex; align-items: center; gap: 7px; padding: 4px 12px 4px 4px; border-radius: 100px;
  background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.25);
  text-decoration: none; transition: all 0.2s ease;
}
.auth-user-pill:hover { background: rgba(255,255,255,0.25); }
.auth-pill-avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; display: block; border: 2px solid rgba(255,255,255,0.6); }
.auth-pill-initial {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), #f97316);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.8rem; color: white;
}
.auth-pill-name { color: white; font-size: 0.82rem; font-weight: 600; max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.auth-signout-pill {
  width: 26px; height: 26px; border-radius: 50%; border: none;
  background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.8);
  font-size: 0.7rem; cursor: pointer; transition: all 0.2s ease;
  display: flex; align-items: center; justify-content: center; font-family: inherit; flex-shrink: 0;
}
.auth-signout-pill:hover { background: rgba(239,68,68,0.6); color: white; }

@media (max-width: 768px) {
  .auth-pill-name { display: none; }
  #authNavItem { justify-content: flex-start; }
  .auth-signin-btn { background: rgba(255,255,255,0.12); color: white; box-shadow: none; border: 1px solid rgba(255,255,255,0.3); }
}

/* Sign-in prompt on progress page */
.signin-prompt { background: white; border-radius: 24px; box-shadow: 0 8px 40px rgba(30,58,138,0.1); padding: 64px 40px; text-align: center; }
.signin-prompt .sp-icon { font-size: 3.5rem; margin-bottom: 20px; display: block; }
.signin-prompt h2 { margin-bottom: 10px; }
.signin-prompt p { max-width: 380px; margin: 0 auto 32px; line-height: 1.7; }
.google-signin-btn {
  display: inline-flex; align-items: center; gap: 14px; padding: 14px 32px;
  background: white; border: 2px solid #e2e8f0; border-radius: 14px;
  font-size: 1rem; font-weight: 700; color: #3c4043; cursor: pointer;
  transition: all 0.2s ease; font-family: inherit; box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.google-signin-btn:hover { border-color: #4285f4; box-shadow: 0 4px 20px rgba(66,133,244,0.2); transform: translateY(-2px); }

/* ===== DISCUSSION THREAD ===== */
.discussion-panel { background: white; border-radius: 16px; box-shadow: var(--shadow); border: 1px solid var(--border); overflow: hidden; margin-top: 24px; }
.discussion-header { padding: 14px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.discussion-header h4 { font-size: 0.9rem; color: var(--text); font-weight: 700; }
.discussion-count { font-size: 0.75rem; color: var(--text-muted); background: var(--bg); padding: 2px 8px; border-radius: 4px; border: 1px solid var(--border); }
.discussion-body { padding: 16px; max-height: 360px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.discussion-body::-webkit-scrollbar { width: 4px; }
.discussion-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.comment-item { display: flex; gap: 10px; }
.comment-avatar { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; background: linear-gradient(135deg, var(--primary), var(--primary-light)); display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 800; color: white; }
.comment-avatar img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.comment-body { flex: 1; min-width: 0; }
.comment-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.comment-author { font-size: 0.8rem; font-weight: 700; color: var(--text); }
.comment-time { font-size: 0.7rem; color: var(--text-muted); }
.comment-text { font-size: 0.875rem; color: var(--text-muted); line-height: 1.6; word-break: break-word; }
.comment-actions { display: flex; gap: 12px; margin-top: 6px; }
.comment-like { background: none; border: none; color: var(--text-muted); font-size: 0.75rem; cursor: pointer; font-family: inherit; display: flex; align-items: center; gap: 4px; padding: 0; transition: color var(--transition); }
.comment-like:hover { color: var(--primary-light); }
.comment-like.liked { color: var(--primary-light); font-weight: 700; }
.no-comments { text-align: center; padding: 28px 16px; color: var(--text-muted); font-size: 0.875rem; }

.discussion-footer { padding: 12px 16px; border-top: 1px solid var(--border); background: var(--bg); }
.comment-input-row { display: flex; gap: 8px; align-items: flex-start; }
.comment-input { flex: 1; background: white; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 9px 14px; color: var(--text); font-family: inherit; font-size: 0.875rem; resize: none; line-height: 1.5; min-height: 38px; max-height: 120px; overflow-y: auto; transition: border-color var(--transition); }
.comment-input:focus { outline: none; border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.comment-input::placeholder { color: var(--text-light); }
.comment-submit { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: white; border: none; border-radius: var(--radius-sm); padding: 9px 16px; font-size: 0.82rem; font-weight: 700; cursor: pointer; font-family: inherit; transition: all var(--transition); white-space: nowrap; flex-shrink: 0; }
.comment-submit:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(30,58,138,0.3); }
.comment-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.discussion-signin-note { font-size: 0.8rem; color: var(--text-muted); text-align: center; padding: 8px; }
.discussion-signin-note a { color: var(--primary-light); font-weight: 700; }
