:root {
  --bg: #09090b;
  --bg-card: #18181b;
  --bg-card-hover: #1f1f23;
  --border: #27272a;
  --border-active: #10b981;
  --text: #fafafa;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;
  --accent: #10b981;
  --accent-dim: #065f46;
  --accent-glow: rgba(16,185,129,0.15);
  --red: #ef4444;
  --yellow: #eab308;
  --blue: #3b82f6;
  --purple: #a855f7;
  --orange: #f97316;
  --cyan: #06b6d4;
  --pink: #ec4899;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --sidebar-w: 260px;
  --max-w: 900px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 15px;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  overflow-y: auto;
  z-index: 100;
}
.sidebar-logo {
  padding: 0 20px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.sidebar-logo h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
}
.sidebar-logo p {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}
.sidebar-section {
  padding: 8px 12px 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-dim);
}
.sidebar a {
  display: block;
  padding: 6px 20px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  transition: all 0.15s;
  border-left: 2px solid transparent;
}
.sidebar a:hover {
  color: var(--text);
  background: var(--bg-card-hover);
}
.sidebar a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--accent-glow);
}
.sidebar .badge {
  display: inline-block;
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--accent-dim);
  color: var(--accent);
  margin-left: 6px;
  vertical-align: middle;
}

/* Main */
.main {
  margin-left: var(--sidebar-w);
  padding: 40px 48px;
  max-width: calc(var(--max-w) + 96px);
}

/* Hero */
.hero {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.hero h1 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--accent), #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero .subtitle {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 640px;
}
.hero .stats {
  display: flex;
  gap: 24px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.hero .stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  min-width: 120px;
}
.hero .stat .num {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
}
.hero .stat .label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Sections */
h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 24px 0 8px;
  color: var(--text);
}
h4 {
  font-size: 14px;
  font-weight: 600;
  margin: 16px 0 6px;
  color: var(--text-muted);
}
p { margin-bottom: 12px; color: var(--text-muted); }
a { color: var(--accent); }

/* Code */
code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--bg-card);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
}
pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
  margin: 12px 0;
}
pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  line-height: 1.6;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 13px;
}
th, td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
th {
  background: var(--bg-card);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  position: sticky;
  top: 0;
}
td { color: var(--text-muted); }
tr:hover td { background: var(--bg-card-hover); }

/* Method badges */
.method {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: var(--font-mono);
  min-width: 52px;
  text-align: center;
}
.method-get { background: #065f46; color: #10b981; }
.method-post { background: #1e3a5f; color: #3b82f6; }
.method-put { background: #713f12; color: #eab308; }
.method-delete { background: #7f1d1d; color: #ef4444; }
.method-patch { background: #4c1d95; color: #a855f7; }

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  transition: border-color 0.2s;
}
.card:hover { border-color: var(--accent); }
.card .card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.card .card-desc {
  font-size: 12px;
  color: var(--text-dim);
}
.card .card-count {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
}

/* Tags */
.tag {
  display: inline-block;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  margin: 2px;
  font-weight: 500;
}
.tag-green { background: #065f46; color: #10b981; }
.tag-blue { background: #1e3a5f; color: #3b82f6; }
.tag-yellow { background: #713f12; color: #eab308; }
.tag-red { background: #7f1d1d; color: #ef4444; }
.tag-purple { background: #4c1d95; color: #a855f7; }
.tag-cyan { background: #164e63; color: #06b6d4; }
.tag-orange { background: #7c2d12; color: #f97316; }

/* Endpoint list */
.endpoint {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.endpoint:last-child { border-bottom: none; }
.endpoint .path {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  flex: 1;
}
.endpoint .desc {
  font-size: 12px;
  color: var(--text-dim);
  max-width: 300px;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* Responsive */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main { margin-left: 0; padding: 20px; }
  .hero h1 { font-size: 24px; }
  .hero .stats { flex-direction: column; }
  .card-grid { grid-template-columns: 1fr; }
}
