/* ================================================
   ¡Aprende! CSEC Spanish — Design System
   Caribbean Teal + Coral + Navy Theme
   ================================================ */

:root {
  --teal:       #0d9488;
  --teal-light: #14b8a6;
  --teal-dark:  #0f766e;
  --coral:      #f97316;
  --coral-dark: #ea6b0a;
  --navy:       #0f172a;
  --navy-light: #1e293b;
  --navy-card:  #162032;
  --gold:       #f59e0b;
  --success:    #10b981;
  --danger:     #ef4444;
  --warning:    #f59e0b;
  --text-primary:   #f0f9ff;
  --text-secondary: #94a3b8;
  --text-muted:     #64748b;
  --border:         rgba(14,165,130,0.2);
  --glass-bg:       rgba(22,32,50,0.75);
  --glass-border:   rgba(13,148,136,0.25);
  --gradient-hero:  linear-gradient(135deg, #0f172a 0%, #0d3b38 50%, #162032 100%);
  --shadow-glow:    0 0 30px rgba(13,148,136,0.2);
  --radius: 14px;
  --radius-sm: 8px;
}

* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }
body {
  font-family:'Poppins', sans-serif;
  background:var(--navy);
  color:var(--text-primary);
  min-height:100vh;
  line-height:1.6;
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width:6px; }
::-webkit-scrollbar-track { background:var(--navy-light); }
::-webkit-scrollbar-thumb { background:var(--teal); border-radius:3px; }

/* ============================
   TYPOGRAPHY
   ============================ */
h1 { font-size:2rem; font-weight:800; }
h2 { font-size:1.5rem; font-weight:700; }
h3 { font-size:1.15rem; font-weight:600; }
p  { color:var(--text-secondary); }
a  { color:var(--teal-light); text-decoration:none; transition:color .2s; }
a:hover { color:var(--coral); }

/* ============================
   LAYOUT
   ============================ */
.app-layout { display:flex; flex-direction:column; min-height:100vh; }
.main-content { padding:2rem; max-width:1400px; margin:0 auto; width:100%; }

/* ============================
   NAVBAR
   ============================ */
.navbar {
  display:flex; align-items:center; gap:1.5rem;
  padding:0.75rem 2rem;
  background:rgba(15,23,42,0.95);
  border-bottom:1px solid var(--glass-border);
  backdrop-filter:blur(20px);
  position:sticky; top:0; z-index:100;
}
.nav-brand { display:flex; align-items:center; gap:0.6rem; font-weight:800; font-size:1.2rem; color:var(--teal-light); }
.brand-icon {
  width:38px; height:38px; background:linear-gradient(135deg,var(--teal),var(--coral));
  border-radius:10px; display:flex; align-items:center; justify-content:center;
  font-weight:900; font-size:0.85rem; color:#fff;
}
.brand-icon.small { width:32px; height:32px; font-size:0.75rem; }
.nav-links { display:flex; gap:0.25rem; flex:1; }
.nav-link {
  display:flex; align-items:center; gap:0.5rem; padding:0.5rem 1rem;
  border-radius:var(--radius-sm); color:var(--text-secondary);
  font-size:0.9rem; font-weight:500; transition:all .2s;
}
.nav-link:hover { background:var(--navy-light); color:var(--text-primary); }
.nav-link.active { background:rgba(13,148,136,0.2); color:var(--teal-light); }
.nav-user { display:flex; align-items:center; gap:0.75rem; margin-left:auto; }
.user-avatar {
  width:36px; height:36px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  font-weight:700; font-size:0.85rem; color:#fff;
}
.user-name { font-size:0.9rem; font-weight:500; }

/* ============================
   BUTTONS
   ============================ */
.btn {
  display:inline-flex; align-items:center; gap:0.5rem;
  padding:0.65rem 1.4rem; border-radius:var(--radius-sm);
  font-family:'Poppins',sans-serif; font-size:0.9rem; font-weight:600;
  border:none; cursor:pointer; transition:all .2s; text-decoration:none;
}
.btn-primary {
  background:linear-gradient(135deg,var(--teal),var(--teal-dark));
  color:#fff; box-shadow:0 4px 15px rgba(13,148,136,0.4);
}
.btn-primary:hover { transform:translateY(-2px); box-shadow:0 6px 20px rgba(13,148,136,0.5); color:#fff; }
.btn-coral  { background:linear-gradient(135deg,var(--coral),var(--coral-dark)); color:#fff; }
.btn-coral:hover  { transform:translateY(-2px); color:#fff; }
.btn-ghost  { background:transparent; color:var(--text-secondary); border:1px solid var(--border); }
.btn-ghost:hover  { color:var(--text-primary); border-color:var(--teal); }
.btn-sm     { padding:0.4rem 0.9rem; font-size:0.8rem; }
.btn-full   { width:100%; justify-content:center; }
.btn-outline { background:transparent; color:var(--teal-light); border:2px solid var(--teal); }
.btn-outline:hover { background:var(--teal); color:#fff; }

/* ============================
   CARDS & GLASS
   ============================ */
.card {
  background:var(--glass-bg);
  border:1px solid var(--glass-border);
  border-radius:var(--radius);
  backdrop-filter:blur(20px);
  padding:1.5rem;
  transition:transform .2s, box-shadow .2s;
}
.card:hover { transform:translateY(-3px); box-shadow:var(--shadow-glow); }
.card-title { font-size:0.75rem; font-weight:600; text-transform:uppercase; letter-spacing:1px; color:var(--text-muted); margin-bottom:0.4rem; }

/* ============================
   STAT CARDS
   ============================ */
.stat-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:1.25rem; margin-bottom:2rem; }
.stat-card {
  background:var(--glass-bg); border:1px solid var(--glass-border);
  border-radius:var(--radius); padding:1.25rem 1.5rem;
  display:flex; align-items:center; gap:1rem;
  transition:all .2s;
}
.stat-card:hover { transform:translateY(-3px); box-shadow:var(--shadow-glow); }
.stat-icon {
  width:48px; height:48px; border-radius:12px;
  display:flex; align-items:center; justify-content:center;
  font-size:1.3rem; flex-shrink:0;
}
.stat-value { font-size:1.6rem; font-weight:800; line-height:1; }
.stat-label { font-size:0.8rem; color:var(--text-muted); margin-top:2px; }

/* ============================
   FORMS
   ============================ */
.form-group { margin-bottom:1.2rem; }
.form-group label { display:flex; align-items:center; gap:0.4rem; font-size:0.85rem; font-weight:500; margin-bottom:0.4rem; color:var(--text-secondary); }
.form-group input, .form-group select, .form-group textarea {
  width:100%; padding:0.75rem 1rem;
  background:rgba(14,165,130,0.08);
  border:1px solid var(--glass-border);
  border-radius:var(--radius-sm);
  color:var(--text-primary);
  font-family:'Poppins',sans-serif; font-size:0.9rem;
  transition:border-color .2s, box-shadow .2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline:none; border-color:var(--teal); box-shadow:0 0 0 3px rgba(13,148,136,0.2);
}
.form-group select option { background:var(--navy-light); }
.form-group textarea { resize:vertical; min-height:120px; }

/* Password strength */
.strength-bar { height:4px; background:var(--navy-light); border-radius:2px; margin-top:6px; overflow:hidden; }
.strength-fill { height:100%; width:0; border-radius:2px; transition:width .3s, background .3s; }
.strength-label { font-size:0.75rem; margin-top:4px; font-weight:500; }

/* ============================
   ALERTS
   ============================ */
.alert { padding:0.85rem 1.1rem; border-radius:var(--radius-sm); margin-bottom:1rem; display:flex; align-items:center; gap:0.5rem; font-size:0.9rem; }
.alert-error   { background:rgba(239,68,68,0.15); border:1px solid rgba(239,68,68,0.3); color:#fca5a5; }
.alert-success { background:rgba(16,185,129,0.15); border:1px solid rgba(16,185,129,0.3); color:#6ee7b7; }
.alert-info    { background:rgba(13,148,136,0.15); border:1px solid rgba(13,148,136,0.3); color:#5eead4; }

/* ============================
   LANDING PAGE
   ============================ */
.landing { min-height:100vh; }
.hero {
  min-height:100vh; display:flex; flex-direction:column;
  align-items:center; justify-content:center;
  background:var(--gradient-hero); position:relative; overflow:hidden;
  padding:4rem 2rem; text-align:center;
}
.hero-badge {
  display:inline-flex; align-items:center; gap:0.5rem;
  background:rgba(13,148,136,0.15); border:1px solid rgba(13,148,136,0.4);
  border-radius:50px; padding:0.4rem 1.2rem; font-size:0.8rem; color:var(--teal-light);
  margin-bottom:1.5rem; animation:slideDown 0.6s ease both;
}
.hero-title {
  font-size:clamp(2.5rem,6vw,5rem); font-weight:900; line-height:1.1;
  margin-bottom:1.5rem; animation:slideUp 0.6s ease 0.2s both;
}
.hero-title .accent { color:var(--coral); }
.hero-title .teal { color:var(--teal-light); }
.hero-sub {
  font-size:1.1rem; color:var(--text-secondary); max-width:600px;
  margin:0 auto 2.5rem; animation:slideUp 0.6s ease 0.4s both;
}
.hero-cta { display:flex; gap:1rem; justify-content:center; flex-wrap:wrap; animation:slideUp 0.6s ease 0.6s both; }

/* Floating words */
.floating-words { position:absolute; inset:0; pointer-events:none; overflow:hidden; }
.floating-words span {
  position:absolute; font-size:clamp(0.8rem,2vw,1.4rem); font-weight:700;
  color:rgba(13,148,136,0.12); animation:floatUp linear infinite;
}
.floating-words span:nth-child(1)  { left:5%;  animation-duration:12s; animation-delay:0s; }
.floating-words span:nth-child(2)  { left:20%; animation-duration:15s; animation-delay:3s; }
.floating-words span:nth-child(3)  { left:40%; animation-duration:10s; animation-delay:1s; }
.floating-words span:nth-child(4)  { left:60%; animation-duration:14s; animation-delay:5s; }
.floating-words span:nth-child(5)  { left:75%; animation-duration:11s; animation-delay:2s; }
.floating-words span:nth-child(6)  { left:90%; animation-duration:16s; animation-delay:7s; }

/* Features section */
.features { padding:4rem 2rem; background:var(--navy-light); }
.features-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); gap:1.5rem; max-width:1100px; margin:2rem auto 0; }
.feature-card {
  background:var(--glass-bg); border:1px solid var(--glass-border);
  border-radius:var(--radius); padding:1.75rem;
  transition:all .25s;
}
.feature-card:hover { transform:translateY(-5px); box-shadow:var(--shadow-glow); border-color:var(--teal); }
.feature-icon { font-size:2rem; margin-bottom:1rem; }
.section-label { text-align:center; font-size:0.8rem; font-weight:600; letter-spacing:2px; text-transform:uppercase; color:var(--teal-light); margin-bottom:0.5rem; }
.section-title { text-align:center; font-size:2rem; font-weight:800; }

/* ============================
   AUTH PAGES
   ============================ */
.auth-page { display:flex; align-items:center; justify-content:center; min-height:100vh; padding:2rem; }
.auth-bg { position:fixed; inset:0; background:var(--gradient-hero); z-index:-1; }
.auth-container { width:100%; max-width:440px; animation:slideUp 0.5s ease; }
.auth-brand {
  display:flex; align-items:center; justify-content:center; gap:0.75rem;
  font-size:1.5rem; font-weight:800; color:var(--teal-light);
  margin-bottom:1.5rem; text-decoration:none;
}
.auth-card {
  background:var(--glass-bg); border:1px solid var(--glass-border);
  border-radius:var(--radius); padding:2.25rem;
  backdrop-filter:blur(30px); box-shadow:var(--shadow-glow);
}
.auth-card h1 { font-size:1.6rem; margin-bottom:0.3rem; }
.auth-subtitle { color:var(--text-muted); margin-bottom:1.5rem; font-size:0.9rem; }
.auth-switch { text-align:center; margin-top:1.25rem; font-size:0.9rem; color:var(--text-secondary); }

/* ============================
   DASHBOARD
   ============================ */
.page-header { margin-bottom:2rem; }
.greeting { font-size:0.9rem; color:var(--text-muted); margin-bottom:0.25rem; }
.greeting span { color:var(--teal-light); font-weight:600; }

.section-mastery { margin-bottom:2rem; }
.mastery-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:1.25rem; }
.mastery-card { background:var(--glass-bg); border:1px solid var(--glass-border); border-radius:var(--radius); padding:1.25rem 1.5rem; }
.mastery-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:0.75rem; }
.mastery-section { font-weight:600; font-size:0.9rem; }
.mastery-pct { font-weight:800; font-size:1.1rem; color:var(--teal-light); }
.progress-bar { height:8px; background:rgba(255,255,255,0.08); border-radius:4px; overflow:hidden; }
.progress-fill { height:100%; border-radius:4px; background:linear-gradient(90deg,var(--teal),var(--teal-light)); transition:width 1s ease; }

.quick-actions { display:flex; gap:1rem; flex-wrap:wrap; margin-bottom:2rem; }
.history-table { width:100%; border-collapse:collapse; }
.history-table th { padding:0.6rem 1rem; text-align:left; font-size:0.75rem; text-transform:uppercase; letter-spacing:1px; color:var(--text-muted); border-bottom:1px solid var(--border); }
.history-table td { padding:0.75rem 1rem; font-size:0.9rem; border-bottom:1px solid rgba(255,255,255,0.04); }
.history-table tr:hover td { background:rgba(13,148,136,0.06); }

/* ============================
   EXAM SETUP
   ============================ */
.setup-card { max-width:700px; margin:0 auto; }
.section-options { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:0.75rem; margin-bottom:1.5rem; }
.section-option {
  border:2px solid var(--glass-border); border-radius:var(--radius); padding:1rem;
  cursor:pointer; text-align:center; transition:all .2s; background:var(--glass-bg);
}
.section-option:hover { border-color:var(--teal); }
.section-option.selected { border-color:var(--teal); background:rgba(13,148,136,0.15); }
.section-option .sec-icon { font-size:1.75rem; margin-bottom:0.5rem; display:block; }
.section-option .sec-name { font-weight:600; font-size:0.85rem; }
.section-option .sec-desc { font-size:0.75rem; color:var(--text-muted); margin-top:0.25rem; }

/* ============================
   EXAM PLAYER
   ============================ */
.exam-layout { display:grid; grid-template-columns:1fr 280px; gap:2rem; align-items:start; }
@media(max-width:900px) { .exam-layout { grid-template-columns:1fr; } }

.exam-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:1.5rem; }
.exam-progress-bar { flex:1; height:6px; background:rgba(255,255,255,0.08); border-radius:3px; margin:0 1.5rem; overflow:hidden; }
.exam-progress-fill { height:100%; background:linear-gradient(90deg,var(--teal),var(--coral)); border-radius:3px; transition:width .3s; }

.timer {
  display:flex; align-items:center; gap:0.5rem; padding:0.5rem 1rem;
  background:rgba(13,148,136,0.15); border:1px solid rgba(13,148,136,0.3);
  border-radius:50px; font-weight:700; font-size:1rem; min-width:90px; justify-content:center;
  transition:background .3s, border-color .3s;
}
.timer.warning { background:rgba(249,115,22,0.15); border-color:rgba(249,115,22,0.4); color:var(--coral); }
.timer.danger  { background:rgba(239,68,68,0.2);  border-color:rgba(239,68,68,0.5);  color:#f87171; animation:pulse 1s infinite; }

.question-card { background:var(--glass-bg); border:1px solid var(--glass-border); border-radius:var(--radius); padding:2rem; animation:fadeIn 0.3s ease; }
.section-badge { display:inline-flex; align-items:center; gap:0.4rem; padding:0.3rem 0.8rem; border-radius:50px; font-size:0.75rem; font-weight:600; margin-bottom:1rem; }
.section-badge.directed    { background:rgba(99,102,241,0.2); color:#a5b4fc; border:1px solid rgba(99,102,241,0.3); }
.section-badge.letter      { background:rgba(249,115,22,0.2); color:#fdba74; border:1px solid rgba(249,115,22,0.3); }
.section-badge.dialogue    { background:rgba(16,185,129,0.2); color:#6ee7b7; border:1px solid rgba(16,185,129,0.3); }
.section-badge.comprehension { background:rgba(245,158,11,0.2); color:#fcd34d; border:1px solid rgba(245,158,11,0.3); }
.section-badge.grammar     { background:rgba(236,72,153,0.2); color:#f9a8d4; border:1px solid rgba(236,72,153,0.3); }

.question-text { font-size:1rem; line-height:1.7; margin-bottom:1.5rem; white-space:pre-line; }
.passage-box { background:rgba(255,255,255,0.04); border-left:3px solid var(--teal); border-radius:0 var(--radius-sm) var(--radius-sm) 0; padding:1rem 1.25rem; margin-bottom:1.25rem; font-size:0.9rem; line-height:1.8; white-space:pre-line; }

/* MCQ Options */
.mcq-options { display:flex; flex-direction:column; gap:0.75rem; }
.mcq-option {
  display:flex; align-items:center; gap:0.75rem; padding:0.9rem 1.1rem;
  background:rgba(255,255,255,0.04); border:1.5px solid rgba(255,255,255,0.08);
  border-radius:var(--radius-sm); cursor:pointer; transition:all .2s;
}
.mcq-option:hover { border-color:var(--teal); background:rgba(13,148,136,0.1); }
.mcq-option.selected { border-color:var(--teal); background:rgba(13,148,136,0.2); }
.option-letter {
  width:30px; height:30px; border-radius:50%;
  background:rgba(255,255,255,0.08); display:flex; align-items:center;
  justify-content:center; font-weight:700; font-size:0.85rem; flex-shrink:0;
  transition:all .2s;
}
.mcq-option.selected .option-letter { background:var(--teal); }
.option-text { font-size:0.9rem; }

/* Exam sidebar */
.exam-sidebar { position:sticky; top:90px; }
.question-nav { display:grid; grid-template-columns:repeat(5,1fr); gap:0.5rem; margin-top:0.75rem; }
.q-nav-btn {
  width:36px; height:36px; border-radius:8px; border:none; cursor:pointer;
  font-size:0.8rem; font-weight:600;
  background:rgba(255,255,255,0.06); color:var(--text-secondary);
  transition:all .2s; display:flex; align-items:center; justify-content:center;
}
.q-nav-btn.answered  { background:rgba(13,148,136,0.3); color:var(--teal-light); }
.q-nav-btn.current   { background:var(--teal); color:#fff; }

.exam-controls { display:flex; gap:0.75rem; margin-top:1.5rem; justify-content:space-between; }

/* ============================
   RESULTS PAGE
   ============================ */
.results-hero { text-align:center; padding:2.5rem; }
.score-ring-wrap { width:180px; height:180px; margin:0 auto 1.5rem; position:relative; }
.score-ring-wrap svg { transform:rotate(-90deg); }
.score-ring-bg  { fill:none; stroke:rgba(255,255,255,0.08); stroke-width:12; }
.score-ring-fg  { fill:none; stroke-width:12; stroke-linecap:round; transition:stroke-dashoffset 1.5s ease; }
.score-ring-text { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.score-pct  { font-size:2.2rem; font-weight:900; line-height:1; }
.score-label { font-size:0.8rem; color:var(--text-muted); }
.grade-badge {
  display:inline-block; padding:0.4rem 1.2rem; border-radius:50px;
  font-weight:700; font-size:0.9rem; margin-bottom:1rem;
}

.feedback-list { display:flex; flex-direction:column; gap:1rem; }
.feedback-item { background:var(--glass-bg); border:1px solid var(--glass-border); border-radius:var(--radius); padding:1.25rem; }
.feedback-item.correct { border-left:4px solid var(--success); }
.feedback-item.incorrect { border-left:4px solid var(--danger); }
.feedback-status { display:flex; align-items:center; gap:0.5rem; font-size:0.8rem; font-weight:600; margin-bottom:0.5rem; }
.feedback-status.correct { color:var(--success); }
.feedback-status.incorrect { color:var(--danger); }
.feedback-q { font-size:0.95rem; margin-bottom:0.75rem; white-space:pre-line; }
.feedback-answers { display:grid; gap:0.5rem; }
.fa-answer { padding:0.6rem 0.9rem; border-radius:var(--radius-sm); font-size:0.88rem; }
.fa-answer.user-ans    { background:rgba(239,68,68,0.1); border:1px solid rgba(239,68,68,0.2); }
.fa-answer.correct-ans { background:rgba(16,185,129,0.1); border:1px solid rgba(16,185,129,0.2); }
.fa-answer label { font-size:0.75rem; font-weight:600; text-transform:uppercase; letter-spacing:0.5px; display:block; margin-bottom:0.2rem; color:var(--text-muted); }
.explanation-box { margin-top:0.75rem; padding:0.75rem 1rem; background:rgba(13,148,136,0.08); border-radius:var(--radius-sm); font-size:0.85rem; color:var(--text-secondary); }

/* ============================
   STUDY PAGE
   ============================ */
.study-tabs { display:flex; gap:0.5rem; flex-wrap:wrap; margin-bottom:2rem; }
.study-tab {
  padding:0.55rem 1.1rem; border-radius:50px; border:1px solid var(--border);
  background:transparent; color:var(--text-secondary); cursor:pointer;
  font-family:'Poppins',sans-serif; font-size:0.85rem; font-weight:500; transition:all .2s;
}
.study-tab:hover { border-color:var(--teal); color:var(--teal-light); }
.study-tab.active { background:var(--teal); color:#fff; border-color:var(--teal); }
.tab-panel { display:none; animation:fadeIn 0.3s ease; }
.tab-panel.active { display:block; }

/* Grammar tables */
.grammar-table { width:100%; border-collapse:collapse; font-size:0.88rem; margin-bottom:1.5rem; }
.grammar-table th { padding:0.6rem 1rem; background:rgba(13,148,136,0.2); text-align:left; font-size:0.8rem; text-transform:uppercase; letter-spacing:1px; }
.grammar-table td { padding:0.6rem 1rem; border-bottom:1px solid rgba(255,255,255,0.05); }
.grammar-table tr:hover td { background:rgba(13,148,136,0.05); }
.verb-es { color:var(--coral); font-weight:600; }
.verb-irreg { color:var(--gold); }

/* Vocab search */
.vocab-search { position:relative; margin-bottom:1.5rem; }
.vocab-search input { padding-left:2.8rem; }
.vocab-search i { position:absolute; left:1rem; top:50%; transform:translateY(-50%); color:var(--text-muted); }
.vocab-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:0.75rem; }
.vocab-card { background:rgba(255,255,255,0.04); border:1px solid var(--border); border-radius:var(--radius-sm); padding:0.75rem 1rem; transition:all .2s; }
.vocab-card:hover { border-color:var(--teal); background:rgba(13,148,136,0.08); }
.vocab-es { font-weight:700; font-size:0.95rem; color:var(--teal-light); }
.vocab-en { font-size:0.85rem; color:var(--text-muted); }
.vocab-cat { display:none; }

/* Phrase bank */
.phrase-section { margin-bottom:2rem; }
.phrase-section h3 { margin-bottom:0.75rem; color:var(--teal-light); display:flex; align-items:center; gap:0.5rem; }
.phrase-list { display:flex; flex-direction:column; gap:0.5rem; }
.phrase-item { display:flex; justify-content:space-between; align-items:center; padding:0.6rem 1rem; background:rgba(255,255,255,0.04); border-radius:var(--radius-sm); border:1px solid rgba(255,255,255,0.06); gap:1rem; }
.phrase-es { font-weight:500; color:var(--text-primary); flex:1; }
.phrase-en { font-size:0.82rem; color:var(--text-muted); text-align:right; flex:1; }

/* Letter format */
.letter-sample { background:rgba(255,255,255,0.04); border:1px solid var(--border); border-radius:var(--radius); padding:1.75rem; font-family:Georgia,serif; line-height:2; white-space:pre-line; font-size:0.92rem; color:var(--text-secondary); }
.letter-annotation { background:rgba(13,148,136,0.1); border:1px solid rgba(13,148,136,0.3); border-radius:var(--radius-sm); padding:0.75rem 1rem; margin-bottom:0.75rem; font-size:0.88rem; }
.letter-annotation strong { color:var(--teal-light); }

/* ============================
   PROGRESS PAGE
   ============================ */
.charts-grid { display:grid; grid-template-columns:1fr 1fr; gap:1.5rem; margin-bottom:2rem; }
@media(max-width:768px) { .charts-grid { grid-template-columns:1fr; } }
.chart-card { background:var(--glass-bg); border:1px solid var(--glass-border); border-radius:var(--radius); padding:1.5rem; }
.topic-table { width:100%; border-collapse:collapse; font-size:0.88rem; }
.topic-table th { padding:0.6rem 1rem; border-bottom:1px solid var(--border); text-align:left; font-size:0.75rem; text-transform:uppercase; letter-spacing:1px; color:var(--text-muted); }
.topic-table td { padding:0.7rem 1rem; border-bottom:1px solid rgba(255,255,255,0.04); }
.accuracy-bar { width:100px; height:6px; background:rgba(255,255,255,0.07); border-radius:3px; overflow:hidden; display:inline-block; vertical-align:middle; }
.accuracy-fill { height:100%; border-radius:3px; background:var(--teal); }

/* ============================
   MODALS
   ============================ */
.modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,0.7); z-index:500; display:flex; align-items:center; justify-content:center; padding:2rem; animation:fadeIn 0.2s; }
.modal { background:var(--navy-card); border:1px solid var(--glass-border); border-radius:var(--radius); padding:2rem; max-width:460px; width:100%; animation:slideUp 0.3s ease; }
.modal h2 { margin-bottom:0.75rem; }
.modal-actions { display:flex; gap:0.75rem; justify-content:flex-end; margin-top:1.5rem; }

/* Loading */
.loading-spinner { display:flex; align-items:center; justify-content:center; padding:3rem; }
.spinner { width:40px; height:40px; border:3px solid var(--border); border-top-color:var(--teal); border-radius:50%; animation:spin 0.7s linear infinite; }

/* Empty state */
.empty-state { text-align:center; padding:3rem 2rem; color:var(--text-muted); }
.empty-state i { font-size:3rem; margin-bottom:1rem; opacity:0.5; }

/* ============================
   ANIMATIONS
   ============================ */
@keyframes slideUp   { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
@keyframes slideDown { from { opacity:0; transform:translateY(-15px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeIn    { from { opacity:0; } to { opacity:1; } }
@keyframes floatUp   { 0% { transform:translateY(110vh) rotate(0deg); opacity:0; } 10% { opacity:1; } 90% { opacity:1; } 100% { transform:translateY(-10vh) rotate(15deg); opacity:0; } }
@keyframes pulse     { 0%,100% { opacity:1; } 50% { opacity:0.6; } }
@keyframes spin      { to { transform:rotate(360deg); } }

/* ============================
   RESPONSIVE
   ============================ */
@media(max-width:768px) {
  .navbar { padding:0.6rem 1rem; }
  .nav-link span { display:none; }
  .main-content { padding:1.25rem; }
  h1 { font-size:1.5rem; }
  .stat-grid { grid-template-columns:1fr 1fr; }
  .exam-controls { flex-direction:column; }
}
