/* ===== Silver Lang Main Stylesheet ===== */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

/* ===== Modern Scrollbar ===== */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--color-border-hover) transparent;
}

body {
  scrollbar-width: thin;
  scrollbar-color: var(--color-border-hover) transparent;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--color-border-hover);
  border-radius: 9999px;
  border: 2px solid transparent;
  background-clip: padding-box;
  transition: background var(--transition-fast);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-border-active);
  background-clip: padding-box;
  border: 2px solid transparent;
}

::-webkit-scrollbar-thumb:active {
  background: var(--color-accent);
  background-clip: padding-box;
  border: 2px solid transparent;
}

::-webkit-scrollbar-corner {
  background: transparent;
}

/* Thin variant for dense areas (sidebars, lists, dropdowns) */
.scrollbar-thin,
.docs-sidebar,
.docs-content pre,
.code-block pre,
.bento-card-code,
.custom-select-options {
  scrollbar-width: thin;
  scrollbar-color: var(--color-border-hover) transparent;
}

.scrollbar-thin::-webkit-scrollbar,
.docs-sidebar::-webkit-scrollbar,
.docs-content pre::-webkit-scrollbar,
.code-block pre::-webkit-scrollbar,
.bento-card-code::-webkit-scrollbar,
.custom-select-options::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.scrollbar-thin::-webkit-scrollbar-thumb,
.docs-sidebar::-webkit-scrollbar-thumb,
.docs-content pre::-webkit-scrollbar-thumb,
.code-block pre::-webkit-scrollbar-thumb,
.bento-card-code::-webkit-scrollbar-thumb,
.custom-select-options::-webkit-scrollbar-thumb {
  background: var(--color-border-hover);
  border-radius: 9999px;
  border: 1px solid transparent;
  background-clip: padding-box;
}

.scrollbar-thin::-webkit-scrollbar-thumb:hover,
.docs-sidebar::-webkit-scrollbar-thumb:hover,
.docs-content pre::-webkit-scrollbar-thumb:hover,
.code-block pre::-webkit-scrollbar-thumb:hover,
.bento-card-code::-webkit-scrollbar-thumb:hover,
.custom-select-options::-webkit-scrollbar-thumb:hover {
  background: var(--color-border-active);
  background-clip: padding-box;
  border: 1px solid transparent;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color var(--transition-base), color var(--transition-base);
}

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

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

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

button {
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}

code, pre {
  font-family: var(--font-mono);
}

::selection {
  background: var(--color-accent-subtle);
  color: var(--color-accent);
}

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

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

@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-4);
  }
}

/* ===== HEADER ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  background: transparent;
  transition: background var(--transition-base), box-shadow var(--transition-base), backdrop-filter var(--transition-base);
}

.site-header.scrolled {
  background: var(--color-bg-primary);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 1px 0 var(--color-border-secondary);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

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

.header-logo:hover {
  color: var(--color-accent);
}

.logo-icon {
  width: 32px;
  height: 32px;
}

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

.header-nav a {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color var(--transition-fast), background var(--transition-fast);
}

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

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

/* Theme Toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  transition: color var(--transition-fast), background var(--transition-fast);
}

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

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }

[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* GitHub Link */
.header-github {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.header-github:hover {
  color: var(--color-text-primary);
  background: var(--color-bg-hover);
}

.header-github svg {
  width: 20px;
  height: 20px;
}

/* Language Selector */
.lang-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--color-bg-hover);
  border: 1px solid var(--color-border-primary);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-8) var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-family: var(--font-sans);
  color: var(--color-text-primary);
  cursor: pointer;
  transition: border-color var(--transition-fast);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6b7b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.lang-select:hover {
  border-color: var(--color-border-hover);
}

.lang-select:focus {
  border-color: var(--color-accent);
  outline: none;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
}

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

@media (max-width: 768px) {
  .header-nav {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--color-bg-primary);
    padding: var(--space-4);
    gap: var(--space-1);
    z-index: var(--z-overlay);
    overflow-y: auto;
  }

  .header-nav.open {
    display: flex;
  }

  .header-nav a {
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-base);
    border-radius: var(--radius-lg);
  }

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

/* ===== HERO SECTION ===== */
.hero {
  position: relative;
  overflow: hidden;
  padding: var(--space-24) 0 var(--space-16);
  text-align: center;
  min-height: 90vh;
  display: flex;
  align-items: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  left: -20%;
  width: 140%;
  height: 180%;
  background: radial-gradient(ellipse at 50% 0%, var(--color-accent-glow) 0%, transparent 50%),
              radial-gradient(ellipse at 20% 80%, rgba(128, 128, 128, 0.04) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 80%, rgba(128, 128, 128, 0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: var(--z-base);
  max-width: 900px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-4);
  background: var(--color-accent-subtle);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-full);
  color: var(--color-accent);
  font-size: var(--text-sm);
  font-weight: 500;
  margin-bottom: var(--space-8);
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-motto {
  font-size: var(--text-lg);
  font-weight: 400;
  color: var(--color-text-secondary);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-6xl);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-6);
  background: linear-gradient(135deg, var(--color-text-primary) 0%, var(--color-text-primary) 40%, var(--color-accent) 70%, var(--color-gradient-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--color-accent), var(--color-gradient-2), var(--color-gradient-3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  font-size: var(--text-xl);
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-8);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: var(--text-base);
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-accent), var(--color-gradient-2));
  color: white;
  box-shadow: 0 2px 12px var(--color-accent-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--color-accent-glow);
  color: white;
}

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

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

.btn-ghost {
  color: var(--color-text-secondary);
}

.btn-ghost:hover {
  color: var(--color-text-primary);
  background: var(--color-bg-hover);
}

.hero-code-preview {
  margin-top: var(--space-12);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}

.hero-code-preview .window-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border-primary);
  border-bottom: none;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.window-chrome .dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
}

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

.window-chrome .title {
  flex: 1;
  text-align: center;
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
}

@media (max-width: 768px) {
  .hero {
    padding: var(--space-16) 0 var(--space-10);
    min-height: auto;
  }

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

  .hero-tagline {
    font-size: var(--text-lg);
  }

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

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ===== SECTION COMMON ===== */
.section {
  padding: var(--space-20) 0;
}

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

.section-label {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-3);
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
  color: var(--color-text-primary);
}

.section-header p {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* ===== BENTO GRID ===== */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-4);
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.bento-card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  transition: all var(--transition-base);
  overflow: hidden;
}

.bento-card:hover {
  border-color: var(--color-border-hover);
  background: var(--color-surface-hover);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.bento-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-accent-subtle), transparent);
  opacity: 0;
  transition: opacity var(--transition-base);
}

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

/* Bento Card Sizes */
.bento-col-3 { grid-column: span 3; }
.bento-col-4 { grid-column: span 4; }
.bento-col-6 { grid-column: span 6; }
.bento-col-8 { grid-column: span 8; }
.bento-col-12 { grid-column: span 12; }

.bento-card-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--color-accent-subtle);
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}

.bento-card-icon svg {
  width: 20px;
  height: 20px;
}

.bento-card h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--color-text-primary);
}

.bento-card p {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.bento-card-code {
  margin-top: var(--space-4);
  background: var(--color-code-bg);
  border: 1px solid var(--color-code-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  overflow-x: auto;
}

.bento-card-code pre {
  font-size: var(--text-sm);
  line-height: 1.6;
}

.bento-card-code code {
  color: var(--color-code-text);
}

/* Accent gradient cards */
.bento-card.accent {
  background: linear-gradient(135deg, var(--color-accent-subtle), transparent);
  border-color: var(--color-border-hover);
}

.bento-card.accent:hover {
  border-color: var(--color-border-active);
}

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

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

  .bento-col-3,
  .bento-col-4,
  .bento-col-6,
  .bento-col-8,
  .bento-col-12 {
    grid-column: span 1;
  }
}

/* ===== MODES SECTION ===== */
.modes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.mode-card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  text-align: center;
  transition: all var(--transition-base);
}

.mode-card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.mode-card-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  background: var(--color-accent-subtle);
}

.mode-card-icon svg {
  width: 24px;
  height: 24px;
  color: var(--color-accent);
}

.mode-card h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.mode-card p {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.mode-card .speed-bar {
  margin-top: var(--space-4);
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--color-bg-hover);
  overflow: hidden;
}

.mode-card .speed-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--color-success), var(--color-accent));
  transition: width 1s ease;
}

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

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

/* ===== FEATURES LIST ===== */
.features-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.feature-item {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-4);
}

.feature-item-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--color-accent-subtle);
  color: var(--color-accent);
}

.feature-item-icon svg {
  width: 20px;
  height: 20px;
}

.feature-item-text h3 {
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--space-1);
}

.feature-item-text p {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.5;
}

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

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

/* ===== CTA SECTION ===== */
.cta-section {
  text-align: center;
  padding: var(--space-20) 0;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, var(--color-accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.cta-section h2 {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 700;
  margin-bottom: var(--space-4);
  letter-spacing: -0.02em;
}

.cta-section p {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  max-width: 500px;
  margin: 0 auto var(--space-8);
}

/* ===== FOOTER ===== */
.site-footer {
  border-top: 1px solid var(--color-border-secondary);
  padding: var(--space-12) 0 var(--space-8);
  background: var(--color-bg-secondary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-8);
  max-width: 1280px;
  margin: 0 auto var(--space-10);
  padding: 0 var(--space-6);
}

.footer-brand p {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-top: var(--space-3);
  line-height: 1.6;
  max-width: 260px;
}

.footer-links h4 {
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-4);
  color: var(--color-text-primary);
}

.footer-links a {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  padding: var(--space-1) 0;
  transition: color var(--transition-fast);
}

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

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-6) 0;
  border-top: 1px solid var(--color-border-secondary);
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
}

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

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

/* ===== CODE PREVIEW BLOCK ===== */
.code-block {
  background: var(--color-code-bg);
  border: 1px solid var(--color-code-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}

.code-block pre {
  padding: var(--space-6);
  margin: 0;
  overflow-x: auto;
  font-size: var(--text-sm);
  line-height: 1.7;
}

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

/* ===== ANIMATIONS ===== */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fade-in-up 0.6s ease forwards;
}

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

/* ===== UTILITY ===== */
.text-center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.hidden { display: none; }

/* ===== DOCS LAYOUT ===== */
.docs-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: calc(100vh - 64px);
  padding-top: 64px;
}

.docs-sidebar {
  position: fixed;
  top: 64px;
  left: 0;
  width: 280px;
  height: calc(100vh - 64px);
  overflow-y: auto;
  background: var(--color-bg-secondary);
  border-right: 1px solid var(--color-border-secondary);
  padding: var(--space-6);
  z-index: var(--z-base);
}

.docs-sidebar-search {
  position: sticky;
  top: 0;
  z-index: 5;
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-2);
  background: var(--color-bg-secondary);
}

.docs-sidebar-search input {
  width: 100%;
  padding: var(--space-2) var(--space-4) var(--space-2) var(--space-8);
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border-primary);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-family: var(--font-sans);
  color: var(--color-text-primary);
  transition: border-color var(--transition-fast);
}

.docs-sidebar-search input:focus {
  outline: none;
  border-color: var(--color-accent);
}

.docs-sidebar-search input::placeholder {
  color: var(--color-text-tertiary);
}

.docs-search-field .search-icon {
  position: absolute;
  left: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--color-text-tertiary);
}

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

.docs-nav-section h3 {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-tertiary);
  margin-bottom: var(--space-2);
  padding: 0 var(--space-2);
}

.docs-nav-section a {
  display: block;
  padding: var(--space-2) var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.docs-nav-section a:hover {
  color: var(--color-text-primary);
  background: var(--color-bg-hover);
}

.docs-nav-section a.active {
  color: var(--color-accent);
  background: var(--color-accent-subtle);
  font-weight: 500;
}

.docs-content {
  grid-column: 2;
  padding: var(--space-8) var(--space-12);
  max-width: 900px;
}

.docs-content h1 {
  font-size: var(--text-3xl);
  font-weight: 700;
  margin-bottom: var(--space-6);
  letter-spacing: -0.02em;
}

.docs-content h2 {
  font-size: var(--text-xl);
  font-weight: 600;
  margin-top: var(--space-8);
  margin-bottom: var(--space-4);
}

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

.docs-content .code-tabs {
  display: flex;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-4);
  background: var(--color-code-bg);
  border: 1px solid var(--color-code-border);
  border-bottom: none;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.docs-content .code-tab {
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-tertiary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.docs-content .code-tab:hover {
  color: var(--color-text-secondary);
  background: var(--color-bg-hover);
}

.docs-content .code-tab.active {
  color: var(--color-accent);
  background: var(--color-accent-subtle);
}

.docs-content .code-panel {
  display: none;
}

.docs-content .code-panel.active {
  display: block;
}

/* Code block copy button */
.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-4);
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-code-border);
  border-bottom: none;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.code-block-header span {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
}

.copy-btn {
  padding: var(--space-1) var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.copy-btn:hover {
  color: var(--color-text-primary);
  background: var(--color-bg-hover);
}

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

  .docs-sidebar {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    z-index: var(--z-overlay);
    border-right: none;
  }

  .docs-sidebar.open {
    display: block;
  }

  .docs-content {
    padding: var(--space-6);
  }
}

/* ===== 404 Error Page ===== */
.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(64px + var(--space-16)) var(--space-4) var(--space-20);
  text-align: center;
  position: relative;
}

.error-content {
  max-width: 560px;
  position: relative;
  z-index: var(--z-base);
}

.error-code {
  font-family: var(--font-display);
  font-size: clamp(7rem, 22vw, 13rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: var(--space-4);
  background: linear-gradient(135deg, var(--color-accent), var(--color-gradient-2), var(--color-gradient-3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.error-heading {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-3);
}

.error-message {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 0 auto var(--space-8);
  max-width: 480px;
}

.error-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
}
