:root {
  --bg: #07090d;
  --surface: #0d131b;
  --surface-alt: #111a24;
  --line: rgba(223, 237, 255, 0.13);
  --text: #eef4ff;
  --text-muted: #a8b6ca;
  --accent: #4d96ff;
  --accent-dark: #3a7bd5;
  --good: #42d392;
  --warn: #ffd166;
  --code: #090d14;
  --radius: 14px;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.34);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: "Plus Jakarta Sans", "Segoe UI", "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
}

body {
  background:
    radial-gradient(1200px 540px at 100% -6%, rgba(77, 150, 255, 0.15), transparent 62%),
    radial-gradient(900px 460px at -10% 2%, rgba(66, 211, 146, 0.08), transparent 70%),
    var(--bg);
}

.docs-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: 100vh;
}

.docs-sidebar {
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #090f17 0%, #0f1825 52%, #0c141f 100%);
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
}

.docs-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.docs-brand__logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(222, 236, 255, 0.22), 0 0 16px rgba(77, 150, 255, 0.25);
}

.docs-brand__logo img {
  width: 100%;
  height: 100%;
}

.docs-brand strong {
  display: block;
  font-size: 1rem;
}

.docs-brand p {
  margin: 2px 0 0;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.docs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  font-size: 0.8rem;
  text-decoration: none;
  font-weight: 600;
}

.docs-btn--primary {
  background: rgba(77, 150, 255, 0.18);
  border-color: rgba(167, 211, 255, 0.44);
}

.docs-search {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
}

.docs-search span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.docs-search input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  padding: 0 12px;
  font-size: 0.9rem;
}

.docs-nav {
  display: grid;
  gap: 4px;
}

.docs-nav__group-title {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: 10px;
  margin-bottom: 4px;
  padding: 0 8px;
}

.docs-nav a {
  display: block;
  text-decoration: none;
  color: var(--text);
  font-size: 0.88rem;
  padding: 9px 10px;
  border-radius: 9px;
  border: 1px solid transparent;
}

.docs-nav a:hover {
  background: var(--surface);
  border-color: var(--line);
}

.docs-nav a.is-active {
  background: rgba(77, 150, 255, 0.16);
  border-color: rgba(169, 212, 255, 0.48);
  color: #d6e8ff;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(194, 224, 255, 0.2);
}

.docs-sidebar__meta {
  margin-top: 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.docs-sidebar__meta p {
  margin: 4px 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.docs-main-wrap {
  min-width: 0;
}

.docs-header {
  position: sticky;
  top: 0;
  z-index: 4;
  background: rgba(7, 9, 13, 0.86);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  padding: 20px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.docs-header__actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.docs-header h1 {
  margin: 0;
  font-size: clamp(1.25rem, 2.2vw, 1.9rem);
}

.docs-header p {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.docs-content {
  max-width: 1080px;
  padding: 30px;
  display: grid;
  gap: 20px;
}

.docs-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.docs-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 35%);
  pointer-events: none;
}

.docs-card h2, .docs-card h3 {
  margin-top: 0;
}

.docs-card p {
  margin: 0 0 12px;
  line-height: 1.6;
  color: #d6e1f2;
}

.docs-card h2 {
  margin-bottom: 10px;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
}

.docs-card h3 {
  margin-bottom: 10px;
  font-size: 1.02rem;
}

.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.docs-main-wrap {
  background:
    radial-gradient(920px 420px at 90% 0%, rgba(77, 150, 255, 0.08), transparent 62%),
    radial-gradient(700px 300px at 0% 12%, rgba(66, 211, 146, 0.06), transparent 68%);
}

.docs-header {
  padding: 26px 34px;
  align-items: end;
}

.docs-header h1 {
  letter-spacing: -0.02em;
}

.docs-header p {
  max-width: 760px;
  line-height: 1.55;
}

.docs-content {
  max-width: 1180px;
  padding: 38px 34px 54px;
  gap: 24px;
}

.docs-sidebar {
  padding: 24px 18px;
}

.docs-brand {
  margin-bottom: 24px;
}

.docs-brand__logo {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  box-shadow: none;
  background: rgba(255, 255, 255, 0.03);
}

.docs-search input,
.docs-btn,
.docs-nav a,
.docs-sidebar__meta {
  border-radius: 14px;
}

.docs-nav a {
  min-height: 40px;
  display: flex;
  align-items: center;
}

.docs-card {
  border-radius: 22px;
  padding: 24px;
}

.docs-card p,
.docs-list li,
.docs-kv span {
  font-size: 0.96rem;
  line-height: 1.72;
}

.docs-list {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 8px;
}

.docs-callout {
  background: linear-gradient(180deg, rgba(77, 150, 255, 0.13), rgba(77, 150, 255, 0.07));
}

.docs-callout--success {
  background: linear-gradient(180deg, rgba(66, 211, 146, 0.16), rgba(66, 211, 146, 0.08));
}

.docs-kv {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.docs-kv strong {
  font-size: 0.86rem;
}

.docs-card pre {
  overflow-x: auto;
  padding: 16px;
  border-radius: 16px;
  background: var(--code);
}

@media (max-width: 980px) {
  .docs-shell {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .docs-header {
    position: static;
    padding: 22px 20px;
    flex-direction: column;
    align-items: start;
  }

  .docs-content {
    padding: 24px 20px 34px;
  }
}

.docs-kv {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-alt);
  padding: 10px 12px;
}

.docs-kv strong {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.docs-list {
  margin: 0;
  padding-left: 18px;
  line-height: 1.7;
  color: #d6e1f2;
}

pre {
  margin: 0;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid #223146;
  background: linear-gradient(180deg, #0a1018, #080d14);
  color: #e2e8f0;
  padding: 14px;
  font-size: 0.83rem;
  line-height: 1.5;
}

code {
  font-family: "Cascadia Code", Consolas, monospace;
}

.docs-callout {
  border-left: 4px solid var(--accent);
  background: rgba(77, 150, 255, 0.12);
  border-radius: 8px;
  padding: 10px 12px;
  color: #d4e7ff;
  box-shadow: inset 0 0 0 1px rgba(200, 227, 255, 0.12);
}

.docs-callout--success {
  border-left-color: var(--good);
  background: rgba(66, 211, 146, 0.12);
  color: #d2ffe9;
}

.docs-callout--warn {
  border-left-color: var(--warn);
  background: rgba(255, 209, 102, 0.12);
  color: #fff0cc;
}

.docs-download {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--surface-alt);
}

.docs-download__meta {
  display: grid;
  gap: 2px;
}

.docs-download__meta strong {
  font-size: 0.9rem;
}

.docs-download__meta span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.docs-download a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid rgba(169, 212, 255, 0.48);
  color: #def0ff;
  background: rgba(77, 150, 255, 0.18);
  font-size: 0.82rem;
  font-weight: 600;
}

.docs-card .docs-grid .docs-kv {
  transition: border-color 220ms ease, transform 220ms ease, background 220ms ease;
}

.docs-card .docs-grid .docs-kv:hover {
  transform: translateY(-2px);
  border-color: rgba(173, 215, 255, 0.5);
  background: rgba(77, 150, 255, 0.12);
}

.docs-content > .docs-card {
  animation: docsFadeUp 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes docsFadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  .docs-shell {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .docs-content,
  .docs-header {
    padding: 18px;
  }

  .docs-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
