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

:root {
  --sidebar-width: 260px;
  --bg: #ffffff;
  --bg-alt: #f8f9fa;
  --sidebar-bg: #1e1e2e;
  --sidebar-text: #cdd6f4;
  --sidebar-active: #89b4fa;
  --text: #1e1e2e;
  --text-muted: #6c757d;
  --border: #dee2e6;
  --code-bg: #1e1e2e;
  --code-text: #cdd6f4;
  --get: #22c55e;
  --post: #3b82f6;
  --delete: #ef4444;
  --put: #f59e0b;
  --patch: #a855f7;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  overflow-y: auto;
  padding: 24px 0;
  z-index: 100;
}

.sidebar-logo {
  padding: 0 20px 24px;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 16px;
}

.sidebar-logo span {
  color: var(--sidebar-active);
}

.sidebar-section {
  padding: 8px 20px 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,0.4);
  font-weight: 600;
}

.sidebar a {
  display: block;
  padding: 6px 20px 6px 28px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.15s;
}

.sidebar a:hover,
.sidebar a.active {
  color: var(--sidebar-active);
  background: rgba(137, 180, 250, 0.08);
}

/* Main Content */
.main {
  margin-left: var(--sidebar-width);
  padding: 40px 48px 80px;
  max-width: 900px;
}

h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
}

h1 + p {
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 40px;
}

h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 48px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}

h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 32px 0 12px;
}

/* Endpoint */
.endpoint {
  margin: 24px 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.endpoint-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.endpoint-header:hover {
  background: #f0f1f3;
}

.method {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  min-width: 60px;
  text-align: center;
}

.method-get { background: var(--get); }
.method-post { background: var(--post); }
.method-delete { background: var(--delete); }
.method-put { background: var(--put); }
.method-patch { background: var(--patch); }

.endpoint-path {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 14px;
  font-weight: 600;
}

.endpoint-desc {
  margin-left: auto;
  font-size: 13px;
  color: var(--text-muted);
}

.endpoint-body {
  padding: 16px;
  display: none;
}

.endpoint-body.open {
  display: block;
}

.auth-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: #fef3c7;
  color: #92400e;
  margin-bottom: 12px;
}

.auth-badge.admin {
  background: #fee2e2;
  color: #991b1b;
}

.auth-badge.public {
  background: #d1fae5;
  color: #065f46;
}

/* Code blocks */
pre {
  background: var(--code-bg);
  color: var(--code-text);
  border-radius: 6px;
  padding: 16px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.5;
  margin: 8px 0 16px;
}

code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px;
}

p code {
  background: var(--bg-alt);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}

/* Labels */
.label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin: 16px 0 4px;
}

.label:first-child {
  margin-top: 0;
}

/* Params table */
.params-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 8px 0 16px;
}

.params-table th {
  text-align: left;
  padding: 8px 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.params-table td {
  padding: 8px 12px;
  border: 1px solid var(--border);
  vertical-align: top;
}

.required {
  color: var(--delete);
  font-size: 11px;
  font-weight: 600;
}

.optional {
  color: var(--text-muted);
  font-size: 11px;
}

/* Error list */
.error-list {
  margin: 8px 0 16px;
  list-style: none;
}

.error-list li {
  padding: 4px 0;
  font-size: 14px;
}

.error-list .status-code {
  display: inline-block;
  min-width: 36px;
  font-weight: 700;
  font-family: monospace;
}

/* Base URL */
.base-url {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 32px;
}

.base-url code {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 4px 8px;
  border-radius: 4px;
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar {
    display: none;
  }
  .main {
    margin-left: 0;
    padding: 24px 16px;
  }
}
