/* ═══════════════════════════════════════════
   DESIGN TOKENS
   ═══════════════════════════════════════════ */
:root {
  --blur-sm: blur(8px); --blur-md: blur(18px); --blur-lg: blur(32px); --blur-xl: blur(60px);
  --shadow-glass: 0 8px 32px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.3);
  --shadow-float: 0 20px 60px rgba(0,0,0,0.4), 0 4px 16px rgba(0,0,0,0.2);
  --reflection-top: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 50%);
  --reflection-inner: inset 0 1px 1px rgba(255,255,255,0.45), inset 0 -1px 1px rgba(0,0,0,0.1);
  --ease-glass: cubic-bezier(0.22, 0.68, 0, 1.2); --ease-liquid: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 180ms; --dur-mid: 360ms; --dur-slow: 600ms;
  --font-display: "Italiana", serif; --font-body: "DM Sans", sans-serif;
  --space-xs: 8px; --space-sm: 12px; --space-md: 16px; --space-lg: 24px;
  --space-xl: 32px; --space-2xl: 48px; --space-3xl: 64px;
  --radius-sm: 10px; --radius-md: 14px; --radius-lg: 20px; --radius-xl: 24px; --radius-full: 9999px;
  --text-xs: 0.75rem; --text-sm: 0.82rem; --text-md: 0.9rem; --text-base: 1rem;
  --text-lg: 1.125rem; --text-xl: 1.3rem; --text-2xl: 1.6rem; --text-3xl: 2rem; --text-4xl: 2.8rem;
}

/* TEMA 1: CREATIVO (Violeta/Cyan) */
[data-theme="creativo"][data-mode="dark"] {
  --accent-primary: #b490f5; --accent-secondary: #5ee7df; --accent-tertiary: #f7a8c4;
  --accent-warm: #ffd27f; --accent-natural: #a8f08a;
  --color-bg: #0b0e1a; --color-surface: rgba(255,255,255,0.04);
  --color-text: #ffffff; --color-text-muted: rgba(255,255,255,0.55); --color-text-subtle: rgba(255,255,255,0.35);
  --glass-white: rgba(255,255,255,0.12); --glass-white-md: rgba(255,255,255,0.2);
  --glass-border: rgba(255,255,255,0.25); --glass-border-subtle: rgba(255,255,255,0.12);
  --blob-1: radial-gradient(circle, #b490f5, #7c3aed); --blob-2: radial-gradient(circle, #5ee7df, #3b82f6);
  --blob-3: radial-gradient(circle, #f7a8c4, #ec4899);
  --gradient-hero: linear-gradient(135deg, #fff 30%, #b490f5 65%, #5ee7df 100%);
  --gradient-btn: linear-gradient(135deg, rgba(180,144,245,0.5) 0%, rgba(94,231,223,0.5) 100%);
  --gradient-btn-hover: linear-gradient(135deg, rgba(180,144,245,0.7) 0%, rgba(94,231,223,0.7) 100%);
  --code-bg: rgba(0,0,0,0.4); --table-stripe: rgba(255,255,255,0.03);
  --quiz-bg: rgba(180,144,245,0.08); --quiz-border: rgba(180,144,245,0.3);
  --quiz-correct: rgba(168,240,138,0.15); --quiz-correct-border: rgba(168,240,138,0.4);
  --sidebar-active: rgba(180,144,245,0.15);
}
[data-theme="creativo"][data-mode="light"] {
  --accent-primary: #7c3aed; --accent-secondary: #0891b2; --accent-tertiary: #db2777;
  --accent-warm: #d97706; --accent-natural: #16a34a;
  --color-bg: #f0e6ff; --color-surface: rgba(0,0,0,0.03);
  --color-text: #1a1a2e; --color-text-muted: rgba(26,26,46,0.55); --color-text-subtle: rgba(26,26,46,0.35);
  --glass-white: rgba(255,255,255,0.6); --glass-white-md: rgba(255,255,255,0.75);
  --glass-border: rgba(124,58,237,0.2); --glass-border-subtle: rgba(124,58,237,0.1);
  --blob-1: radial-gradient(circle, #c4b5fd, #a78bfa); --blob-2: radial-gradient(circle, #67e8f9, #22d3ee);
  --blob-3: radial-gradient(circle, #fda4af, #fb7185);
  --gradient-hero: linear-gradient(135deg, #1a1a2e 30%, #7c3aed 65%, #0891b2 100%);
  --gradient-btn: linear-gradient(135deg, rgba(124,58,237,0.8) 0%, rgba(8,145,178,0.8) 100%);
  --gradient-btn-hover: linear-gradient(135deg, rgba(124,58,237,1) 0%, rgba(8,145,178,1) 100%);
  --code-bg: rgba(0,0,0,0.06); --table-stripe: rgba(124,58,237,0.04);
  --quiz-bg: rgba(124,58,237,0.06); --quiz-border: rgba(124,58,237,0.25);
  --quiz-correct: rgba(22,163,74,0.1); --quiz-correct-border: rgba(22,163,74,0.3);
  --sidebar-active: rgba(124,58,237,0.1);
}

/* TEMA 2: NATURALEZA (Verde/Dorado) */
[data-theme="naturaleza"][data-mode="dark"] {
  --accent-primary: #34d399; --accent-secondary: #fbbf24; --accent-tertiary: #f472b6;
  --accent-warm: #fb923c; --accent-natural: #22d3ee;
  --color-bg: #0a1a0f; --color-surface: rgba(255,255,255,0.04);
  --color-text: #ffffff; --color-text-muted: rgba(255,255,255,0.55); --color-text-subtle: rgba(255,255,255,0.35);
  --glass-white: rgba(255,255,255,0.12); --glass-white-md: rgba(255,255,255,0.2);
  --glass-border: rgba(255,255,255,0.25); --glass-border-subtle: rgba(255,255,255,0.12);
  --blob-1: radial-gradient(circle, #34d399, #059669); --blob-2: radial-gradient(circle, #fbbf24, #d97706);
  --blob-3: radial-gradient(circle, #a78bfa, #7c3aed);
  --gradient-hero: linear-gradient(135deg, #fff 30%, #34d399 65%, #fbbf24 100%);
  --gradient-btn: linear-gradient(135deg, rgba(52,211,153,0.5) 0%, rgba(251,191,36,0.5) 100%);
  --gradient-btn-hover: linear-gradient(135deg, rgba(52,211,153,0.7) 0%, rgba(251,191,36,0.7) 100%);
  --code-bg: rgba(0,0,0,0.4); --table-stripe: rgba(255,255,255,0.03);
  --quiz-bg: rgba(52,211,153,0.08); --quiz-border: rgba(52,211,153,0.3);
  --quiz-correct: rgba(52,211,153,0.15); --quiz-correct-border: rgba(52,211,153,0.4);
  --sidebar-active: rgba(52,211,153,0.15);
}
[data-theme="naturaleza"][data-mode="light"] {
  --accent-primary: #059669; --accent-secondary: #d97706; --accent-tertiary: #db2777;
  --accent-warm: #ea580c; --accent-natural: #0891b2;
  --color-bg: #ecfdf5; --color-surface: rgba(0,0,0,0.03);
  --color-text: #1a1a2e; --color-text-muted: rgba(26,26,46,0.55); --color-text-subtle: rgba(26,26,46,0.35);
  --glass-white: rgba(255,255,255,0.6); --glass-white-md: rgba(255,255,255,0.75);
  --glass-border: rgba(5,150,105,0.2); --glass-border-subtle: rgba(5,150,105,0.1);
  --blob-1: radial-gradient(circle, #6ee7b7, #34d399); --blob-2: radial-gradient(circle, #fcd34d, #fbbf24);
  --blob-3: radial-gradient(circle, #fda4af, #fb7185);
  --gradient-hero: linear-gradient(135deg, #1a1a2e 30%, #059669 65%, #d97706 100%);
  --gradient-btn: linear-gradient(135deg, rgba(5,150,105,0.8) 0%, rgba(217,119,6,0.8) 100%);
  --gradient-btn-hover: linear-gradient(135deg, rgba(5,150,105,1) 0%, rgba(217,119,6,1) 100%);
  --code-bg: rgba(0,0,0,0.06); --table-stripe: rgba(5,150,105,0.04);
  --quiz-bg: rgba(5,150,105,0.06); --quiz-border: rgba(5,150,105,0.25);
  --quiz-correct: rgba(5,150,105,0.1); --quiz-correct-border: rgba(5,150,105,0.3);
  --sidebar-active: rgba(5,150,105,0.1);
}

/* TEMA 3: OCÉANO (Azul profundo/Coral) */
[data-theme="oceano"][data-mode="dark"] {
  --accent-primary: #38bdf8; --accent-secondary: #fb7185; --accent-tertiary: #c084fc;
  --accent-warm: #fbbf24; --accent-natural: #4ade80;
  --color-bg: #0d1b2a; --color-surface: rgba(255,255,255,0.04);
  --color-text: #ffffff; --color-text-muted: rgba(255,255,255,0.55); --color-text-subtle: rgba(255,255,255,0.35);
  --glass-white: rgba(255,255,255,0.12); --glass-white-md: rgba(255,255,255,0.2);
  --glass-border: rgba(255,255,255,0.25); --glass-border-subtle: rgba(255,255,255,0.12);
  --blob-1: radial-gradient(circle, #38bdf8, #0284c7); --blob-2: radial-gradient(circle, #fb7185, #e11d48);
  --blob-3: radial-gradient(circle, #c084fc, #a855f7);
  --gradient-hero: linear-gradient(135deg, #fff 30%, #38bdf8 65%, #fb7185 100%);
  --gradient-btn: linear-gradient(135deg, rgba(56,189,248,0.5) 0%, rgba(251,113,133,0.5) 100%);
  --gradient-btn-hover: linear-gradient(135deg, rgba(56,189,248,0.7) 0%, rgba(251,113,133,0.7) 100%);
  --code-bg: rgba(0,0,0,0.4); --table-stripe: rgba(255,255,255,0.03);
  --quiz-bg: rgba(56,189,248,0.08); --quiz-border: rgba(56,189,248,0.3);
  --quiz-correct: rgba(74,222,128,0.15); --quiz-correct-border: rgba(74,222,128,0.4);
  --sidebar-active: rgba(56,189,248,0.15);
}
[data-theme="oceano"][data-mode="light"] {
  --accent-primary: #0284c7; --accent-secondary: #e11d48; --accent-tertiary: #9333ea;
  --accent-warm: #d97706; --accent-natural: #16a34a;
  --color-bg: #e0f2fe; --color-surface: rgba(0,0,0,0.03);
  --color-text: #1a1a2e; --color-text-muted: rgba(26,26,46,0.55); --color-text-subtle: rgba(26,26,46,0.35);
  --glass-white: rgba(255,255,255,0.6); --glass-white-md: rgba(255,255,255,0.75);
  --glass-border: rgba(2,132,199,0.2); --glass-border-subtle: rgba(2,132,199,0.1);
  --blob-1: radial-gradient(circle, #7dd3fc, #38bdf8); --blob-2: radial-gradient(circle, #fda4af, #fb7185);
  --blob-3: radial-gradient(circle, #d8b4fe, #c084fc);
  --gradient-hero: linear-gradient(135deg, #1a1a2e 30%, #0284c7 65%, #e11d48 100%);
  --gradient-btn: linear-gradient(135deg, rgba(2,132,199,0.8) 0%, rgba(225,29,72,0.8) 100%);
  --gradient-btn-hover: linear-gradient(135deg, rgba(2,132,199,1) 0%, rgba(225,29,72,1) 100%);
  --code-bg: rgba(0,0,0,0.06); --table-stripe: rgba(2,132,199,0.04);
  --quiz-bg: rgba(2,132,199,0.06); --quiz-border: rgba(2,132,199,0.25);
  --quiz-correct: rgba(22,163,74,0.1); --quiz-correct-border: rgba(22,163,74,0.3);
  --sidebar-active: rgba(2,132,199,0.1);
}

/* ═══════════════════════════════════════════
   BASE & RESET
   ═══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body); background: var(--color-bg); color: var(--color-text);
  line-height: 1.7; transition: background var(--dur-slow) var(--ease-smooth), color var(--dur-slow) var(--ease-smooth);
  overflow-x: hidden; min-height: 100vh;
}
a { color: var(--accent-primary); text-decoration: none; transition: color var(--dur-fast); }
a:hover { color: var(--accent-secondary); }

/* ═══════════════════════════════════════════
   ANIMATED BACKGROUND BLOBS
   ═══════════════════════════════════════════ */
.scene { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.scene__blob {
  position: absolute; border-radius: 50%; filter: blur(100px); opacity: 0.35;
  animation: blob-drift var(--dur, 20s) ease-in-out infinite alternate;
}
[data-mode="light"] .scene__blob { opacity: 0.2; }
.scene__blob--1 { width: 700px; height: 700px; background: var(--blob-1); top: -200px; left: -150px; --dur: 22s; }
.scene__blob--2 { width: 600px; height: 600px; background: var(--blob-2); bottom: -200px; right: -100px; --dur: 17s; animation-delay: -8s; }
.scene__blob--3 { width: 400px; height: 400px; background: var(--blob-3); top: 40%; left: 50%; --dur: 25s; animation-delay: -13s; }
@keyframes blob-drift {
  0% { transform: translate(0,0) scale(1); } 33% { transform: translate(60px,-40px) scale(1.08); }
  66% { transform: translate(-40px,60px) scale(0.94); } 100% { transform: translate(30px,30px) scale(1.04); }
}

/* ═══════════════════════════════════════════
   LIQUID GLASS BASE
   ═══════════════════════════════════════════ */
.glass {
  backdrop-filter: var(--blur-md); -webkit-backdrop-filter: var(--blur-md);
  background: var(--glass-white); border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-glass); position: relative; overflow: hidden;
}
.glass::before {
  content: ""; position: absolute; inset: 0; background: var(--reflection-top);
  pointer-events: none; border-radius: inherit; z-index: 1;
}

/* ═══════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════ */
.page { position: relative; z-index: 10; display: flex; min-height: 100vh; }

/* SIDEBAR */
.sidebar {
  position: fixed; top: 0; left: 0; width: 280px; height: 100vh;
  backdrop-filter: var(--blur-lg); -webkit-backdrop-filter: var(--blur-lg);
  background: var(--glass-white); border-right: 1px solid var(--glass-border-subtle);
  display: flex; flex-direction: column; z-index: 100;
  transition: transform var(--dur-slow) var(--ease-smooth), background var(--dur-slow);
  overflow: hidden;
}
.sidebar__header { padding: var(--space-lg); border-bottom: 1px solid var(--glass-border-subtle); }
.sidebar__logo {
  font-family: var(--font-display); font-size: var(--text-xl);
  background: var(--gradient-hero); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.sidebar__subtitle { font-size: var(--text-xs); color: var(--color-text-muted); margin-top: 4px; }

/* Theme selector */
.theme-selector { padding: var(--space-md) var(--space-lg); border-bottom: 1px solid var(--glass-border-subtle); }
.theme-selector__label { font-size: var(--text-xs); color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: var(--space-sm); }
.theme-selector__row { display: flex; gap: var(--space-xs); margin-bottom: var(--space-xs); }
.theme-btn {
  flex: 1; padding: 6px 8px; border: 1px solid var(--glass-border-subtle);
  border-radius: var(--radius-sm); background: transparent; color: var(--color-text);
  font-size: var(--text-xs); cursor: pointer; transition: all var(--dur-fast) var(--ease-glass);
  font-family: var(--font-body);
}
.theme-btn:hover { background: var(--glass-white-md); }
.theme-btn.active { background: var(--sidebar-active); border-color: var(--accent-primary); color: var(--accent-primary); }
.mode-toggle { display: flex; gap: var(--space-xs); }
.mode-btn {
  flex: 1; padding: 6px; border: 1px solid var(--glass-border-subtle);
  border-radius: var(--radius-sm); background: transparent; color: var(--color-text-muted);
  font-size: var(--text-xs); cursor: pointer; transition: all var(--dur-fast) var(--ease-glass);
  font-family: var(--font-body);
}
.mode-btn:hover { background: var(--glass-white-md); }
.mode-btn.active { background: var(--sidebar-active); border-color: var(--accent-primary); color: var(--accent-primary); }

/* Progress bar */
.progress-bar { padding: var(--space-md) var(--space-lg); border-bottom: 1px solid var(--glass-border-subtle); }
.progress-bar__label { font-size: var(--text-xs); color: var(--color-text-muted); margin-bottom: var(--space-xs); }
.progress-bar__track { height: 6px; background: var(--glass-white); border-radius: var(--radius-full); overflow: hidden; }
.progress-bar__fill {
  height: 100%; background: var(--accent-primary); border-radius: var(--radius-full);
  transition: width var(--dur-slow) var(--ease-smooth); width: 0%;
}

/* Nav items */
.sidebar__nav { flex: 1; padding: var(--space-md) 0; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: var(--space-sm);
  padding: 10px var(--space-lg); cursor: pointer;
  font-size: var(--text-sm); color: var(--color-text-muted);
  transition: all var(--dur-fast) var(--ease-smooth);
  border-left: 3px solid transparent; text-decoration: none;
}
.nav-item:hover { background: var(--glass-white); color: var(--color-text); }
.nav-item.active { background: var(--sidebar-active); color: var(--accent-primary); border-left-color: var(--accent-primary); }
.nav-item.completed { color: var(--accent-natural); }
.nav-item__icon { font-size: var(--text-lg); width: 24px; text-align: center; }
.nav-item__text { flex: 1; }
.nav-item__check { font-size: var(--text-xs); opacity: 0; transition: opacity var(--dur-fast); }
.nav-item.completed .nav-item__check { opacity: 1; }

/* MAIN CONTENT */
.main { margin-left: 280px; flex: 1; min-width: 0; }

/* ═══════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════ */
.hero {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; padding: 80px var(--space-xl); gap: var(--space-lg);
}
.hero__kicker {
  font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--accent-primary); font-weight: 600;
  animation: cascade-in var(--dur-slow) var(--ease-glass) both;
}
.hero__title {
  font-family: var(--font-display); font-size: clamp(2.5rem, 7vw, 5rem);
  line-height: 1.05; letter-spacing: -0.02em;
  background: var(--gradient-hero); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  animation: cascade-in var(--dur-slow) var(--ease-glass) 0.1s both;
}
.hero__sub {
  font-size: var(--text-lg); color: var(--color-text-muted); max-width: 600px;
  animation: cascade-in var(--dur-slow) var(--ease-glass) 0.2s both;
}
.hero__cta {
  display: inline-flex; align-items: center; gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl); border-radius: var(--radius-full);
  background: var(--gradient-btn); border: 1px solid var(--glass-border);
  color: var(--color-text); font-size: var(--text-base); font-weight: 600;
  cursor: pointer; transition: all var(--dur-mid) var(--ease-liquid); text-decoration: none;
  animation: cascade-in var(--dur-slow) var(--ease-glass) 0.3s both;
}
.hero__cta:hover { background: var(--gradient-btn-hover); transform: translateY(-3px); box-shadow: var(--shadow-float); }

/* ═══════════════════════════════════════════
   MODULE CONTENT
   ═══════════════════════════════════════════ */
.content {
  padding: var(--space-3xl) var(--space-xl); max-width: 900px; margin: 0 auto;
  animation: cascade-in var(--dur-slow) var(--ease-glass) both;
}

.module__header { margin-bottom: var(--space-2xl); }
.module__badge {
  display: inline-block; padding: 4px 14px; border-radius: var(--radius-full);
  font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--quiz-bg); border: 1px solid var(--quiz-border); color: var(--accent-primary);
  margin-bottom: var(--space-md);
}
.module__title { font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: var(--space-sm); }
.module__desc { font-size: var(--text-lg); color: var(--color-text-muted); font-style: italic; }

.content h2 {
  font-family: var(--font-display); font-size: var(--text-2xl); margin: var(--space-2xl) 0 var(--space-md);
  padding-bottom: var(--space-sm); border-bottom: 1px solid var(--glass-border-subtle);
}
.content h3 { font-size: var(--text-xl); margin: var(--space-xl) 0 var(--space-sm); color: var(--accent-primary); }
.content h4 { font-size: var(--text-lg); margin: var(--space-lg) 0 var(--space-sm); }
.content p { margin-bottom: var(--space-md); }
.content ul, .content ol { margin: var(--space-md) 0 var(--space-md) var(--space-lg); }
.content li { margin-bottom: var(--space-xs); }
.content strong { color: var(--accent-primary); }
.content em { color: var(--accent-tertiary); }

.content blockquote {
  margin: var(--space-lg) 0; padding: var(--space-lg) var(--space-xl);
  border-radius: var(--radius-lg); border-left: 4px solid var(--accent-primary);
  background: var(--quiz-bg);
}
.content blockquote p { margin-bottom: var(--space-sm); }

.content pre {
  margin: var(--space-md) 0; padding: var(--space-lg);
  border-radius: var(--radius-md); background: var(--code-bg);
  overflow-x: auto; font-size: var(--text-sm); line-height: 1.6;
  border: 1px solid var(--glass-border-subtle);
}
.content code { font-family: 'Fira Code', 'Consolas', monospace; font-size: 0.9em; }
.content p code, .content li code {
  background: var(--code-bg); padding: 2px 6px; border-radius: 4px;
  border: 1px solid var(--glass-border-subtle);
}

.content table {
  width: 100%; margin: var(--space-md) 0; border-collapse: collapse;
  border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--glass-border-subtle);
}
.content th {
  padding: var(--space-sm) var(--space-md); text-align: left;
  background: var(--glass-white); font-weight: 600; font-size: var(--text-sm);
  border-bottom: 1px solid var(--glass-border-subtle);
}
.content td {
  padding: var(--space-sm) var(--space-md); font-size: var(--text-sm);
  border-bottom: 1px solid var(--glass-border-subtle);
}
.content tr:nth-child(even) { background: var(--table-stripe); }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space-md); margin: var(--space-lg) 0; }
.glass-card {
  border-radius: var(--radius-xl); padding: var(--space-xl);
  transition: transform var(--dur-mid) var(--ease-glass), box-shadow var(--dur-mid) var(--ease-glass);
}
.glass-card:hover { transform: translateY(-4px) scale(1.01); box-shadow: var(--shadow-float); }
.glass-card__title { font-size: var(--text-lg); font-weight: 600; margin-bottom: var(--space-sm); }
.glass-card__body { font-size: var(--text-sm); color: var(--color-text-muted); }

/* ═══════════════════════════════════════════
   QUIZ SYSTEM
   ═══════════════════════════════════════════ */
.quiz-section {
  margin: var(--space-2xl) 0; padding: var(--space-xl);
  border-radius: var(--radius-xl); background: var(--quiz-bg); border: 1px solid var(--quiz-border);
}
.quiz-section__title {
  font-family: var(--font-display); font-size: var(--text-xl);
  margin-bottom: var(--space-lg); display: flex; align-items: center; gap: var(--space-sm);
}
.quiz-question {
  margin-bottom: var(--space-lg); padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--glass-border-subtle);
}
.quiz-question:last-of-type { border-bottom: none; }
.quiz-question__text { font-weight: 600; margin-bottom: var(--space-sm); display: flex; gap: var(--space-xs); }
.quiz-question__num { color: var(--accent-primary); min-width: 28px; }
.quiz-answer-input {
  width: 100%; min-height: 60px; padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md); border: 1px solid var(--glass-border-subtle);
  background: var(--glass-white); color: var(--color-text);
  font-family: var(--font-body); font-size: var(--text-sm);
  resize: vertical; outline: none; transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.quiz-answer-input:focus { border-color: var(--accent-primary); box-shadow: 0 0 0 3px var(--quiz-bg); }
.quiz-answer-input::placeholder { color: var(--color-text-subtle); }

.quiz-reveal-btn {
  display: inline-flex; align-items: center; gap: var(--space-xs);
  padding: var(--space-sm) var(--space-lg); border-radius: var(--radius-full);
  background: var(--gradient-btn); border: 1px solid var(--glass-border);
  color: var(--color-text); font-size: var(--text-sm); font-weight: 600;
  cursor: pointer; transition: all var(--dur-mid) var(--ease-liquid);
  font-family: var(--font-body); margin-top: var(--space-md);
}
.quiz-reveal-btn:hover { background: var(--gradient-btn-hover); transform: translateY(-2px); }

.quiz-correct-answer {
  margin-top: var(--space-md); padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md); background: var(--quiz-correct);
  border: 1px solid var(--quiz-correct-border);
  animation: cascade-in var(--dur-mid) var(--ease-glass) both;
  display: none;
}
.quiz-correct-answer.show { display: block; }
.quiz-correct-answer__label {
  font-size: var(--text-xs); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--accent-natural); margin-bottom: var(--space-xs);
}
.quiz-correct-answer__text { font-size: var(--text-sm); line-height: 1.6; }

/* ═══════════════════════════════════════════
   NAV BUTTONS
   ═══════════════════════════════════════════ */
.module-nav {
  display: flex; justify-content: space-between; margin-top: var(--space-2xl);
  padding-top: var(--space-xl); border-top: 1px solid var(--glass-border-subtle);
}
.module-nav__btn {
  display: inline-flex; align-items: center; gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg); border-radius: var(--radius-full);
  background: var(--glass-white); border: 1px solid var(--glass-border-subtle);
  color: var(--color-text); font-size: var(--text-sm); cursor: pointer;
  transition: all var(--dur-mid) var(--ease-liquid); font-family: var(--font-body); text-decoration: none;
}
.module-nav__btn:hover { background: var(--glass-white-md); transform: translateY(-2px); }
.module-nav__btn--prev::before { content: "← "; }
.module-nav__btn--next::after { content: " →"; }

/* ═══════════════════════════════════════════
   MOBILE TOGGLE
   ═══════════════════════════════════════════ */
.mobile-toggle {
  display: none; position: fixed; top: var(--space-md); left: var(--space-md);
  z-index: 200; width: 44px; height: 44px; border-radius: var(--radius-md);
  background: var(--glass-white); border: 1px solid var(--glass-border);
  backdrop-filter: var(--blur-md); -webkit-backdrop-filter: var(--blur-md);
  color: var(--color-text); font-size: var(--text-xl); cursor: pointer;
  align-items: center; justify-content: center;
}

/* ═══════════════════════════════════════════
   12 ANIMATIONS
   ═══════════════════════════════════════════ */
@keyframes cascade-in {
  0% { opacity: 0; transform: translateY(24px) scale(0.97); filter: blur(8px); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
@keyframes liquid-morph {
  0% { border-radius: 60% 40% 30% 70%/60% 30% 70% 40%; }
  50% { border-radius: 50% 60% 30% 60%/40% 40% 70% 60%; }
  100% { border-radius: 60% 40% 30% 70%/60% 30% 70% 40%; }
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes shimmer { 0% { background-position: -200% center; } 100% { background-position: 200% center; } }
@keyframes breathing-blur { 0%, 100% { backdrop-filter: blur(10px); } 50% { backdrop-filter: blur(30px); } }
@keyframes edge-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(94,231,223,0); }
  50% { box-shadow: 0 0 30px 6px rgba(94,231,223,0.35); }
}
@keyframes depth-shift {
  0%, 100% { transform: perspective(400px) rotateY(0deg); }
  50% { transform: perspective(400px) rotateY(8deg); }
}
@keyframes tension {
  0%, 100% { transform: scaleX(1) scaleY(1); }
  30% { transform: scaleX(1.06) scaleY(0.94); }
  60% { transform: scaleX(0.95) scaleY(1.05); }
}

/* ═══════════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .scene__blob { animation: none !important; }
  .content { opacity: 1 !important; transform: none !important; }
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .mobile-toggle { display: flex; }
  .hero__title { font-size: clamp(2rem, 8vw, 3.5rem); }
  .content { padding: var(--space-xl) var(--space-md); }
}

/* ═══════════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════════ */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--glass-border-subtle); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--accent-primary); }

/* ═══════════════════════════════════════════
   FOCUS
   ═══════════════════════════════════════════ */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent-primary); outline-offset: 3px; border-radius: var(--radius-xs); }

/* ═══════════════════════════════════════════
   SPECIAL BOXES
   ═══════════════════════════════════════════ */
.exercise-box {
  margin: var(--space-xl) 0; padding: var(--space-xl);
  border-radius: var(--radius-lg); border: 1px solid var(--accent-secondary);
  background: rgba(94,231,223,0.05);
}
.exercise-box__title {
  font-weight: 700; color: var(--accent-secondary); margin-bottom: var(--space-md);
  display: flex; align-items: center; gap: var(--space-sm);
}
.exercise-section {
  margin: var(--space-3xl) 0; padding: var(--space-xl);
  border-radius: var(--radius-xl); border: 2px solid var(--accent-secondary);
  background: var(--quiz-bg);
}
.exercise-section .module__badge {
  background: rgba(94,231,223,0.12); border-color: rgba(94,231,223,0.3); color: var(--accent-secondary);
}
.exercise-section .module__title { color: var(--accent-secondary); }
.exercise-content h2 {
  font-family: var(--font-display); font-size: var(--text-xl);
  margin: var(--space-xl) 0 var(--space-md); color: var(--accent-secondary);
}
.exercise-content h3 { font-size: var(--text-lg); margin: var(--space-lg) 0 var(--space-sm); color: var(--accent-primary); }
.exercise-content p { margin-bottom: var(--space-md); }
.exercise-content ul, .exercise-content ol { margin: var(--space-md) 0 var(--space-md) var(--space-lg); }
.exercise-content li { margin-bottom: var(--space-xs); }
.exercise-content pre {
  margin: var(--space-md) 0; padding: var(--space-lg);
  border-radius: var(--radius-md); background: var(--code-bg);
  overflow-x: auto; font-size: var(--text-sm); line-height: 1.6;
  border: 1px solid var(--glass-border-subtle);
}
.exercise-content code { font-family: 'Fira Code', 'Consolas', monospace; font-size: 0.9em; }
.exercise-content p code, .exercise-content li code {
  background: var(--code-bg); padding: 2px 6px; border-radius: 4px;
  border: 1px solid var(--glass-border-subtle);
}
.exercise-content blockquote {
  margin: var(--space-lg) 0; padding: var(--space-lg) var(--space-xl);
  border-radius: var(--radius-lg); border-left: 4px solid var(--accent-secondary);
  background: rgba(94,231,223,0.06);
}
.exercise-content blockquote p { margin-bottom: var(--space-sm); }
.exercise-content strong { color: var(--accent-secondary); }
.warning-box {
  margin: var(--space-lg) 0; padding: var(--space-lg) var(--space-xl);
  border-radius: var(--radius-lg); border-left: 4px solid var(--accent-tertiary);
  background: rgba(247,168,196,0.08);
}
.warning-box__title { font-weight: 700; color: var(--accent-tertiary); margin-bottom: var(--space-xs); }
.tip-box {
  margin: var(--space-lg) 0; padding: var(--space-lg) var(--space-xl);
  border-radius: var(--radius-lg); border-left: 4px solid var(--accent-warm);
  background: rgba(255,210,127,0.08);
}
.tip-box__title { font-weight: 700; color: var(--accent-warm); margin-bottom: var(--space-xs); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--space-md); margin: var(--space-2xl) 0; }
.stat-card { text-align: center; padding: var(--space-lg); border-radius: var(--radius-xl); background: var(--glass-white); border: 1px solid var(--glass-border-subtle); }
.stat-card__num { font-family: var(--font-display); font-size: var(--text-3xl); color: var(--accent-primary); }
.stat-card__label { font-size: var(--text-xs); color: var(--color-text-muted); margin-top: var(--space-xs); }

.divider {
  height: 1px; margin: var(--space-3xl) 0;
  background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
}
