:root {
    --primary-color: #C9972B;
    --primary-dark: #A87A1F;
    --primary-light: #E8B84B;
    --primary-subtle: rgba(201, 151, 43, 0.08);
    --secondary-color: #C9972B;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;

    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --bg-tertiary: #f4f4f5;
    --bg-code: #18181b;

    --text-primary: #09090b;
    --text-secondary: #71717a;
    --text-tertiary: #a1a1aa;

    --border-color: #e4e4e7;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px -4px rgba(0, 0, 0, 0.1);

    --sidebar-width: 260px;
    --header-height: 70px;

    --transition-fast: 120ms ease;
    --transition-base: 220ms ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-primary);
    background: var(--bg-secondary);
    overflow-x: hidden;
}

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

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    z-index: 100;
    transition: transform var(--transition-base);
}

.sidebar-header {
    padding: 1.75rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 2px;
    flex-shrink: 0;
}

.version {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-weight: 500;
    letter-spacing: 0.02em;
    margin-left: 1.25rem;
}

.nav-menu {
    padding: 1rem 0 2rem;
}

.nav-section {
    padding: 1.25rem 1.25rem 0.375rem;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
}

.nav-item {
    display: block;
    padding: 0.5rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 450;
    transition: all var(--transition-fast);
    border-radius: 0;
    margin: 0 0.5rem;
    border-radius: 6px;
}

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

.nav-item.active {
    background: var(--primary-subtle);
    color: var(--primary-dark);
    font-weight: 550;
}

/* Main Content */
.content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 3rem 3.5rem;
    max-width: 900px;
}

.section {
    margin-bottom: 4rem;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

h2 {
    font-size: 1.5rem;
    font-weight: 650;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    letter-spacing: -0.02em;
}

h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 1.5rem;
    margin-bottom: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.75rem;
}

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

.lead {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.65;
}

/* Info Card */
.info-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    box-shadow: var(--shadow-sm);
}

.info-card h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
    font-weight: 600;
}

/* Code Blocks */
.code-block {
    background: var(--bg-code);
    border-radius: 10px;
    overflow: hidden;
    margin: 1.25rem 0;
    box-shadow: var(--shadow-md);
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 1.125rem;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.code-header span {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.copy-btn {
    background: transparent;
    color: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0.3rem 0.75rem;
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.copy-btn:hover {
    background: rgba(201, 151, 43, 0.2);
    color: var(--primary-light);
    border-color: rgba(201, 151, 43, 0.4);
}

.copy-btn:active {
    transform: scale(0.97);
}

.code-block pre {
    padding: 1.25rem;
    overflow-x: auto;
    margin: 0;
}

.code-block code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.8125rem;
    line-height: 1.75;
    color: #d4d4d8;
}

.inline-code {
    background: var(--bg-tertiary);
    color: var(--primary-dark);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8125em;
    font-weight: 500;
    border: 1px solid var(--border-color);
}

/* Tables */
.table-wrapper {
    overflow-x: auto;
    margin: 1rem 0;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-primary);
    font-size: 0.875rem;
}

thead {
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

thead th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition-fast);
}

tbody tr:hover {
    background: var(--bg-secondary);
}

tbody tr:last-child {
    border-bottom: none;
}

tbody td {
    padding: 0.875rem 1rem;
    color: var(--text-secondary);
    vertical-align: top;
}

tbody td:first-child {
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
}

tbody td code {
    background: var(--bg-tertiary);
    color: var(--primary-dark);
    padding: 0.1rem 0.375rem;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8125rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
}

/* Endpoint Badge */
.endpoint-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.75rem 0 1.25rem;
    padding: 0.625rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.method {
    padding: 0.25rem 0.625rem;
    border-radius: 5px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-family: 'JetBrains Mono', monospace;
}

.method.get {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.method.post {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.path {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* Alerts */
.alert {
    padding: 0.875rem 1.125rem;
    border-radius: 8px;
    margin: 1.25rem 0;
    border-left: 3px solid;
    font-size: 0.875rem;
    line-height: 1.6;
}

.alert strong {
    font-weight: 600;
}

.alert-info {
    background: rgba(59, 130, 246, 0.06);
    border-color: var(--info-color);
    color: #1d4ed8;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.06);
    border-color: var(--warning-color);
    color: #92400e;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.06);
    border-color: var(--danger-color);
    color: #b91c1c;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.2rem 0.625rem;
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    font-family: 'JetBrains Mono', monospace;
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

/* Footer */
.footer {
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.8125rem;
}

.footer p {
    margin-bottom: 0.375rem;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .content {
        margin-left: 0;
        padding: 2rem 1.25rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    h3 {
        font-size: 1rem;
    }

    .table-wrapper {
        border-radius: 8px;
    }

    table {
        font-size: 0.8125rem;
    }

    thead th,
    tbody td {
        padding: 0.625rem 0.75rem;
    }
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

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

/* Selection */
::selection {
    background: rgba(201, 151, 43, 0.2);
    color: var(--primary-dark);
}
