/* ============================================
   VIDYAVERSE — CBSE PLATFORM DESIGN SYSTEM
   Palette: Indigo Ink + Acid Neon
   Fonts: Bricolage Grotesque + Plus Jakarta Sans
   ============================================ */

/* --- CSS VARIABLES --- */
:root {
  --bg-deep:       #0A0612;
  --bg-mid:        #110D1E;
  --bg-card:       #1A1430;
  --bg-card-hover: #221A3D;
  --border:        rgba(123, 104, 238, 0.18);
  --border-bright: rgba(123, 104, 238, 0.45);

  --indigo-deep:   #1B0A3C;
  --indigo-mid:    #3D1E7C;
  --indigo-bright: #7B68EE;
  --indigo-light:  #E8E0F0;

  --neon-lime:     #CCFF00;
  --neon-cyan:     #00F5FF;
  --neon-pink:     #FF3CAC;
  --neon-orange:   #FF6B2B;

  --text-primary:  #F0EBF8;
  --text-secondary:#B8A8D4;
  --text-muted:    #7A6A9A;

  --font-display:  'Bricolage Grotesque', sans-serif;
  --font-body:     'Plus Jakarta Sans', sans-serif;

  --radius-sm:     8px;
  --radius-md:     16px;
  --radius-lg:     24px;
  --radius-xl:     36px;
  --radius-full:   9999px;

  --shadow-card:   0 4px 32px rgba(0,0,0,0.4), 0 0 0 1px var(--border);
  --shadow-glow:   0 0 40px rgba(123,104,238,0.25);
  --shadow-neon:   0 0 20px rgba(204,255,0,0.4);

  --transition:    all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* --- STAR FIELD CANVAS --- */
#starfield {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* --- CONTAINER --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; }

h1 { font-size: clamp(2.4rem, 6vw, 5rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 700; }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 600; }

.gradient-text {
  background: linear-gradient(135deg, var(--neon-lime) 0%, var(--neon-cyan) 50%, var(--indigo-bright) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- BUTTONS --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: linear-gradient(135deg, var(--indigo-mid), var(--indigo-bright));
  color: #fff;
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  border: 1px solid rgba(123,104,238,0.4);
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--neon-lime), var(--neon-cyan));
  opacity: 0;
  transition: var(--transition);
}
.btn-primary:hover::before { opacity: 0.15; }
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(123,104,238,0.5), var(--shadow-neon);
}

.btn-large { padding: 16px 36px; font-size: 1.05rem; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  transition: var(--transition);
}
.btn-ghost:hover {
  border-color: var(--border-bright);
  color: var(--text-primary);
  background: rgba(123,104,238,0.08);
  transform: translateY(-2px);
}

/* --- SECTION HEADERS --- */
.section-header {
  text-align: center;
  margin-bottom: 56px;
}
.section-tag {
  display: inline-block;
  padding: 6px 18px;
  background: rgba(204,255,0,0.1);
  border: 1px solid rgba(204,255,0,0.3);
  border-radius: var(--radius-full);
  color: var(--neon-lime);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.section-header h2 { margin-bottom: 16px; }
.section-header p {
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0 24px;
  transition: var(--transition);
}
.navbar.scrolled {
  background: rgba(10, 6, 18, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 32px;
  height: 72px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--text-primary);
  flex-shrink: 0;
}
.logo-icon {
  font-size: 1.5rem;
  filter: drop-shadow(0 0 8px var(--neon-lime));
}
.logo-text {
  background: linear-gradient(135deg, var(--neon-lime), var(--neon-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}
.nav-links a {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition);
}
.nav-links a:hover {
  color: var(--text-primary);
  background: rgba(123,104,238,0.12);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition);
  background: rgba(255,255,255,0.03);
}
.lang-toggle:hover { border-color: var(--border-bright); color: var(--text-primary); }
.lang-en.active, .lang-hi.active { color: var(--neon-lime); }
.lang-divider { opacity: 0.3; }
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  margin-left: auto;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: var(--transition);
}
.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 16px 0 20px;
  border-top: 1px solid var(--border);
  background: rgba(10,6,18,0.95);
  backdrop-filter: blur(20px);
}
.mobile-menu a {
  padding: 12px 16px;
  color: var(--text-secondary);
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.mobile-menu a:hover { color: var(--text-primary); background: rgba(123,104,238,0.1); }
.mobile-menu .btn-primary { margin: 8px 16px 0; text-align: center; justify-content: center; }

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 24px 80px;
  overflow: hidden;
  z-index: 1;
}
.hero-bg-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
}
.orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--indigo-mid), transparent);
  top: -200px; left: -200px;
  animation: orbFloat 8s ease-in-out infinite;
}
.orb-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(204,255,0,0.3), transparent);
  top: 20%; right: -100px;
  animation: orbFloat 10s ease-in-out infinite reverse;
}
.orb-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(0,245,255,0.2), transparent);
  bottom: 10%; left: 30%;
  animation: orbFloat 12s ease-in-out infinite;
}
@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 30px) scale(0.95); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 620px;
  flex: 1;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: rgba(204,255,0,0.08);
  border: 1px solid rgba(204,255,0,0.25);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--neon-lime);
  margin-bottom: 24px;
  letter-spacing: 0.04em;
}
.badge-dot {
  width: 7px; height: 7px;
  background: var(--neon-lime);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero-title {
  display: flex;
  flex-direction: column;
  margin-bottom: 24px;
}
.title-line {
  display: block;
  opacity: 0;
  transform: translateY(30px);
  animation: slideUp 0.8s cubic-bezier(0.4,0,0.2,1) forwards;
}
.title-line:nth-child(1) { animation-delay: 0.1s; }
.title-line:nth-child(2) { animation-delay: 0.25s; }
@keyframes slideUp {
  to { opacity: 1; transform: translateY(0); }
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 36px;
  opacity: 0;
  animation: slideUp 0.8s 0.4s cubic-bezier(0.4,0,0.2,1) forwards;
}
.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
  opacity: 0;
  animation: slideUp 0.8s 0.55s cubic-bezier(0.4,0,0.2,1) forwards;
}
.hero-stats {
  display: flex;
  align-items: center;
  gap: 0;
  opacity: 0;
  animation: slideUp 0.8s 0.7s cubic-bezier(0.4,0,0.2,1) forwards;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 24px;
}
.stat:first-child { padding-left: 0; }
.stat-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--neon-lime);
  line-height: 1;
}
.stat-suffix { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; color: var(--neon-lime); }
.stat-label { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; margin-top: 4px; }
.stat-divider { width: 1px; height: 36px; background: var(--border); }

/* PLANET SYSTEM */
.hero-visual {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 480px;
}
.planet-system {
  position: relative;
  width: 380px;
  height: 380px;
}
.planet-core {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 100px; height: 100px;
  z-index: 10;
}
.planet-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle, rgba(123,104,238,0.5), transparent 70%);
  border-radius: 50%;
  animation: glowPulse 3s ease-in-out infinite;
}
@keyframes glowPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}
.planet-surface {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--indigo-mid), var(--indigo-bright));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  box-shadow: 0 0 40px rgba(123,104,238,0.6), inset 0 0 20px rgba(255,255,255,0.1);
  animation: planetSpin 20s linear infinite;
}
@keyframes planetSpin {
  from { box-shadow: 0 0 40px rgba(123,104,238,0.6), inset 0 0 20px rgba(255,255,255,0.1); }
  50% { box-shadow: 0 0 60px rgba(204,255,0,0.4), inset 0 0 20px rgba(255,255,255,0.15); }
  to { box-shadow: 0 0 40px rgba(123,104,238,0.6), inset 0 0 20px rgba(255,255,255,0.1); }
}

.orbit {
  position: absolute;
  top: 50%; left: 50%;
  border-radius: 50%;
  border: 1px solid rgba(123,104,238,0.2);
  transform: translate(-50%, -50%);
}
.orbit-1 { width: 180px; height: 180px; animation: orbitSpin 6s linear infinite; }
.orbit-2 { width: 250px; height: 250px; animation: orbitSpin 10s linear infinite reverse; }
.orbit-3 { width: 310px; height: 310px; animation: orbitSpin 14s linear infinite; }
.orbit-4 { width: 370px; height: 370px; animation: orbitSpin 18s linear infinite reverse; }
@keyframes orbitSpin { from { transform: translate(-50%,-50%) rotate(0deg); } to { transform: translate(-50%,-50%) rotate(360deg); } }

.satellite {
  position: absolute;
  top: -18px; left: 50%;
  transform: translateX(-50%);
  width: 36px; height: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 0 16px rgba(123,104,238,0.4);
  cursor: pointer;
  transition: var(--transition);
}
.satellite:hover { transform: translateX(-50%) scale(1.3); box-shadow: 0 0 24px var(--neon-lime); }

.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}
.scroll-arrow {
  width: 24px; height: 24px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  animation: scrollBounce 2s ease-in-out infinite;
}
@keyframes scrollBounce {
  0%, 100% { transform: rotate(45deg) translateY(0); opacity: 0.5; }
  50% { transform: rotate(45deg) translateY(6px); opacity: 1; }
}

/* ============================================
   CLASS SELECTOR
   ============================================ */
.class-selector {
  position: relative;
  z-index: 1;
  padding: 100px 0;
}
.class-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.class-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: var(--transition);
  overflow: hidden;
  cursor: pointer;
}
.class-card-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(123,104,238,0.15), transparent 70%);
  opacity: 0;
  transition: var(--transition);
}
.class-card:hover .class-card-glow { opacity: 1; }
.class-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-6px);
  box-shadow: var(--shadow-glow);
}
.class-card.featured {
  border-color: rgba(204,255,0,0.35);
  background: linear-gradient(160deg, var(--bg-card), rgba(204,255,0,0.04));
}
.class-card.featured:hover { border-color: rgba(204,255,0,0.6); }
.featured-badge {
  position: absolute;
  top: 16px; right: 16px;
  padding: 4px 12px;
  background: rgba(204,255,0,0.15);
  border: 1px solid rgba(204,255,0,0.4);
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--neon-lime);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.class-number {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--indigo-bright), var(--neon-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.class-card.featured .class-number {
  background: linear-gradient(135deg, var(--neon-lime), var(--neon-cyan));
  -webkit-background-clip: text;
  background-clip: text;
}
.class-info h3 { font-size: 1.2rem; margin-bottom: 4px; }
.class-info p { font-size: 0.85rem; color: var(--text-muted); }
.class-subjects-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.class-subjects-preview span {
  padding: 3px 10px;
  background: rgba(123,104,238,0.12);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  color: var(--text-secondary);
}
.class-arrow {
  font-size: 1.3rem;
  color: var(--text-muted);
  transition: var(--transition);
  margin-top: auto;
}
.class-card:hover .class-arrow { color: var(--neon-lime); transform: translateX(4px); }

/* ============================================
   FEATURES SECTION
   ============================================ */
.features {
  position: relative;
  z-index: 1;
  padding: 100px 0;
  background: linear-gradient(180deg, transparent, rgba(61,30,124,0.08), transparent);
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 20px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--indigo-bright), transparent);
  opacity: 0;
  transition: var(--transition);
}
.feature-card:hover::before { opacity: 1; }
.feature-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}
.feature-large {
  grid-column: span 2;
}
.feature-icon-wrap {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--indigo-mid), var(--indigo-bright));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(123,104,238,0.4);
}
.feature-icon {
  font-size: 2rem;
  margin-bottom: 16px;
  display: block;
}
.feature-card h3 { margin-bottom: 10px; }
.feature-card p { color: var(--text-secondary); font-size: 0.92rem; line-height: 1.7; }

/* AI Chat Demo */
.feature-demo { margin-top: 24px; }
.ai-chat-demo {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-bubble {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  max-width: 85%;
}
.chat-bubble.bot {
  background: rgba(123,104,238,0.15);
  border: 1px solid rgba(123,104,238,0.25);
  color: var(--text-secondary);
}
.chat-bubble.user {
  background: rgba(204,255,0,0.08);
  border: 1px solid rgba(204,255,0,0.2);
  color: var(--neon-lime);
  align-self: flex-end;
  flex-direction: row-reverse;
}
.bot-avatar { font-size: 1.1rem; flex-shrink: 0; }

/* XP Demo */
.xp-demo { margin-top: 20px; }
.xp-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.xp-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--neon-lime);
  white-space: nowrap;
}
.xp-bar {
  flex: 1;
  height: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.xp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--indigo-bright), var(--neon-lime));
  border-radius: var(--radius-full);
  animation: xpGrow 2s ease-out forwards;
}
@keyframes xpGrow { from { width: 0; } }
.xp-val { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; }
.badges-row { display: flex; flex-wrap: wrap; gap: 8px; }
.badge-chip {
  padding: 4px 12px;
  background: rgba(123,104,238,0.12);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ============================================
   SUBJECTS SHOWCASE
   ============================================ */
.subjects-showcase {
  position: relative;
  z-index: 1;
  padding: 100px 0;
}
.subjects-orbit-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}
.subject-orb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, hsl(var(--hue), 70%, 25%), hsl(var(--hue), 50%, 10%));
  border: 1px solid hsl(var(--hue), 60%, 35%);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 0 30px hsl(var(--hue), 60%, 20%);
}
.subject-orb:hover {
  transform: scale(1.1) translateY(-4px);
  box-shadow: 0 0 50px hsl(var(--hue), 80%, 30%);
  border-color: hsl(var(--hue), 80%, 55%);
}
.orb-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  padding: 12px;
}
.orb-emoji { font-size: 1.8rem; }
.orb-name {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.2;
}
.subjects-cta { text-align: center; }

/* ============================================
   MOTIVATION STRIP
   ============================================ */
.motivation-strip {
  position: relative;
  z-index: 1;
  padding: 20px 0;
  background: linear-gradient(90deg, var(--indigo-deep), rgba(61,30,124,0.5), var(--indigo-deep));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.strip-inner { overflow: hidden; }
.strip-track {
  display: flex;
  gap: 60px;
  white-space: nowrap;
  animation: stripScroll 25s linear infinite;
}
.strip-track span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
}
@keyframes stripScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============================================
   HOW IT WORKS
   ============================================ */
.how-it-works {
  position: relative;
  z-index: 1;
  padding: 100px 0;
}
.steps-row {
  display: flex;
  align-items: flex-start;
  gap: 0;
}
.step {
  flex: 1;
  text-align: center;
  padding: 32px 24px;
  position: relative;
}
.step-num {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 800;
  color: rgba(123,104,238,0.15);
  line-height: 1;
  margin-bottom: 12px;
}
.step-icon {
  font-size: 2.2rem;
  margin-bottom: 16px;
  display: block;
}
.step h3 { margin-bottom: 10px; font-size: 1.1rem; }
.step p { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.6; }
.step-connector {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--indigo-bright), var(--neon-lime));
  margin-top: 80px;
  flex-shrink: 0;
  opacity: 0.4;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  position: relative;
  z-index: 1;
  padding: 80px 0 32px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(17,13,30,0.8));
}
.footer-top {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 60px;
  margin-bottom: 48px;
}
.footer-brand p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.7;
  margin-top: 16px;
  max-width: 280px;
}
.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.footer-col h4 {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: 10px;
  transition: var(--transition);
}
.footer-col a:hover { color: var(--neon-lime); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.footer-bottom p { font-size: 0.82rem; color: var(--text-muted); }

/* ============================================
   CLASSES PAGE
   ============================================ */
.page-hero {
  position: relative;
  z-index: 1;
  padding: 140px 24px 80px;
  text-align: center;
}
.page-hero h1 { margin-bottom: 16px; }
.page-hero p { color: var(--text-secondary); font-size: 1.05rem; max-width: 560px; margin: 0 auto 40px; }

.class-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 60px;
  flex-wrap: wrap;
}
.class-tab {
  padding: 10px 28px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
  cursor: pointer;
}
.class-tab:hover { border-color: var(--border-bright); color: var(--text-primary); }
.class-tab.active {
  background: linear-gradient(135deg, var(--indigo-mid), var(--indigo-bright));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 20px rgba(123,104,238,0.4);
}

.subjects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  padding: 0 24px 100px;
  max-width: 1200px;
  margin: 0 auto;
}
.subject-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
}
.subject-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}
.subject-card-icon {
  font-size: 2.2rem;
  width: 56px; height: 56px;
  background: var(--bg-mid);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}
.subject-card h3 { font-size: 1.1rem; }
.subject-card p { color: var(--text-muted); font-size: 0.82rem; }
.subject-card-meta {
  display: flex;
  gap: 8px;
  margin-top: auto;
}
.meta-chip {
  padding: 3px 10px;
  background: rgba(123,104,238,0.1);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ============================================
   SUBJECT PAGE
   ============================================ */
.subject-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 120px 24px 80px;
  position: relative;
  z-index: 1;
}
.subject-sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}
.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
}
.sidebar-card h4 {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}
.chapter-list { display: flex; flex-direction: column; gap: 4px; }
.chapter-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.chapter-item:hover { background: rgba(123,104,238,0.1); color: var(--text-primary); }
.chapter-item.active { background: rgba(123,104,238,0.15); color: var(--neon-lime); }
.chapter-num {
  width: 22px; height: 22px;
  background: rgba(123,104,238,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}
.chapter-item.active .chapter-num { background: var(--neon-lime); color: var(--bg-deep); }

.subject-main {}
.lesson-header {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
}
.lesson-header h1 { font-size: 1.8rem; margin-bottom: 8px; }
.lesson-header p { color: var(--text-secondary); font-size: 0.92rem; }
.lesson-tags { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.lesson-tag {
  padding: 4px 12px;
  background: rgba(123,104,238,0.1);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  color: var(--indigo-bright);
}

.content-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 4px;
  margin-bottom: 24px;
  width: fit-content;
}
.content-tab {
  padding: 8px 20px;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}
.content-tab.active {
  background: linear-gradient(135deg, var(--indigo-mid), var(--indigo-bright));
  color: #fff;
}

.lesson-panel {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.lesson-panel.active { display: block; }

/* AI Lesson Panel */
.ai-lesson-area {
  background: var(--bg-mid);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 20px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ai-message {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.ai-avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--indigo-mid), var(--indigo-bright));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.ai-bubble {
  background: rgba(123,104,238,0.1);
  border: 1px solid rgba(123,104,238,0.2);
  border-radius: 0 var(--radius-md) var(--radius-md) var(--radius-md);
  padding: 14px 18px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  flex: 1;
}
.ai-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.ai-btn {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: rgba(123,104,238,0.08);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.ai-btn:hover { border-color: var(--indigo-bright); color: var(--indigo-bright); }
.ai-btn.primary { background: linear-gradient(135deg, var(--indigo-mid), var(--indigo-bright)); color: #fff; border-color: transparent; }

/* Notes Panel */
.notes-content h2 { font-size: 1.4rem; margin-bottom: 16px; color: var(--neon-lime); }
.notes-content h3 { font-size: 1.1rem; margin: 24px 0 10px; color: var(--indigo-bright); }
.notes-content p { color: var(--text-secondary); font-size: 0.92rem; line-height: 1.8; margin-bottom: 12px; }
.notes-content ul { padding-left: 20px; margin-bottom: 12px; }
.notes-content li { color: var(--text-secondary); font-size: 0.92rem; line-height: 1.8; margin-bottom: 6px; }
.formula-box {
  background: rgba(204,255,0,0.05);
  border: 1px solid rgba(204,255,0,0.2);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin: 16px 0;
  font-family: 'Courier New', monospace;
  font-size: 1rem;
  color: var(--neon-lime);
  text-align: center;
}

/* Quiz Panel */
.quiz-question {
  margin-bottom: 28px;
}
.quiz-question h3 { font-size: 1rem; margin-bottom: 16px; color: var(--text-primary); }
.quiz-options { display: flex; flex-direction: column; gap: 10px; }
.quiz-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-mid);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.quiz-option:hover { border-color: var(--indigo-bright); color: var(--text-primary); background: rgba(123,104,238,0.08); }
.quiz-option.correct { border-color: var(--neon-lime); background: rgba(204,255,0,0.08); color: var(--neon-lime); }
.quiz-option.wrong { border-color: var(--neon-pink); background: rgba(255,60,172,0.08); color: var(--neon-pink); }
.option-letter {
  width: 28px; height: 28px;
  background: rgba(123,104,238,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}
.quiz-submit {
  margin-top: 20px;
}

/* ============================================
   ADMIN PANEL
   ============================================ */
.admin-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  z-index: 1;
}
.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 48px;
  width: 100%;
  max-width: 440px;
  text-align: center;
}
.login-logo { font-size: 3rem; margin-bottom: 8px; }
.login-card h2 { margin-bottom: 8px; }
.login-card p { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 32px; }
.form-group { margin-bottom: 20px; text-align: left; }
.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.form-input {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-mid);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
}
.form-input:focus { border-color: var(--indigo-bright); box-shadow: 0 0 0 3px rgba(123,104,238,0.15); }
.login-error {
  color: var(--neon-pink);
  font-size: 0.82rem;
  margin-top: 12px;
  display: none;
}

.admin-panel {
  display: none;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}
.admin-sidebar {
  position: fixed;
  top: 0; left: 0;
  width: 260px;
  height: 100vh;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  z-index: 100;
  overflow-y: auto;
}
.admin-logo {
  padding: 0 24px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.admin-nav { display: flex; flex-direction: column; gap: 2px; padding: 0 12px; }
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.admin-nav-item:hover { background: rgba(123,104,238,0.1); color: var(--text-primary); }
.admin-nav-item.active { background: rgba(123,104,238,0.15); color: var(--neon-lime); }
.admin-nav-icon { font-size: 1.1rem; }

.admin-content {
  margin-left: 260px;
  padding: 32px;
  min-height: 100vh;
}
.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}
.admin-topbar h1 { font-size: 1.6rem; }
.admin-section { display: none; }
.admin-section.active { display: block; }

.admin-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.admin-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.admin-stat-card .stat-icon { font-size: 1.8rem; margin-bottom: 12px; }
.admin-stat-card .stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--neon-lime);
}
.admin-stat-card .stat-label { font-size: 0.82rem; color: var(--text-muted); margin-top: 4px; }

.admin-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
}
.admin-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.admin-table-header h3 { font-size: 1rem; }
table { width: 100%; border-collapse: collapse; }
th {
  padding: 12px 20px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}
td {
  padding: 14px 20px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(123,104,238,0.04); }

.status-badge {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
}
.status-published { background: rgba(204,255,0,0.1); color: var(--neon-lime); border: 1px solid rgba(204,255,0,0.3); }
.status-draft { background: rgba(123,104,238,0.1); color: var(--indigo-bright); border: 1px solid rgba(123,104,238,0.3); }

.btn-sm {
  padding: 6px 14px;
  font-size: 0.78rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-body);
}
.btn-sm:hover { border-color: var(--indigo-bright); color: var(--indigo-bright); }
.btn-sm.danger:hover { border-color: var(--neon-pink); color: var(--neon-pink); }

.announcement-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
}
.announcement-form h3 { margin-bottom: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
textarea.form-input { resize: vertical; min-height: 100px; }
select.form-input { appearance: none; }

/* ============================================
   ANIMATIONS & UTILITIES
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

.shimmer {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}
@keyframes shimmer { from { background-position: -200% 0; } to { background-position: 200% 0; } }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .hero { flex-direction: column; text-align: center; padding-top: 140px; }
  .hero-content { max-width: 100%; }
  .hero-cta { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-visual { min-height: 320px; }
  .planet-system { width: 280px; height: 280px; }
  .orbit-4 { width: 270px; height: 270px; }
  .orbit-3 { width: 220px; height: 220px; }
  .orbit-2 { width: 170px; height: 170px; }
  .orbit-1 { width: 120px; height: 120px; }
  .class-cards { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-large { grid-column: span 2; }
  .subjects-orbit-grid { grid-template-columns: repeat(4, 1fr); }
  .steps-row { flex-wrap: wrap; }
  .step-connector { display: none; }
  .step { flex: 0 0 calc(50% - 16px); }
  .footer-top { grid-template-columns: 1fr; gap: 40px; }
  .subject-layout { grid-template-columns: 1fr; }
  .subject-sidebar { position: static; }
  .admin-stats-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links, .nav-actions .btn-primary { display: none; }
  .hamburger { display: flex; }
  .mobile-menu.open { display: flex; }
  .class-cards { grid-template-columns: 1fr 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .feature-large { grid-column: span 1; }
  .subjects-orbit-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-links { grid-template-columns: repeat(2, 1fr); }
  .admin-sidebar { transform: translateX(-100%); transition: var(--transition); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-content { margin-left: 0; padding: 20px; }
  .admin-stats-row { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .class-cards { grid-template-columns: 1fr; }
  .subjects-orbit-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { flex-wrap: wrap; gap: 16px; }
  .stat-divider { display: none; }
  .stat { flex: 0 0 calc(50% - 8px); }
  .footer-links { grid-template-columns: 1fr; }
  .admin-stats-row { grid-template-columns: 1fr; }
  .login-card { padding: 32px 24px; }
}