:root {
  --docs-bg: #0b0c0f;
  --docs-panel: #11141c;
  --docs-panel-2: #171b24;
  --docs-border: rgba(255, 255, 255, 0.12);
  --docs-text: rgba(255, 255, 255, 0.92);
  --docs-muted: rgba(255, 255, 255, 0.62);
  --docs-link: #7cc5ff;
  --docs-active: rgba(124, 197, 255, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  color: var(--docs-text);
  background: radial-gradient(circle at top left, rgba(22, 30, 45, 0.9), var(--docs-bg) 58%);
}

a {
  color: var(--docs-link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.docs-mobile-topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--docs-border);
  background: rgba(8, 10, 16, 0.92);
  padding: 12px 14px;
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(8px);
}

.docs-mobile-topbar button {
  border: 1px solid var(--docs-border);
  background: var(--docs-panel);
  color: var(--docs-text);
  border-radius: 8px;
  padding: 8px 12px;
}

.docs-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 260px;
  min-height: 100vh;
}

.docs-sidebar {
  border-right: 1px solid var(--docs-border);
  background: rgba(8, 10, 16, 0.75);
  position: sticky;
  top: 0;
  max-height: 100vh;
  overflow: auto;
  padding: 20px 14px 24px;
}

.docs-sidebar-head {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.docs-brand {
  color: var(--docs-text);
  font-weight: 700;
}

.docs-home-link {
  color: var(--docs-muted);
  font-size: 13px;
}

.docs-sidebar-section {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 8px;
  margin-top: 8px;
}

.docs-sidebar-toggle {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--docs-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 8px;
}

.docs-sidebar-section[data-collapsed="true"] .docs-sidebar-list {
  display: none;
}

.docs-sidebar-section[data-collapsed="true"] .docs-sidebar-chevron {
  transform: rotate(-90deg);
}

.docs-sidebar-chevron {
  transition: transform 0.2s ease;
}

.docs-sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.docs-sidebar-link {
  display: block;
  color: var(--docs-muted);
  border-radius: 8px;
  padding: 8px;
  margin: 2px 0;
  font-size: 14px;
}

.docs-sidebar-link.is-active,
.docs-sidebar-link:hover {
  background: var(--docs-active);
  color: var(--docs-text);
  text-decoration: none;
}

.docs-content {
  padding: 48px 36px 72px;
}

.docs-article {
  max-width: 860px;
  margin: 0 auto;
  line-height: 1.78;
  font-size: 16px;
}

.docs-article h1,
.docs-article h2,
.docs-article h3 {
  scroll-margin-top: 90px;
  line-height: 1.22;
}

.docs-article h1 {
  font-size: 2.15rem;
  margin-bottom: 1rem;
}

.docs-article h2 {
  margin-top: 2.4rem;
  font-size: 1.45rem;
}

.docs-article h3 {
  margin-top: 1.6rem;
  font-size: 1.15rem;
}

.docs-article p,
.docs-article ul,
.docs-article ol,
.docs-article table {
  color: var(--docs-text);
}

.docs-article p {
  color: rgba(255, 255, 255, 0.88);
}

.docs-article ul,
.docs-article ol {
  padding-left: 1.2rem;
}

.docs-article li + li {
  margin-top: 0.35rem;
}

.docs-article blockquote {
  border-left: 3px solid var(--docs-link);
  margin: 1rem 0;
  padding: 0.25rem 0 0.25rem 0.9rem;
  color: var(--docs-muted);
}

.docs-article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  border: 1px solid var(--docs-border);
}

.docs-article th,
.docs-article td {
  border: 1px solid var(--docs-border);
  padding: 10px;
  text-align: left;
}

.docs-article pre {
  position: relative;
  margin: 1rem 0;
  border: 1px solid var(--docs-border);
  border-radius: 12px;
  overflow: auto;
}

.docs-article code:not(pre code) {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  padding: 0.1rem 0.38rem;
}

.code-copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 1px solid var(--docs-border);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12px;
  background: rgba(0, 0, 0, 0.4);
  color: var(--docs-text);
  cursor: pointer;
}

.heading-anchor {
  opacity: 0;
  margin-right: 0.5rem;
}

h2:hover .heading-anchor,
h3:hover .heading-anchor {
  opacity: 1;
}

.docs-toc {
  border-left: 1px solid var(--docs-border);
  padding: 24px 16px;
  position: sticky;
  top: 0;
  max-height: 100vh;
  overflow: auto;
}

.docs-toc h2 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--docs-muted);
}

.docs-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.docs-toc li {
  margin: 6px 0;
}

.docs-toc .toc-depth-3 {
  margin-left: 12px;
}

.docs-toc a {
  color: var(--docs-muted);
  font-size: 13px;
}

.docs-toc a:hover {
  color: var(--docs-text);
  text-decoration: none;
}

@media (max-width: 1100px) {
  .docs-layout {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .docs-toc {
    display: none;
  }
}

@media (max-width: 860px) {
  .docs-mobile-topbar {
    display: flex;
  }

  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(85vw, 320px);
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    z-index: 50;
  }

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

  .docs-content {
    padding: 22px 16px 52px;
  }
}
