/* ==========================================================
   COLLEGE STUDY PORTAL — Premium Dark Design System
   ========================================================== */

/* ---------- INTER FONT ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ---------- CSS CUSTOM PROPERTIES ---------- */
:root {
  --bg: #0B0B0F;
  --bg-secondary: #111015;
  --surface: #17151F;
  --surface-hover: #211D2B;
  --accent: #A855F7;
  --accent-hover: #C084FC;
  --accent-dark: #7E22CE;
  --accent-secondary: #F59E0B;
  --accent-soft: rgba(168,85,247,0.12);
  --text-primary: #FAFAF9;
  --text-secondary: #A8A29E;
  --text-muted: #78716C;
  --white: #FAFAF9;
  --black: #0B0B0F;
  --muted: var(--text-muted);
  --border: #302A3A;
  --border-light: rgba(48,42,58,0.5);
  --success: #22C55E;
  --error: #EF4444;
  --info: #38BDF8;
  --nav-bg: rgba(17,16,21,0.94);
  --nav-pill: rgba(17,16,21,0.96);
  --radius-pill: 9999px;
  --radius-btn: 10px;
  --radius-card: 16px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.2);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.25);
  --shadow-lg: 0 16px 40px rgba(0,0,0,0.3);
}

/* ---------- RESET & BASE ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Content wrapper to maintain layout stability */
.content-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; font-family: 'Inter', sans-serif; }
input, textarea, select { font-family: 'Inter', sans-serif; }
ul, ol { list-style: none; }

/* ==========================================================
   TYPOGRAPHY SCALE (shared across pages)
   ========================================================== */
.hero-eyebrow,
.section-eyebrow,
.about-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.hero-title,
.section-title,
.about-title {
  font-size: clamp(30px, 3.4vw, 48px);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.hero-subtitle,
.section-desc,
.about-text,
.about-card p,
.about-body p,
.mission-copy,
.dev-bio {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-secondary);
  font-weight: 400;
}

.hero-title .highlight,
.section-title .highlight,
.about-title .highlight {
  color: var(--accent);
}

/* ==========================================================
   NAVBAR
   ========================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: transparent;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

.navbar.nav-scrolled {
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.nav-container {
  max-width: 1160px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-left: 0;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: -0.75rem;
  padding-left: 0;
  font-size: 1.6rem;
  font-weight: 800;
}

.nav-logo-img {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: contain;
  border: 1px solid var(--border);
}

.nav-logo svg {
  display: none;
}

.nav-logo .wordmark {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

/* Frosted Pill Nav */
.nav-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--nav-pill);
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 5px;
  gap: 6px;
  box-shadow: var(--shadow-sm);
}

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

.nav-link {
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  transition: all 0.25s ease;
  display: block;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 5px;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.nav-link:hover {
  color: var(--accent-hover);
  background: rgba(168,85,247,0.08);
}

.nav-link.active {
  color: var(--accent);
  background: rgba(168,85,247,0.12);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

/* Navbar CTA */
.nav-cta {
  background: var(--accent);
  color: var(--white);
  font-size: 13.5px;
  font-weight: 600;
  border-radius: var(--radius-btn);
  padding: 10px 22px;
  border: none;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background 0.18s, transform 0.12s;
}

.nav-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

/* Hamburger Menu (hidden on desktop) */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.hamburger span:nth-child(3) {
  width: 13px;
  align-self: flex-end;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  width: 20px;
  transform: translateY(-6px) rotate(-45deg);
}

/* Mobile Menu Dropdown */
.mobile-menu {
  display: none;
  position: fixed;
  top: 76px;
  left: 16px;
  right: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px;
  box-shadow: var(--shadow-lg);
  z-index: 99;
  flex-direction: column;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu .nav-link {
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.mobile-menu .nav-link:hover {
  background: rgba(168,85,247,0.08);
  color: var(--accent-hover);
}

.mobile-menu .nav-link.active {
  color: var(--accent);
  font-weight: 700;
  background: rgba(168,85,247,0.12);
}

.mobile-divider {
  height: 0;
  border-top: 1px solid var(--border);
  margin: 8px 0;
}

.mobile-cta {
  width: 100%;
  background: var(--accent);
  color: var(--white);
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  padding: 12px;
  text-align: center;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  border: none;
  transition: background 0.18s;
}

.mobile-cta:hover {
  background: var(--accent-hover);
}

/* Navbar Divider */
.navbar-divider {
  height: 1px;
  background: var(--border);
  width: calc(100% - 56px);
  margin: 0 auto;
  position: relative;
  top: 0;
  opacity: 0.5;
}

/* ==========================================================
   HERO SECTION
   ========================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  overflow: hidden;
  padding: 80px 56px;
  padding-top: calc(80px + 80px);
}

.hero-background {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.3;
  animation: orbFloat 25s ease-in-out infinite;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: var(--accent);
  top: -15%;
  left: -10%;
  animation-delay: 0s;
  opacity: 0.06;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: var(--accent-dark);
  bottom: -20%;
  right: -10%;
  animation-delay: -7s;
  opacity: 0.05;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: var(--accent-secondary);
  top: 40%;
  left: 60%;
  animation-delay: -14s;
  opacity: 0.04;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(50px, -80px) scale(1.1); }
  50% { transform: translate(-30px, 30px) scale(0.95); }
  75% { transform: translate(60px, 50px) scale(1.05); }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--text-primary);
  max-width: 900px;
  animation: fadeInUp 1s ease 0.2s both;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 8px 20px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(168,85,247,0.5);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.hero-title {
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero-title .word {
  display: inline-block;
  animation: slideInUp 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.hero-title .word:nth-child(1) { animation-delay: 0.2s; }
.hero-title .word:nth-child(2) { animation-delay: 0.35s; }
.hero-title .word:nth-child(3) { animation-delay: 0.5s; }

.hero-title .highlight {
  color: var(--accent);
}

.hero-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.65;
  font-weight: 400;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.stat-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 1.8rem 2rem;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  min-width: 140px;
}

.stat-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
  background: var(--surface-hover);
}

.stat-number {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--text-primary);
  animation: countUp 0.8s ease forwards;
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 0.4rem;
}

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

.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: var(--white);
  padding: 13px 28px;
  border: none;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(168,85,247,0.2);
}

.btn-hero:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(168,85,247,0.3);
}

.btn-hero:hover .btn-hero-arrow {
  transform: translateX(4px);
}

.btn-hero-arrow {
  display: inline-block;
  transition: transform 0.18s;
  font-size: 16px;
}

/* ==========================================================
   FEATURES SECTION
   ========================================================== */
.features-section {
  padding: 80px 56px;
  background: var(--bg);
  text-align: center;
}

.section-header {
  margin-bottom: 48px;
  max-width: 1160px;
  margin-left: auto;
  margin-right: auto;
}

.section-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(30px, 3.4vw, 48px);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.75;
  max-width: 650px;
  margin: 0 auto;
}

.features-grid {
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 640px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .features-grid { grid-template-columns: repeat(4, 1fr); } }

.feature-card {
  background: var(--surface);
  padding: 28px 24px;
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
  background: var(--surface-hover);
}

.feature-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(168,85,247,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  transition: transform 0.18s, background 0.18s;
}

.feature-card:hover .feature-icon-wrap {
  transform: scale(1.05);
  background: rgba(168,85,247,0.25);
}

.feature-icon {
  font-size: 20px;
  filter: none;
}

.feature-card h3 {
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.65;
}

/* ==========================================================
   BROWSE SECTION
   ========================================================== */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 80px 56px;
}

.section {
  margin: 24px 0;
  animation: fadeInUp 0.6s ease both;
}

.section h2 {
  font-size: clamp(26px, 3vw, 42px);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.section h2 .highlight-text {
  color: var(--accent);
}

/* Back Button */
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 8px 20px;
  border-radius: 9999px;
  font-weight: 500;
  font-size: 13.5px;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  margin-bottom: 24px;
  transition: border-color 0.18s, color 0.18s, transform 0.12s, background 0.18s;
}

.btn-back:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(168,85,247,0.08);
  transform: translateX(-3px);
}

.btn-back-arrow {
  transition: transform 0.18s;
}
.btn-back:hover .btn-back-arrow {
  transform: translateX(-3px);
}

/* Bottom Back Button */
.btn-back-bottom {
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
  margin-bottom: 0;
  transition: all 0.18s;
}

.btn-back-bottom:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(168,85,247,0.08);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}
.empty-state p {
  font-size: 14px;
}

/* ==========================================================
   GRID & CARDS
   ========================================================== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.card {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 1.8rem 1.5rem;
  text-align: center;
  border: 1px solid var(--border);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--accent), rgba(245,158,11,0.4));
  opacity: 0;
  transition: opacity 0.25s ease;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
  background: var(--surface-hover);
}
.card:hover::before {
  opacity: 1;
}

/* Browse and Semester Cards with Left Border Accent */
.card-browse {
  border-left: 3px solid var(--accent);
  padding: 1.5rem;
}

.card-browse:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-left-color: var(--accent-hover);
}

.card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
}

.card .badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(168,85,247,0.12);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 12px;
}

/* Important Topic Card */
.card.imp-true {
  border: 2px solid var(--accent);
}

.card.imp-true:hover {
  border-color: var(--accent-hover);
}

/* Module Number Chip */
.module-num-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--white);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 12px;
}

/* Important Tag */
.important-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--accent-secondary);
  color: #0B0B0F;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
}

/* Topic Pin */
.topic-pin {
  font-size: 16px;
}

/* Difficulty Badge */
.difficulty {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 11px;
  text-transform: capitalize;
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.difficulty.easy {
  background: rgba(34,197,94,0.12);
  color: var(--success);
  border-color: rgba(34,197,94,0.2);
}

.difficulty.medium {
  background: rgba(245,158,11,0.12);
  color: var(--accent-secondary);
  border-color: rgba(245,158,11,0.2);
}

.difficulty.hard {
  background: rgba(239,68,68,0.12);
  color: var(--error);
  border-color: rgba(239,68,68,0.2);
}

/* Key Points List in Topic Cards */
.key-points-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.key-points-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.key-points-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.key-points-list li {
  position: relative;
  padding-left: 20px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.65;
}

.key-points-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* Resources link in topic cards */
.resources-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 16px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  transition: gap 0.18s;
}

.resources-link:hover {
  color: var(--accent-hover);
  gap: 8px;
}

/* ==========================================================
   SKELETON LOADING
   ========================================================== */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-hover) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 6px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.skeleton-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  margin-bottom: 16px;
}

.skeleton-line {
  height: 14px;
  border-radius: 6px;
  margin-bottom: 8px;
}

.skeleton-line-sm { width: 60%; }
.skeleton-line-md { width: 80%; }
.skeleton-line-lg { width: 95%; }

.skeleton-badge {
  width: 70px;
  height: 22px;
  border-radius: 9999px;
  margin-top: 12px;
}

/* ==========================================================
   TOAST NOTIFICATIONS
   ========================================================== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  pointer-events: auto;
  animation: toastSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  max-width: 400px;
}

.toast.toast-exit {
  animation: toastSlideOut 0.3s ease forwards;
}

.toast-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.toast-message {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 0;
  line-height: 1;
  transition: color 0.18s;
  font-family: 'Inter', sans-serif;
}

.toast-close:hover {
  color: var(--text-primary);
}

.toast.toast-success { border-left: 4px solid var(--success); }
.toast.toast-error { border-left: 4px solid var(--error); }
.toast.toast-warning { border-left: 4px solid var(--accent-secondary); }
.toast.toast-info { border-left: 4px solid var(--accent); }

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastSlideOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(100%); }
}

/* ==========================================================
   ADMIN PAGE
   ========================================================== */
.admin-page {
  background: var(--bg);
}

.admin-container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 24px;
  padding-top: calc(80px + 24px);
}

/* Auth Section */
.auth-section {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
  padding: 24px;
}

.auth-card {
  background: var(--surface);
  padding: 32px;
  border-radius: 14px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  animation: slideInUp 0.6s ease;
}

.auth-card h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 8px;
}

.auth-card .auth-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
}

/* Form Elements */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--text-primary);
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
  resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(168,85,247,0.1);
  background: var(--surface);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: rgba(168,85,247,0.08);
  border-radius: 10px;
  border: 1px solid rgba(168,85,247,0.2);
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.checkbox-group label {
  margin: 0;
  font-weight: 600;
  color: var(--accent);
  font-size: 14px;
  cursor: pointer;
}

.auth-link {
  text-align: center;
  color: var(--text-muted);
  margin-top: 20px;
  font-size: 14px;
}

.auth-link a {
  color: var(--accent);
  font-weight: 600;
  transition: color 0.18s;
}

.auth-link a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: var(--white);
  padding: 13px 28px;
  border: none;
  border-radius: var(--radius-btn);
  font-size: 14px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background 0.18s, transform 0.12s;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  background: var(--accent-dark);
}

.btn-primary.btn-block {
  width: 100%;
}

.btn-success {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--success);
  color: var(--white);
  padding: 13px 28px;
  border: none;
  border-radius: var(--radius-btn);
  font-size: 14px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background 0.18s, transform 0.12s;
}

.btn-success:hover {
  background: #16a34a;
  transform: translateY(-1px);
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: rgba(239,68,68,0.12);
  color: var(--error);
  padding: 8px 16px;
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: var(--radius-btn);
  font-size: 11px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.12s;
}

.btn-danger:hover {
  background: var(--error);
  color: var(--white);
  border-color: var(--error);
  transform: translateY(-1px);
}

.btn-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--surface);
  color: var(--text-secondary);
  padding: 10px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  font-size: 13.5px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.18s;
}

.btn-logout:hover {
  background: var(--surface-hover);
  color: var(--error);
  border-color: rgba(239,68,68,0.3);
  transform: translateY(-1px);
}

/* ==========================================================
   DASHBOARD LAYOUT
   ========================================================== */
.dashboard {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  min-height: 70vh;
}

.sidebar {
  width: 100%;
  background: var(--bg-secondary);
  padding: 16px 0;
}

.sidebar-header {
  color: rgba(250,250,249,0.35);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0 20px 12px;
}

.sidebar-menu {
  list-style: none;
  display: flex;
  overflow-x: auto;
  padding: 0 8px;
  gap: 4px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 8px;
  transition: all 0.18s;
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
  flex-shrink: 0;
  border: 1px solid transparent;
}

.menu-item:hover {
  background: rgba(168,85,247,0.08);
  color: var(--accent-hover);
}

.menu-item.active {
  background: rgba(168,85,247,0.15);
  color: var(--accent);
  border-color: rgba(168,85,247,0.2);
}

.dashboard-content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.tab-content h2 {
  color: var(--text-primary);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
}

/* Form Card inside dashboard */
.form-card {
  background: var(--bg-secondary);
  padding: 24px;
  border-radius: 10px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
}

.form-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 640px) {
  .form-row { grid-template-columns: repeat(2, 1fr); }
}

/* List Items */
.list-section {
  margin-top: 16px;
}

.list-item {
  background: var(--bg-secondary);
  padding: 16px 20px;
  border-radius: 10px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow 0.18s;
  border-left: 4px solid var(--accent);
  border: 1px solid var(--border);
  border-left-width: 4px;
}

.list-item:hover {
  box-shadow: var(--shadow-sm);
}

.list-item.is-important {
  border-left-color: var(--accent);
  background: rgba(168,85,247,0.04);
}

.list-item-content h4 {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.list-item-content p {
  color: var(--text-secondary);
  font-size: 14px;
}

.list-item-content .item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.item-meta-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

@media (min-width: 768px) {
  .list-item { flex-direction: row; justify-content: space-between; align-items: center; }
}

/* ==========================================================
   FOOTER
   ========================================================== */
.footer {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  margin-top: 48px;
  font-size: 14px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 20px;
}

.footer strong {
  color: var(--text-primary);
}

.footer-logo {
  flex: 1;
  min-width: 200px;
}

.footer-logo a {
  display: inline-block;
}

.footer-logo svg {
  width: 40px;
  height: 40px;
}

.footer-copyright {
  flex: 1;
  text-align: center;
  min-width: 200px;
}

.footer-nav {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  min-width: 200px;
}

.footer-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.18s;
}

.footer-nav a:hover {
  color: var(--accent-hover);
}

@media (max-width: 768px) {
  .footer {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-logo,
  .footer-copyright,
  .footer-nav {
    flex: none;
    width: 100%;
    text-align: center;
    justify-content: center;
  }
  
  .footer-nav {
    margin-top: 16px;
  }
}

/* ==========================================================
   SECTION REVEAL ANIMATIONS
   ========================================================== */
.section-reveal {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.section-reveal .reveal-shade {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(115deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.05) 10%, rgba(168,85,247,0.10) 42%, rgba(245,158,11,0.06) 72%, rgba(255,255,255,0) 100%);
  transform: translateX(-135%) skewX(-16deg);
  transition: transform 0.9s cubic-bezier(.16,1,.3,1), opacity 0.9s cubic-bezier(.16,1,.3,1);
  will-change: transform, opacity;
  filter: blur(0.3px);
}

.section-reveal[data-direction="right"] .reveal-shade {
  transform: translateX(135%) skewX(-16deg);
}

.section-reveal .reveal-content {
  position: relative;
  z-index: 1;
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s cubic-bezier(.16,1,.3,1), transform 0.9s cubic-bezier(.16,1,.3,1);
  will-change: opacity, transform;
}

.section-reveal.is-visible .reveal-shade {
  opacity: 1;
  transform: translateX(135%) skewX(-16deg);
}

.section-reveal[data-direction="right"].is-visible .reveal-shade {
  transform: translateX(-135%) skewX(-16deg);
}

.section-reveal.is-visible .reveal-content {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================
   CARD REVEAL ANIMATION (Home & About pages)
   ========================================================== */
.card-reveal {
  opacity: 0;
  transition: opacity 0.6s ease-out, transform 0.6s ease-out, box-shadow 0.7s ease-out;
  will-change: opacity, transform, box-shadow;
}

.card-reveal[data-direction="left"] {
  transform: translateX(-60px);
}

.card-reveal[data-direction="right"] {
  transform: translateX(60px);
}

.card-reveal.is-visible {
  opacity: 1;
  transform: translateX(0);
  box-shadow: var(--shadow-md);
}

/* ==========================================================
   ANIMATIONS
   ========================================================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInSlide {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeInUp 0.52s ease forwards;
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.section-block {
  margin-top: 28px;
  padding: 24px;
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.subsection-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.subsection-heading h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.subsection-desc {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.75;
}

.topic-card {
  padding: 22px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-card);
}

.question-card {
  padding: 22px;
  border-left: 4px solid var(--accent);
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
}

.question-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.question-number-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--white);
  font-weight: 700;
  font-size: 0.95rem;
}

.question-card h3 {
  margin: 0 0 10px 0;
  font-size: 1.05rem;
  color: var(--text-primary);
}

.question-card p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.75;
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }
}

@keyframes slideInUp {
  from { opacity: 0; transform: translateY(50px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

/* Loading spinner for buttons */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(250,250,249,0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 720px) {
  .nav-pill {
    display: none;
  }

  .nav-cta.desktop {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .hero {
    padding: 48px 24px;
    padding-top: calc(80px + 48px);
  }

  .features-section {
    padding: 48px 24px;
  }

  .container {
    padding: 48px 24px;
  }

  .hero-title {
    font-size: 32px;
  }


  .features-grid,
  .grid {
    grid-template-columns: 1fr !important;
  }

  .section {
    margin: 16px 0;
  }

  .card {
    padding: 20px;
  }

  .dashboard-content {
    padding: 16px;
  }

  .form-card {
    padding: 16px;
  }

  .auth-card {
    padding: 24px;
  }

  .admin-container {
    padding: 16px;
  }
}

@media (min-width: 1024px) {
  .dashboard {
    flex-direction: row;
  }
  .sidebar {
    width: 240px;
    flex-shrink: 0;
    padding: 24px 0;
  }
  .sidebar-menu {
    flex-direction: column;
    gap: 4px;
    padding: 0 12px;
    overflow: visible;
  }
  .menu-item {
    border-radius: 8px;
    padding: 12px 16px;
  }
}

/* ==========================================================
   LOGIN SCREEN
   ========================================================== */
.login-screen {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 24px;
}

.login-card {
  background: var(--surface);
  padding: 40px 32px;
  border-radius: 14px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  text-align: center;
  animation: slideInUp 0.6s ease;
}

.login-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.login-card h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.login-error {
  color: var(--error);
  font-size: 13px;
  font-weight: 500;
  margin-top: 16px;
  min-height: 20px;
}

/* ==========================================================
   EDIT MODAL
   ========================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 24px;
  animation: fadeIn 0.2s ease;
}

.modal-card {
  background: var(--surface);
  border-radius: 14px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  animation: scaleIn 0.3s ease;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close {
  background: rgba(255,255,255,0.05);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  color: var(--text-muted);
  transition: background 0.18s, color 0.18s;
  font-family: 'Inter', sans-serif;
}

.modal-close:hover {
  background: rgba(255,255,255,0.10);
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  padding: 13px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  font-size: 14px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.18s;
}

.btn-secondary:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
  border-color: var(--accent);
  transform: translateY(-1px);
}

/* ==========================================================
   EDIT BUTTON
   ========================================================== */
.btn-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: rgba(168,85,247,0.10);
  color: var(--accent);
  padding: 8px 16px;
  border: 1px solid rgba(168,85,247,0.2);
  border-radius: var(--radius-btn);
  font-size: 11px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.18s;
}

.btn-edit:hover {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.list-item-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}