:root {
  --docs-bg: #070b14;
  --docs-card: #0f1727;
  --docs-border: rgba(154, 170, 196, 0.2);
  --docs-text: #e8ecf7;
  --docs-muted: #a4afc3;
  --docs-accent: #7c5cff;
  --docs-accent-2: #00b3d9;
  --docs-surface: rgba(15, 23, 39, 0.74);
}

* {
  box-sizing: border-box;
}

.docs-body {
  margin: 0;
  font-family: "Sora", "Segoe UI", "Inter", "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(1200px 620px at -10% -20%, rgba(124, 92, 255, 0.26), transparent),
    radial-gradient(1100px 520px at 110% -5%, rgba(0, 179, 217, 0.14), transparent),
    var(--docs-bg);
  color: var(--docs-text);
}

.docs-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
}

.docs-sidebar {
  border-right: 1px solid var(--docs-border);
  background: rgba(6, 10, 22, 0.88);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 22px 16px;
}

.docs-sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand {
  display: inline-block;
  color: #fff;
  text-decoration: none;
  font-size: 1.16rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: 0.01em;
}

.docs-sidebar-close {
  display: none;
  width: 34px;
  height: 34px;
  border: 1px solid var(--docs-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: #eaf0ff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.lang-switch {
  display: flex;
  gap: 0;
  margin-bottom: 14px;
  border: 1px solid var(--docs-border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-right: 1px solid var(--docs-border);
  background: transparent;
  color: var(--docs-muted);
  padding: 8px 12px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  font-weight: 700;
  min-width: 62px;
  transition: background-color .18s ease, color .18s ease;
}

.lang-btn:last-child {
  border-right: 0;
}

.lang-btn:hover {
  color: #f2f5ff;
  background: rgba(124, 92, 255, 0.16);
}

.lang-btn.is-active {
  color: #fff;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.38), rgba(0, 179, 217, 0.24));
}

.lang-flag-img {
  width: 18px;
  height: 12px;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset;
  flex: 0 0 auto;
}

.docs-search {
  width: 100%;
  border: 1px solid var(--docs-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--docs-text);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 14px;
}

.docs-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.docs-sidebar nav a {
  color: var(--docs-muted);
  text-decoration: none;
  border-radius: 7px;
  padding: 8px 10px;
  font-size: 0.92rem;
}

.docs-sidebar nav a:hover {
  color: #fff;
  background: rgba(124, 92, 255, 0.18);
}

.docs-main {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 34px 28px 60px;
}

.docs-mobile-bar {
  display: none;
}

.docs-menu-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--docs-border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
}

.docs-mobile-brand {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.docs-overlay {
  display: none;
}

.docs-header h1 {
  margin: 0;
  font-size: 2.1rem;
  letter-spacing: -0.01em;
}

.docs-header p {
  margin: 10px 0 0;
  color: var(--docs-muted);
}

.doc-block {
  margin-top: 18px;
  padding: 22px;
  border: 1px solid var(--docs-border);
  border-radius: 14px;
  background: var(--docs-surface);
  box-shadow: 0 24px 40px -32px rgba(0, 0, 0, 0.65);
}

.doc-block h2 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.doc-block p,
.doc-block li {
  color: var(--docs-muted);
  line-height: 1.65;
}

.doc-block code {
  background: rgba(124, 92, 255, 0.18);
  color: #e4ddff;
  padding: 2px 6px;
  border-radius: 5px;
  font-family: "JetBrains Mono", "Consolas", "Monaco", monospace;
  font-size: 0.86em;
}

.doc-block pre {
  margin: 12px 0 0;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid rgba(124, 92, 255, 0.24);
  background: rgba(4, 9, 20, 0.92);
  overflow-x: auto;
}

.doc-block pre code {
  background: transparent;
  padding: 0;
}

.docs-shell-reference .docs-main {
  max-width: 860px;
}

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

  .docs-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: min(86vw, 320px);
    max-width: 320px;
    height: 100vh;
    z-index: 60;
    transform: translateX(-100%);
    transition: transform 0.24s ease;
    border-right: 1px solid var(--docs-border);
    border-top-right-radius: 14px;
    border-bottom-right-radius: 14px;
    padding: 16px 14px 18px;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45);
  }

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

  .docs-sidebar-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .docs-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(4, 7, 14, 0.66);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  body.docs-nav-open .docs-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .docs-mobile-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
  }

  .docs-sidebar nav {
    max-height: calc(100vh - 190px);
    overflow-y: auto;
    padding-right: 4px;
  }

  .docs-main {
    padding: 16px 14px 44px;
  }

  .doc-block {
    padding: 16px;
    border-radius: 12px;
  }

  .docs-header h1 {
    font-size: 1.58rem;
  }
}
