/* ============================================
   CLASS 10 STUDY WEBSITE — STYLES
   Dark Theme · 3D Animations · Premium Design
   By Hardik Jain (HTL)
   ============================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Base colors */
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a2e;
  --bg-card-hover: #222240;
  --bg-surface: #16162a;

  /* Text colors */
  --text-primary: #f0f0f5;
  --text-secondary: #a0a0b8;
  --text-muted: #6a6a80;

  /* Accent colors */
  --cyan: #00f5ff;
  --purple: #8b5cf6;
  --pink: #ec4899;
  --orange: #f97316;
  --green: #22c55e;
  --blue: #3b82f6;
  --yellow: #facc15;
  --red: #ef4444;

  /* Gradients */
  --gradient-cyan-purple: linear-gradient(135deg, #00f5ff, #8b5cf6);
  --gradient-pink-orange: linear-gradient(135deg, #ec4899, #f97316);
  --gradient-green-cyan: linear-gradient(135deg, #22c55e, #00f5ff);
  --gradient-blue-purple: linear-gradient(135deg, #3b82f6, #8b5cf6);
  --gradient-yellow-orange: linear-gradient(135deg, #facc15, #f97316);
  --gradient-aurora: linear-gradient(135deg, #0a0a0f 0%, #1a0a2e 25%, #0a1a2e 50%, #0a2e1a 75%, #0a0a0f 100%);

  /* Subject colors */
  --math-color: #00f5ff;
  --math-gradient: linear-gradient(135deg, #00f5ff, #0088ff);
  --science-color: #22c55e;
  --science-gradient: linear-gradient(135deg, #22c55e, #00f5ff);
  --english-color: #ec4899;
  --english-gradient: linear-gradient(135deg, #ec4899, #f97316);
  --hindi-color: #f97316;
  --hindi-gradient: linear-gradient(135deg, #f97316, #facc15);
  --sst-color: #8b5cf6;
  --sst-gradient: linear-gradient(135deg, #8b5cf6, #3b82f6);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Border radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 50%;

  /* Shadows */
  --shadow-glow-cyan: 0 0 20px rgba(0, 245, 255, 0.3);
  --shadow-glow-purple: 0 0 20px rgba(139, 92, 246, 0.3);
  --shadow-glow-pink: 0 0 20px rgba(236, 72, 153, 0.3);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-card-hover: 0 16px 48px rgba(0, 0, 0, 0.6);

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

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

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

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--cyan), var(--purple));
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--purple), var(--pink));
}

/* ---------- Watermark ---------- */
.watermark {
  position: fixed;
  top: 16px;
  right: 20px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.08);
  text-transform: uppercase;
  z-index: 9999;
  pointer-events: none;
  user-select: none;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

@media (min-width: 768px) {
  .watermark {
    writing-mode: horizontal-tb;
    font-size: 0.95rem;
  }
}

/* ---------- Aurora Background ---------- */
.aurora-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  animation: auroraFloat 12s ease-in-out infinite alternate;
}

.aurora-blob:nth-child(1) {
  width: 500px;
  height: 500px;
  background: var(--cyan);
  top: -150px;
  left: -100px;
  animation-delay: 0s;
}

.aurora-blob:nth-child(2) {
  width: 400px;
  height: 400px;
  background: var(--purple);
  top: 30%;
  right: -100px;
  animation-delay: -4s;
}

.aurora-blob:nth-child(3) {
  width: 350px;
  height: 350px;
  background: var(--pink);
  bottom: -100px;
  left: 30%;
  animation-delay: -8s;
}

.aurora-blob:nth-child(4) {
  width: 300px;
  height: 300px;
  background: var(--green);
  bottom: 20%;
  left: -80px;
  animation-delay: -2s;
}

/* ---------- Floating 3D Shapes ---------- */
.floating-shapes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  perspective: 1000px;
}

.shape {
  position: absolute;
  opacity: 0.06;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}

.shape-cube {
  width: 40px;
  height: 40px;
  border: 2px solid var(--cyan);
  animation: shapeSpin 20s linear infinite;
}

.shape-circle {
  width: 50px;
  height: 50px;
  border: 2px solid var(--purple);
  border-radius: 50%;
  animation: shapeFloat 8s ease-in-out infinite alternate;
}

.shape-triangle {
  width: 0;
  height: 0;
  border-left: 20px solid transparent;
  border-right: 20px solid transparent;
  border-bottom: 35px solid var(--pink);
  opacity: 0.05;
  animation: shapeSpin 15s linear infinite reverse;
}

.shape-ring {
  width: 60px;
  height: 60px;
  border: 3px solid var(--orange);
  border-radius: 50%;
  animation: shapeFloat 10s ease-in-out infinite alternate;
}

/* Shape positions */
.shape:nth-child(1) {
  top: 10%;
  left: 5%;
}

.shape:nth-child(2) {
  top: 20%;
  right: 8%;
}

.shape:nth-child(3) {
  top: 50%;
  left: 10%;
}

.shape:nth-child(4) {
  top: 70%;
  right: 15%;
}

.shape:nth-child(5) {
  top: 85%;
  left: 20%;
}

.shape:nth-child(6) {
  top: 15%;
  left: 60%;
}

.shape:nth-child(7) {
  top: 40%;
  right: 5%;
}

.shape:nth-child(8) {
  top: 60%;
  left: 45%;
}

/* ---------- Header / Navbar ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 var(--space-xl);
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: var(--transition-smooth);
}

.navbar.scrolled {
  background: rgba(10, 10, 15, 0.95);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
}

.nav-logo {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--gradient-cyan-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
  animation: logoPulse 3s ease-in-out infinite;
}

.nav-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  background: var(--gradient-cyan-purple);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 400;
  display: block;
  margin-top: -2px;
}

/* Back button */
.nav-back {
  display: none;
  align-items: center;
  gap: var(--space-sm);
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.nav-back:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.nav-back.visible {
  display: flex;
}

.nav-back svg {
  width: 16px;
  height: 16px;
}

/* Breadcrumb */
.breadcrumb {
  display: none;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.breadcrumb.visible {
  display: flex;
}

.breadcrumb-item {
  cursor: pointer;
  transition: var(--transition-fast);
}

.breadcrumb-item:hover {
  color: var(--cyan);
}

.breadcrumb-separator {
  color: var(--text-muted);
  opacity: 0.5;
}

.breadcrumb-current {
  color: var(--text-primary);
  font-weight: 600;
}

/* ---------- Main Content Area ---------- */
main {
  padding-top: 70px;
  min-height: 100vh;
}

/* ---------- Page Sections ---------- */
.page {
  display: none;
  animation: pageFadeIn 0.5s ease-out forwards;
  padding: var(--space-2xl) var(--space-xl);
  max-width: 1200px;
  margin: 0 auto;
}

.page.active {
  display: block;
}

/* ---------- Hero Section ---------- */
.hero {
  text-align: center;
  padding: var(--space-3xl) 0;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 6px 18px;
  background: rgba(0, 245, 255, 0.08);
  border: 1px solid rgba(0, 245, 255, 0.2);
  border-radius: 50px;
  font-size: 0.8rem;
  color: var(--cyan);
  margin-bottom: var(--space-lg);
  animation: fadeInUp 0.6s ease-out;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  background: var(--cyan);
  border-radius: 50%;
  animation: dotPulse 2s ease-in-out infinite;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 800;
  margin-bottom: var(--space-md);
  animation: fadeInUp 0.6s ease-out 0.1s both;
}

.hero h1 .gradient-text {
  background: var(--gradient-cyan-purple);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-2xl);
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

/* Stats bar */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-2xl);
  flex-wrap: wrap;
  animation: fadeInUp 0.6s ease-out 0.3s both;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-cyan-purple);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---------- Section Header ---------- */
.section-header {
  margin-bottom: var(--space-2xl);
}

.section-header h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: var(--space-sm);
}

.section-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ---------- Subject Cards Grid ---------- */
.subjects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-xl);
  perspective: 1000px;
}

.subject-card {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  cursor: pointer;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: var(--transition-smooth);
  transform-style: preserve-3d;
  will-change: transform;
  animation: cardAppear 0.5s ease-out both;
}

.subject-card:nth-child(1) {
  animation-delay: 0.05s;
}

.subject-card:nth-child(2) {
  animation-delay: 0.1s;
}

.subject-card:nth-child(3) {
  animation-delay: 0.15s;
}

.subject-card:nth-child(4) {
  animation-delay: 0.2s;
}

.subject-card:nth-child(5) {
  animation-delay: 0.25s;
}

.subject-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--card-gradient);
  opacity: 0;
  transition: var(--transition-smooth);
}

.subject-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.06) 0%, transparent 60%);
  opacity: 0;
  transition: var(--transition-fast);
  pointer-events: none;
}

.subject-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-8px) scale(1.02);
}

.subject-card:hover::before {
  opacity: 1;
}

.subject-card:hover::after {
  opacity: 1;
}

/* Subject icon */
.subject-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: var(--space-lg);
  background: var(--card-gradient);
  box-shadow: 0 4px 20px var(--card-shadow-color, rgba(0, 0, 0, 0.3));
  transition: var(--transition-spring);
}

.subject-card:hover .subject-icon {
  transform: scale(1.1) rotate(-5deg);
}

.subject-name {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
  font-family: var(--font-heading);
}

.subject-chapters {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

.subject-arrow {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.subject-card:hover .subject-arrow {
  color: var(--text-primary);
  gap: var(--space-md);
}

/* Subject-specific colors */
.subject-card[data-subject="math"] {
  --card-gradient: var(--math-gradient);
  --card-shadow-color: rgba(0, 245, 255, 0.2);
}

.subject-card[data-subject="science"] {
  --card-gradient: var(--science-gradient);
  --card-shadow-color: rgba(34, 197, 94, 0.2);
}

.subject-card[data-subject="english"] {
  --card-gradient: var(--english-gradient);
  --card-shadow-color: rgba(236, 72, 153, 0.2);
}

.subject-card[data-subject="hindi"] {
  --card-gradient: var(--hindi-gradient);
  --card-shadow-color: rgba(249, 115, 22, 0.2);
}

.subject-card[data-subject="sst"] {
  --card-gradient: var(--sst-gradient);
  --card-shadow-color: rgba(139, 92, 246, 0.2);
}

/* ---------- Chapter List ---------- */
.chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
  perspective: 800px;
}

.chapter-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  cursor: pointer;
  transition: var(--transition-smooth);
  transform-style: preserve-3d;
  animation: cardAppear 0.4s ease-out both;
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
}

.chapter-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.chapter-number {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--chapter-gradient, var(--gradient-cyan-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1rem;
  color: #fff;
  transition: var(--transition-spring);
}

.chapter-card:hover .chapter-number {
  transform: scale(1.1) rotate(-3deg);
}

.chapter-info {
  flex: 1;
}

.chapter-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
  font-family: var(--font-heading);
}

.chapter-status {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--yellow);
}

.status-dot.available {
  background: var(--green);
  animation: dotPulse 2s ease-in-out infinite;
}

/* SST sub-section headers */
.sub-section-header {
  grid-column: 1 / -1;
  padding: var(--space-md) 0 var(--space-sm);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: var(--space-md);
}

.sub-section-header:first-child {
  margin-top: 0;
}

.sub-section-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.sub-section-icon {
  font-size: 1.2rem;
}

/* ---------- Chapter Content Page ---------- */
.content-area {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  min-height: 400px;
  animation: fadeInUp 0.5s ease-out;
}

.content-header {
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.content-header h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  margin-bottom: var(--space-sm);
}

.content-subject-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 4px 14px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--tag-bg, rgba(0, 245, 255, 0.1));
  color: var(--tag-color, var(--cyan));
  border: 1px solid var(--tag-border, rgba(0, 245, 255, 0.2));
}

.content-placeholder {
  text-align: center;
  padding: var(--space-3xl) var(--space-xl);
  color: var(--text-muted);
}

.content-placeholder-icon {
  font-size: 4rem;
  margin-bottom: var(--space-lg);
  animation: floatBounce 3s ease-in-out infinite;
}

.content-placeholder h3 {
  font-size: 1.3rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.content-placeholder p {
  font-size: 0.9rem;
  max-width: 400px;
  margin: 0 auto;
}

/* Content body styling for when content is added */
.content-body {
  line-height: 1.8;
  font-size: 1rem;
}

.content-body h3 {
  font-size: 1.3rem;
  margin: var(--space-xl) 0 var(--space-md);
  color: var(--text-primary);
}

.content-body p {
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
}

.content-body ul,
.content-body ol {
  margin: var(--space-md) 0;
  padding-left: var(--space-xl);
}

.content-body li {
  margin-bottom: var(--space-sm);
  color: var(--text-secondary);
}

/* ---------- Content Tabs ---------- */
.content-tabs {
  display: flex;
  gap: var(--space-xs);
  margin-bottom: var(--space-xl);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  overflow-x: auto;
  scrollbar-width: none;
}

.content-tabs::-webkit-scrollbar {
  display: none;
}

.content-tab {
  padding: 12px 24px;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.content-tab:hover {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
}

.content-tab.active {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

.content-tab-icon {
  font-size: 1.1rem;
}

.tab-panel {
  display: none;
  animation: fadeInUp 0.4s ease-out;
}

.tab-panel.active {
  display: block;
}

/* ---------- Notes Section ---------- */
.notes-section {
  line-height: 1.8;
}

.notes-topic {
  margin-bottom: var(--space-2xl);
  padding: var(--space-xl);
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--cyan);
  animation: fadeInUp 0.4s ease-out both;
}

.notes-topic:nth-child(even) {
  border-left-color: var(--purple);
}

.notes-topic:nth-child(3n) {
  border-left-color: var(--green);
}

.notes-topic:nth-child(4n) {
  border-left-color: var(--pink);
}

.notes-topic-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--gradient-cyan-purple);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.85rem;
  color: #fff;
  margin-right: var(--space-sm);
  flex-shrink: 0;
}

.notes-topic h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  color: var(--text-primary);
}

.notes-topic p {
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  font-size: 0.95rem;
}

.notes-topic p:last-child {
  margin-bottom: 0;
}

/* Bullet points in notes */
.notes-bullets {
  list-style: none;
  padding: 0;
  margin: var(--space-md) 0;
}

.notes-bullets li {
  position: relative;
  padding-left: 24px;
  margin-bottom: var(--space-sm);
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.notes-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  opacity: 0.7;
}

.notes-bullets li:nth-child(even)::before {
  background: var(--purple);
}

.notes-bullets li:nth-child(3n)::before {
  background: var(--pink);
}

/* Key terms highlight */
.key-term {
  color: var(--cyan);
  font-weight: 600;
}

.key-term.purple {
  color: var(--purple);
}

.key-term.pink {
  color: var(--pink);
}

.key-term.green {
  color: var(--green);
}

.key-term.orange {
  color: var(--orange);
}

/* Formula box */
.formula-box {
  background: rgba(0, 245, 255, 0.05);
  border: 1px solid rgba(0, 245, 255, 0.15);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin: var(--space-md) 0;
  text-align: center;
  font-family: 'Courier New', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 1px;
}

.formula-box.purple {
  background: rgba(139, 92, 246, 0.05);
  border-color: rgba(139, 92, 246, 0.15);
  color: var(--purple);
}

.formula-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: var(--space-xs);
}

/* Data tables in notes */
.notes-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-md) 0;
  font-size: 0.85rem;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.notes-table thead th {
  background: rgba(0, 245, 255, 0.08);
  color: var(--cyan);
  font-family: var(--font-heading);
  font-weight: 700;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 2px solid rgba(0, 245, 255, 0.15);
  white-space: nowrap;
}

.notes-table tbody td {
  padding: 10px 16px;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.notes-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.notes-table tbody tr:last-child td {
  border-bottom: none;
}

/* Did you know / info boxes */
.info-box {
  background: rgba(139, 92, 246, 0.06);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin: var(--space-md) 0;
}

.info-box-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--purple);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.info-box p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

/* Flowchart styles */
.flowchart {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin: var(--space-lg) 0;
  padding: var(--space-lg);
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-md);
}

.flow-item {
  background: var(--bg-card);
  border: 1px solid rgba(0, 245, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 12px 24px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 500;
  min-width: 200px;
  max-width: 350px;
  transition: var(--transition-fast);
}

.flow-item:hover {
  border-color: var(--cyan);
  box-shadow: var(--shadow-glow-cyan);
  transform: scale(1.02);
}

.flow-item.highlight {
  background: rgba(0, 245, 255, 0.08);
  border-color: var(--cyan);
  color: var(--cyan);
  font-weight: 700;
}

.flow-arrow {
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  padding: 4px 0;
}

/* Checklist */
.checklist {
  list-style: none;
  padding: 0;
  margin: var(--space-md) 0;
}

.checklist li {
  position: relative;
  padding: 8px 0 8px 32px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.checklist li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
  font-size: 1rem;
}

/* ---------- Mindmap Gallery ---------- */
.mindmap-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.mindmap-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--bg-surface);
  cursor: pointer;
  transition: var(--transition-smooth);
  animation: cardAppear 0.4s ease-out both;
}

.mindmap-card:hover {
  border-color: rgba(0, 245, 255, 0.3);
  box-shadow: var(--shadow-glow-cyan);
  transform: translateY(-4px);
}

.mindmap-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: var(--transition-smooth);
}

.mindmap-card:hover img {
  transform: scale(1.05);
}

.mindmap-card-label {
  padding: 12px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  font-family: var(--font-heading);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(10px);
  justify-content: center;
  align-items: center;
  padding: var(--space-xl);
  cursor: zoom-out;
  animation: fadeInUp 0.3s ease-out;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90%;
  max-height: 90vh;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ---------- Video Section ---------- */
.video-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.video-card {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  overflow: hidden;
  animation: fadeInUp 0.4s ease-out;
}

.video-card video {
  width: 100%;
  max-height: 500px;
  background: #000;
  display: block;
}

.video-card-info {
  padding: var(--space-lg);
}

.video-card-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.video-card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ---------- Responsive for content sections ---------- */
@media (max-width: 768px) {
  .content-tabs {
    gap: 0;
  }

  .content-tab {
    padding: 10px 16px;
    font-size: 0.8rem;
  }

  .notes-topic {
    padding: var(--space-md);
  }

  .mindmap-gallery {
    grid-template-columns: 1fr;
  }

  .flowchart {
    padding: var(--space-md);
  }

  .flow-item {
    min-width: 160px;
    font-size: 0.8rem;
    padding: 10px 16px;
  }

  .notes-table {
    font-size: 0.75rem;
  }

  .notes-table thead th,
  .notes-table tbody td {
    padding: 8px 10px;
  }
}

/* ---------- Search Bar ---------- */
.search-container {
  position: relative;
  max-width: 500px;
  margin: 0 auto var(--space-2xl);
  animation: fadeInUp 0.6s ease-out 0.4s both;
}

.search-input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-smooth);
}

.search-input:focus {
  border-color: rgba(0, 245, 255, 0.3);
  box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.08);
  background: var(--bg-surface);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 18px;
  height: 18px;
  pointer-events: none;
}

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  padding: var(--space-2xl) var(--space-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-size: 0.8rem;
}

.footer-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  background: var(--gradient-cyan-purple);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes auroraFloat {
  0% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(30px, -40px) scale(1.1);
  }

  66% {
    transform: translate(-20px, 30px) scale(0.95);
  }

  100% {
    transform: translate(40px, 20px) scale(1.05);
  }
}

@keyframes shapeSpin {
  0% {
    transform: rotate(0deg) translateY(0);
  }

  25% {
    transform: rotate(90deg) translateY(-10px);
  }

  50% {
    transform: rotate(180deg) translateY(0);
  }

  75% {
    transform: rotate(270deg) translateY(10px);
  }

  100% {
    transform: rotate(360deg) translateY(0);
  }
}

@keyframes shapeFloat {
  0% {
    transform: translateY(0) rotate(0deg);
  }

  100% {
    transform: translateY(-30px) rotate(15deg);
  }
}

@keyframes logoPulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(0, 245, 255, 0.4);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(0, 245, 255, 0);
  }
}

@keyframes dotPulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(0.8);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pageFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardAppear {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes floatBounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-15px);
  }
}

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

  100% {
    background-position: 200% 0;
  }
}

/* ---------- Utility Classes ---------- */
.text-gradient {
  background: var(--gradient-cyan-purple);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hidden {
  display: none !important;
}

/* ---------- Responsive Design ---------- */
@media (max-width: 768px) {
  .navbar {
    padding: 0 var(--space-md);
    height: 60px;
  }

  .nav-title {
    font-size: 1rem;
  }

  .nav-subtitle {
    display: none;
  }

  .page {
    padding: var(--space-xl) var(--space-md);
  }

  .hero {
    padding: var(--space-xl) 0;
  }

  .hero-stats {
    gap: var(--space-lg);
  }

  .stat-number {
    font-size: 1.6rem;
  }

  .subjects-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .chapter-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .subject-card {
    padding: var(--space-lg);
  }

  .content-area {
    padding: var(--space-lg);
  }

  .breadcrumb {
    display: none !important;
  }

  .aurora-blob {
    filter: blur(60px);
    opacity: 0.1;
  }

  .aurora-blob:nth-child(1) {
    width: 300px;
    height: 300px;
  }

  .aurora-blob:nth-child(2) {
    width: 250px;
    height: 250px;
  }

  .aurora-blob:nth-child(3) {
    width: 200px;
    height: 200px;
  }

  .aurora-blob:nth-child(4) {
    width: 180px;
    height: 180px;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero-description {
    font-size: 0.9rem;
  }

  .subject-icon {
    width: 48px;
    height: 48px;
    font-size: 1.4rem;
  }

  .nav-logo {
    width: 34px;
    height: 34px;
    font-size: 0.9rem;
  }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}