/* MynaDB - Fantastic Solar Light Theme with Animations */

/* ============================================
   CSS Variables & Design System
   ============================================ */
:root {
  /* Primary Colors - Vibrant Blue */
  --primary: #0284c7;
  --primary-dark: #0369a1;
  --primary-light: #38bdf8;
  --primary-subtle: rgba(2, 132, 199, 0.1);

  /* Secondary & Accent Colors */
  --secondary: #06b6d4;
  --accent: #f59e0b;
  --accent-light: rgba(245, 158, 11, 0.1);
  --purple: #8b5cf6;
  --pink: #ec4899;
  --emerald: #10b981;
  --warning: #f59e0b;
  --error: #dc2626;

  /* Backgrounds - Light & Airy */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-code: #1e293b;
  --bg-code-light: #f1f5f9;

  /* Text Colors */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-inverse: #f8fafc;

  /* Borders */
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  --border-focus: var(--primary);

  /* Gradients - Vibrant & Dynamic */
  --gradient-primary: linear-gradient(135deg, #0284c7 0%, #06b6d4 50%, #38bdf8 100%);
  --gradient-rainbow: linear-gradient(135deg, #0284c7 0%, #8b5cf6 25%, #ec4899 50%, #f59e0b 75%, #10b981 100%);
  --gradient-hero: linear-gradient(180deg, #ffffff 0%, #e0f2fe 30%, #bae6fd 60%, #e0f2fe 80%, #ffffff 100%);
  --gradient-card: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  --gradient-mesh: radial-gradient(at 40% 20%, rgba(2, 132, 199, 0.08) 0px, transparent 50%),
                   radial-gradient(at 80% 0%, rgba(6, 182, 212, 0.08) 0px, transparent 50%),
                   radial-gradient(at 0% 50%, rgba(139, 92, 246, 0.06) 0px, transparent 50%),
                   radial-gradient(at 100% 80%, rgba(236, 72, 153, 0.05) 0px, transparent 50%);

  /* Shadows - Soft & Elevated */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.08), 0 4px 6px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1), 0 8px 10px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 40px rgba(2, 132, 199, 0.2);
  --shadow-glow-accent: 0 0 40px rgba(245, 158, 11, 0.2);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-float: 0 20px 40px rgba(0, 0, 0, 0.12);

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

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;
  --transition-slow: 500ms ease;
  --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

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

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

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

a:hover {
  color: var(--primary-dark);
}

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

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--bg-tertiary);
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  color: var(--primary-dark);
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

h1 { font-size: 3rem; letter-spacing: -0.02em; }
h2 { font-size: 2.25rem; letter-spacing: -0.01em; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

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

.lead {
  font-size: 1.25rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================
   Layout Components
   ============================================ */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section {
  padding: var(--space-3xl) 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-header h2 {
  margin-bottom: var(--space-md);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.section-header p {
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-md) 0;
  transition: all var(--transition-normal);
}

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

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.navbar-brand:hover {
  color: var(--text-primary);
}

.navbar-brand .logo-icon {
  width: 40px;
  height: 40px;
  background: var(--gradient-primary);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: white;
  font-weight: 700;
  animation: logoFloat 3s ease-in-out infinite;
  box-shadow: var(--shadow-glow);
}

.navbar-brand .logo-img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-lg);
  animation: logoFloat 3s ease-in-out infinite;
  box-shadow: var(--shadow-glow);
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-3px) rotate(2deg); }
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  list-style: none;
}

.navbar-nav a {
  color: var(--text-secondary);
  font-weight: 500;
  transition: all var(--transition-fast);
  position: relative;
  padding: var(--space-xs) 0;
}

.navbar-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: all var(--transition-normal);
  transform: translateX(-50%);
  border-radius: var(--radius-full);
}

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

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

.navbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.lang-switcher {
  display: flex;
  align-items: center;
}

.lang-switcher .lang-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  transition: all 0.2s ease;
}

.lang-switcher .lang-link:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-subtle);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ============================================
   Buttons with Animations
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-lg), 0 0 50px rgba(2, 132, 199, 0.3);
  color: white;
}

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

.btn-secondary {
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

.btn-lg {
  padding: var(--space-md) var(--space-xl);
  font-size: 1rem;
  border-radius: var(--radius-xl);
}

.btn-icon {
  font-size: 1.25rem;
  transition: transform var(--transition-fast);
}

.btn:hover .btn-icon {
  transform: scale(1.2);
}

/* ============================================
   Hero Section with Particles
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

/* Animated mesh background */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-mesh);
  animation: meshMove 20s ease-in-out infinite;
  pointer-events: none;
}

@keyframes meshMove {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(2%, 2%) scale(1.02); }
  50% { transform: translate(-1%, 3%) scale(1.01); }
  75% { transform: translate(3%, -1%) scale(1.03); }
}

/* Animated grid */
.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(2, 132, 199, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(2, 132, 199, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridPulse 4s ease-in-out infinite;
  pointer-events: none;
}

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

/* Floating particles */
.hero-particles {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  border-radius: 50%;
  animation: particleFloat linear infinite;
  opacity: 0.6;
}

.particle:nth-child(1) { width: 20px; height: 20px; background: var(--primary-light); left: 10%; animation-duration: 15s; animation-delay: 0s; }
.particle:nth-child(2) { width: 15px; height: 15px; background: var(--secondary); left: 20%; animation-duration: 20s; animation-delay: 2s; }
.particle:nth-child(3) { width: 25px; height: 25px; background: var(--purple); left: 30%; animation-duration: 18s; animation-delay: 4s; }
.particle:nth-child(4) { width: 12px; height: 12px; background: var(--pink); left: 40%; animation-duration: 22s; animation-delay: 1s; }
.particle:nth-child(5) { width: 18px; height: 18px; background: var(--accent); left: 50%; animation-duration: 16s; animation-delay: 3s; }
.particle:nth-child(6) { width: 22px; height: 22px; background: var(--emerald); left: 60%; animation-duration: 19s; animation-delay: 5s; }
.particle:nth-child(7) { width: 14px; height: 14px; background: var(--primary); left: 70%; animation-duration: 21s; animation-delay: 2s; }
.particle:nth-child(8) { width: 16px; height: 16px; background: var(--secondary); left: 80%; animation-duration: 17s; animation-delay: 4s; }
.particle:nth-child(9) { width: 20px; height: 20px; background: var(--purple); left: 90%; animation-duration: 23s; animation-delay: 1s; }
.particle:nth-child(10) { width: 10px; height: 10px; background: var(--pink); left: 5%; animation-duration: 14s; animation-delay: 3s; }

@keyframes particleFloat {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(-100px) rotate(720deg);
    opacity: 0;
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  color: var(--primary);
  margin-bottom: var(--space-xl);
  font-weight: 500;
  box-shadow: var(--shadow-md);
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { box-shadow: var(--shadow-md); }
  50% { box-shadow: var(--shadow-lg), var(--shadow-glow); }
}

.hero-badge span {
  animation: sparkle 1.5s ease-in-out infinite;
}

@keyframes sparkle {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.hero h1 {
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: var(--space-lg);
  color: var(--text-primary);
  animation: heroTitleIn 1s ease-out;
}

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

.hero h1 span {
  background: var(--gradient-rainbow);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 5s ease infinite;
}

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

.hero-description {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto var(--space-2xl);
  line-height: 1.7;
  animation: fadeInUp 1s ease-out 0.2s backwards;
}

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

.hero-buttons {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 1s ease-out 0.4s backwards;
}

.hero-code {
  margin-top: var(--space-3xl);
  background: var(--bg-code);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-2xl);
  padding: var(--space-lg);
  text-align: left;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  overflow-x: auto;
  box-shadow: var(--shadow-xl);
  animation: fadeInUp 1s ease-out 0.6s backwards;
  position: relative;
}

.hero-code::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: var(--gradient-rainbow);
  border-radius: var(--radius-2xl);
  z-index: -1;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.hero-code:hover::before {
  opacity: 1;
}

.hero-code pre {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: #e2e8f0;
  margin: 0;
}

.hero-code .comment { color: #64748b; }
.hero-code .command { color: #34d399; }
.hero-code .string { color: #fbbf24; }
.hero-code .keyword { color: #a78bfa; }

/* ============================================
   Features Section
   ============================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-2xl);
  padding: var(--space-xl);
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-normal);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(2, 132, 199, 0.03) 0%, transparent 70%);
  opacity: 0;
  transition: opacity var(--transition-normal);
  pointer-events: none;
}

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

.feature-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-float), var(--shadow-glow);
}

.feature-icon {
  width: 64px;
  height: 64px;
  background: var(--gradient-primary);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: var(--space-lg);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-bounce);
  position: relative;
}

.feature-card:hover .feature-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.feature-card h3 {
  margin-bottom: var(--space-sm);
  transition: color var(--transition-fast);
}

.feature-card:hover h3 {
  color: var(--primary);
}

.feature-card p {
  color: var(--text-secondary);
  margin: 0;
}

/* ============================================
   Stats Section with Counters
   ============================================ */
.stats-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.stats-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-mesh);
  animation: meshMove 15s ease-in-out infinite reverse;
  pointer-events: none;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
  text-align: center;
  position: relative;
}

.stat-item {
  padding: var(--space-lg);
  border-radius: var(--radius-xl);
  transition: all var(--transition-normal);
}

.stat-item:hover {
  background: white;
  box-shadow: var(--shadow-lg);
  transform: translateY(-5px);
}

.stat-item h3 {
  font-size: 3.5rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-sm);
  transition: transform var(--transition-bounce);
}

.stat-item:hover h3 {
  transform: scale(1.1);
}

.stat-item p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin: 0;
  font-weight: 500;
}

/* ============================================
   Architecture Section
   ============================================ */
.architecture-diagram {
  background: var(--bg-code);
  border: 2px solid transparent;
  border-radius: var(--radius-2xl);
  padding: var(--space-2xl);
  overflow-x: auto;
  box-shadow: var(--shadow-xl);
  position: relative;
  transition: all var(--transition-normal);
}

.architecture-diagram::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: var(--gradient-rainbow);
  border-radius: var(--radius-2xl);
  z-index: -1;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.architecture-diagram:hover::before {
  opacity: 1;
}

.architecture-diagram pre {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: #e2e8f0;
  margin: 0;
  line-height: 1.8;
}

.architecture-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-2xl);
}

.arch-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  box-shadow: var(--shadow-card);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.arch-card::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform var(--transition-normal);
}

.arch-card:hover::before {
  transform: scaleX(1);
}

.arch-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.arch-card h4 {
  color: var(--primary);
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 1.1rem;
}

.arch-card p {
  font-size: 0.875rem;
  margin: 0;
}

/* ============================================
   Code Blocks with Glow
   ============================================ */
.code-block {
  background: var(--bg-code);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-normal);
  position: relative;
}

.code-block:hover {
  box-shadow: var(--shadow-xl), 0 0 60px rgba(2, 132, 199, 0.1);
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.code-header .dots {
  display: flex;
  gap: var(--space-xs);
}

.code-header .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transition: transform var(--transition-fast);
}

.code-header:hover .dot {
  animation: dotBounce 0.5s ease infinite;
}

.code-header .dot:nth-child(1) { animation-delay: 0s; }
.code-header .dot:nth-child(2) { animation-delay: 0.1s; }
.code-header .dot:nth-child(3) { animation-delay: 0.2s; }

@keyframes dotBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.code-header .dot.red { background: #ef4444; }
.code-header .dot.yellow { background: #f59e0b; }
.code-header .dot.green { background: #10b981; }

.code-header .lang {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.code-header .copy-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  transition: all var(--transition-fast);
}

.code-header .copy-btn:hover {
  background: var(--primary);
  color: white;
  transform: scale(1.05);
}

.code-content {
  padding: var(--space-lg);
  overflow-x: auto;
}

.code-content pre {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.7;
  margin: 0;
}

.code-content code {
  color: #e2e8f0;
  background: none;
  padding: 0;
}

/* Syntax highlighting */
.token-comment { color: #64748b; }
.token-keyword { color: #c084fc; }
.token-string { color: #34d399; }
.token-number { color: #fbbf24; }
.token-function { color: #60a5fa; }
.token-operator { color: #f472b6; }
.token-variable { color: #fb923c; }

/* ============================================
   Documentation Sidebar
   ============================================ */
.docs-layout {
  display: flex;
  min-height: 100vh;
  padding-top: 73px;
}

.docs-sidebar {
  width: 280px;
  flex-shrink: 0;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  padding: var(--space-xl);
  position: sticky;
  top: 73px;
  height: calc(100vh - 73px);
  overflow-y: auto;
}

.sidebar-section {
  margin-bottom: var(--space-xl);
}

.sidebar-section h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  font-weight: 600;
}

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

.sidebar-nav li {
  margin-bottom: var(--space-xs);
}

.sidebar-nav a {
  display: block;
  padding: var(--space-sm) var(--space-md);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  transition: all var(--transition-fast);
  border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  transform: translateX(4px);
}

.sidebar-nav a.active {
  background: var(--primary-subtle);
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 500;
}

.docs-content {
  flex: 1;
  padding: var(--space-2xl) var(--space-3xl);
  max-width: 900px;
}

.docs-content h1 {
  margin-bottom: var(--space-lg);
  color: var(--text-primary);
}

.docs-content h2 {
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--border-color);
  color: var(--text-primary);
}

.docs-content h3 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.docs-content p {
  margin-bottom: var(--space-md);
}

.docs-content ul, .docs-content ol {
  margin-bottom: var(--space-md);
  padding-left: var(--space-xl);
  color: var(--text-secondary);
}

.docs-content li {
  margin-bottom: var(--space-sm);
}

.docs-content .code-block {
  margin: var(--space-lg) 0;
}

/* ============================================
   Tables
   ============================================ */
.table-wrapper {
  overflow-x: auto;
  margin: var(--space-lg) 0;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

th, td {
  padding: var(--space-md);
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th {
  background: var(--bg-secondary);
  font-weight: 600;
  color: var(--text-primary);
}

td {
  color: var(--text-secondary);
  transition: background var(--transition-fast);
}

td code {
  background: var(--primary-subtle);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--primary-dark);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: var(--bg-tertiary);
}

/* ============================================
   Callouts / Alerts
   ============================================ */
.callout {
  padding: var(--space-lg);
  border-radius: var(--radius-xl);
  margin: var(--space-lg) 0;
  border-left: 4px solid;
  position: relative;
  overflow: hidden;
}

.callout::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, currentColor 0%, transparent 70%);
  opacity: 0.05;
  pointer-events: none;
}

.callout-title {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.callout p {
  margin: 0;
}

.callout ul {
  margin: var(--space-sm) 0 0 0;
}

.callout-info {
  background: rgba(6, 182, 212, 0.08);
  border-color: var(--secondary);
}

.callout-info .callout-title {
  color: var(--secondary);
}

.callout-warning {
  background: rgba(245, 158, 11, 0.08);
  border-color: var(--warning);
}

.callout-warning .callout-title {
  color: var(--warning);
}

.callout-success {
  background: rgba(16, 185, 129, 0.08);
  border-color: var(--emerald);
}

.callout-success .callout-title {
  color: var(--emerald);
}

.callout-error {
  background: rgba(220, 38, 38, 0.08);
  border-color: var(--error);
}

.callout-error .callout-title {
  color: var(--error);
}

/* ============================================
   Cards Grid with Hover Effects
   ============================================ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
  margin: var(--space-xl) 0;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-2xl);
  padding: var(--space-xl);
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition-normal);
  pointer-events: none;
}

.card:hover::before {
  opacity: 0.03;
}

.card:hover {
  border-color: var(--primary);
  transform: translateY(-8px) scale(1.01);
  box-shadow: var(--shadow-float), var(--shadow-glow);
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
  transition: transform var(--transition-bounce);
}

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

.card h3 {
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
  transition: color var(--transition-fast);
}

.card:hover h3 {
  color: var(--primary);
}

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

.card-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--primary);
  font-weight: 500;
  transition: gap var(--transition-fast);
}

.card:hover .card-link {
  gap: var(--space-sm);
}

.card-link span {
  transition: transform var(--transition-fast);
}

.card:hover .card-link span {
  transform: translateX(4px);
}

/* ============================================
   Footer with Wave
   ============================================ */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: var(--space-3xl) 0 var(--space-xl);
  position: relative;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer-brand p {
  margin-top: var(--space-md);
  max-width: 300px;
}

.footer-column h4 {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

.footer-column ul {
  list-style: none;
}

.footer-column li {
  margin-bottom: var(--space-sm);
}

.footer-column a {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  transition: all var(--transition-fast);
  display: inline-block;
}

.footer-column a:hover {
  color: var(--primary);
  transform: translateX(4px);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border-color);
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin: 0;
}

.footer-social {
  display: flex;
  gap: var(--space-md);
}

.footer-social a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
  font-size: 1.25rem;
  transition: all var(--transition-normal);
}

.footer-social a:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

/* ============================================
   Step Lists
   ============================================ */
.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
}

.steps li {
  position: relative;
  padding-left: 3.5rem;
  padding-bottom: var(--space-xl);
  border-left: 2px solid var(--border-color);
  margin-left: 1rem;
  transition: border-color var(--transition-fast);
}

.steps li:hover {
  border-left-color: var(--primary-light);
}

.steps li:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: -1.125rem;
  top: 0;
  width: 2.25rem;
  height: 2.25rem;
  background: var(--gradient-primary);
  color: white;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-bounce);
}

.steps li:hover::before {
  transform: scale(1.15);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.steps li h4 {
  margin-bottom: var(--space-sm);
}

/* ============================================
   Tabs
   ============================================ */
.tabs {
  margin: var(--space-lg) 0;
}

.tab-list {
  display: flex;
  gap: var(--space-xs);
  border-bottom: 2px solid var(--border-color);
  margin-bottom: var(--space-lg);
}

.tab-btn {
  padding: var(--space-sm) var(--space-lg);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  color: var(--text-secondary);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

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

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

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
  .docs-sidebar {
    display: none;
  }

  .docs-content {
    padding: var(--space-xl);
    max-width: 100%;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }

  .navbar-nav {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

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

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

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }

  .stat-item h3 {
    font-size: 2.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-brand p {
    margin: var(--space-md) auto;
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

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

  .particle {
    display: none;
  }
}

/* ============================================
   Scroll Animations
   ============================================ */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

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

.animate-on-scroll.delay-1 { transition-delay: 0.1s; }
.animate-on-scroll.delay-2 { transition-delay: 0.2s; }
.animate-on-scroll.delay-3 { transition-delay: 0.3s; }
.animate-on-scroll.delay-4 { transition-delay: 0.4s; }

/* ============================================
   Utility Classes
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

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

.bg-primary { background: var(--bg-primary); }
.bg-secondary { background: var(--bg-secondary); }
.bg-tertiary { background: var(--bg-tertiary); }

.mt-1 { margin-top: var(--space-md); }
.mt-2 { margin-top: var(--space-xl); }
.mt-3 { margin-top: var(--space-2xl); }

.mb-1 { margin-bottom: var(--space-md); }
.mb-2 { margin-bottom: var(--space-xl); }
.mb-3 { margin-bottom: var(--space-2xl); }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: var(--space-md); }
.gap-2 { gap: var(--space-xl); }

.hidden { display: none; }
.visible { display: block; }

/* ============================================
   Sidebar NEW Badge
   ============================================ */
.badge-new {
  display: inline-block;
  background: linear-gradient(135deg, #10b981, #34d399);
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-full);
  margin-left: 0.375rem;
  letter-spacing: 0.05em;
  vertical-align: middle;
  line-height: 1.4;
  text-transform: uppercase;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
  .navbar,
  .docs-sidebar,
  .footer,
  .hero-particles {
    display: none;
  }

  .docs-content {
    max-width: 100%;
    padding: 0;
  }

  .code-block {
    break-inside: avoid;
  }

  body {
    background: white;
    color: black;
  }

  * {
    animation: none !important;
  }
}

/* Engineering entry points shared by the English and Chinese portal. */
.nav-language-note { font-size: 9px; color: #6d8a99; padding-left: 3px; }
.navbar-nav { gap: 24px; }
.series-promo { background: #f3f9fc; border-top: 1px solid #e1ebf0; border-bottom: 1px solid #e1ebf0; }
.series-promo-card { display: flex; align-items: center; justify-content: space-between; gap: 48px; }
.series-promo-card > div { max-width: 780px; }
.series-promo-eyebrow { color: #087da5; font-size: 12px; font-weight: 700; letter-spacing: .07em; margin-bottom: 14px; }
.series-promo-card h2 { font-size: 30px; line-height: 1.5; margin-bottom: 16px; }
.series-promo-card > div > p:not(.series-promo-eyebrow) { color: #5c7485; line-height: 1.9; }
.series-promo-actions { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; margin-top: 24px; }
.series-promo-start { font-size: 13px; font-weight: 600; }
.series-promo-stat { font-size: 13px; color: #3b7189; line-height: 2; border-left: 1px solid #ccdde6; padding-left: 32px; max-width: 220px; }
@media(max-width:1180px) {
  .navbar .container { gap: 20px; }
  .navbar-nav { display: none; }
  .mobile-menu-btn { display: block; flex-shrink: 0; }
  .navbar-nav.mobile-open { display: flex; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; background: white; border-bottom: 1px solid #dce7ed; box-shadow: 0 8px 20px #19394c10; padding: 16px 32px 24px; gap: 0; }
  .navbar-nav.mobile-open a { display: block; padding: 12px 0; }
}
@media(max-width:768px) {
  .series-promo-card { display: block; }
  .series-promo-card h2 { font-size: 25px; }
  .series-promo-stat { margin-top: 24px; max-width: none; padding: 15px 0 0; border-left: 0; border-top: 1px solid #ccdde6; }
}
@media(max-width:520px) {
  .navbar .container { gap: 12px; }
  .navbar-brand { font-size: 1.2rem; gap: 8px; }
  .navbar-brand .logo-img { width: 32px; height: 32px; }
  .navbar-actions { margin-left: auto; gap: 8px; }
  .navbar-actions .btn { display: none; }
}
/* Draw menu controls without depending on a symbol font. */
.mobile-menu-btn { position: relative; width: 32px; height: 32px; font-size: 0 !important; }
.mobile-menu-btn::before, .mobile-menu-btn::after { content: ''; position: absolute; left: 6px; top: 15px; width: 20px; height: 2px; background: currentColor; }
.mobile-menu-btn::before { box-shadow: 0 -6px currentColor, 0 6px currentColor; }
.mobile-menu-btn::after { display: none; }
.mobile-menu-btn[aria-expanded="true"]::before { box-shadow: none; transform: rotate(45deg); }
.mobile-menu-btn[aria-expanded="true"]::after { display: block; transform: rotate(-45deg); }
