@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');
:root {
  --primary: #8b5cf6;
  --primary-dark: #7c3aed;
  --primary-light: #a78bfa;
  --primary-bg: rgba(139, 92, 246, 0.1);
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --bg-base: #0f172a;
  --bg-surface: #1e293b;
  --bg-elevated: #334155;
  --bg-card: rgba(30, 41, 59, 0.8);
  --border-subtle: rgba(148, 163, 184, 0.1);
  --border-default: rgba(148, 163, 184, 0.2);
  --border-accent: rgba(139, 92, 246, 0.3);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.3);
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --sidebar-width: 280px;
  --content-max-width: 800px;
  --header-height: 64px;
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
}
[data-theme="light"] {
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --bg-base: #ffffff;
  --bg-surface: #f8fafc;
  --bg-elevated: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.9);
  --border-subtle: rgba(0, 0, 0, 0.05);
  --border-default: rgba(0, 0, 0, 0.1);
  --border-accent: rgba(139, 92, 246, 0.2);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
}
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  font-size: 16px;
}
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-base);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body::before,
body::after {
  display: none;
}
.docs-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  grid-template-rows: var(--header-height) 1fr;
  grid-template-areas:
    "header header"
    "sidebar content";
  min-height: 100vh;
}
.docs-header {
  grid-area: header;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-xl);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-default);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.docs-header__brand {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  text-decoration: none;
  color: var(--text-primary);
}
.docs-header__logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}
.docs-header__title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}
.docs-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}
.docs-header__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.docs-header__btn:hover {
  background: var(--bg-elevated);
  color: var(--primary);
}
.docs-header__menu-toggle {
  display: none;
}
.docs-sidebar {
  grid-area: sidebar;
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
  padding: var(--space-xl) var(--space-lg);
  background: var(--bg-surface);
  border-right: 1px solid var(--border-default);
}
.docs-sidebar__section {
  margin-bottom: var(--space-xl);
}
.docs-sidebar__heading {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  margin-bottom: var(--space-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.docs-sidebar__icon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
}
.docs-sidebar__list {
  list-style: none;
}
.docs-sidebar__item {
  margin-bottom: 2px;
}
.docs-sidebar__link {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-fast);
}
.docs-sidebar__link:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}
.docs-sidebar__link--active {
  background: var(--primary-bg);
  color: var(--primary);
  font-weight: 500;
}
.docs-sidebar__link--active::before {
  content: '';
  position: absolute;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--primary);
  border-radius: 0 2px 2px 0;
}
.docs-sidebar__external-icon {
  width: 14px;
  height: 14px;
  margin-left: auto;
  opacity: 0.5;
}
.docs-content {
  grid-area: content;
  padding: var(--space-2xl) var(--space-xl);
  max-width: calc(var(--content-max-width) + var(--space-xl) * 2);
}
.docs-article {
  max-width: var(--content-max-width);
}
.docs-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  font-size: 0.875rem;
  color: var(--text-muted);
}
.docs-breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.docs-breadcrumb a:hover {
  color: var(--primary);
}
.docs-breadcrumb__separator {
  opacity: 0.5;
}
.docs-article__header {
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--border-default);
}
.docs-article__title {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}
.docs-article__description {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.docs-article__meta {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-top: var(--space-md);
  font-size: 0.875rem;
  color: var(--text-muted);
}
.docs-article__meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}
.docs-article__body {
  font-size: 1rem;
  line-height: 1.8;
}
.docs-article__body h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: var(--space-2xl) 0 var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border-subtle);
}
.docs-article__body h2:first-child {
  margin-top: 0;
}
.docs-article__body h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: var(--space-xl) 0 var(--space-md);
}
.docs-article__body h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: var(--space-lg) 0 var(--space-sm);
}
.docs-article__body p {
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
}
.docs-article__body ul,
.docs-article__body ol {
  margin: var(--space-md) 0;
  padding-left: var(--space-xl);
}
.docs-article__body li {
  margin-bottom: var(--space-sm);
  color: var(--text-secondary);
}
.docs-article__body li::marker {
  color: var(--primary);
}
.docs-article__body a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition-fast);
}
.docs-article__body a:hover {
  border-bottom-color: var(--primary);
}
.docs-article__body a.docs-btn {
  color: #fff;
  border-bottom: none;
}
.docs-article__body a.docs-btn:hover {
  border-bottom: none;
}
.docs-article__body strong,
.docs-article__body b {
  font-weight: 600;
  color: var(--text-primary);
}
.docs-article__body code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.875em;
  padding: 0.2em 0.4em;
  background: var(--bg-elevated);
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
}
.docs-article__body pre {
  margin: var(--space-lg) 0;
  padding: var(--space-lg);
  background: var(--bg-elevated);
  border-radius: 8px;
  border: 1px solid var(--border-default);
  overflow-x: auto;
}
.docs-article__body pre code {
  padding: 0;
  background: none;
  border: none;
  font-size: 0.875rem;
  line-height: 1.6;
}
.docs-callout {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-lg);
  margin: var(--space-lg) 0;
  border-radius: 8px;
  border-left: 4px solid;
}
.docs-callout--info {
  background: rgba(59, 130, 246, 0.1);
  border-left-color: #3b82f6;
}
.docs-callout--warning {
  background: rgba(245, 158, 11, 0.1);
  border-left-color: #f59e0b;
}
.docs-callout--tip {
  background: rgba(34, 197, 94, 0.1);
  border-left-color: #22c55e;
}
.docs-callout--important {
  background: var(--primary-bg);
  border-left-color: var(--primary);
}
.docs-callout__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}
.docs-callout__content {
  flex: 1;
}
.docs-callout__title {
  font-weight: 600;
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
}
.docs-callout__text {
  font-size: 0.9375rem;
  color: var(--text-secondary);
}
.docs-faq {
  margin: var(--space-xl) 0;
}
.docs-faq__item {
  border: 1px solid var(--border-default);
  border-radius: 8px;
  margin-bottom: var(--space-sm);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}
.docs-faq__item:hover {
  border-color: var(--border-accent);
}
.docs-faq__question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  background: var(--bg-surface);
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: background var(--transition-fast);
}
.docs-faq__question:hover {
  background: var(--bg-elevated);
}
.docs-faq__icon {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  transition: transform var(--transition-base);
}
.docs-faq__item--open .docs-faq__icon {
  transform: rotate(180deg);
}
.docs-faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow);
}
.docs-faq__answer-content {
  padding: 0 var(--space-lg) var(--space-lg);
  color: var(--text-secondary);
}
.docs-faq__item--open .docs-faq__answer {
  max-height: 500px;
}
.docs-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  background: var(--primary);
  color: #fff;
}
.docs-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.docs-btn--primary {
  background: var(--primary);
  color: #fff;
}
.docs-btn--primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.docs-btn--secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
}
.docs-btn--secondary:hover {
  background: var(--bg-surface);
  border-color: var(--border-accent);
}
.docs-btn--ghost {
  background: transparent;
  color: var(--primary);
}
.docs-btn--ghost:hover {
  background: var(--primary-bg);
}
.docs-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
  margin: var(--space-xl) 0;
}
.docs-card {
  display: flex;
  flex-direction: column;
  padding: var(--space-xl);
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  text-decoration: none;
  transition: all var(--transition-base);
}
.docs-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.docs-card__icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-md);
  border-radius: 10px;
}
.docs-card__title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}
.docs-card__description {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.docs-footer {
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border-default);
}
.docs-footer__nav {
  display: flex;
  justify-content: space-between;
  gap: var(--space-lg);
}
.docs-footer__link {
  display: flex;
  flex-direction: column;
  padding: var(--space-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  text-decoration: none;
  transition: all var(--transition-fast);
  flex: 1;
  max-width: 300px;
}
.docs-footer__link:hover {
  border-color: var(--border-accent);
  background: var(--bg-elevated);
}
.docs-footer__link--prev {
  align-items: flex-start;
}
.docs-footer__link--next {
  align-items: flex-end;
  margin-left: auto;
}
.docs-footer__label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
}
.docs-footer__title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--primary);
}
.docs-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}
.docs-overlay--visible {
  opacity: 1;
  visibility: visible;
}
.docs-settings {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 16px;
  padding: var(--space-xl);
  width: 100%;
  max-width: 360px;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  transition: transform var(--transition-base);
}
.docs-overlay--visible .docs-settings {
  transform: scale(1);
}
.docs-settings__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
}
.docs-settings__title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}
.docs-settings__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.docs-settings__close:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}
.docs-settings__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border-subtle);
}
.docs-settings__item:last-child {
  border-bottom: none;
}
.docs-settings__label {
  font-size: 0.9375rem;
  color: var(--text-primary);
}
.docs-toggle {
  position: relative;
  width: 44px;
  height: 24px;
}
.docs-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.docs-toggle__slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--bg-elevated);
  border-radius: 12px;
  transition: background var(--transition-fast);
}
.docs-toggle__slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: all var(--transition-fast);
}
.docs-toggle input:checked + .docs-toggle__slider {
  background: var(--primary);
}
.docs-toggle input:checked + .docs-toggle__slider::before {
  background: #fff;
  transform: translateX(20px);
}
@media (max-width: 1024px) {
  .docs-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "content";
  }
  .docs-sidebar {
    position: fixed;
    left: 0;
    top: var(--header-height);
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    transform: translateX(-100%);
    transition: transform var(--transition-base);
    z-index: 99;
    box-shadow: var(--shadow-lg);
  }
  .docs-sidebar--open {
    transform: translateX(0);
  }
  .docs-header__menu-toggle {
    display: flex;
  }
  .docs-content {
    padding: var(--space-xl) var(--space-lg);
  }
}
@media (max-width: 640px) {
  :root {
    --header-height: 56px;
  }
  .docs-header {
    padding: 0 var(--space-md);
  }
  .docs-header__title {
    font-size: 1rem;
  }
  .docs-content {
    padding: var(--space-lg) var(--space-md);
  }
  .docs-article__title {
    font-size: 1.75rem;
  }
  .docs-article__description {
    font-size: 1rem;
  }
  .docs-footer__nav {
    flex-direction: column;
  }
  .docs-footer__link {
    max-width: none;
  }
  .docs-footer__link--next {
    align-items: flex-start;
  }
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.text-center {
  text-align: center;
}
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }
.mt-4 { margin-top: var(--space-xl); }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }
.mb-4 { margin-bottom: var(--space-xl); }
