:root {
  --bg: #05060d;
  --sidebar: rgba(8, 10, 22, 0.95);
  --glass: rgba(12, 16, 32, 0.72);
  --glass-border: rgba(255, 255, 255, 0.09);
  --text: #eef2ff;
  --muted: #8b93b8;
  --neon-cyan: #00f0ff;
  --neon-purple: #a855f7;
  --neon-pink: #ff2d95;
  --ok: #34d399;
  --bad: #f87171;
  --req: #fb7185;
  --radius: 14px;
  --sidebar-w: 220px;
}

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

body {
  font-family: 'Unbounded', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.55;
}

.ambient { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.4; }
.orb-1 { width: 420px; height: 420px; background: radial-gradient(circle, var(--neon-purple), transparent 70%); top: -120px; left: -80px; }
.orb-2 { width: 360px; height: 360px; background: radial-gradient(circle, var(--neon-cyan), transparent 70%); bottom: -100px; right: -60px; }

.api-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

.api-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 1.25rem 0.85rem;
  border-right: 1px solid var(--glass-border);
  background: var(--sidebar);
  overflow-y: auto;
}

.api-brand {
  font-size: 0.82rem;
  margin-bottom: 0.35rem;
}

.api-brand-sub {
  font-size: 0.62rem;
  color: var(--muted);
  margin-bottom: 1.1rem;
}

.api-nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.api-nav a {
  display: block;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.68rem;
  transition: background 0.15s, color 0.15s;
}

.api-nav a:hover,
.api-nav a.active {
  color: var(--text);
  background: rgba(0, 240, 255, 0.08);
}

.api-main {
  padding: 1.5rem 1.75rem 3rem;
  max-width: 900px;
}

.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(18px);
}

.api-hero {
  padding: 1.35rem 1.25rem;
  margin-bottom: 1rem;
}

.api-hero-top {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.api-badge,
.api-status {
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
}

.api-status.on { color: var(--ok); border-color: rgba(52, 211, 153, 0.35); background: rgba(52, 211, 153, 0.08); }
.api-status.off { color: var(--bad); border-color: rgba(248, 113, 113, 0.35); background: rgba(248, 113, 113, 0.08); }

.api-hero h1 { font-size: clamp(1.2rem, 3vw, 1.65rem); margin-bottom: 0.4rem; }
.api-lead { color: var(--muted); font-size: 0.76rem; max-width: 58ch; }

.api-links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.9rem;
}

.api-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  text-decoration: none;
  font-size: 0.68rem;
}

.api-chip.mono { font-family: 'IBM Plex Mono', monospace; }

.api-section {
  padding: 1.1rem 1.2rem;
  margin-bottom: 0.85rem;
  scroll-margin-top: 1rem;
}

.api-section h2 {
  font-size: 0.9rem;
  margin-bottom: 0.65rem;
}

.api-note {
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 0.65rem;
}

.api-note a { color: var(--neon-cyan); }

.api-endpoint-bar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.method {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.22rem 0.5rem;
  border-radius: 6px;
}

.method.get { color: #93c5fd; background: rgba(147, 197, 253, 0.12); }
.method.post { color: #86efac; background: rgba(134, 239, 172, 0.12); }

.api-path {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  color: var(--neon-cyan);
}

.api-params {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0 0.85rem;
  font-size: 0.7rem;
}

.api-params th,
.api-params td {
  text-align: left;
  padding: 0.5rem 0.55rem;
  border-bottom: 1px solid var(--glass-border);
  vertical-align: top;
}

.api-params th { color: var(--muted); font-weight: 500; }

.api-params code {
  font-family: 'IBM Plex Mono', monospace;
  color: var(--neon-cyan);
}

.req-badge {
  display: inline-block;
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.4rem;
  border-radius: 5px;
  background: rgba(251, 113, 133, 0.15);
  color: var(--req);
  border: 1px solid rgba(251, 113, 133, 0.35);
}

.opt-badge {
  display: inline-block;
  font-size: 0.58rem;
  text-transform: uppercase;
  padding: 0.15rem 0.4rem;
  border-radius: 5px;
  background: rgba(139, 147, 184, 0.12);
  color: var(--muted);
  border: 1px solid var(--glass-border);
}

.api-params tr.required td:first-child code {
  color: var(--req);
}

.api-flow {
  display: grid;
  gap: 0.45rem;
  margin: 0.75rem 0;
}

.api-flow-step {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  font-size: 0.7rem;
  color: var(--muted);
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.15);
}

.api-flow-step strong { color: var(--text); }
.api-flow-step span.num {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.58rem;
  color: var(--neon-cyan);
  border: 1px solid rgba(0, 240, 255, 0.35);
}

.api-subtitle {
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0.85rem 0 0.4rem;
}

.api-code-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.api-code-tab {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  padding: 0.35rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.2);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}

.api-code-tab:hover { color: var(--text); border-color: rgba(0, 240, 255, 0.3); }
.api-code-tab.active {
  color: var(--neon-cyan);
  border-color: rgba(0, 240, 255, 0.45);
  background: rgba(0, 240, 255, 0.08);
}

.api-code-panel { display: none; }
.api-code-panel.active { display: block; }

.api-code {
  margin: 0;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--glass-border);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  line-height: 1.55;
  overflow-x: auto;
  white-space: pre;
}

.api-code .hl-key { color: #f472b6; }
.api-code .hl-str { color: #86efac; }
.api-code .hl-num { color: #fcd34d; }

.api-errors {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.72rem;
  color: var(--muted);
}

.api-errors li {
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.15);
}

.api-errors code {
  font-family: 'IBM Plex Mono', monospace;
  color: var(--bad);
}

.api-footer {
  text-align: center;
  padding: 1rem 0;
  font-size: 0.72rem;
  color: var(--muted);
}

.api-footer a { color: var(--neon-cyan); text-decoration: none; }

@media (max-width: 800px) {
  .api-layout { grid-template-columns: 1fr; }
  .api-sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--glass-border);
  }
  .api-nav { flex-direction: row; flex-wrap: wrap; }
  .api-main { padding: 1rem; }
}
