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

:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-light: #60a5fa;
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --green: #22c55e;
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --sidebar-width: 280px;
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--white);
  color: var(--gray-800);
  line-height: 1.6;
  display: flex;
  min-height: 100vh;
}

/* ─── SIDEBAR ─── */
.docs-sidebar {
  width: var(--sidebar-width);
  background: var(--gray-900);
  color: #fff;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
  display: flex;
  flex-direction: column;
}
.docs-sidebar::-webkit-scrollbar { width: 4px; }
.docs-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-weight: 800;
  font-size: 1.2rem;
  justify-content: space-between;
}
.sidebar-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-direction: column;
  gap: 5px;
}
.sidebar-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s;
}
.sidebar-overlay {
  display: none;
}
.sidebar-header a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
}
.sidebar-cube {
  width: 48px;
  height: 48px;
}

.sidebar-title {
  padding: 20px 20px 12px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray-400);
}

.sidebar-nav { padding: 0 0 24px; }

.nav-group {
  padding: 4px 0;
}
.nav-group-title {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-400);
  padding: 12px 20px 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--gray-300);
  text-decoration: none;
  transition: all 0.2s;
  border-left: 2px solid transparent;
}
.nav-item:hover {
  background: rgba(255,255,255,0.04);
  color: #fff;
}
.nav-item.active {
  background: rgba(37,99,235,0.1);
  border-left-color: var(--blue);
  color: #fff;
}
.nav-item .method {
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  min-width: 36px;
  text-align: center;
  flex-shrink: 0;
}
.nav-item .method.post { background: rgba(34,197,94,0.15); color: #4ade80; }
.nav-item .method.get { background: rgba(59,130,246,0.15); color: #60a5fa; }
.nav-item .method.put { background: rgba(251,146,60,0.15); color: #fb923c; }
.nav-item .path {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── MAIN ─── */
.docs-main {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 48px 56px;
  max-width: 900px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--gray-400);
  margin-bottom: 32px;
}
.breadcrumb a {
  color: var(--blue);
  text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }

.endpoint-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}
.endpoint-method {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  border-radius: 6px;
  background: rgba(34,197,94,0.12);
  color: var(--green);
}
.endpoint-path {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gray-800);
}

.endpoint-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 16px;
}

.endpoint-desc {
  font-size: 1rem;
  color: var(--gray-500);
  line-height: 1.8;
  margin-bottom: 40px;
  max-width: 650px;
}

/* ─── SECTION BLOCKS ─── */
.doc-section {
  margin-bottom: 48px;
}
.doc-section h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gray-200);
}

.param-table {
  width: 100%;
  border-collapse: collapse;
}
.param-table th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-400);
  padding: 8px 16px 8px 0;
  border-bottom: 1px solid var(--gray-200);
}
.param-table td {
  padding: 12px 16px 12px 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.9rem;
  vertical-align: top;
}
.param-table .p-name {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  color: var(--gray-800);
  white-space: nowrap;
}
.param-table .p-type {
  font-size: 0.8rem;
  color: var(--blue);
  font-weight: 500;
}
.param-table .p-req {
  font-size: 0.7rem;
  font-weight: 600;
  color: #ef4444;
}
.param-table .p-opt {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--gray-400);
}
.param-table .p-desc {
  color: var(--gray-500);
  font-size: 0.85rem;
}

/* ─── CODE BLOCKS ─── */
.code-block {
  background: var(--gray-900);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
}
.code-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.code-tab {
  padding: 10px 18px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray-400);
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
}
.code-tab:hover { color: #fff; }
.code-tab.active {
  color: #fff;
  border-bottom-color: var(--blue);
}
.code-body {
  padding: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  line-height: 1.8;
  color: var(--gray-300);
  overflow-x: auto;
  white-space: pre;
}
.code-body .hl-k { color: #c084fc; }
.code-body .hl-s { color: #4ade80; }
.code-body .hl-n { color: #f472b6; }
.code-body .hl-c { color: var(--gray-500); }
.code-body .hl-b { color: #fbbf24; }

/* ─── RESPONSES ─── */
.response-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 12px;
}
.response-card .status {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 10px;
}
.response-card .status.success {
  background: rgba(34,197,94,0.1);
  color: #16a34a;
}
.response-card .status.error {
  background: rgba(239,68,68,0.1);
  color: #dc2626;
}
.response-card h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.response-card p {
  font-size: 0.85rem;
  color: var(--gray-500);
}

/* ─── BACK BUTTON ─── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
  margin-bottom: 32px;
}
.back-link:hover { text-decoration: underline; }

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .sidebar-hamburger {
    display: flex;
  }
  .docs-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  .docs-sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
  }
  .sidebar-overlay.open {
    display: block;
  }
  .docs-main {
    margin-left: 0;
    padding: 32px 20px;
  }
  .endpoint-title { font-size: 1.5rem; }
  .param-table { display: block; overflow-x: auto; }
}
