/* ═══════════════════════════════════════════════════════════
   PSYCHOLOGY OF ADJUSTMENT — STUDY COMPANION
   style.css  |  Professional EdTech UI
   ═══════════════════════════════════════════════════════════ */

/* ── VARIABLES ────────────────────────────────────────────── */
:root {
  --lav:        #7C6BE8;
  --lav-d:      #6255D0;
  --lav-light:  #EDE9FF;
  --lav-glass:  rgba(124,107,232,0.08);
  --blue:       #4E9AF1;
  --blue-light: #DBEAFE;
  --mint:       #34D399;
  --mint-light: #D1FAE5;
  --pink:       #EC4899;
  --pink-light: #FCE7F3;
  --amber:      #F59E0B;
  --amber-light:#FEF3C7;
  --violet:     #8B5CF6;
  --red:        #EF4444;
  --red-light:  #FEE2E2;

  --bg:         #F7F6FE;
  --bg-alt:     #EFECFF;
  --surface:    #FFFFFF;
  --surface-2:  #F9F8FF;
  --border:     rgba(124,107,232,0.12);
  --border-md:  rgba(124,107,232,0.22);
  --text:       #1C1537;
  --text-2:     #6B63A0;
  --text-3:     #A79DC8;

  --shadow-xs:  0 1px 4px rgba(124,107,232,0.08);
  --shadow-sm:  0 3px 14px rgba(124,107,232,0.10);
  --shadow-md:  0 8px 30px rgba(124,107,232,0.14);
  --shadow-lg:  0 16px 48px rgba(124,107,232,0.18);
  --shadow-hov: 0 12px 40px rgba(124,107,232,0.22);

  --nav-h:      64px;
  --radius:     14px;
  --radius-lg:  22px;
  --radius-xl:  32px;
  --trans:      all .2s cubic-bezier(.4,0,.2,1);
}

[data-theme="dark"] {
  --bg:         #0E0B22;
  --bg-alt:     #160E38;
  --surface:    #1C1537;
  --surface-2:  #231A45;
  --border:     rgba(168,154,240,0.15);
  --border-md:  rgba(168,154,240,0.28);
  --text:       #EDE9FF;
  --text-2:     #9487CC;
  --text-3:     #635B92;
  --lav:        #A89AF0;
  --lav-d:      #C4B5FD;
  --lav-light:  #2D2452;
  --lav-glass:  rgba(168,154,240,0.06);
  --blue-light: #1E3A5F;
  --mint-light: #0D3326;
  --pink-light: #4A1328;
  --amber-light:#3B2800;
  --red-light:  #3B0A0A;
  --shadow-sm:  0 3px 14px rgba(0,0,0,0.3);
  --shadow-md:  0 8px 30px rgba(0,0,0,0.4);
  --shadow-hov: 0 12px 40px rgba(0,0,0,0.5);
}

/* ── RESET & BASE ─────────────────────────────────────────── */
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html { scroll-behavior:smooth; font-size:16px; }
body {
  font-family:'Poppins', system-ui, sans-serif;
  background:var(--bg); color:var(--text);
  line-height:1.65; overflow-x:hidden;
  transition:background .3s, color .3s;
  padding-top:var(--nav-h);
}
a { color:inherit; text-decoration:none; cursor:pointer; }
button { font-family:inherit; cursor:pointer; border:none; background:none; }
select,input,textarea { font-family:inherit; }
ul { list-style:none; }
img { max-width:100%; }
::-webkit-scrollbar { width:5px; height:5px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:var(--lav); border-radius:4px; opacity:.4; }

/* ── UTILITY ──────────────────────────────────────────────── */
.hidden  { display:none !important; }
.page    { display:none; min-height:calc(100vh - var(--nav-h)); }
.page.active { display:block; }
.section { max-width:1200px; margin:0 auto; padding:40px 28px; }
.page-shell { max-width:1200px; margin:0 auto; padding:36px 28px 60px; }
.empty-state { text-align:center; padding:48px; color:var(--text-2); font-size:15px; }
.empty-state.large { padding:80px 40px; font-size:17px; }

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn {
  display:inline-flex; align-items:center; gap:6px;
  padding:9px 20px; border-radius:var(--radius); font-weight:600;
  font-size:14px; transition:var(--trans); white-space:nowrap; cursor:pointer;
}
.btn-primary {
  background:var(--lav); color:#fff;
  box-shadow:0 4px 14px rgba(124,107,232,0.35);
}
.btn-primary:hover { background:var(--lav-d); transform:translateY(-1px); box-shadow:0 6px 20px rgba(124,107,232,0.45); }
.btn-outline { background:transparent; color:var(--lav); border:1.5px solid var(--lav); }
.btn-outline:hover { background:var(--lav-light); }
.btn-ghost { background:var(--bg-alt); color:var(--text-2); border:1px solid var(--border); }
.btn-ghost:hover { background:var(--lav-light); color:var(--lav); border-color:var(--lav); }
.btn-lg { padding:12px 28px; font-size:15px; border-radius:var(--radius-lg); }
.btn-full { width:100%; justify-content:center; padding:14px; font-size:16px; margin-top:16px; }
.btn:disabled { opacity:.45; cursor:not-allowed; transform:none !important; }
.icon-btn {
  width:34px; height:34px; border-radius:10px; display:flex; align-items:center;
  justify-content:center; font-size:16px; background:var(--bg-alt);
  border:1px solid var(--border); transition:var(--trans);
}
.icon-btn:hover { background:var(--lav-light); border-color:var(--lav); }

/* ── INPUTS ───────────────────────────────────────────────── */
.select-input, .search-input {
  padding:8px 14px; border-radius:var(--radius); border:1.5px solid var(--border);
  background:var(--surface); color:var(--text); font-size:13.5px;
  font-family:inherit; outline:none; transition:var(--trans);
}
.select-input:focus, .search-input:focus { border-color:var(--lav); box-shadow:0 0 0 3px rgba(124,107,232,0.12); }

/* ── NAVBAR ───────────────────────────────────────────────── */
.navbar {
  position:fixed; top:0; left:0; right:0; z-index:200;
  height:var(--nav-h);
  background:rgba(247,246,254,0.92);
  backdrop-filter:blur(18px) saturate(1.4);
  -webkit-backdrop-filter:blur(18px) saturate(1.4);
  border-bottom:1px solid var(--border);
  transition:background .3s, box-shadow .3s;
}
[data-theme="dark"] .navbar { background:rgba(14,11,34,0.92); }
.navbar.scrolled { box-shadow:var(--shadow-sm); }

.nav-inner {
  max-width:1400px; margin:0 auto; padding:0 24px;
  height:100%; display:flex; align-items:center; gap:12px;
}
.nav-logo {
  display:flex; align-items:center; gap:8px; font-weight:700;
  font-size:17px; color:var(--lav); white-space:nowrap;
  font-family:'Playfair Display',serif; flex-shrink:0;
}
.nav-logo:hover { opacity:.85; }
.logo-icon { font-size:22px; }
.logo-text sup { font-size:10px; letter-spacing:1px; opacity:.7; font-family:'Poppins',sans-serif; }
.nav-links { display:flex; align-items:center; gap:2px; flex:1; margin:0 12px; }
.nav-btn {
  padding:6px 13px; border-radius:10px; font-size:13px; font-weight:500;
  color:var(--text-2); transition:var(--trans); white-space:nowrap;
}
.nav-btn:hover, .nav-btn.active { background:var(--lav-light); color:var(--lav); }
.nav-actions { display:flex; align-items:center; gap:8px; margin-left:auto; }
.upload-btn-nav {
  padding:7px 14px; border-radius:var(--radius); font-size:13px; font-weight:600;
  background:var(--lav-glass); color:var(--lav); border:1.5px solid var(--border-md);
  cursor:pointer; transition:var(--trans); white-space:nowrap;
}
.upload-btn-nav:hover { background:var(--lav-light); border-color:var(--lav); }
.theme-btn {
  width:36px; height:36px; border-radius:10px; font-size:17px;
  background:var(--bg-alt); border:1px solid var(--border); transition:var(--trans);
}
.theme-btn:hover { background:var(--lav-light); }
.hamburger { display:none; font-size:22px; color:var(--text); }

/* ── TOAST ────────────────────────────────────────────────── */
#toast-container { position:fixed; bottom:24px; right:24px; z-index:900; display:flex; flex-direction:column; gap:10px; }
.toast {
  background:var(--surface); border:1px solid var(--border);
  border-left:4px solid var(--lav); border-radius:12px;
  padding:12px 18px; font-size:13.5px; box-shadow:var(--shadow-md);
  animation:slideIn .3s ease; max-width:320px;
}
.toast.success { border-left-color:var(--mint); }
.toast.error   { border-left-color:var(--red); }
@keyframes slideIn { from { opacity:0; transform:translateX(20px); } to { opacity:1; transform:translateX(0); } }

/* ── LOADING ──────────────────────────────────────────────── */
.loading-overlay {
  position:fixed; inset:0; z-index:500;
  background:rgba(247,246,254,0.9); backdrop-filter:blur(8px);
  display:flex; align-items:center; justify-content:center;
}
[data-theme="dark"] .loading-overlay { background:rgba(14,11,34,0.9); }
.loading-box { text-align:center; }
.loading-spinner {
  width:52px; height:52px; border:4px solid var(--lav-light);
  border-top-color:var(--lav); border-radius:50%;
  animation:spin .8s linear infinite; margin:0 auto 16px;
}
.loading-box p { color:var(--text-2); font-size:14px; }
@keyframes spin { to { transform:rotate(360deg); } }

/* ── HERO ─────────────────────────────────────────────────── */
.hero-section {
  max-width:1200px; margin:0 auto; padding:56px 28px 48px;
  display:grid; grid-template-columns:1fr 380px; gap:60px; align-items:center;
  position:relative;
}
.hero-section::before {
  content:'';
  position:absolute; inset:0; pointer-events:none;
  background:
    radial-gradient(ellipse 60% 70% at 65% 50%, rgba(124,107,232,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 5% 20%,  rgba(78,154,241,0.05) 0%, transparent 60%);
}
.hero-badge {
  display:inline-block; background:var(--lav-glass); color:var(--lav);
  border:1px solid var(--border-md); padding:5px 16px; border-radius:40px;
  font-size:12px; font-weight:600; letter-spacing:.3px; margin-bottom:20px;
  animation:fadeUp .5s ease both;
}
.hero-title {
  font-family:'Playfair Display',serif;
  font-size:clamp(40px,5.5vw,66px); font-weight:700; line-height:1.08;
  margin-bottom:18px; animation:fadeUp .5s .08s ease both;
}
.hero-title em {
  font-style:italic;
  background:linear-gradient(135deg,var(--lav),var(--blue) 55%,var(--mint));
  -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text;
}
.hero-sub {
  font-size:16px; color:var(--text-2); max-width:500px; line-height:1.8;
  margin-bottom:32px; animation:fadeUp .5s .16s ease both;
}
.hero-ctas { display:flex; gap:12px; flex-wrap:wrap; animation:fadeUp .5s .24s ease both; }

/* Brain Visual */
.hero-visual {
  position:relative; width:360px; height:360px;
  display:flex; align-items:center; justify-content:center;
  animation:fadeUp .6s .3s ease both;
}
.brain-ring {
  position:absolute; border-radius:50%; border:1.5px solid;
  animation:ringPulse 4s ease-in-out infinite;
}
.ring-1 { width:100%; height:100%; border-color:rgba(124,107,232,0.12); animation-delay:0s; }
.ring-2 { width:72%;  height:72%;  border-color:rgba(78,154,241,0.15); animation-delay:.6s; }
.ring-3 { width:46%;  height:46%;  border-color:rgba(52,211,153,0.2); animation-delay:1.2s; }
.brain-center {
  font-size:100px; position:relative; z-index:2;
  animation:brainFloat 3s ease-in-out infinite;
  filter:drop-shadow(0 0 30px rgba(124,107,232,0.35));
}
.orbit-tag {
  position:absolute; background:var(--surface); border:1px solid var(--border-md);
  padding:5px 12px; border-radius:20px; font-size:11.5px; font-weight:700;
  color:var(--lav); box-shadow:var(--shadow-xs); z-index:3;
}
.t1 { top:8%;  left:18%; }  .t2 { top:8%;  right:14%; }
.t3 { top:50%; right:0%;  transform:translateY(-50%); }
.t4 { bottom:12%; right:16%; }
.t5 { bottom:12%; left:16%; }
.t6 { top:50%; left:-2%; transform:translateY(-50%); }

/* ── STATS BAR ────────────────────────────────────────────── */
.stats-bar {
  background:var(--surface); border-top:1px solid var(--border);
  border-bottom:1px solid var(--border);
  display:flex; align-items:center; justify-content:center; gap:0;
  padding:18px 28px;
}
.stat-item { display:flex; flex-direction:column; align-items:center; gap:2px; padding:0 40px; }
.stat-num { font-family:'Playfair Display',serif; font-size:34px; font-weight:700; color:var(--lav); line-height:1; }
.stat-lbl { font-size:12px; color:var(--text-2); font-weight:500; letter-spacing:.3px; }
.stat-div { width:1px; height:48px; background:var(--border); flex-shrink:0; }

/* ── SECTION HEADERS ──────────────────────────────────────── */
.section-header { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; margin-bottom:28px; flex-wrap:wrap; }
.section-eyebrow { font-size:11px; font-weight:700; letter-spacing:2px; color:var(--lav); margin-bottom:4px; }
.section-title { font-family:'Playfair Display',serif; font-size:clamp(24px,3.5vw,34px); font-weight:700; }

/* ── FILTER PILLS ─────────────────────────────────────────── */
.filter-pills { display:flex; gap:6px; flex-wrap:wrap; }
.filter-pill {
  padding:6px 16px; border-radius:20px; font-size:12.5px; font-weight:600;
  background:var(--bg-alt); color:var(--text-2); border:1.5px solid var(--border);
  cursor:pointer; transition:var(--trans);
}
.filter-pill.active, .filter-pill:hover { background:var(--lav); color:#fff; border-color:var(--lav); }

/* ── TOPICS GRID ──────────────────────────────────────────── */
.topics-grid {
  display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:16px;
}
.topic-card {
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg);
  padding:22px; box-shadow:var(--shadow-xs); transition:var(--trans);
  animation:fadeUp .4s ease both; cursor:default;
}
.topic-card:hover { transform:translateY(-4px); box-shadow:var(--shadow-hov); border-color:var(--border-md); }
.tc-top { display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; }
.tc-icon { font-size:32px; }
.tc-badge {
  padding:3px 11px; border-radius:16px; font-size:10.5px; font-weight:700;
  white-space:nowrap; letter-spacing:.2px;
}
.tc-name { font-size:14.5px; font-weight:700; line-height:1.35; margin-bottom:6px; }
.tc-preview { font-size:12px; color:var(--text-2); line-height:1.6; margin-bottom:16px;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.tc-actions { display:flex; gap:8px; }
.tc-actions .btn { flex:1; justify-content:center; font-size:12.5px; padding:7px 10px; }
.tc-progress { height:3px; background:var(--bg-alt); border-radius:2px; margin-bottom:14px; overflow:hidden; }
.tc-progress-fill { height:100%; background:var(--lav); border-radius:2px; transition:width .6s ease; }

/* ── DAILY FACT ───────────────────────────────────────────── */
.daily-fact-card {
  background:linear-gradient(135deg,var(--lav-light),var(--blue-light));
  border:1px solid var(--border-md); border-radius:var(--radius-xl);
  padding:32px 36px; display:flex; gap:24px; align-items:flex-start;
}
.fact-icon { font-size:40px; flex-shrink:0; }
.fact-eyebrow { font-size:10.5px; font-weight:700; letter-spacing:2px; color:var(--lav); margin-bottom:6px; }
.fact-title { font-family:'Playfair Display',serif; font-size:20px; font-weight:700; margin-bottom:8px; }
.fact-text { font-size:14px; color:var(--text-2); line-height:1.8; max-width:680px; }

/* ── UPLOAD HERO ──────────────────────────────────────────── */
.upload-hero {
  background:var(--surface-2); border:2px dashed var(--border-md);
  border-radius:var(--radius-xl); padding:32px 36px;
  display:flex; align-items:center; justify-content:space-between; gap:24px;
  transition:var(--trans);
}
.upload-hero:hover { border-color:var(--lav); background:var(--lav-glass); }
.upload-hero-text h3 { font-size:18px; font-weight:700; margin-bottom:6px; }
.upload-hero-text p { font-size:13.5px; color:var(--text-2); max-width:500px; line-height:1.7; }

/* ── SITE FOOTER ──────────────────────────────────────────── */
.site-footer {
  text-align:center; padding:40px 28px; border-top:1px solid var(--border);
  font-size:13.5px; color:var(--text-2); line-height:2;
}
.site-footer strong { color:var(--lav); }

/* ── PAGE HEADER ──────────────────────────────────────────── */
.page-hdr {
  display:flex; align-items:center; justify-content:space-between;
  gap:20px; flex-wrap:wrap; margin-bottom:28px;
}
.page-eyebrow { font-size:11px; font-weight:700; letter-spacing:2px; color:var(--lav); margin-bottom:4px; }
.page-h1 { font-family:'Playfair Display',serif; font-size:clamp(26px,4vw,36px); font-weight:700; }

/* ── STUDY LAYOUT ─────────────────────────────────────────── */
.study-layout {
  display:grid; grid-template-columns:1fr 360px; min-height:calc(100vh - var(--nav-h));
  transition:grid-template-columns .3s ease;
}
.study-layout.notes-hidden { grid-template-columns:1fr 0; }

/* Content Panel */
.study-content-panel {
  padding:28px 32px; overflow-y:auto;
  border-right:1px solid var(--border);
}
.panel-header {
  display:flex; align-items:center; justify-content:space-between;
  gap:16px; margin-bottom:24px; flex-wrap:wrap;
}
.topic-selector { display:flex; align-items:center; gap:8px; }
.topic-selector select { min-width:220px; padding:9px 14px; }
.panel-nav-btn {
  width:34px; height:34px; border-radius:10px; font-size:18px;
  background:var(--bg-alt); border:1px solid var(--border); color:var(--text);
  display:flex; align-items:center; justify-content:center; transition:var(--trans);
}
.panel-nav-btn:hover { background:var(--lav-light); border-color:var(--lav); }
.study-mode-tabs { display:flex; gap:6px; }
.mode-tab {
  padding:7px 16px; border-radius:10px; font-size:13px; font-weight:600;
  background:var(--bg-alt); color:var(--text-2); border:1.5px solid var(--border);
  transition:var(--trans);
}
.mode-tab.active { background:var(--lav); color:#fff; border-color:var(--lav); }
.mode-tab:hover:not(.active) { border-color:var(--lav); color:var(--lav); }

/* Notes Panel */
.notes-panel {
  background:var(--surface-2); border-left:1px solid var(--border);
  display:flex; flex-direction:column; overflow:hidden;
}
.notes-panel-header {
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 18px; border-bottom:1px solid var(--border);
  font-weight:700; font-size:14px;
}
.notes-actions { display:flex; gap:6px; }
.note-title-input {
  margin:12px 14px 0; padding:9px 12px; border-radius:var(--radius);
  border:1.5px solid var(--border); background:var(--surface);
  color:var(--text); font-size:14px; font-weight:600;
  outline:none; transition:var(--trans);
}
.note-title-input:focus { border-color:var(--lav); }
.note-editor {
  flex:1; margin:10px 14px; padding:12px 14px; border-radius:var(--radius);
  border:1.5px solid var(--border); background:var(--surface);
  color:var(--text); font-size:13.5px; line-height:1.7; resize:none;
  outline:none; transition:var(--trans); min-height:200px;
}
.note-editor:focus { border-color:var(--lav); box-shadow:0 0 0 3px rgba(124,107,232,0.1); }
.saved-notes-list {
  border-top:1px solid var(--border); padding:10px 14px;
  display:flex; flex-direction:column; gap:6px; max-height:220px; overflow-y:auto;
}
.saved-note-chip {
  padding:8px 12px; border-radius:10px; background:var(--bg);
  border:1px solid var(--border); font-size:12.5px; cursor:pointer;
  transition:var(--trans); display:flex; justify-content:space-between; align-items:center;
}
.saved-note-chip:hover { border-color:var(--lav); background:var(--lav-light); }
.note-chip-title { font-weight:600; color:var(--text); }
.note-chip-del { font-size:14px; opacity:.5; }
.note-chip-del:hover { opacity:1; color:var(--red); }
.notes-collapse-btn {
  position:fixed; right:16px; top:50%; transform:translateY(-50%);
  width:36px; height:36px; border-radius:50%; background:var(--lav);
  color:#fff; font-size:16px; box-shadow:var(--shadow-md); z-index:50;
}

/* Study Content Cards */
.study-content { display:flex; flex-direction:column; gap:16px; }
.s-card {
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius-lg); padding:22px 24px;
  box-shadow:var(--shadow-xs); animation:fadeUp .4s ease both;
}
.s-card-title { font-size:14.5px; font-weight:700; margin-bottom:12px; }
.s-card p { font-size:14px; line-height:1.85; }
.s-card p + p { margin-top:10px; }
.s-card ul { padding-left:18px; display:flex; flex-direction:column; gap:7px; margin-top:8px; }
.s-card ul li { font-size:13.5px; line-height:1.65; }
.s-card-2col { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.key-points-grid { display:flex; flex-direction:column; gap:8px; }
.kp-row {
  display:flex; gap:10px; align-items:flex-start;
  padding:10px 13px; background:var(--bg); border-radius:10px;
}
.kp-num {
  width:22px; height:22px; border-radius:50%; background:var(--violet);
  color:#fff; font-size:11px; font-weight:700; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
}
.kp-text { font-size:13.5px; line-height:1.65; }
.tagged-item {
  padding:8px 12px; border-radius:9px; font-size:13px;
  line-height:1.55; border:1px solid;
}
.s-summary-card {
  background:linear-gradient(135deg,rgba(124,107,232,.07),rgba(78,154,241,.07));
  border:2px solid rgba(124,107,232,.18) !important;
}
.mnemonic-box { margin-top:14px; padding:12px 14px; border-radius:10px; background:var(--mint-light); }
.quick-def-card {
  background:var(--lav-light); border:1px solid rgba(124,107,232,.25);
  border-radius:var(--radius-lg); padding:20px 24px; margin-bottom:14px;
}
.quick-label { font-size:11px; font-weight:700; letter-spacing:1.5px; color:var(--lav); margin-bottom:6px; }
.quick-def-card p { font-size:16px; font-weight:500; line-height:1.8; }

/* ── FLASHCARDS ───────────────────────────────────────────── */
.fc-progress-bar { height:4px; background:var(--bg-alt); border-radius:2px; margin-bottom:10px; overflow:hidden; }
.fc-progress-fill { height:100%; background:linear-gradient(90deg,var(--lav),var(--mint)); border-radius:2px; transition:width .4s ease; }
.fc-counter { text-align:center; color:var(--text-2); font-size:13.5px; margin-bottom:24px; }
.fc-stage { perspective:1200px; max-width:560px; margin:0 auto; }
.fc-card-wrap { height:280px; cursor:pointer; }
.fc-card {
  position:relative; width:100%; height:100%;
  transition:transform .65s cubic-bezier(.4,0,.2,1);
  transform-style:preserve-3d;
}
.fc-card.flipped { transform:rotateY(180deg); }
.fc-face {
  position:absolute; inset:0; border-radius:var(--radius-xl);
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  padding:36px 40px; text-align:center;
  backface-visibility:hidden; -webkit-backface-visibility:hidden;
}
.fc-front {
  background:var(--surface); border:2px solid var(--border-md);
  box-shadow:var(--shadow-md);
}
.fc-back { transform:rotateY(180deg); }
.fc-q-num {
  position:absolute; top:18px; left:24px;
  font-size:12px; font-weight:700; color:var(--text-3); letter-spacing:.5px;
}
.fc-term { font-size:20px; font-weight:700; line-height:1.4; margin-bottom:12px; }
.fc-hint { font-size:12.5px; color:var(--text-3); }
.fc-back-label {
  position:absolute; top:16px; font-size:10.5px; font-weight:700;
  letter-spacing:2px; color:rgba(255,255,255,.7);
}
.fc-definition { font-size:15.5px; font-weight:600; line-height:1.6; color:#fff; margin-bottom:10px; }
.fc-example { font-size:13px; color:rgba(255,255,255,.85); line-height:1.65; font-style:italic; }
.fc-controls { display:flex; align-items:center; justify-content:center; gap:16px; margin:24px 0 16px; }
.fc-dots { display:flex; gap:5px; }
.fc-dot {
  width:7px; height:7px; border-radius:50%; background:var(--border-md);
  cursor:pointer; transition:var(--trans);
}
.fc-dot.active { background:var(--lav); transform:scale(1.3); }
.fc-key-points {
  max-width:560px; margin:0 auto;
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius-lg); padding:20px 24px;
  animation:fadeUp .4s ease both;
}
.fc-kp-title { font-weight:700; color:var(--violet); font-size:14px; margin-bottom:12px; }
.fc-kp-list { display:flex; flex-direction:column; gap:7px; }
.fc-kp-item { display:flex; gap:10px; align-items:flex-start; font-size:13.5px; }
.fc-kp-dot { width:6px; height:6px; border-radius:50%; background:var(--lav); flex-shrink:0; margin-top:7px; }

/* ── NOTES PAGE ───────────────────────────────────────────── */
.notes-filter-bar { display:flex; gap:12px; margin-bottom:24px; flex-wrap:wrap; }
.notes-filter-bar .search-input { flex:1; min-width:200px; }
.notes-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:16px; }
.note-card {
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg);
  padding:20px; box-shadow:var(--shadow-xs); transition:var(--trans);
  display:flex; flex-direction:column; gap:10px;
}
.note-card:hover { box-shadow:var(--shadow-hov); border-color:var(--border-md); }
.note-card-header { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; }
.note-card-title { font-weight:700; font-size:15px; line-height:1.35; }
.note-cat-badge {
  padding:2px 10px; border-radius:14px; font-size:10.5px; font-weight:700;
  background:var(--lav-light); color:var(--lav); white-space:nowrap; flex-shrink:0;
}
.note-card-body { font-size:13px; color:var(--text-2); line-height:1.7;
  display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.note-card-footer { display:flex; justify-content:space-between; align-items:center; margin-top:4px; }
.note-card-date { font-size:11.5px; color:var(--text-3); }
.note-card-actions { display:flex; gap:6px; }

/* ── MODAL ────────────────────────────────────────────────── */
.modal-overlay {
  position:fixed; inset:0; z-index:300;
  background:rgba(28,21,55,0.6); backdrop-filter:blur(4px);
  display:flex; align-items:center; justify-content:center; padding:20px;
}
.modal {
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius-xl); padding:32px; width:100%; max-width:560px;
  box-shadow:var(--shadow-lg);
}
.modal-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:20px; }
.modal-header h3 { font-size:20px; font-weight:700; }
.modal-input, .modal-select, .modal-textarea {
  width:100%; padding:10px 14px; border-radius:var(--radius); border:1.5px solid var(--border);
  background:var(--bg); color:var(--text); font-family:inherit; font-size:14px;
  outline:none; transition:var(--trans); margin-bottom:12px; display:block;
}
.modal-input:focus, .modal-select:focus, .modal-textarea:focus { border-color:var(--lav); }
.modal-textarea { min-height:180px; resize:vertical; }
.modal-actions { display:flex; gap:10px; justify-content:flex-end; margin-top:4px; }

/* ── QUIZ ─────────────────────────────────────────────────── */
.score-card {
  border-radius:var(--radius-xl); padding:36px; text-align:center; margin-bottom:24px;
  background:linear-gradient(135deg,var(--lav-light),var(--blue-light));
  border:1px solid var(--border);
}
.score-emoji { font-size:56px; }
.score-number { font-family:'Playfair Display',serif; font-size:48px; font-weight:700; color:var(--lav); margin:8px 0 4px; line-height:1; }
.score-pct { font-size:18px; color:var(--text-2); margin-bottom:8px; }
.score-msg { color:var(--text-2); font-size:15px; }
.quiz-section-hd { font-weight:700; font-size:16.5px; color:var(--blue); margin:24px 0 16px; }
.quiz-block {
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg);
  padding:22px; margin-bottom:16px; box-shadow:var(--shadow-xs);
}
.q-item { padding:14px 16px; border-radius:12px; background:var(--bg-alt); margin-bottom:12px; transition:var(--trans); }
.q-item.correct { background:var(--mint-light); border:1px solid rgba(52,211,153,.5); }
.q-item.wrong   { background:var(--red-light);  border:1px solid rgba(239,68,68,.5); }
.q-text { font-size:13.5px; line-height:1.7; margin-bottom:8px; font-weight:500; }
.q-text b { color:var(--lav); }
.q-input {
  width:100%; padding:9px 13px; border-radius:9px; border:1.5px solid var(--border-md);
  background:var(--surface); color:var(--text); font-family:inherit; font-size:14px;
  outline:none; transition:var(--trans);
}
.q-input:focus { border-color:var(--lav); }
.q-input:disabled { opacity:.7; }
.q-fb { font-size:12px; font-weight:600; margin-top:6px; }
.q-fb.ok { color:var(--mint); } .q-fb.no { color:var(--red); }
.mcq-item { padding:16px; border-radius:12px; background:var(--bg-alt); margin-bottom:12px; }
.mcq-q { font-size:14px; font-weight:600; line-height:1.7; margin-bottom:12px; }
.mcq-q span { color:var(--lav); }
.mcq-opts { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.mcq-opt {
  padding:10px 13px; border-radius:10px; text-align:left;
  border:2px solid var(--border); background:var(--surface);
  font-size:13px; font-family:inherit; cursor:pointer; transition:var(--trans);
}
.mcq-opt:hover:not(:disabled) { border-color:var(--lav); background:var(--lav-light); }
.mcq-opt.selected { border-color:var(--lav); background:var(--lav-light); }
.mcq-opt.correct  { border-color:var(--mint); background:var(--mint-light); }
.mcq-opt.wrong    { border-color:var(--red);  background:var(--red-light); }
.mcq-exp { margin-top:10px; padding:9px 12px; background:var(--blue-light); border-radius:9px; font-size:12.5px; color:var(--blue); }

/* ── EXAM PAPER ───────────────────────────────────────────── */
.exam-controls { display:flex; gap:10px; flex-wrap:wrap; }
.exam-cover {
  background:var(--surface); border:1px solid var(--border);
  border-top:5px solid var(--lav); border-radius:var(--radius-lg);
  padding:32px; text-align:center; margin-bottom:20px; box-shadow:var(--shadow-sm);
}
.exam-cover-tag { font-size:10.5px; letter-spacing:3px; color:var(--text-3); margin-bottom:8px; text-transform:uppercase; }
.exam-cover h1 { font-family:'Playfair Display',serif; font-size:26px; font-weight:700; margin-bottom:6px; }
.exam-meta { display:flex; gap:28px; justify-content:center; font-size:13px; color:var(--text-2); margin-top:14px; flex-wrap:wrap; }
.exam-q-block {
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg);
  padding:26px; margin-bottom:18px; box-shadow:var(--shadow-xs);
}
.exam-q-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:16px; }
.exam-q-num { font-family:'Playfair Display',serif; font-size:22px; font-weight:700; }
.marks-badge { padding:4px 14px; border-radius:20px; font-size:13px; font-weight:700; color:#fff; }
.exam-q-sub { color:var(--text-2); font-size:13.5px; font-weight:600; margin-bottom:14px; }
.blank-item {
  display:flex; gap:10px; align-items:flex-start;
  padding:10px 13px; background:var(--bg-alt); border-radius:9px;
  font-size:13.5px; line-height:1.7; margin-bottom:8px;
}
.blank-num { color:var(--lav); font-weight:700; flex-shrink:0; }
.blank-ans { color:var(--mint); font-weight:700; margin-left:auto; flex-shrink:0; font-size:13px; }
.long-opt { padding:15px 18px; background:var(--bg-alt); border-radius:12px; font-size:14px; line-height:1.75; margin-bottom:10px; }
.exam-or { text-align:center; font-weight:700; color:var(--text-3); margin:10px 0; }
.hints-box { margin-top:12px; padding:12px 14px; background:var(--mint-light); border-radius:10px; }
.hints-box .hl { color:var(--mint); font-weight:700; font-size:13px; margin-bottom:6px; }
.hints-box li { font-size:12.5px; color:#065F46; margin-bottom:3px; padding-left:14px; position:relative; }
.hints-box li::before { content:"•"; position:absolute; left:4px; }
.sn-item { margin-bottom:10px; padding:12px 16px; background:var(--bg-alt); border-radius:11px; font-size:14px; }
.sn-item b { color:var(--lav); }
.sn-pts { padding-left:16px; margin-top:6px; }
.sn-pts li { font-size:12.5px; color:var(--mint); margin-bottom:3px; position:relative; padding-left:12px; }
.sn-pts li::before { content:"•"; position:absolute; left:0; }
.exam-footer-note { text-align:center; padding:32px; color:var(--text-2); font-size:13px; line-height:2; }
.exam-footer-note strong { color:var(--lav); }

/* ── ANIMATIONS ───────────────────────────────────────────── */
@keyframes fadeUp { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:translateY(0); } }
@keyframes brainFloat { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-12px)} }
@keyframes ringPulse { 0%,100%{opacity:.7} 50%{opacity:.2} }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width:1100px) {
  .hero-section { grid-template-columns:1fr; }
  .hero-visual   { display:none; }
  .study-layout  { grid-template-columns:1fr; }
  .notes-panel   { border-left:none; border-top:1px solid var(--border); max-height:400px; }
  .s-card-2col   { grid-template-columns:1fr; }
}
@media (max-width:768px) {
  .nav-links { display:none; flex-direction:column; position:absolute; top:var(--nav-h); left:0; right:0; background:var(--surface); padding:12px 20px; border-bottom:1px solid var(--border); z-index:190; gap:2px; }
  .nav-links.open { display:flex; }
  .hamburger { display:block; }
  .upload-btn-nav { display:none; }
  .stats-bar { flex-wrap:wrap; justify-content:center; }
  .stat-item { padding:12px 20px; }
  .mcq-opts { grid-template-columns:1fr; }
  .modal { padding:22px; }
  .daily-fact-card { flex-direction:column; padding:24px; }
  .upload-hero { flex-direction:column; gap:16px; }
  .page-shell { padding:24px 16px 48px; }
  .section { padding:28px 16px; }
}
@media (max-width:480px) {
  .nav-inner { padding:0 14px; }
  .hero-section { padding:36px 16px 32px; }
  .hero-title { font-size:34px; }
  .stat-num { font-size:26px; }
  .tc-actions { flex-direction:column; }
  .exam-controls { flex-direction:column; }
}

/* ── PRINT ────────────────────────────────────────────────── */
@media print {
  .navbar,.nav-actions,.exam-controls,.site-footer { display:none !important; }
  #pg-exam { display:block !important; }
  body { padding-top:0; }
  .exam-q-block { break-inside:avoid; box-shadow:none; }
  .blank-ans { display:inline !important; }
}
