/* ============================================================
   BashHero — Premium Dark Theme Stylesheet
   Version: 1.0.0
   A stunning, glassmorphic, animated dark UI for learning Bash.
   ============================================================ */

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

/* ---------- CSS Custom Properties ---------- */
:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-card: rgba(255, 255, 255, 0.05);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.1);
  --border-hover: rgba(139, 92, 246, 0.4);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --purple: #8b5cf6;
  --blue: #3b82f6;
  --cyan: #06b6d4;
  --green: #22c55e;
  --yellow: #eab308;
  --red: #ef4444;
  --orange: #f97316;
  --gradient-primary: linear-gradient(135deg, var(--purple), var(--blue), var(--cyan));
  --gradient-glow: linear-gradient(135deg, var(--purple), var(--cyan));
  --gradient-hero: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 50%, #06b6d4 100%);
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: 20px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
  --shadow-glow-purple: 0 0 30px rgba(139, 92, 246, 0.3);
  --shadow-glow-blue: 0 0 30px rgba(59, 130, 246, 0.3);
  --shadow-glow-cyan: 0 0 30px rgba(6, 182, 212, 0.3);
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --nav-height: 72px;
  --sidebar-width: 280px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: clamp(0.95rem, 1vw + 0.5rem, 1.1rem);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: rgba(139, 92, 246, 0.4);
  color: #ffffff;
}

::-moz-selection {
  background: rgba(139, 92, 246, 0.4);
  color: #ffffff;
}

a {
  color: var(--cyan);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--purple);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: inherit;
}

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

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

::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.3);
  border-radius: 10px;
  border: 2px solid var(--bg-primary);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 92, 246, 0.6);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 92, 246, 0.3) var(--bg-primary);
}

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

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

@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  33% {
    transform: translateY(-20px) rotate(2deg);
  }
  66% {
    transform: translateY(10px) rotate(-1deg);
  }
}

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

@keyframes gradientFlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes progressFill {
  from {
    width: 0;
  }
  to {
    width: var(--progress, 0%);
  }
}

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

@keyframes orbFloat2 {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(-60px, 40px) scale(0.9);
  }
  50% {
    transform: translate(70px, 80px) scale(1.1);
  }
  75% {
    transform: translate(-30px, 50px) scale(1);
  }
}

@keyframes typewriter {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

/* ---------- Animation Utility Classes ---------- */
.fade-in-up {
  animation: fadeInUp 0.7s ease-out both;
}

.slide-in {
  animation: slideInLeft 0.7s ease-out both;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ============================================================
   3. NAVIGATION
   ============================================================ */

/* Top gradient progress bar */
.nav-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 1001;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.nav-progress .progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  background-size: 200% 200%;
  animation: gradientFlow 3s ease infinite;
  transition: width var(--transition-slow);
  border-radius: 0 2px 2px 0;
}

.navbar {
  position: fixed;
  top: 3px;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1rem, 4vw, 3rem);
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid var(--glass-border);
  transition: background var(--transition-base), box-shadow var(--transition-base);
}

.navbar.scrolled {
  background: rgba(10, 14, 26, 0.95);
  box-shadow: var(--shadow-md);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: var(--gradient-hero);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientFlow 4s ease infinite;
  transition: transform var(--transition-fast);
}

.nav-brand:hover {
  transform: scale(1.03);
}

.nav-brand .brand-icon {
  font-size: 1.8rem;
  -webkit-text-fill-color: initial;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2.5rem);
  list-style: none;
}

.nav-links a {
  position: relative;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 6px 0;
  transition: color var(--transition-fast);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 2px;
  transition: width var(--transition-base);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  padding: 8px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================================
   4. HERO SECTION
   ============================================================ */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-height) + 4rem) clamp(1rem, 5vw, 4rem) 6rem;
  overflow: hidden;
  isolation: isolate;
}

/* Animated floating orbs */
.hero::before {
  content: '';
  position: absolute;
  top: 10%;
  left: -5%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
  animation: orbFloat1 18s ease-in-out infinite;
  z-index: -1;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 5%;
  right: -10%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.12) 0%, transparent 70%);
  animation: orbFloat2 22s ease-in-out infinite;
  z-index: -1;
  pointer-events: none;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
}

.hero-orb-1 {
  top: 25%;
  right: 20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
  animation: float 15s ease-in-out infinite;
}

.hero-orb-2 {
  bottom: 20%;
  left: 15%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
  animation: float 12s ease-in-out infinite reverse;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw + 1rem, 5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 1.5rem;
  background: var(--gradient-hero);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientFlow 5s ease infinite, fadeInUp 0.8s ease-out both;
}

.hero .subtitle {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 2.5rem;
  line-height: 1.6;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 40px;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  background: var(--gradient-primary);
  background-size: 200% 200%;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-base);
  animation: fadeInUp 0.8s ease-out 0.4s both, gradientFlow 4s ease infinite;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 40px rgba(139, 92, 246, 0.4), 0 0 80px rgba(139, 92, 246, 0.15);
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-primary:active {
  transform: translateY(-1px) scale(1.01);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--glass-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-purple);
}

/* ============================================================
   5. LESSON CARDS GRID
   ============================================================ */
.lessons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(1.2rem, 2vw, 2rem);
  padding: 0 clamp(1rem, 4vw, 4rem);
  max-width: 1400px;
  margin: 0 auto;
}

.lesson-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2rem;
  transition: all var(--transition-base);
  overflow: hidden;
  cursor: pointer;
}

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

.lesson-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-lg), 0 0 60px rgba(139, 92, 246, 0.1);
}

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

.lesson-card .card-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--gradient-primary);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-mono);
  margin-bottom: 1.2rem;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.lesson-card h3 {
  font-size: clamp(1.15rem, 1.5vw, 1.3rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
  line-height: 1.3;
  transition: color var(--transition-fast);
}

.lesson-card:hover h3 {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.lesson-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.lesson-card .card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.2rem;
  border-top: 1px solid var(--glass-border);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-beginner {
  background: rgba(34, 197, 94, 0.15);
  color: var(--green);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.badge-intermediate {
  background: rgba(234, 179, 8, 0.15);
  color: var(--yellow);
  border: 1px solid rgba(234, 179, 8, 0.25);
}

.badge-advanced {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.card-footer .est-time {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* ============================================================
   6. LESSON PAGE LAYOUT
   ============================================================ */
.lesson-container {
  max-width: 900px;
  margin: 0 auto;
  padding: calc(var(--nav-height) + 3rem) clamp(1rem, 4vw, 3rem) 4rem;
}

.lesson-header {
  margin-bottom: 3rem;
  animation: fadeInUp 0.6s ease-out both;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

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

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

.breadcrumb .current {
  color: var(--text-secondary);
}

.lesson-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.2;
  margin-bottom: 0.8rem;
}

.lesson-header .lesson-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  flex-wrap: wrap;
}

/* ---------- Lesson Content Prose ---------- */
.lesson-content {
  animation: fadeInUp 0.6s ease-out 0.15s both;
}

.lesson-content h2 {
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  font-weight: 700;
  color: var(--text-primary);
  margin: 3rem 0 1.2rem;
  letter-spacing: -0.5px;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--glass-border);
}

.lesson-content h3 {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 600;
  color: var(--text-primary);
  margin: 2rem 0 0.8rem;
}

.lesson-content p {
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
  line-height: 1.8;
}

.lesson-content ul,
.lesson-content ol {
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
  padding-left: 1.5rem;
}

.lesson-content li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.lesson-content li::marker {
  color: var(--purple);
}

.lesson-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.lesson-content em {
  color: var(--cyan);
  font-style: italic;
}

.lesson-content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  border-left: 4px solid var(--purple);
  background: rgba(139, 92, 246, 0.06);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--text-secondary);
  font-style: italic;
}

.lesson-content code:not(pre code) {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 2px 8px;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 6px;
  color: var(--purple);
}

/* ---------- Lesson Navigation (Prev / Next) ---------- */
.lesson-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--glass-border);
}

.lesson-nav a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  min-width: 180px;
  backdrop-filter: blur(10px);
}

.lesson-nav a:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-purple);
}

.lesson-nav .nav-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
}

.lesson-nav .nav-title {
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 600;
}

.lesson-nav .prev { text-align: left; }
.lesson-nav .next { text-align: right; margin-left: auto; }

/* ============================================================
   7. CODE BLOCKS
   ============================================================ */
.code-block {
  margin: 1.5rem 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #1a1a2e;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-md);
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.code-header .lang-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-body);
}

.btn-copy:hover {
  color: var(--cyan);
  background: rgba(6, 182, 212, 0.1);
  border-color: rgba(6, 182, 212, 0.3);
}

.btn-copy.copied {
  color: var(--green);
  border-color: rgba(34, 197, 94, 0.3);
}

.code-body {
  padding: 1.2rem 1.5rem;
  overflow-x: auto;
}

.code-body pre {
  margin: 0;
}

.code-body code {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.7;
  color: #e2e8f0;
  tab-size: 2;
}

/* Syntax highlighting colors */
.code-body .token-keyword   { color: #c792ea; }
.code-body .token-string    { color: #c3e88d; }
.code-body .token-comment   { color: #546e7a; font-style: italic; }
.code-body .token-function  { color: #82aaff; }
.code-body .token-variable  { color: #f78c6c; }
.code-body .token-operator  { color: #89ddff; }
.code-body .token-flag      { color: #ffcb6b; }
.code-body .token-builtin   { color: #06b6d4; }
.code-body .token-number    { color: #f78c6c; }
.code-body .token-path      { color: #c3e88d; text-decoration: underline; }

/* ---------- Interactive Code Editor ---------- */
.code-interactive {
  margin: 1.5rem 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #1a1a2e;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-md);
}

.code-interactive textarea {
  display: block;
  width: 100%;
  min-height: 140px;
  padding: 1.2rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.7;
  color: #22c55e;
  background: transparent;
  border: none;
  outline: none;
  resize: vertical;
  tab-size: 2;
  caret-color: var(--green);
}

.code-interactive textarea::placeholder {
  color: rgba(34, 197, 94, 0.3);
}

.code-interactive textarea:focus {
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.2);
}

.btn-run {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 1rem 1rem;
  padding: 8px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--green), #16a34a);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-body);
}

.btn-run:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.35);
}

.btn-run:active {
  transform: translateY(0);
}

.btn-run .play-icon {
  font-size: 0.75rem;
}

.code-output {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.2);
  min-height: 40px;
}

.code-output .output-label {
  color: var(--text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
  display: block;
}

/* ============================================================
   8. QUIZ SECTION
   ============================================================ */
.quiz-container {
  margin: 2.5rem 0;
  padding: 2rem;
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
}

.quiz-container h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.quiz-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 100px;
  margin: 1rem 0 1.5rem;
  overflow: hidden;
}

.quiz-progress-bar .fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 100px;
  transition: width var(--transition-slow);
}

.quiz-question {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
}

.quiz-question .question-text {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.quiz-question .question-number {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--purple);
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.quiz-options {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.quiz-option {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  user-select: none;
}

.quiz-option:hover {
  background: rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.25);
  color: var(--text-primary);
}

.quiz-option .option-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.quiz-option:hover .option-letter {
  background: rgba(139, 92, 246, 0.2);
  color: var(--purple);
}

.quiz-option.correct {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.4);
  color: var(--green);
}

.quiz-option.correct .option-letter {
  background: rgba(34, 197, 94, 0.25);
  color: var(--green);
}

.quiz-option.wrong {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.4);
  color: var(--red);
}

.quiz-option.wrong .option-letter {
  background: rgba(239, 68, 68, 0.25);
  color: var(--red);
}

.quiz-result {
  text-align: center;
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  margin-top: 1.5rem;
}

.quiz-result .score {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 900;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.quiz-result .score-label {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* ============================================================
   9. TIP / WARNING BOXES
   ============================================================ */
.tip-box {
  position: relative;
  margin: 1.5rem 0;
  padding: 1.2rem 1.5rem 1.2rem 1.5rem;
  border-radius: var(--radius-md);
  border-left: 4px solid;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.tip-box .tip-icon {
  margin-right: 8px;
  font-size: 1.1rem;
}

.tip-box .tip-title {
  font-weight: 700;
  display: block;
  margin-bottom: 0.3rem;
}

.tip-box.tip-info {
  background: rgba(59, 130, 246, 0.08);
  border-left-color: var(--blue);
}

.tip-box.tip-info .tip-title { color: var(--blue); }

.tip-box.tip-success {
  background: rgba(34, 197, 94, 0.08);
  border-left-color: var(--green);
}

.tip-box.tip-success .tip-title { color: var(--green); }

.tip-box.tip-warning {
  background: rgba(234, 179, 8, 0.08);
  border-left-color: var(--yellow);
}

.tip-box.tip-warning .tip-title { color: var(--yellow); }

.tip-box.tip-danger {
  background: rgba(239, 68, 68, 0.08);
  border-left-color: var(--red);
}

.tip-box.tip-danger .tip-title { color: var(--red); }

/* ============================================================
   10. SIDEBAR (LESSON PAGE)
   ============================================================ */
.sidebar {
  position: fixed;
  top: calc(var(--nav-height) + 3px);
  left: 0;
  width: var(--sidebar-width);
  height: calc(100vh - var(--nav-height) - 3px);
  background: rgba(10, 14, 26, 0.92);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-right: 1px solid var(--glass-border);
  overflow-y: auto;
  padding: 1.5rem 0;
  z-index: 999;
  transform: translateX(0);
  transition: transform var(--transition-base);
}

.sidebar.collapsed {
  transform: translateX(-100%);
}

.sidebar-toggle {
  position: fixed;
  top: calc(var(--nav-height) + 18px);
  left: var(--sidebar-width);
  z-index: 1000;
  width: 28px;
  height: 28px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-left: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-base);
}

.sidebar.collapsed + .sidebar-toggle,
.sidebar.collapsed ~ .sidebar-toggle {
  left: 0;
}

.sidebar-toggle:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.sidebar-heading {
  padding: 0 1.2rem 1rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
}

.sidebar-list {
  list-style: none;
}

.sidebar-list li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 1.2rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  border-left: 3px solid transparent;
}

.sidebar-list li a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
  border-left-color: rgba(139, 92, 246, 0.3);
}

.sidebar-list li a.active {
  color: var(--text-primary);
  background: rgba(139, 92, 246, 0.08);
  border-left-color: var(--purple);
}

.sidebar-list li a .lesson-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  min-width: 24px;
}

.sidebar-list li a .completed {
  margin-left: auto;
  color: var(--green);
  font-size: 1rem;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.sidebar-list li a.completed-lesson .completed {
  opacity: 1;
}

/* ============================================================
   11. PROGRESS SECTION (HOME PAGE)
   ============================================================ */
.progress-section {
  padding: 4rem clamp(1rem, 4vw, 4rem);
  max-width: 1400px;
  margin: 0 auto;
}

.progress-section h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 2rem;
}

.progress-bar {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 2.5rem;
  position: relative;
}

.progress-bar .fill {
  height: 100%;
  background: var(--gradient-primary);
  background-size: 200% 200%;
  border-radius: 100px;
  animation: progressFill 1.2s ease-out forwards, gradientFlow 3s ease infinite;
  position: relative;
}

.progress-bar .fill::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 30px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3));
  border-radius: 100px;
  animation: shimmer 2s ease-in-out infinite;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  transition: all var(--transition-base);
}

.stat-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow-purple);
}

.stat-card .stat-value {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 900;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.stat-card .stat-label {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.3rem;
  font-weight: 500;
}

.stat-card .stat-icon {
  font-size: 1.8rem;
  margin-bottom: 0.8rem;
  display: block;
}

/* ============================================================
   12. INTERACTIVE TERMINAL
   ============================================================ */
.interactive-terminal {
  margin: 1.5rem 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #0d1117;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-lg);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.terminal-header .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-header .dot-red    { background: #ff5f57; }
.terminal-header .dot-yellow { background: #febc2e; }
.terminal-header .dot-green  { background: #28c840; }

.terminal-header .terminal-title {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.terminal-body {
  padding: 1.2rem 1.5rem;
  min-height: 120px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.8;
  color: var(--green);
}

.terminal-body .prompt {
  color: var(--cyan);
  user-select: none;
}

.terminal-body .command {
  color: var(--text-primary);
}

.terminal-body .output {
  color: var(--text-secondary);
}

.terminal-body .cursor {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  background: var(--green);
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
  margin-left: 2px;
}

/* ============================================================
   13. FOOTER
   ============================================================ */
.footer {
  margin-top: 6rem;
  padding: 3rem clamp(1rem, 4vw, 4rem) 2rem;
  border-top: 1px solid var(--glass-border);
  text-align: center;
}

.footer-content {
  max-width: 800px;
  margin: 0 auto;
}

.footer-brand {
  font-size: 1.3rem;
  font-weight: 800;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.8rem;
  display: inline-block;
}

.footer-text {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1.2rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  list-style: none;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* ============================================================
   14. SECTION HEADERS & UTILITIES
   ============================================================ */
.section {
  padding: 5rem clamp(1rem, 4vw, 4rem);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem;
}

.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 0.8rem;
}

.section-header p {
  color: var(--text-secondary);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
}

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

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 4rem);
}

/* ============================================================
   15. WITH-SIDEBAR LAYOUT
   ============================================================ */
.with-sidebar .lesson-container {
  margin-left: var(--sidebar-width);
  transition: margin-left var(--transition-base);
}

.with-sidebar .sidebar.collapsed ~ .lesson-container,
.with-sidebar.sidebar-collapsed .lesson-container {
  margin-left: 0;
}

/* ============================================================
   16. RESPONSIVE DESIGN
   ============================================================ */
@media (max-width: 1024px) {
  .with-sidebar .lesson-container {
    margin-left: 0;
  }

  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-toggle {
    left: 0;
  }

  .sidebar.open + .sidebar-toggle,
  .sidebar.open ~ .sidebar-toggle {
    left: var(--sidebar-width);
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 60px;
  }

  .nav-links {
    position: fixed;
    top: calc(var(--nav-height) + 3px);
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(10, 14, 26, 0.96);
    backdrop-filter: blur(var(--glass-blur));
    padding: 1.5rem;
    gap: 0;
    border-bottom: 1px solid var(--glass-border);
    transform: translateY(-120%);
    opacity: 0;
    transition: transform var(--transition-base), opacity var(--transition-base);
    pointer-events: none;
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav-links a {
    padding: 12px 0;
    font-size: 1.05rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    width: 100%;
    display: block;
  }

  .nav-links a::after {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    min-height: 75vh;
    padding-bottom: 4rem;
  }

  .hero h1 {
    letter-spacing: -1px;
  }

  .lessons-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .lesson-nav {
    flex-direction: column;
  }

  .lesson-nav a {
    min-width: 100%;
  }

  .lesson-nav .next {
    text-align: left;
  }

  .sidebar {
    width: 100%;
    z-index: 1001;
  }

  .sidebar.open + .sidebar-toggle,
  .sidebar.open ~ .sidebar-toggle {
    left: auto;
    right: 1rem;
    top: calc(var(--nav-height) + 18px);
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
  }

  .code-block,
  .code-interactive,
  .interactive-terminal {
    border-radius: var(--radius-md);
  }

  .quiz-container {
    padding: 1.2rem;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .lesson-card {
    padding: 1.5rem;
  }

  .btn-primary {
    padding: 14px 28px;
    font-size: 0.95rem;
  }

  .hero {
    min-height: 70vh;
  }

  .footer-links {
    flex-direction: column;
    gap: 0.8rem;
  }
}

/* ============================================================
   17. PRINT STYLES
   ============================================================ */
@media print {
  body {
    background: #fff;
    color: #000;
  }

  .navbar,
  .sidebar,
  .sidebar-toggle,
  .nav-progress,
  .btn-copy,
  .btn-run,
  .footer {
    display: none !important;
  }

  .lesson-container {
    margin-left: 0 !important;
    max-width: 100%;
  }

  .code-block,
  .interactive-terminal {
    border: 1px solid #ccc;
    box-shadow: none;
  }
}

/* ============================================================
   18. ACCESSIBILITY & FOCUS STATES
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
}

.btn-primary:focus-visible,
.btn-secondary:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

.quiz-option:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
  background: rgba(139, 92, 246, 0.08);
}

.nav-links a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   19. SHIMMER / LOADING SKELETON
   ============================================================ */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04) 25%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.04) 75%
  );
  background-size: 400% 100%;
  animation: shimmer 1.8s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

.skeleton-text {
  height: 14px;
  margin-bottom: 10px;
  width: 80%;
}

.skeleton-title {
  height: 24px;
  margin-bottom: 14px;
  width: 60%;
}

.skeleton-card {
  height: 240px;
  border-radius: var(--radius-xl);
}

/* ============================================================
   20. MISC COMPONENTS
   ============================================================ */

/* Toast notifications */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 12px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  animation: fadeInUp 0.3s ease-out;
  backdrop-filter: blur(10px);
}

.toast.success { border-left: 4px solid var(--green); }
.toast.error   { border-left: 4px solid var(--red); }
.toast.info    { border-left: 4px solid var(--blue); }

/* Tooltip */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  z-index: 100;
}

[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Divider */
.divider {
  border: none;
  height: 1px;
  background: var(--glass-border);
  margin: 3rem 0;
}

/* Completion checkmark animation */
.checkmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.15);
  color: var(--green);
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* Keyboard shortcut hint */
kbd {
  display: inline-block;
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Search highlight */
mark {
  background: rgba(139, 92, 246, 0.25);
  color: var(--text-primary);
  padding: 1px 4px;
  border-radius: 3px;
}

/* Table styling for lesson content */
.lesson-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.92rem;
}

.lesson-content table th {
  text-align: left;
  padding: 12px 16px;
  background: rgba(139, 92, 246, 0.08);
  border-bottom: 2px solid rgba(139, 92, 246, 0.2);
  color: var(--text-primary);
  font-weight: 600;
}

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

.lesson-content table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.lesson-content table code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  padding: 1px 6px;
  background: rgba(139, 92, 246, 0.1);
  border-radius: 4px;
  color: var(--cyan);
}

/* ============================================
   MISSING STYLES - ADDED FOR BUG FIXES
   ============================================ */

/* Hero Section */
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 120px 20px 80px;
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: #fff;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255,255,255,0.7);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.hero-terminal {
    max-width: 600px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    background: #0d1117;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.hero-terminal .terminal-body {
    padding: 1.25rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: #00e676;
    min-height: 120px;
    white-space: pre-wrap;
    line-height: 1.6;
}

/* Orbs (animated background blobs) */
.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: #8b5cf6;
    top: -100px;
    left: -100px;
    animation: float 8s ease-in-out infinite;
}

.orb-2 {
    width: 350px;
    height: 350px;
    background: #3b82f6;
    top: 50%;
    right: -80px;
    animation: float 10s ease-in-out infinite reverse;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: #06b6d4;
    bottom: -80px;
    left: 30%;
    animation: float 12s ease-in-out infinite;
}

/* Section Titles (Home page) */
.section-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 0.75rem;
    color: #fff;
}

.section-subtitle {
    text-align: center;
    color: rgba(255,255,255,0.6);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    font-size: 1.05rem;
}

/* Lesson Card extras */
.lesson-card .card-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.lesson-card .card-duration {
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
}

.lesson-card .card-completion {
    position: absolute;
    top: 12px;
    right: 12px;
}

.lesson-card.completed .card-completion::after {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
}

/* Lesson page */
.lesson-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.lesson-icon {
    font-size: 2rem;
}

.lesson-description {
    color: rgba(255,255,255,0.6);
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

.lesson-duration {
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
}

.lesson-number {
    color: rgba(255,255,255,0.4);
    font-size: 0.85rem;
}

.lesson-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    margin-top: 1.5rem;
    overflow: hidden;
}

.lesson-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #3b82f6, #06b6d4);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Breadcrumb */
.breadcrumb-sep {
    margin: 0 0.5rem;
    color: rgba(255,255,255,0.3);
}

.breadcrumb-current {
    color: rgba(255,255,255,0.8);
}

/* Sidebar extras */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #fff;
}

.sidebar-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.sidebar-close:hover {
    color: #fff;
}

.sidebar-lessons {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    max-height: calc(100vh - 120px);
}

.sidebar-lessons li {
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.sidebar-link:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
}

.sidebar-link.active {
    background: rgba(139,92,246,0.15);
    color: #a78bfa;
    border-left: 3px solid #8b5cf6;
}

.sidebar-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.3);
    min-width: 24px;
}

.sidebar-title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-check {
    font-size: 0.85rem;
}

.sidebar-link.completed .sidebar-check::after {
    content: '✓';
    color: #10b981;
}

/* Interactive Code Editor */
.code-editor {
    width: 100%;
    min-height: 100px;
    background: #0d1117;
    border: none;
    color: #00e676;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    padding: 1rem;
    resize: vertical;
    outline: none;
    line-height: 1.6;
}

.editor-controls {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.03);
    border-top: 1px solid rgba(255,255,255,0.08);
}

.btn-run {
    padding: 0.4rem 1rem;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-run:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(16,185,129,0.4);
}

.btn-clear {
    padding: 0.4rem 1rem;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.6);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.btn-clear:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
}

/* Output area (interactive editor results) */
.output-area {
    background: #0a0e1a;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 0.75rem 1rem;
    max-height: 250px;
    overflow-y: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
}

.output-area:empty {
    display: none;
}

.output-line {
    margin-bottom: 0.5rem;
}

.output-prompt {
    color: #06b6d4;
    display: block;
}

.output-result {
    color: #e2e8f0;
    margin: 0.15rem 0 0;
    font-size: 0.85rem;
    white-space: pre-wrap;
}

/* Quiz extras */
.quiz-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.quiz-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
}

.quiz-intro {
    color: rgba(255,255,255,0.6);
    margin-bottom: 1.5rem;
}

.quiz-question-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 1rem;
}

.quiz-explanation {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(59,130,246,0.1);
    border-left: 3px solid #3b82f6;
    border-radius: 0 6px 6px 0;
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

.quiz-explanation.hidden {
    display: none;
}

.quiz-score-card {
    text-align: center;
    padding: 2rem;
}

.quiz-score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(139,92,246,0.2), rgba(6,182,212,0.2));
    border: 3px solid #8b5cf6;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.quiz-score-pct {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
}

.quiz-score-detail {
    color: rgba(255,255,255,0.7);
    margin-bottom: 0.5rem;
}

.quiz-score-msg {
    font-size: 1.1rem;
    color: #fff;
}

.btn-retry {
    margin-top: 1.5rem;
    padding: 0.6rem 1.5rem;
    background: rgba(255,255,255,0.08);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.btn-retry:hover {
    background: rgba(255,255,255,0.15);
}

.btn-retry.hidden {
    display: none;
}

.quiz-error {
    color: #f87171;
    text-align: center;
    padding: 2rem;
}

.quiz-option.disabled {
    pointer-events: none;
    opacity: 0.85;
}

.quiz-result.show {
    display: block !important;
}

/* Mark Complete */
.lesson-complete-section {
    text-align: center;
    margin: 2.5rem 0;
}

.btn-complete {
    padding: 0.75rem 2rem;
    font-size: 1rem;
}

.btn-complete.completed {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    pointer-events: none;
}

/* Progress bar wrapper (home page) */
.progress-bar-wrapper {
    max-width: 600px;
    margin: 2rem auto 0;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* Footer extras */
.footer-copy {
    margin-top: 1rem;
    color: rgba(255,255,255,0.3);
    font-size: 0.8rem;
}

/* Typing effect */
.typing-effect {
    min-height: 1.5em;
}

.typing-active::after {
    content: '▋';
    animation: blink 0.8s infinite;
    color: #00e676;
}

/* Check icon (progress checkmarks) */
.check-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #10b981;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: 0.5rem;
}

/* Visible animation trigger */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.delay-1.visible { transition-delay: 0.1s; }
.fade-in-up.delay-2.visible { transition-delay: 0.2s; }
.fade-in-up.delay-3.visible { transition-delay: 0.3s; }
.fade-in-up.delay-4.visible { transition-delay: 0.4s; }
.fade-in-up.delay-5.visible { transition-delay: 0.5s; }

/* Lessons section (home page) */
.lessons-section {
    padding: 4rem 0;
}

/* Nav stats */
.nav-stats {
    display: flex;
    align-items: center;
}

.nav-stat {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Brand text */
.brand-text {
    font-weight: 700;
    font-size: 1.25rem;
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   MISSING STYLES — BUG FIXES
   ============================================ */

/* Hero Section */
.hero { position: relative; overflow: hidden; }

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 120px 20px 80px;
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: #fff;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255,255,255,0.7);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.hero-terminal {
    max-width: 600px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    background: #0d1117;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.hero-terminal .terminal-body {
    padding: 1.25rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: #00e676;
    min-height: 120px;
    white-space: pre-wrap;
    line-height: 1.6;
}

/* Animated Orbs */
.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
}

.orb-1 {
    width: 400px; height: 400px;
    background: #8b5cf6;
    top: -100px; left: -100px;
    animation: float 8s ease-in-out infinite;
}

.orb-2 {
    width: 350px; height: 350px;
    background: #3b82f6;
    top: 50%; right: -80px;
    animation: float 10s ease-in-out infinite reverse;
}

.orb-3 {
    width: 300px; height: 300px;
    background: #06b6d4;
    bottom: -80px; left: 30%;
    animation: float 12s ease-in-out infinite;
}

/* Section Titles */
.section-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 0.75rem;
    color: #fff;
}

.section-subtitle {
    text-align: center;
    color: rgba(255,255,255,0.6);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    font-size: 1.05rem;
}

.lessons-section { padding: 4rem 0; }
.progress-section { padding: 4rem 0; }

/* Lesson Card extras */
.lesson-card { position: relative; }
.lesson-card .card-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.lesson-card .card-duration { color: rgba(255,255,255,0.5); font-size: 0.85rem; }
.lesson-card .card-completion { position: absolute; top: 12px; right: 12px; }
.lesson-card.completed .card-completion::after {
    content: '✓';
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white; font-weight: 700; font-size: 0.85rem;
}

/* Lesson page */
.lesson-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800; color: #fff;
    margin-bottom: 0.75rem;
    display: flex; align-items: center; gap: 0.75rem;
}
.lesson-icon { font-size: 2rem; }
.lesson-description { color: rgba(255,255,255,0.6); font-size: 1.05rem; margin-bottom: 1.5rem; }
.lesson-duration { color: rgba(255,255,255,0.5); font-size: 0.9rem; }
.lesson-number { color: rgba(255,255,255,0.4); font-size: 0.85rem; }

.lesson-progress-bar {
    width: 100%; height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px; margin-top: 1.5rem; overflow: hidden;
}
.lesson-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #3b82f6, #06b6d4);
    border-radius: 4px; transition: width 0.5s ease;
}

/* Breadcrumb */
.breadcrumb-sep { margin: 0 0.5rem; color: rgba(255,255,255,0.3); }
.breadcrumb-current { color: rgba(255,255,255,0.8); }

/* Sidebar extras */
.sidebar-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar-header h3 { margin: 0; font-size: 1.1rem; color: #fff; }
.sidebar-close {
    background: none; border: none; color: rgba(255,255,255,0.5);
    font-size: 1.5rem; cursor: pointer; padding: 4px; line-height: 1;
}
.sidebar-close:hover { color: #fff; }
.sidebar-lessons {
    list-style: none; padding: 0; margin: 0;
    overflow-y: auto; max-height: calc(100vh - 120px);
}
.sidebar-lessons li { border-bottom: 1px solid rgba(255,255,255,0.05); }
.sidebar-link {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.85rem 1rem; color: rgba(255,255,255,0.6);
    text-decoration: none; transition: all 0.2s ease; font-size: 0.9rem;
}
.sidebar-link:hover { background: rgba(255,255,255,0.05); color: #fff; }
.sidebar-link.active {
    background: rgba(139,92,246,0.15); color: #a78bfa;
    border-left: 3px solid #8b5cf6;
}
.sidebar-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem; color: rgba(255,255,255,0.3); min-width: 24px;
}
.sidebar-title { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-check { font-size: 0.85rem; }
.sidebar-link.completed .sidebar-check::after { content: '✓'; color: #10b981; }

/* Code Editor */
.code-editor {
    width: 100%; min-height: 100px; background: #0d1117; border: none;
    color: #00e676; font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem; padding: 1rem; resize: vertical; outline: none; line-height: 1.6;
}
.editor-controls {
    display: flex; gap: 0.5rem; padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.03);
    border-top: 1px solid rgba(255,255,255,0.08);
}
.btn-clear {
    padding: 0.4rem 1rem;
    background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.6);
    border: 1px solid rgba(255,255,255,0.1); border-radius: 6px;
    cursor: pointer; font-size: 0.85rem; transition: all 0.2s ease;
}
.btn-clear:hover { background: rgba(255,255,255,0.12); color: #fff; }

/* Output area */
.output-area {
    background: #0a0e1a;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 0.75rem 1rem; max-height: 250px; overflow-y: auto;
    font-family: 'JetBrains Mono', monospace; font-size: 0.85rem;
}
.output-area:empty { display: none; }
.output-line { margin-bottom: 0.5rem; }
.output-prompt { color: #06b6d4; display: block; }
.output-result { color: #e2e8f0; margin: 0.15rem 0 0; font-size: 0.85rem; white-space: pre-wrap; }

/* Quiz extras */
.quiz-section {
    margin-top: 3rem; padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.quiz-title { font-size: 1.5rem; font-weight: 700; color: #fff; margin-bottom: 0.5rem; }
.quiz-intro { color: rgba(255,255,255,0.6); margin-bottom: 1.5rem; }
.quiz-question-title { font-size: 1.05rem; font-weight: 600; color: #e2e8f0; margin-bottom: 1rem; }
.quiz-explanation {
    margin-top: 0.75rem; padding: 0.75rem 1rem;
    background: rgba(59,130,246,0.1); border-left: 3px solid #3b82f6;
    border-radius: 0 6px 6px 0; color: rgba(255,255,255,0.8); font-size: 0.9rem;
}
.quiz-explanation.hidden { display: none; }
.quiz-score-card { text-align: center; padding: 2rem; }
.quiz-score-circle {
    width: 120px; height: 120px; border-radius: 50%;
    background: linear-gradient(135deg, rgba(139,92,246,0.2), rgba(6,182,212,0.2));
    border: 3px solid #8b5cf6;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.5rem;
}
.quiz-score-pct { font-size: 2rem; font-weight: 800; color: #fff; }
.quiz-score-detail { color: rgba(255,255,255,0.7); margin-bottom: 0.5rem; }
.quiz-score-msg { font-size: 1.1rem; color: #fff; }
.btn-retry {
    margin-top: 1.5rem; padding: 0.6rem 1.5rem;
    background: rgba(255,255,255,0.08); color: #fff;
    border: 1px solid rgba(255,255,255,0.2); border-radius: 8px;
    cursor: pointer; font-size: 0.95rem; transition: all 0.2s ease;
}
.btn-retry:hover { background: rgba(255,255,255,0.15); }
.btn-retry.hidden { display: none; }
.quiz-error { color: #f87171; text-align: center; padding: 2rem; }
.quiz-option.disabled { pointer-events: none; opacity: 0.85; }
.quiz-result.show { display: block !important; }

/* Mark Complete */
.lesson-complete-section { text-align: center; margin: 2.5rem 0; }
.btn-complete { padding: 0.75rem 2rem; font-size: 1rem; }
.btn-complete.completed { background: linear-gradient(135deg, #10b981, #059669) !important; pointer-events: none; }

/* Progress bar wrapper */
.progress-bar-wrapper { max-width: 600px; margin: 2rem auto 0; }
.progress-label {
    display: flex; justify-content: space-between;
    color: rgba(255,255,255,0.6); font-size: 0.9rem; margin-bottom: 0.5rem;
}

/* Footer */
.footer-copy { margin-top: 1rem; color: rgba(255,255,255,0.3); font-size: 0.8rem; }

/* Typing effect */
.typing-effect { min-height: 1.5em; }
.typing-active::after { content: '█'; animation: blink 0.8s infinite; color: #00e676; }

/* Check icon */
.check-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border-radius: 50%;
    background: #10b981; color: white;
    font-size: 0.7rem; font-weight: 700; margin-left: 0.5rem;
}

/* Visible animation trigger */
.fade-in-up { opacity: 0; transform: translateY(30px); }
.fade-in-up.visible {
    opacity: 1; transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in-up.delay-1.visible { transition-delay: 0.1s; }
.fade-in-up.delay-2.visible { transition-delay: 0.2s; }
.fade-in-up.delay-3.visible { transition-delay: 0.3s; }
.fade-in-up.delay-4.visible { transition-delay: 0.4s; }
.fade-in-up.delay-5.visible { transition-delay: 0.5s; }

/* Nav stats */
.nav-stats { display: flex; align-items: center; }
.nav-stat {
    font-size: 0.85rem; color: rgba(255,255,255,0.6);
    display: flex; align-items: center; gap: 0.25rem;
}

/* Brand text */
.brand-text {
    font-weight: 700; font-size: 1.25rem;
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* ============================================
   AUTH PAGES — LOGIN / REGISTER / PROFILE
   ============================================ */

.auth-page {
    display: flex; align-items: center; justify-content: center;
    min-height: calc(100vh - 200px); padding: 2rem 1rem;
}

.auth-card {
    width: 100%; max-width: 440px;
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px; padding: 2.5rem;
    box-shadow: 0 25px 80px rgba(0,0,0,0.4);
}

.auth-card h1 {
    text-align: center; font-size: 1.75rem; font-weight: 800; color: #fff;
    margin-bottom: 0.5rem;
}

.auth-card .auth-subtitle {
    text-align: center; color: rgba(255,255,255,0.5); margin-bottom: 2rem; font-size: 0.95rem;
}

.auth-card .form-group { margin-bottom: 1.25rem; }

.auth-card label {
    display: block; margin-bottom: 0.4rem;
    color: rgba(255,255,255,0.7); font-size: 0.9rem; font-weight: 500;
}

.auth-card input[type="text"],
.auth-card input[type="email"],
.auth-card input[type="password"] {
    width: 100%; padding: 0.75rem 1rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12); border-radius: 10px;
    color: #fff; font-size: 0.95rem; font-family: 'Inter', sans-serif;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none; box-sizing: border-box;
}

.auth-card input:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139,92,246,0.2);
}

.auth-card .btn-auth {
    width: 100%; padding: 0.8rem;
    background: linear-gradient(135deg, #8b5cf6, #3b82f6);
    color: #fff; border: none; border-radius: 10px;
    font-size: 1rem; font-weight: 600; cursor: pointer;
    transition: all 0.3s ease; margin-top: 0.5rem;
}

.auth-card .btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139,92,246,0.4);
}

.auth-card .auth-footer {
    text-align: center; margin-top: 1.5rem;
    color: rgba(255,255,255,0.5); font-size: 0.9rem;
}

.auth-card .auth-footer a {
    color: #a78bfa; text-decoration: none; font-weight: 500;
}

.auth-card .auth-footer a:hover { text-decoration: underline; }

.auth-error {
    background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.3);
    color: #fca5a5; padding: 0.75rem 1rem; border-radius: 8px;
    margin-bottom: 1.25rem; font-size: 0.9rem; text-align: center;
}

.auth-success {
    background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.3);
    color: #6ee7b7; padding: 0.75rem 1rem; border-radius: 8px;
    margin-bottom: 1.25rem; font-size: 0.9rem; text-align: center;
}

/* Profile page */
.profile-page { padding: 100px 1rem 3rem; max-width: 700px; margin: 0 auto; }

.profile-header {
    display: flex; align-items: center; gap: 1.5rem;
    margin-bottom: 2.5rem; flex-wrap: wrap;
}

.profile-avatar {
    width: 80px; height: 80px; border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; color: white; font-weight: 700;
    flex-shrink: 0;
}

.profile-info h1 { font-size: 1.5rem; color: #fff; margin: 0 0 0.25rem; }
.profile-info p { color: rgba(255,255,255,0.5); margin: 0; font-size: 0.9rem; }

.profile-stats {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem; margin-bottom: 2rem;
}

.profile-stat-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px; padding: 1.25rem; text-align: center;
}

.profile-stat-card .stat-value { font-size: 1.75rem; font-weight: 800; color: #fff; }
.profile-stat-card .stat-label { color: rgba(255,255,255,0.5); font-size: 0.85rem; margin-top: 0.25rem; }

.profile-actions {
    display: flex; gap: 1rem; flex-wrap: wrap;
}

.btn-logout {
    padding: 0.6rem 1.5rem;
    background: rgba(239,68,68,0.15); color: #f87171;
    border: 1px solid rgba(239,68,68,0.3); border-radius: 8px;
    cursor: pointer; font-size: 0.9rem; transition: all 0.2s ease;
    text-decoration: none; display: inline-flex; align-items: center; gap: 0.4rem;
}

.btn-logout:hover { background: rgba(239,68,68,0.25); }

/* Nav auth links */
.nav-auth {
    display: flex; align-items: center; gap: 0.75rem; margin-left: 0.5rem;
}

.nav-auth a {
    color: rgba(255,255,255,0.7); text-decoration: none;
    font-size: 0.9rem; transition: color 0.2s ease;
}

.nav-auth a:hover { color: #fff; }

.nav-user {
    display: flex; align-items: center; gap: 0.5rem;
    color: rgba(255,255,255,0.8); font-size: 0.9rem;
}

.nav-user-avatar {
    width: 30px; height: 30px; border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; color: white; font-weight: 700;
}

/* Developer Credit */
.footer-dev {
    margin-top: 0.75rem;
    color: rgba(255,255,255,0.4);
    font-size: 0.85rem;
}
.footer-dev strong {
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}
