:root {
    --primary: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1d4ed8;
    --text: #1f2937;
    --text-light: #6b7280;
    --text-lighter: #9ca3af;
    --bg: #ffffff;
    --bg-secondary: #f9fafb;
    --border: #e5e7eb;
    --border-dark: #d1d5db;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    --rounded-sm: 0.125rem;
    --rounded: 0.25rem;
    --rounded-md: 0.375rem;
    --rounded-lg: 0.5rem;

    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    color: var(--text);
    background-color: var(--bg);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.layout {
    display: grid;
    grid-template-columns: 280px 4.3fr; /* Increased to 4fr for more content space */
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    width: 280px;
    height: 100vh;
    border-right: 1px solid var(--border);
    background-color: var(--bg);
    padding: var(--space-xl) 0;
    display: flex;
    flex-direction: column;
}

.logo {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
    padding: 0 var(--space-xl);
    margin-bottom: var(--space-xl);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.logo-icon {
    width: 24px;
    height: 24px;
}

.social-links {
    display: flex;
    gap: var(--space-md);
    padding: 0 var(--space-xl);
    margin-bottom: var(--space-xl);
}

.social-link {
    display: inline-flex;
    color: var(--text-light);
    transition: color 0.2s ease;
}

.social-link:hover {
    color: var(--primary);
}

.social-icon {
    width: 20px;
    height: 20px;
}

.nav {
    flex: 1;
    overflow-y: auto;
    padding: 0 var(--space-xl);
}

.nav-group {
    margin-bottom: var(--space-lg);
}

.nav-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    margin-bottom: var(--space-sm);
    font-weight: 600;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--rounded);
    color: var(--text);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-bottom: var(--space-xs);
}

.nav-link:hover {
    background-color: var(--bg-secondary);
    color: var(--primary);
}

.nav-link.active {
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    font-weight: 600;
}

.nav-link .icon {
    margin-right: var(--space-sm);
    width: 18px;
    height: 18px;
    opacity: 0.7;
}

.nav-link.active .icon {
    opacity: 1;
}

.content {
    grid-column: 2;
    padding: var(--space-xl);
    max-width: 1200px; /* Increased from 900px to allow more width */
    margin: 0 auto;
    width: 100%;
}

.api-header {
    margin-bottom: var(--space-2xl);
}

.api-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: var(--space-sm);
    line-height: 1.2;
}

.api-description {
    color: var(--text-light);
    font-size: 1.125rem;
    max-width: 720px;
    margin-bottom: var(--space-xl);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: var(--space-lg);
    position: relative;
    padding-bottom: var(--space-sm);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--primary);
    border-radius: 3px;
}

.card {
    background-color: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--rounded-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: var(--space-sm);
}

.card-content {
    color: var(--text-light);
}

.card-content p {
    margin-bottom: var(--space-sm);
}

.card-content pre {
    margin-top: var(--space-sm);
}

.feature-list {
    list-style: none;
}

.feature-list li {
    margin-bottom: var(--space-xs);
    position: relative;
    padding-left: var(--space-md);
}

.feature-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.feature-card {
    background-color: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--rounded-md);
    padding: var(--space-lg);
    transition: all 0.2s ease;
}

.feature-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow);
}

.feature-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(37, 99, 235, 0.1);
    border-radius: 50%;
    margin-bottom: var(--space-md);
    color: var(--primary);
}

.feature-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: var(--space-sm);
}

.feature-description {
    color: var(--text-light);
    font-size: 0.875rem;
}

.tabs {
    margin-bottom: var(--space-xl);
}

.tab-buttons {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: -1px;
}

.tab-button {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-light);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-button:hover {
    color: var(--primary);
}

.tab-button.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

.tab-content {
    display: none;
    padding: var(--space-md) 0;
}

.tab-content.active {
    display: block;
}

pre {
    background-color: var(--bg-secondary);
    border-radius: var(--rounded);
    padding: var(--space-md);
    overflow-x: auto;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text);
    margin: var(--space-sm) 0;
}

code {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.875rem;
    background-color: var(--bg-secondary);
    padding: 0.2em 0.4em;
    border-radius: var(--rounded-sm);
    color: var(--primary-dark);
}

@media (max-width: 768px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: var(--space-md);
    }

    .content {
        grid-column: 1;
        padding: var(--space-md);
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
}

.api-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.api-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.api-header h1 {
    font-size: 1.75rem;
    font-weight: 500;
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.api-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.method {
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    text-transform: uppercase;
}

.method.post {
    background-color: rgba(66, 153, 225, 0.1);
    color: var(--post);
}

.path {
    font-family: monospace;
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.code-block {
    background-color: #f8fafc;
    padding: 1rem;
    border-radius: 0.375rem;
    font-family: monospace;
    font-size: 0.9375rem;
    overflow-x: auto;
    margin: 1rem 0;
    border: 1px solid var(--border-color);
}

.response-status {
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    display: inline-block;
    margin: 0.5rem 0;
}

code {
    font-family: monospace;
    background-color: #f8fafc;
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    color: var(--primary);
}

/* General styling for the content */
.content {
    max-width: 1200px; /* Increased from 900px to allow more width */
    margin: 0 auto;
    padding: 20px;
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

/* Section styling */
.api-section {
    margin-bottom: 40px;
}

.api-section h2 {
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.api-section p {
    color: #34495e;
}

.parameter-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
}

.param-row {
    display: flex;
    border-bottom: 1px solid #ddd;
}

.param-row:last-child {
    border-bottom: none;
}

.param-row div {
    padding: 12px;
    flex: 1;
}

.param-row.header {
    background-color: #3498db;
    color: white;
    font-weight: bold;
}

.param-row code {
    background-color: #ecf0f1;
    padding: 2px 6px;
    border-radius: 4px;
}

.code-block {
    background-color: #2d2d2d;
    color: #f8f8f2;
    padding: 20px;
    border-radius: 8px;
    font-family: 'Courier New', Courier, monospace;
    overflow-x: auto;
    margin: 10px 0;
}

.response-status {
    padding: 8px 16px;
    border-radius: 4px;
    display: inline-block;
    margin: 10px 0;
    font-weight: bold;
}

.response-status.success {
    background-color: #27ae60;
    color: white;
}

.response-status.error {
    background-color: #e74c3c;
    color: white;
}

.api-endpoint {
    background-color: var(--bg-secondary);
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.api-method {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    text-transform: uppercase;
}

.api-method.post {
    background-color: rgba(56, 161, 105, 0.1);
    color: #38a169;
}

.api-path {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9375rem;
}

.api-meta {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    font-size: 0.875rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.meta-label {
    font-weight: 500;
    color: var(--text-light);
}

.meta-value {
    color: var(--text-primary);
}

.sidebar {
    position: relative; /* Ensure positioning context */
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Make sidebar full height */
}

.user-info {
    margin-top: auto; /* Push to bottom of sidebar */
    padding: 16px;
    border-top: 1px solid #e5e7eb;
}

.user-details {
    margin-bottom: 12px;
    font-size: 14px;
    color: #4b5563;
}

.user-details span {
    display: block; /* Stack username and email */
    line-height: 1.5;
}

#logout-button {
    background-color: #dc2626;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    width: 100%; /* Full width */
    transition: background-color 0.2s;
}

#logout-button:hover {
    background-color: #b91c1c;
}