/* ============================================================
   Tofido Code Manager - Global Stylesheet
   Premium Dark Theme with Mint Green Accent
   ============================================================ */

/* CSS Custom Properties (Design Tokens)
   ---------------------------------------------------------- */
:root {
  /* Brand Colors */
  --color-brand: #1B9C85;
  --color-brand-light: #2DD4BF;
  --color-brand-dark: #147a6b;
  --color-brand-glow: rgba(27, 156, 133, 0.4);

  /* Background Colors */
  --bg-primary: #0B1120;
  --bg-secondary: #0F172A;
  --bg-tertiary: #1E293B;
  --bg-card: rgba(30, 41, 59, 0.6);
  --bg-card-hover: rgba(30, 41, 59, 0.8);
  --bg-code: #0f172a;
  --bg-input: rgba(15, 23, 42, 0.8);

  /* Text Colors */
  --text-primary: #F8FAFC;
  --text-secondary: #CBD5E1;
  --text-muted: #94A3B8;
  --text-dark: #0F172A;

  /* Border Colors */
  --border-primary: rgba(148, 163, 184, 0.1);
  --border-brand: rgba(27, 156, 133, 0.3);
  --border-focus: #1B9C85;

  /* Gradients */
  --gradient-hero: linear-gradient(135deg, #0B1120 0%, #0F172A 50%, #0B1120 100%);
  --gradient-card: linear-gradient(145deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.5) 100%);
  --gradient-accent: linear-gradient(135deg, #1B9C85 0%, #2DD4BF 100%);
  --gradient-glow: radial-gradient(circle at 50% 0%, rgba(27, 156, 133, 0.15) 0%, transparent 60%);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
  --shadow-glow: 0 0 20px rgba(27, 156, 133, 0.3);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;

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

  /* Z-Index Scale */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal: 300;
  --z-toast: 400;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

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

::-webkit-scrollbar-thumb {
  background: var(--color-brand-dark);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-brand);
}

/* Selection */
::selection {
  background: rgba(27, 156, 133, 0.3);
  color: var(--text-primary);
}

/* Focus Styles */
:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
}

/* Typography
   ---------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
  margin-bottom: var(--space-4);
}

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

a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

/* Utility Classes
   ---------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }

.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }

.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.mt-16 { margin-top: var(--space-16); }
.mt-20 { margin-top: var(--space-20); }

/* Buttons
   ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.5;
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-accent);
  color: var(--text-dark);
  border-color: var(--color-brand);
  box-shadow: 0 4px 14px rgba(27, 156, 133, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(27, 156, 133, 0.4);
  color: var(--text-dark);
  text-decoration: none;
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-primary);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  border-color: var(--color-brand);
  color: var(--color-brand-light);
  text-decoration: none;
}

.btn-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
}

.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
}

/* Badges
   ---------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-full);
  background: rgba(27, 156, 133, 0.1);
  color: var(--color-brand-light);
  border: 1px solid var(--border-brand);
}

/* Cards
   ---------------------------------------------------------- */
.card {
  background: var(--gradient-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(27, 156, 133, 0.3), transparent);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-brand);
  box-shadow: var(--shadow-glow), var(--shadow-card);
  background: var(--bg-card-hover);
}

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

.card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  background: rgba(27, 156, 133, 0.1);
  color: var(--color-brand-light);
  margin-bottom: var(--space-4);
  font-size: var(--text-xl);
}

.card h3 {
  margin-bottom: var(--space-3);
  font-size: var(--text-xl);
}

.card p {
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: var(--text-sm);
  line-height: 1.6;
}

/* Grid System
   ---------------------------------------------------------- */
.grid {
  display: grid;
  gap: var(--space-6);
}

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

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* Section Styles
   ---------------------------------------------------------- */
.section {
  padding: var(--space-20) 0;
  position: relative;
}

.section-header {
  max-width: 700px;
  margin: 0 auto var(--space-12);
  text-align: center;
}

.section-header h2 {
  margin-bottom: var(--space-4);
}

.section-header p {
  color: var(--text-muted);
  font-size: var(--text-lg);
}

.section-label {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-brand-light);
  background: rgba(27, 156, 133, 0.1);
  border: 1px solid var(--border-brand);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-4);
}

/* Header / Navigation
   ---------------------------------------------------------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  background: rgba(11, 17, 32, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-primary);
  transition: all var(--transition-base);
}

.header.scrolled {
  background: rgba(11, 17, 32, 0.95);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--text-primary);
  text-decoration: none;
}

.logo:hover {
  text-decoration: none;
  color: var(--text-primary);
}

.logo-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-accent);
  border-radius: var(--radius-md);
  color: var(--text-dark);
  font-size: var(--text-sm);
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

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

.nav-link {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition-fast);
  position: relative;
}

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

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
  text-decoration: none;
}

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

.nav-cta {
  margin-left: var(--space-4);
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: var(--space-2);
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}

.mobile-menu-toggle:hover {
  background: var(--bg-tertiary);
}

.mobile-menu-toggle svg {
  width: 24px;
  height: 24px;
}

/* Mobile Navigation */
@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: var(--space-8);
    transform: translateX(100%);
    transition: transform var(--transition-slow);
    overflow-y: auto;
  }

  .nav.active {
    transform: translateX(0);
  }

  .nav-list {
    flex-direction: column;
    gap: var(--space-6);
    width: 100%;
  }

  .nav-link {
    font-size: var(--text-lg);
    width: 100%;
    display: block;
    padding: var(--space-2) 0;
  }

  .nav-cta {
    margin-left: 0;
    margin-top: var(--space-6);
    width: 100%;
  }

  .nav-cta .btn {
    width: 100%;
  }

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

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

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: var(--gradient-glow);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 600px;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: rgba(27, 156, 133, 0.1);
  border: 1px solid var(--border-brand);
  border-radius: var(--radius-full);
  color: var(--color-brand-light);
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-6);
}

.hero h1 {
  font-size: var(--text-6xl);
  line-height: 1.1;
  margin-bottom: var(--space-6);
  letter-spacing: -0.03em;
}

.hero p {
  font-size: var(--text-xl);
  color: var(--text-muted);
  margin-bottom: var(--space-8);
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-10);
  flex-wrap: wrap;
}

.hero-trust {
  display: flex;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.trust-item svg {
  color: var(--color-brand);
  flex-shrink: 0;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-code {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  width: 100%;
  max-width: 500px;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.hero-code-header {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.hero-code-dot {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
}

.hero-code-dot.red { background: #ef4444; }
.hero-code-dot.yellow { background: #eab308; }
.hero-code-dot.green { background: #22c55e; }

.hero-code pre {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.6;
  overflow-x: auto;
  color: var(--text-secondary);
}

.hero-code .keyword { color: #c084fc; }
.hero-code .function { color: #60a5fa; }
.hero-code .string { color: #4ade80; }
.hero-code .comment { color: var(--text-muted); }

@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero h1 {
    font-size: var(--text-4xl);
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-trust {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
  }

  .hero-code {
    max-width: 100%;
  }
}

/* Feature Preview Cards (Homepage)
   ---------------------------------------------------------- */
.features-preview {
  background: var(--bg-secondary);
  position: relative;
}

.features-preview::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-brand), transparent);
}

/* How It Works
   ---------------------------------------------------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  counter-reset: step;
}

.step {
  position: relative;
  text-align: center;
  padding: var(--space-6);
}

.step-number {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-accent);
  color: var(--text-dark);
  font-weight: 700;
  font-size: var(--text-lg);
  border-radius: var(--radius-full);
  margin: 0 auto var(--space-4);
}

.step h3 {
  margin-bottom: var(--space-2);
  font-size: var(--text-lg);
}

.step p {
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin-bottom: 0;
}

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

/* CTA Section
   ---------------------------------------------------------- */
.cta-section {
  background: var(--gradient-glow);
  position: relative;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bg-secondary);
  opacity: 0.9;
}

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

.cta-section h2 {
  margin-bottom: var(--space-4);
}

.cta-section p {
  color: var(--text-muted);
  margin-bottom: var(--space-8);
  font-size: var(--text-lg);
}

/* Footer
   ---------------------------------------------------------- */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-primary);
  padding: var(--space-16) 0 var(--space-8);
}

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

.footer-brand {
  max-width: 300px;
}

.footer-brand .logo {
  margin-bottom: var(--space-4);
}

.footer-brand p {
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
}

.footer-heading {
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-4);
}

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

.footer-list li {
  margin-bottom: var(--space-3);
}

.footer-list a {
  color: var(--text-muted);
  font-size: var(--text-sm);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-list a:hover {
  color: var(--color-brand-light);
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid var(--border-primary);
  padding-top: var(--space-8);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
}

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

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

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

.footer-social a:hover {
  color: var(--color-brand-light);
}

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

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

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* Features Page
   ---------------------------------------------------------- */
.page-header {
  padding: var(--space-24) 0 var(--space-12);
  background: var(--gradient-hero);
  position: relative;
  text-align: center;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-glow);
  pointer-events: none;
}

.page-header-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
}

.page-header h1 {
  margin-bottom: var(--space-4);
}

.page-header p {
  color: var(--text-muted);
  font-size: var(--text-lg);
}

.feature-category {
  margin-bottom: var(--space-16);
}

.feature-category-header {
  margin-bottom: var(--space-8);
}

.feature-category-header h2 {
  margin-bottom: var(--space-2);
}

.feature-category-header p {
  color: var(--text-muted);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

@media (max-width: 1024px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* Documentation Pages
   ---------------------------------------------------------- */
.docs-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: var(--space-12);
  padding-top: var(--space-8);
  padding-bottom: var(--space-16);
}

.docs-sidebar {
  position: sticky;
  top: 96px;
  height: calc(100vh - 120px);
  overflow-y: auto;
  padding-right: var(--space-4);
}

.docs-sidebar-title {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
  padding-left: var(--space-4);
}

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

.docs-nav li {
  margin-bottom: var(--space-1);
}

.docs-nav a {
  display: block;
  padding: var(--space-2) var(--space-4);
  color: var(--text-muted);
  font-size: var(--text-sm);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.docs-nav a:hover,
.docs-nav a.active {
  color: var(--text-primary);
  background: rgba(27, 156, 133, 0.1);
}

.docs-nav a.active {
  font-weight: 600;
}

.docs-content {
  min-width: 0;
}

.docs-content h2 {
  margin-top: var(--space-12);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-primary);
}

.docs-content h2:first-of-type {
  margin-top: 0;
}

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

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

.docs-content ul,
.docs-content ol {
  margin-bottom: var(--space-4);
  padding-left: var(--space-6);
}

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

.docs-content strong {
  color: var(--text-primary);
}

.docs-content a {
  color: var(--color-brand-light);
}

.docs-content a:hover {
  text-decoration: underline;
}

/* Code Blocks */
.code-block {
  position: relative;
  background: var(--bg-code);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  margin: var(--space-6) 0;
  overflow: hidden;
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  background: rgba(15, 23, 42, 0.8);
  border-bottom: 1px solid var(--border-primary);
}

.code-block-lang {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.code-block-copy {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  background: transparent;
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: var(--text-xs);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.code-block-copy:hover {
  border-color: var(--color-brand);
  color: var(--color-brand-light);
}

.code-block pre {
  padding: var(--space-4);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--text-secondary);
}

.code-block code {
  font-family: var(--font-mono);
}

/* Inline Code */
code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: var(--space-1) var(--space-2);
  background: rgba(27, 156, 133, 0.1);
  border: 1px solid var(--border-brand);
  border-radius: var(--radius-sm);
  color: var(--color-brand-light);
}

/* Callout Boxes */
.callout {
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--color-brand);
  background: rgba(27, 156, 133, 0.05);
  margin: var(--space-6) 0;
}

.callout-warning {
  border-left-color: #eab308;
  background: rgba(234, 179, 8, 0.05);
}

.callout-danger {
  border-left-color: #ef4444;
  background: rgba(239, 68, 68, 0.05);
}

.callout p {
  margin-bottom: 0;
}

.callout-title {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Table Styles */
.table-wrapper {
  overflow-x: auto;
  margin: var(--space-6) 0;
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

th {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-weight: 600;
  text-align: left;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-primary);
}

td {
  padding: var(--space-3) var(--space-4);
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-primary);
}

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

tr:hover td {
  background: rgba(27, 156, 133, 0.03);
}

/* Mobile Docs Sidebar */
@media (max-width: 1024px) {
  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: fixed;
    top: 72px;
    left: 0;
    bottom: 0;
    width: 280px;
    background: var(--bg-secondary);
    z-index: var(--z-sticky);
    transform: translateX(-100%);
    transition: transform var(--transition-slow);
    padding: var(--space-6);
    border-right: 1px solid var(--border-primary);
    height: calc(100vh - 72px);
  }

  .docs-sidebar.active {
    transform: translateX(0);
  }

  .docs-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: calc(var(--z-sticky) - 1);
  }

  .docs-sidebar-overlay.active {
    display: block;
  }

  .docs-mobile-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-6);
    padding: var(--space-2) var(--space-4);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: var(--text-sm);
    cursor: pointer;
  }
}

@media (min-width: 1025px) {
  .docs-mobile-toggle,
  .docs-sidebar-overlay {
    display: none;
  }
}

/* FAQ Page
   ---------------------------------------------------------- */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
  overflow: hidden;
  transition: border-color var(--transition-base);
}

.faq-item:hover {
  border-color: var(--border-brand);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  background: var(--bg-card);
  border: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.faq-question:hover {
  background: var(--bg-card-hover);
}

.faq-question svg {
  flex-shrink: 0;
  transition: transform var(--transition-base);
  color: var(--color-brand);
}

.faq-item.active .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow), padding var(--transition-slow);
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 0 var(--space-6) var(--space-6);
}

.faq-answer p {
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

/* Changelog
   ---------------------------------------------------------- */
.changelog-list {
  max-width: 800px;
  margin: 0 auto;
}

.changelog-item {
  position: relative;
  padding-left: var(--space-8);
  padding-bottom: var(--space-12);
  border-left: 2px solid var(--border-primary);
}

.changelog-item:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}

.changelog-dot {
  position: absolute;
  left: -9px;
  top: 0;
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  background: var(--color-brand);
  border: 3px solid var(--bg-primary);
  box-shadow: 0 0 0 2px var(--color-brand);
}

.changelog-version {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.changelog-version h3 {
  font-size: var(--text-2xl);
  margin-bottom: 0;
}

.changelog-date {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.changelog-badge {
  padding: var(--space-1) var(--space-3);
  background: var(--gradient-accent);
  color: var(--text-dark);
  font-size: var(--text-xs);
  font-weight: 700;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.changelog-section {
  margin-bottom: var(--space-6);
}

.changelog-section h4 {
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

.changelog-section ul {
  list-style: none;
  padding-left: 0;
}

.changelog-section li {
  position: relative;
  padding-left: var(--space-6);
  margin-bottom: var(--space-2);
  color: var(--text-secondary);
}

.changelog-section li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-brand);
}

/* Breadcrumbs
   ---------------------------------------------------------- */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--color-brand-light);
}

.breadcrumbs-separator {
  color: var(--text-muted);
}

.breadcrumbs-current {
  color: var(--text-primary);
  font-weight: 500;
}

/* Animation Utilities
   ---------------------------------------------------------- */
.animate-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Responsive Typography
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  :root {
    --text-5xl: 2.25rem;
    --text-6xl: 2.5rem;
  }

  .section {
    padding: var(--space-12) 0;
  }

  .page-header {
    padding: var(--space-16) 0 var(--space-8);
  }
}

/* Print Styles
   ---------------------------------------------------------- */
@media print {
  .header,
  .footer,
  .hero-visual,
  .mobile-menu-toggle,
  .docs-sidebar,
  .docs-mobile-toggle {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .card {
    border: 1px solid #ccc;
    box-shadow: none;
  }
}

/* Skip Link for Accessibility
   ---------------------------------------------------------- */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-brand);
  color: white;
  padding: var(--space-2) var(--space-4);
  z-index: 9999;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 0;
}
