@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

/* ─── CSS Variables ─── */
:root {
  --bg: #080810;
  --bg2: #0d0d1a;
  --bg3: #111128;
  --surface: rgba(255,255,255,0.04);
  --surface2: rgba(255,255,255,0.07);
  --border: rgba(255,255,255,0.08);
  --border2: rgba(255,255,255,0.14);
  --text: #f0f0fa;
  --text2: rgba(240,240,250,0.55);
  --text3: rgba(240,240,250,0.3);
  --accent: #7c6dfa;
  --accent2: #a799ff;
  --accent3: #5b4de8;
  --glow: rgba(124,109,250,0.35);
  --glow2: rgba(124,109,250,0.15);
  --green: #2dd4a0;
  --green-bg: rgba(45,212,160,0.1);
  --red: #ff5e7d;
  --red-bg: rgba(255,94,125,0.1);
  --amber: #f5b944;
  --amber-bg: rgba(245,185,68,0.1);
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --radius-xl: 28px;
}

/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 18px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Ambient background glow */
body::before {
  content: '';
  position: fixed;
  top: -30vh;
  left: 50%;
  transform: translateX(-50%);
  width: 80vw;
  height: 60vh;
  background: radial-gradient(ellipse at center, rgba(124,109,250,0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(124,109,250,0.3); border-radius: 2px; }

/* ─── Navbar ─── */
.nav {
  height: 58px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(8,8,16,0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.logo {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--text);
}

.logo b {
  color: var(--accent2);
  font-weight: 800;
}

.nav-actions { display: flex; gap: 6px; align-items: center; }

/* ─── Pills / Buttons ─── */
.pill {
  padding: 7px 16px;
  border-radius: 40px;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  border: 1px solid var(--border2);
  background: transparent;
  color: var(--text2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  white-space: nowrap;
}

.pill:hover {
  background: var(--surface2);
  color: var(--text);
  border-color: rgba(255,255,255,0.2);
}

.pill-solid {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: 600;
}

.pill-solid:hover {
  background: var(--accent2);
  border-color: var(--accent2);
  box-shadow: 0 0 24px var(--glow);
}

.submit {
  width: 100%;
  padding: 13px;
  border-radius: 40px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-display);
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  margin-top: 6px;
  transition: all 0.25s;
  letter-spacing: 0.3px;
}

.submit:hover {
  background: var(--accent2);
  box-shadow: 0 0 32px var(--glow);
  transform: translateY(-1px);
}

.nav-search {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 0 24px;
  max-width: 600px;  /* caps it on large screens */
  margin: 0 auto;
}

.nav-search input {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 40px;
  color: var(--text);
  font-size: 12.5px;
  font-family: var(--font-body);
  outline: none;
  padding: 7px 16px 7px 36px;
  transition: all 0.2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='rgba(240,240,250,0.3)' stroke-width='2.5'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 12px center;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
}

.nav-search input::placeholder { color: var(--text3); }



.search-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 28px;
  position: relative;
  z-index: 1;
}


.empty-state {
  text-align: center;
  padding: 56px 24px;
  color: var(--text3);
  font-size: 13px;
  line-height: 2;
}
/* ─── Messages ─── */
.messages-container { padding: 12px 28px 0; }

.message {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 8px;
  border-left: 3px solid;
}

.message-success {
  background: var(--green-bg);
  color: var(--green);
  border-color: var(--green);
}

.message-error {
  background: var(--red-bg);
  color: var(--red);
  border-color: var(--red);
}

.message-info {
  background: rgba(124,109,250,0.08);
  color: var(--accent2);
  border-color: var(--accent);
}

/* ─── Hero ─── */
.hero-wrap { padding: 0 28px; position: relative; z-index: 1; }

.hero-top {
  padding: 72px 0 48px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

/* Floating orbs */
.hero-top::before {
  content: '';
  position: absolute;
  bottom: -60px;
  right: -40px;
  width: 400px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(124,109,250,0.08) 0%, transparent 65%);
  pointer-events: none;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(124,109,250,0.12);
  color: var(--accent2);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 40px;
  border: 1px solid rgba(124,109,250,0.25);
  margin-bottom: 24px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.tag-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent2);
  box-shadow: 0 0 6px var(--accent2);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.8); }
}

.hero-h {
  font-family: var(--font-display);
  font-size: clamp(38px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -1px;
  margin-bottom: 20px;
  color: var(--text);
  max-width: 600px; 
}

.hero-h em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent2) 0%, #c4b5fd 50%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 16px;
  color: var(--text2);
  line-height: 1.7;
  max-width: 460px;
  margin-bottom: 32px;
  font-weight: 300;
}

.hero-cta { display: flex; gap: 10px; margin-bottom: 48px; flex-wrap: wrap; }

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 400px;
}

.hm {
  background: var(--bg2);
  padding: 18px 16px;
  text-align: center;
  transition: background 0.2s;
}

.hm:hover { background: var(--bg3); }

.hm-n {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent2);
}

.hm-l {
  font-size: 10.5px;
  color: var(--text3);
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ─── Courses Section ─── */
.courses-section { padding: 32px 0 48px; }

.dept-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  margin-top: 32px;
}

.dept-row:first-child { margin-top: 0; }

.dept-name {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.dept-tag {
  font-size: 10px;
  color: var(--accent2);
  background: rgba(124,109,250,0.12);
  padding: 3px 10px;
  border-radius: 40px;
  border: 1px solid rgba(124,109,250,0.2);
}

.cg {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}

.cc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  cursor: pointer;
  display: block;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}

.cc::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.cc:hover {
  border-color: rgba(124,109,250,0.4);
  background: var(--surface2);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px rgba(124,109,250,0.15);
}

.cc:hover::before { opacity: 1; }

.cc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.cc-code {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent2);
  background: rgba(124,109,250,0.12);
  padding: 3px 9px;
  border-radius: 40px;
  border: 1px solid rgba(124,109,250,0.2);
  letter-spacing: 0.3px;
}

.cc-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.cc-name {
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 6px;
  color: var(--text);
}

.cc-count {
  font-size: 11px;
  color: var(--text3);
}

/* ─── Course Hero ─── */
.course-hero {
  background: linear-gradient(135deg, rgba(124,109,250,0.08) 0%, rgba(8,8,16,0) 60%);
  border-bottom: 1px solid var(--border);
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
}

.course-hero::after {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 300px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(124,109,250,0.1) 0%, transparent 65%);
  pointer-events: none;
}

.ch-dept {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent2);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.ch-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.3px;
  margin-bottom: 6px;
  color: var(--text);
}

.ch-meta { font-size: 12px; color: var(--text3); }

/* ─── Tools Grid ─── */
.tools-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 20px 28px;
}

.tool {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
}

.tool::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(124,109,250,0.06) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.25s;
}

.tool:hover {
  border-color: rgba(124,109,250,0.35);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3), 0 0 0 1px rgba(124,109,250,0.1);
}

.tool:hover::after { opacity: 1; }

.tool > a {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  color: inherit;
}

.tool-icon {
  width: 40px;
  height: 40px;   /* ← you had changed this to 100px, revert it */
  border-radius: 10px;
  background: rgba(124,109,250,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  border: 1px solid rgba(124,109,250,0.2);
  transition: all 0.25s;
}

.tool:hover .tool-icon {
  background: rgba(124,109,250,0.2);
  box-shadow: 0 0 16px rgba(124,109,250,0.25);
}

.tool-name {
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-display);
  color: var(--text);
}

.tool-desc {
  font-size: 11px;
  color: var(--text3);
  margin-top: 2px;
}

/* ─── Notes Section ─── */
.notes-section { padding: 0 28px 32px; }

.sec-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-top: 20px;
}

.sec-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.note-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 8px;
  transition: all 0.2s;
}

.note-card:hover {
  border-color: var(--border2);
  background: var(--surface2);
}

.note-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}

.note-av {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  background: rgba(124,109,250,0.15);
  color: var(--accent2);
  border: 1px solid rgba(124,109,250,0.25);
}

.note-t { font-size: 13px; font-weight: 500; color: var(--text); }
.note-m { font-size: 11px; color: var(--text3); margin-top: 1px; }
.note-body { flex: 1; }

/* ─── Chips ─── */
.chip {
  padding: 3px 9px;
  border-radius: 40px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.chip-g {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid rgba(45,212,160,0.2);
}

.chip-a {
  background: var(--amber-bg);
  color: var(--amber);
  border: 1px solid rgba(245,185,68,0.2);
}

.chip-r {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid rgba(255,94,125,0.2);
}

/* ─── Auth Pages ─── */
.auth-page {
  min-height: calc(100vh - 58px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  position: relative;
  z-index: 1;
}

.auth-inner {
  width: 100%;
  max-width: 360px;
}

.auth-mark {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.auth-mark b { color: var(--accent2); font-weight: 800; }

.auth-tagline {
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 32px;
  line-height: 1.6;
  font-weight: 300;
}

.f { margin-bottom: 14px; }

.f label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text3);
  display: block;
  margin-bottom: 6px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.f input, .f select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-family: var(--font-body);
  background: var(--surface2);
  color: var(--text);
  outline: none;
  transition: all 0.2s;
}

.f input::placeholder { color: var(--text3); }

.f input:focus, .f select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,109,250,0.15);
  background: rgba(124,109,250,0.05);
}

.f select option { background: var(--bg2); color: var(--text); }

.auth-switch {
  text-align: center;
  font-size: 12.5px;
  color: var(--text3);
  margin-top: 18px;
}

.auth-switch a {
  color: var(--accent2);
  font-weight: 500;
  transition: color 0.2s;
}

.auth-switch a:hover { color: var(--text); }

/* ─── Upload Page ─── */
.upload-page { padding: 32px 28px; }

.page-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.3px;
  margin-bottom: 4px;
  color: var(--text);
}

.page-sub {
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 24px;
}

.drop {
  border: 1.5px dashed rgba(124,109,250,0.3);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  margin-bottom: 20px;
  cursor: pointer;
  transition: all 0.25s;
  background: rgba(124,109,250,0.03);
  position: relative;
}

.drop:hover {
  border-color: var(--accent);
  background: rgba(124,109,250,0.07);
  box-shadow: 0 0 32px rgba(124,109,250,0.1);
}

.drop-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(124,109,250,0.12);
  border: 1px solid rgba(124,109,250,0.2);
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.drop-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}

.drop-sub {
  font-size: 11.5px;
  color: var(--text3);
  margin-bottom: 14px;
}

.pts-banner {
  background: rgba(124,109,250,0.06);
  border: 1px solid rgba(124,109,250,0.15);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.pts-text {
  font-size: 12.5px;
  color: var(--accent2);
  font-weight: 500;
}

/* ─── Profile ─── */
.profile-top {
  background: linear-gradient(135deg, rgba(124,109,250,0.08) 0%, transparent 70%);
  border-bottom: 1px solid var(--border);
  padding: 32px 28px;
}

.prof-av {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent3), var(--accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 14px;
  box-shadow: 0 0 24px rgba(124,109,250,0.4);
}

.prof-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text);
}

.prof-status {
  font-size: 12px;
  color: var(--accent2);
  margin-top: 4px;
  font-weight: 500;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
}

.ss {
  background: var(--bg2);
  padding: 18px;
  text-align: center;
  transition: background 0.2s;
}

.ss:hover { background: var(--bg3); }

.ss-n {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent2);
}

.ss-l {
  font-size: 10px;
  color: var(--text3);
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.profile-body { padding: 20px 28px; }

/* ─── Section ─── */
.section { padding: 28px; position: relative; z-index: 1; }

/* ─── Spinner ─── */
.brain-loader {
  position: relative;
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brain-core {
  position: absolute;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(124,109,250,0.15);
  border: 1px solid rgba(124,109,250,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  z-index: 3;
  animation: corePulse 2.4s ease-in-out infinite;
}

@keyframes corePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(124,109,250,0.3); }
  50% { box-shadow: 0 0 0 6px rgba(124,109,250,0); }
}

.ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid transparent;
}

.ring-1 {
  width: 56px; height: 56px;
  border-top-color: rgba(124,109,250,0.7);
  border-right-color: rgba(124,109,250,0.15);
  border-bottom-color: rgba(124,109,250,0.15);
  border-left-color: rgba(124,109,250,0.15);
  animation: spin1 1.4s cubic-bezier(0.4,0,0.2,1) infinite;
}

.ring-2 {
  width: 72px; height: 72px;
  border-right-color: rgba(167,153,255,0.5);
  border-bottom-color: rgba(167,153,255,0.1);
  animation: spin2 2s cubic-bezier(0.4,0,0.2,1) infinite;
}

.ring-3 {
  width: 90px; height: 90px;
  border-top-color: rgba(124,109,250,0.2);
  border-bottom-color: rgba(124,109,250,0.4);
  border-left-color: rgba(124,109,250,0.1);
  animation: spin3 2.8s cubic-bezier(0.4,0,0.2,1) infinite reverse;
}

@keyframes spin1 { to { transform: rotate(360deg); } }
@keyframes spin2 { to { transform: rotate(360deg); } }
@keyframes spin3 { to { transform: rotate(360deg); } }



/* ─── AI Content ─── */
.ai-result {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 0 28px 24px;
  font-size: 14px;
  line-height: 1.75;
  display: none;
}

.ai-result.visible { display: block; }

#ai-content {
  max-width: 780px;
  margin: 0 auto;
  line-height: 1.8;
  font-size: 14.5px;
  color: var(--text);
  padding: 0 4px;
}

#ai-content h1 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 800;
  margin: 2rem 0 1rem;
  color: var(--text);
  letter-spacing: -0.5px;
}

#ai-content h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  margin: 2.5rem 0 0.75rem;
  color: var(--text);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

#ai-content h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
  color: var(--accent2);
}

#ai-content p { margin-bottom: 0.85rem; color: var(--text2); }

#ai-content ul, #ai-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

#ai-content li { margin-bottom: 0.4rem; color: var(--text2); }
#ai-content ul ul { list-style: circle; margin-top: 0.25rem; }
#ai-content strong { color: var(--text); font-weight: 600; }

#ai-content blockquote {
  background: rgba(124,109,250,0.06);
  border-left: 3px solid var(--accent);
  padding: 12px 18px;
  margin: 1.25rem 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13.5px;
  color: var(--text2);
}

#ai-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 13.5px;
}

#ai-content th {
  background: rgba(124,109,250,0.15);
  color: var(--accent2);
  padding: 10px 16px;
  text-align: left;
  font-family: var(--font-display);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#ai-content td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text2);
}

#ai-content tr:hover td { background: var(--surface); }

#ai-content code {
  background: rgba(124,109,250,0.1);
  color: var(--accent2);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12.5px;
  font-family: 'SF Mono', monospace;
}

#ai-content pre {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  overflow-x: auto;
  margin: 1rem 0;
}

#ai-content pre code {
  background: none;
  padding: 0;
  color: var(--text2);
}

/* ─── Master Notes / Summary Container ─── */
.master-notes-container {
  max-width: 780px;
  margin: 0 auto;
  padding: 32px 28px 64px;
  position: relative;
  z-index: 1;
}

.master-notes-header { margin-bottom: 28px; }

.master-notes-header h1 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text);
  margin-top: 10px;
  letter-spacing: -0.8px;
}

.back-btn {
  font-size: 12.5px;
  color: var(--accent2);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
  padding: 6px 12px;
  border-radius: 40px;
  border: 1px solid rgba(124,109,250,0.2);
  background: rgba(124,109,250,0.06);
}

.back-btn:hover {
  background: rgba(124,109,250,0.12);
  border-color: rgba(124,109,250,0.4);
  transform: translateX(-2px);
}

/* ─── MCQ Page ─── */
.mcq-content-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 28px 64px;
  position: relative;
  z-index: 1;
}

.mcq-content-header { margin-bottom: 28px; }

.mcq-content-header h1 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  margin-top: 10px;
  letter-spacing: -0.8px;
  color: var(--text);
}

.mcq-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 14px;
  transition: border-color 0.2s;
}

.mcq-card:hover { border-color: var(--border2); }

.question-number {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent2);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 10px;
}

.question-text {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 18px;
}

.option-grid {
  display: grid;
  gap: 8px;
}

.option-btn {
  width: 100%;
  padding: 11px 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text2);
  font-size: 13.5px;
  font-family: var(--font-body);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
}

.option-btn:hover:not(:disabled) {
  background: rgba(124,109,250,0.08);
  border-color: rgba(124,109,250,0.3);
  color: var(--text);
}

.option-btn.selected {
  background: rgba(124,109,250,0.12);
  border-color: var(--accent);
  color: var(--text);
}

.option-btn.correct {
  background: var(--green-bg);
  border-color: var(--green);
  color: var(--green);
}

.option-btn.wrong {
  background: var(--red-bg);
  border-color: var(--red);
  color: var(--red);
}

.option-key {
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 12px;
  min-width: 20px;
  opacity: 0.6;
}

.feedback {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 500;
  min-height: 20px;
}

.submit-btn-row { padding: 20px 0 8px; }

.submit-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 40px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-display);
  cursor: pointer;
  transition: all 0.25s;
  letter-spacing: 0.3px;
}

.submit-btn:hover {
  background: var(--accent2);
  box-shadow: 0 0 24px var(--glow);
  transform: translateY(-1px);
}

.results-bar {
  position: sticky;
  bottom: 20px;
  margin-top: 24px;
}

.results-inner {
  background: rgba(13,13,26,0.95);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

#score-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.retry-btn {
  background: var(--surface2);
  color: var(--accent2);
  border: 1px solid rgba(124,109,250,0.25);
  padding: 8px 20px;
  border-radius: 40px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-display);
  cursor: pointer;
  transition: all 0.2s;
}

.retry-btn:hover {
  background: rgba(124,109,250,0.1);
  border-color: var(--accent);
}

/* ─── Mock Exam Config ─── */
.exam-config-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  max-width: 780px;
  margin: 0 auto 24px;
}

.exam-config-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
}

.exam-config-card label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--text3);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.topic-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.chip-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--border2);
  border-radius: 40px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text2);
  background: var(--surface2);
  cursor: pointer;
  transition: all 0.2s;
}

.chip-toggle:hover {
  border-color: rgba(124,109,250,0.4);
  color: var(--text);
}

.chip-toggle input[type="checkbox"] {
  accent-color: var(--accent);
  width: 12px;
  height: 12px;
}

.chip-toggle:has(input:checked) {
  background: rgba(124,109,250,0.1);
  border-color: var(--accent);
  color: var(--accent2);
}

.difficulty-options {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.difficulty-options label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  cursor: pointer;
  transition: all 0.2s;
  text-transform: none;
  letter-spacing: 0;
}

.difficulty-options label:has(input:checked) {
  border-color: var(--accent);
  background: rgba(124,109,250,0.1);
  color: var(--accent2);
}

.difficulty-options input[type="radio"] { accent-color: var(--accent); }

.exam-config-card select {
  padding: 10px 14px;
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--surface2);
  outline: none;
  cursor: pointer;
  margin-bottom: 0;
  transition: border-color 0.2s;
}

.exam-config-card select:focus { border-color: var(--accent); }
.exam-config-card select option { background: var(--bg2); }

/* ─── Sub/Subscribe Page ─── */
.sub-page { padding: 48px 28px; position: relative; z-index: 1; }

.sub-inner { max-width: 340px; margin: 0 auto; }

.sub-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(124,109,250,0.1);
  color: var(--accent2);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 40px;
  border: 1px solid rgba(124,109,250,0.2);
  margin-bottom: 16px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.price-card {
  background: linear-gradient(135deg, rgba(124,109,250,0.1) 0%, var(--surface) 100%);
  border: 1px solid rgba(124,109,250,0.2);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 20px;
  text-align: center;
}

.price-n {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -3px;
  color: var(--text);
}

.price-per { font-size: 13px; color: var(--text3); margin-top: 4px; }

.feats { margin-bottom: 20px; }

.feat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text2);
}

.feat:last-child { border-bottom: none; }

.fcheck {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--green-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: var(--green);
  flex-shrink: 0;
  border: 1px solid rgba(45,212,160,0.2);
}

.pay-methods {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.pay-badge {
  font-size: 11px;
  color: var(--text3);
  background: var(--surface2);
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

/* ─── Empty State ─── */
.empty {
  text-align: center;
  padding: 56px 24px;
  color: var(--text3);
  font-size: 13px;
  line-height: 2;
}

.empty a {
  color: var(--accent2);
  font-weight: 500;
  transition: color 0.2s;
}

.empty a:hover { color: var(--text); }

/* ─── Modal ─── */
.modal-wrap {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 20px;
}

.modal {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
}

.modal-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}

.modal-sub { font-size: 13px; color: var(--text3); margin-bottom: 18px; }

.modal-actions { display: flex; gap: 8px; margin-top: 20px; }

/* ─── Loading overlay ─── */
.loading-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(8,8,16,0.85);
  backdrop-filter: blur(8px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 999;
  border-radius: var(--radius);
}

/* ─── Animations ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.hero-top > * {
  animation: fadeUp 0.9s ease both;
}

.hero-top > *:nth-child(1) { animation-delay: 0s; }
.hero-top > *:nth-child(2) { animation-delay: 0.12s; }
.hero-top > *:nth-child(3) { animation-delay: 0.16s; }
.hero-top > *:nth-child(4) { animation-delay: 0.24s; }
.hero-top > *:nth-child(5) { animation-delay: 0.32s; }

.cc {
  animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* File input styling */
input[type="file"] {
  color: var(--text2);
  font-size: 13px;
  font-family: var(--font-body);
}

input[type="file"]::file-selector-button {
  padding: 6px 16px;
  border-radius: 40px;
  border: 1px solid rgba(124,109,250,0.3);
  background: rgba(124,109,250,0.1);
  color: var(--accent2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-right: 10px;
  transition: all 0.2s;
  font-family: var(--font-body);
}

input[type="file"]::file-selector-button:hover {
  background: rgba(124,109,250,0.2);
  border-color: var(--accent);
}

/* ─── Responsive ─── */
@media (max-width: 640px) {
  .nav { padding: 0 16px; }
  .hero-wrap { padding: 0 16px; }
  .tools-grid { grid-template-columns: 1fr; padding: 16px; }
  .cg { grid-template-columns: 1fr 1fr; }
  .hero-h { font-size: 32px; }
  .notes-section, .profile-body { padding-left: 16px; padding-right: 16px; }
  .course-hero, .sec-header { padding-left: 16px; padding-right: 16px; }
  .section { padding: 16px; }
}