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

:root {
  --primary: #3b82f6;
  --primary-dark: #1e40af;
  --primary-light: #dbeafe;
  --bg: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --text: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-tertiary: #94a3b8;
  --border: #475569;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --code-bg: #1a1f2e;
}

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

html {
  scroll-behavior: smooth;
}

.container {
  display: flex;
  height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 2rem 0;
  position: fixed;
  height: 100vh;
  z-index: 1000;
}

.sidebar-content {
  padding: 0 1.5rem;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo svg {
  width: 24px;
  height: 24px;
}

.nav-section {
  margin-bottom: 2rem;
}

.nav-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-tertiary);
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.nav-link {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  transition: all 0.2s;
  border-left: 3px solid transparent;
  margin-bottom: 0.25rem;
}

.nav-link:hover {
  background-color: var(--bg-tertiary);
  color: var(--text);
}

.nav-link.active {
  background-color: var(--primary-light);
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 600;
}

/* Main Content */
.main {
  margin-left: 280px;
  flex: 1;
  overflow-y: auto;
  background-color: var(--bg);
}

.content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

/* Header */
.header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 4rem 2rem;
  margin-bottom: 3rem;
  border-radius: 1rem;
}

.header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: white;
}

.header p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
}

.header-meta {
  display: flex;
  gap: 2rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
}

/* Sections */
.section {
  margin-bottom: 3rem;
  display: none;
}

.section.active {
  display: block;
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

h2 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  color: var(--primary);
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border);
}

h3 {
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--text);
}

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

ul, ol {
  margin: 1rem 0 1rem 2rem;
  color: var(--text-secondary);
}

li {
  margin-bottom: 0.5rem;
}

/* Code */
code {
  background-color: var(--code-bg);
  color: #a1e8ff;
  padding: 0.2em 0.4em;
  border-radius: 0.3rem;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.9em;
}

pre {
  background-color: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  position: relative;
}

pre code {
  background: none;
  color: #e2e8f0;
  padding: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background-color: var(--bg-tertiary);
  border-radius: 0.5rem 0.5rem 0 0;
  margin: 1.5rem 0 0 0;
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

.copy-btn {
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 0.3rem;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.copy-btn:hover {
  background-color: var(--primary-dark);
}

.copy-btn.copied {
  background-color: var(--success);
}

/* Response Examples */
.endpoint-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.endpoint-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.method-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 36px;
  border-radius: 0.5rem;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.method-get {
  background-color: rgba(16, 185, 129, 0.2);
  color: var(--success);
}

.method-post {
  background-color: rgba(59, 130, 246, 0.2);
  color: var(--primary);
}

.method-put {
  background-color: rgba(245, 158, 11, 0.2);
  color: var(--warning);
}

.method-delete {
  background-color: rgba(239, 68, 68, 0.2);
  color: var(--error);
}

.endpoint-path {
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 1rem;
  color: var(--text);
  flex: 1;
  min-width: 300px;
}

.param-section {
  margin: 1.5rem 0;
}

.param-section-title {
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.param-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

.param-table th {
  background-color: var(--bg-tertiary);
  padding: 0.75rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.85rem;
  border: 1px solid var(--border);
}

.param-table td {
  padding: 0.75rem;
  border: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.param-name {
  font-family: monospace;
  color: var(--primary-light);
  font-weight: 600;
}

.param-type {
  background-color: rgba(59, 130, 246, 0.1);
  color: var(--primary);
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.param-required {
  color: var(--error);
  font-weight: 700;
}

/* Example Tabs */
.tabs {
  display: flex;
  gap: 0.5rem;
  margin: 1.5rem 0 0.5rem 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.tab {
  padding: 0.75rem 1.5rem;
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.tab:hover {
  color: var(--text);
}

.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Status Badge */
.status-badge {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border-radius: 0.25rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-success {
  background-color: rgba(16, 185, 129, 0.2);
  color: var(--success);
}

.status-error {
  background-color: rgba(239, 68, 68, 0.2);
  color: var(--error);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border);
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar {
    width: 250px;
  }

  .main {
    margin-left: 250px;
  }

  .content {
    padding: 2rem 1rem;
  }

  .header {
    padding: 2rem 1rem;
  }

  .header h1 {
    font-size: 1.75rem;
  }

  .header-meta {
    flex-direction: column;
    gap: 1rem;
  }
}

@media (max-width: 640px) {
  .sidebar {
    width: 200px;
    padding: 1rem 0;
  }

  .main {
    margin-left: 200px;
  }

  .content {
    padding: 1.5rem 0.75rem;
  }

  .header h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.4rem;
  }

  .endpoint-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .method-badge {
    width: 50px;
    height: 32px;
    font-size: 0.75rem;
  }
}