:root {
  --primary: #3B82F6;
  --primary-dark: #2563EB;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --code-bg: #f1f5f9;
}

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

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

/* Sidebar */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 260px;
  background: var(--card);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 10;
}

.sidebar-logo {
  padding: 0 24px 20px;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.sidebar-logo small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 2px;
}

.sidebar nav a {
  display: block;
  padding: 8px 24px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.15s;
}

.sidebar nav a:hover,
.sidebar nav a.active {
  color: var(--primary);
  background: #eff6ff;
}

.sidebar nav a.active {
  font-weight: 600;
  border-right: 3px solid var(--primary);
}

.sidebar nav .section-title {
  padding: 16px 24px 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

/* Main */
.main {
  flex: 1;
  margin-left: 260px;
  padding: 40px;
  max-width: 960px;
  margin-right: auto;
}

/* Content */
.content h1 { font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.content h2 { font-size: 22px; font-weight: 600; margin: 32px 0 12px; padding-top: 20px; border-top: 1px solid var(--border); }
.content h3 { font-size: 17px; font-weight: 600; margin: 24px 0 8px; }
.content p { margin-bottom: 12px; color: var(--text); }
.content ul, .content ol { margin: 8px 0 16px 24px; }
.content li { margin-bottom: 4px; }
.content a { color: var(--primary); text-decoration: none; }
.content a:hover { text-decoration: underline; }

.content table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 20px;
  font-size: 14px;
}

.content th, .content td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  text-align: left;
}

.content th {
  background: var(--code-bg);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}

.content code {
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  font-family: 'SF Mono', Monaco, monospace;
}

.content pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 16px 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 12px 0 20px;
  font-size: 13px;
  line-height: 1.5;
}

.content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* Hero card */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 40px;
  border-radius: 16px;
  margin-bottom: 32px;
}

.hero h1 { color: white; font-size: 32px; margin-bottom: 8px; }
.hero p { color: rgba(255,255,255,0.85); font-size: 16px; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  margin-right: 6px;
  margin-bottom: 6px;
}

.badge-blue { background: rgba(255,255,255,0.2); color: white; }

/* Feature grid */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

.feature-card h3 {
  font-size: 15px;
  margin: 0 0 6px;
  border: none;
  padding: 0;
}

.feature-card p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

.feature-icon {
  font-size: 24px;
  margin-bottom: 8px;
}

/* Method badges */
.method {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  font-family: monospace;
  color: white;
}

.method-get { background: #22c55e; }
.method-post { background: #3b82f6; }
.method-put { background: #f59e0b; }
.method-delete { background: #ef4444; }

/* Mobile */
.menu-toggle {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 20;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 20px;
  cursor: pointer;
}

@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .sidebar { transform: translateX(-100%); transition: transform 0.3s; }
  .sidebar.open { transform: translateX(0); box-shadow: 4px 0 20px rgba(0,0,0,0.1); }
  .main { margin-left: 0; padding: 60px 20px 40px; }
  .features { grid-template-columns: 1fr; }
  .content table { font-size: 12px; }
  .content th, .content td { padding: 6px 8px; }
}
