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

:root {
  --bg:        #040c18;
  --surface:   #08152a;
  --surface2:  #0c1d38;
  --surface3:  #102240;
  --border:    rgba(59,130,246,.1);
  --border2:   rgba(59,130,246,.2);
  --accent:    #3b82f6;
  --accent2:   #6366f1;
  --text:      #ddeeff;
  --text-muted:#4d7090;
  --text-dim:  #7ba3c4;
  --success:   #10b981;
  --danger:    #ef4444;
  --warning:   #f59e0b;
  --get:       #3b82f6;
  --post:      #10b981;
  --del:       #ef4444;
  --sidebar-w: 230px;
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px; line-height: 1.6;
}
body::before {
  content: '';
  position: fixed; inset: 0;
  background: radial-gradient(ellipse 60% 40% at 50% -5%, rgba(59,130,246,.09) 0%, transparent 60%);
  pointer-events: none; z-index: 0;
}
code {
  font-family: 'JetBrains Mono', monospace;
  background: rgba(59,130,246,.1); border: 1px solid rgba(59,130,246,.15);
  padding: 2px 6px; border-radius: 5px; font-size: .88em; color: #93c5fd;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Nav ── */
.docs-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(4,12,24,.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
}
.docs-nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1280px; margin: 0 auto; padding: 13px 24px;
}
.docs-logo {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 15px; color: var(--text); text-decoration: none;
}
.docs-logo-icon {
  width: 30px; height: 30px;
  background: linear-gradient(135deg,#3b82f6,#8b5cf6);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.docs-logo-sep { color: var(--text-muted); margin: 0 2px; }
.docs-logo-sub { color: var(--text-muted); font-weight: 400; }
.docs-nav-right { display: flex; align-items: center; gap: 14px; }
.docs-nav-link { color: var(--text-dim); font-size: 13px; text-decoration: none; transition: color .15s; }
.docs-nav-link:hover { color: var(--text); }
.docs-nav-cta {
  background: linear-gradient(135deg,var(--accent),var(--accent2));
  color: #fff; padding: 7px 16px; border-radius: 8px;
  font-size: 13px; font-weight: 600; text-decoration: none; transition: all .15s;
  box-shadow: 0 2px 10px rgba(59,130,246,.3);
}
.docs-nav-cta:hover { filter: brightness(1.1); }

/* ── Layout ── */
.docs-layout {
  display: flex; max-width: 1280px; margin: 0 auto;
  position: relative; z-index: 1;
}

/* ── Sidebar ── */
.docs-sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  position: sticky; top: 53px; height: calc(100vh - 53px);
  overflow-y: auto; padding: 28px 16px;
  border-right: 1px solid var(--border);
  scrollbar-width: thin; scrollbar-color: var(--surface3) transparent;
}
.docs-sidebar-section { margin-bottom: 24px; }
.docs-sidebar-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--text-muted); font-weight: 600; padding: 0 8px; margin-bottom: 6px;
}
.docs-sidebar-link {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 8px; border-radius: 7px; font-size: 13px;
  color: var(--text-dim); text-decoration: none; transition: all .12s;
  margin-bottom: 1px;
}
.docs-sidebar-link:hover { background: var(--surface3); color: var(--text); }
.docs-sidebar-link.active { background: rgba(59,130,246,.1); color: var(--accent); }

/* ── Content ── */
.docs-content {
  flex: 1; padding: 40px 52px; min-width: 0; max-width: 860px;
}

.docs-h1 { font-size: 2rem; font-weight: 800; letter-spacing: -.5px; margin-bottom: 14px; }
.docs-h2 { font-size: 1.3rem; font-weight: 700; letter-spacing: -.2px; margin-bottom: 16px; }
.docs-lead { font-size: 16px; color: var(--text-dim); line-height: 1.75; margin-bottom: 28px; }
.docs-section { margin-bottom: 56px; }
.docs-section p { color: var(--text-dim); margin-bottom: 16px; line-height: 1.7; }
.docs-divider { border: none; border-top: 1px solid var(--border); margin: 48px 0 40px; }

/* ── Info cards ── */
.docs-info-cards { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.docs-info-card {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--surface2); border: 1px solid var(--border2);
  border-radius: 12px; padding: 14px 18px; flex: 1; min-width: 200px;
}
.docs-info-icon { font-size: 22px; flex-shrink: 0; }
.docs-info-title { font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.docs-info-desc { font-size: 12px; color: var(--text-muted); }

/* ── Endpoint section ── */
.endpoint-section { border: 1px solid var(--border); border-radius: 14px; padding: 24px; }
.endpoint-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.endpoint-path { font-family: 'JetBrains Mono', monospace; font-size: 16px; font-weight: 600; }

/* ── Badges ── */
.badge {
  font-size: 10px; font-weight: 700; letter-spacing: .5px;
  padding: 2px 6px; border-radius: 5px; flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
}
.badge.lg { font-size: 12px; padding: 4px 10px; border-radius: 7px; }
.badge-get  { background: rgba(59,130,246,.15);  color: #93c5fd; border: 1px solid rgba(59,130,246,.25); }
.badge-post { background: rgba(16,185,129,.15);  color: #6ee7b7; border: 1px solid rgba(16,185,129,.25); }
.badge-del  { background: rgba(239,68,68,.15);   color: #fca5a5; border: 1px solid rgba(239,68,68,.25); }

/* ── Code blocks ── */
.code-block { margin-bottom: 16px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.code-block-header {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--surface3); padding: 8px 14px;
  font-size: 11px; color: var(--text-muted); border-bottom: 1px solid var(--border);
}
.code-block pre {
  background: var(--surface); padding: 16px;
  font-family: 'JetBrains Mono', monospace; font-size: 12.5px;
  color: #c4d5f0; line-height: 1.7; overflow-x: auto;
  white-space: pre; tab-size: 2;
}
.copy-btn {
  background: rgba(59,130,246,.12); border: 1px solid rgba(59,130,246,.2);
  color: var(--accent); border-radius: 5px; padding: 2px 10px;
  font-size: 11px; font-family: inherit; cursor: pointer; transition: all .15s;
}
.copy-btn:hover { background: rgba(59,130,246,.2); }

/* ── Tables ── */
.docs-table {
  width: 100%; border-collapse: collapse;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden; margin-bottom: 16px; font-size: 13px;
}
.docs-table th {
  background: var(--surface2); color: var(--text-muted);
  padding: 10px 14px; text-align: left; font-weight: 600; font-size: 12px;
  border-bottom: 1px solid var(--border);
}
.docs-table td { padding: 10px 14px; border-bottom: 1px solid rgba(59,130,246,.05); color: var(--text-dim); }
.docs-table tr:last-child td { border-bottom: none; }

/* ── Status badges ── */
.status-badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 5px; font-family: monospace; }
.s200,.s201 { background: rgba(16,185,129,.15); color: #6ee7b7; }
.s400 { background: rgba(245,158,11,.15); color: #fcd34d; }
.s401 { background: rgba(239,68,68,.15);  color: #fca5a5; }
.s403 { background: rgba(239,68,68,.15);  color: #fca5a5; }
.s404 { background: rgba(107,114,128,.15);color: #9ca3af; }
.s429 { background: rgba(245,158,11,.15); color: #fcd34d; }
.s500 { background: rgba(239,68,68,.15);  color: #fca5a5; }

/* ── Params table ── */
.params-table { margin-bottom: 16px; }
.params-title { font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .5px; }
.docs-link { color: var(--accent); }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 99px; }

@media (max-width: 768px) {
  .docs-sidebar { display: none; }
  .docs-content { padding: 24px 16px; }
  .docs-info-cards { flex-direction: column; }
}
