/* API Documentation Styles - OpenAI-inspired design */

:root {
    --api-bg: #ffffff;
    --api-surface: #f8f9fa;
    --api-border: #e5e7eb;
    --api-text: #1f2937;
    --api-text-secondary: #6b7280;
    --api-primary: #10b981;
    --api-primary-hover: #059669;
    --api-code-bg: #1e293b;
    --api-code-text: #e2e8f0;
    --api-nav-bg: #ffffff;
    --api-sidebar-bg: #f9fafb;
    --api-link: #2563eb;
    --api-link-hover: #1d4ed8;
    --api-method-get: #10b981;
    --api-method-post: #3b82f6;
    --api-method-put: #f59e0b;
    --api-method-delete: #ef4444;
    --api-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --api-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.dark {
    --api-bg: #0f172a;
    --api-surface: #1e293b;
    --api-border: #334155;
    --api-text: #f1f5f9;
    --api-text-secondary: #94a3b8;
    --api-primary: #10b981;
    --api-primary-hover: #059669;
    --api-code-bg: #0f172a;
    --api-code-text: #e2e8f0;
    --api-nav-bg: #1e293b;
    --api-sidebar-bg: #1e293b;
    --api-link: #60a5fa;
    --api-link-hover: #3b82f6;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--api-bg);
    color: var(--api-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Navigation */
.api-navbar {
    background: var(--api-nav-bg);
    border-bottom: 1px solid var(--api-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--api-shadow);
}

.api-nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.api-nav-logo a {
    font-size: 20px;
    font-weight: 600;
    color: var(--api-text);
    text-decoration: none;
}

.api-nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
    align-items: center;
}

.api-nav-link {
    color: var(--api-text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.api-nav-link:hover,
.api-nav-link.active {
    color: var(--api-text);
}

.api-nav-link.cta {
    background: var(--api-primary);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
}

.api-nav-link.cta:hover {
    background: var(--api-primary-hover);
    color: white;
}

.api-theme-toggle {
    background: transparent;
    border: 1px solid var(--api-border);
    border-radius: 6px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 16px;
}

.api-theme-toggle:hover {
    background: var(--api-surface);
}

/* Main Container */
.api-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    min-height: calc(100vh - 64px);
}

/* Sidebar */
.api-sidebar {
    background: var(--api-sidebar-bg);
    border-right: 1px solid var(--api-border);
    padding: 32px 0;
    position: sticky;
    top: 64px;
    height: calc(100vh - 64px);
    overflow-y: auto;
}

.api-sidebar-content {
    padding: 0 24px;
}

.api-sidebar-section {
    margin-bottom: 32px;
}

.api-sidebar-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--api-text-secondary);
    margin-bottom: 12px;
}

.api-sidebar-list {
    list-style: none;
}

.api-sidebar-link {
    display: block;
    padding: 8px 12px;
    color: var(--api-text-secondary);
    text-decoration: none;
    font-size: 14px;
    border-radius: 6px;
    transition: all 0.2s;
    margin-bottom: 4px;
}

.api-sidebar-link:hover {
    background: var(--api-surface);
    color: var(--api-text);
}

.api-sidebar-link.active {
    background: var(--api-surface);
    color: var(--api-primary);
    font-weight: 500;
}

/* Main Content */
.api-main {
    padding: 48px 64px;
    max-width: 900px;
}

.api-section {
    margin-bottom: 64px;
    scroll-margin-top: 80px;
}

.api-h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--api-text);
    line-height: 1.2;
}

.api-h2 {
    font-size: 32px;
    font-weight: 600;
    margin-top: 48px;
    margin-bottom: 16px;
    color: var(--api-text);
    line-height: 1.3;
}

.api-h3 {
    font-size: 24px;
    font-weight: 600;
    margin-top: 32px;
    margin-bottom: 12px;
    color: var(--api-text);
}

.api-h4 {
    font-size: 18px;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 12px;
    color: var(--api-text);
}

.api-intro {
    font-size: 18px;
    color: var(--api-text-secondary);
    margin-bottom: 24px;
    line-height: 1.7;
}

/* Info Boxes */
.api-info-box {
    background: var(--api-surface);
    border: 1px solid var(--api-border);
    border-left: 4px solid var(--api-primary);
    border-radius: 6px;
    padding: 16px 20px;
    margin: 24px 0;
    font-size: 14px;
}

.api-info-box code {
    background: var(--api-code-bg);
    color: var(--api-code-text);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
}

.api-warning-box {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-left: 4px solid #f59e0b;
    border-radius: 6px;
    padding: 16px 20px;
    margin: 24px 0;
    font-size: 14px;
}

.dark .api-warning-box {
    background: #78350f;
    border-color: #f59e0b;
}

/* Lists */
.api-feature-list,
.api-steps-list {
    margin: 16px 0;
    padding-left: 24px;
    color: var(--api-text-secondary);
}

.api-feature-list li,
.api-steps-list li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* Code Blocks */
.api-code-block {
    background: var(--api-code-bg);
    border-radius: 8px;
    margin: 24px 0;
    overflow: hidden;
    box-shadow: var(--api-shadow-lg);
}

.api-code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.api-code-header span {
    font-size: 12px;
    font-weight: 600;
    color: var(--api-code-text);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.api-copy-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--api-code-text);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.api-copy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.api-code-block pre {
    margin: 0;
    padding: 20px;
    overflow-x: auto;
}

.api-code-block code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: var(--api-code-text);
}

/* Endpoint Display */
.api-endpoint {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
}

.api-method {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

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

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

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

.api-endpoint-url {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 14px;
    color: var(--api-text);
    background: var(--api-surface);
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid var(--api-border);
}

/* Tables */
.api-params-table {
    margin: 24px 0;
    overflow-x: auto;
}

.api-params-table table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--api-border);
    border-radius: 6px;
    overflow: hidden;
}

.api-params-table thead {
    background: var(--api-surface);
}

.api-params-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    color: var(--api-text);
    border-bottom: 1px solid var(--api-border);
}

.api-params-table td {
    padding: 12px 16px;
    font-size: 14px;
    color: var(--api-text-secondary);
    border-bottom: 1px solid var(--api-border);
}

.api-params-table tbody tr:last-child td {
    border-bottom: none;
}

.api-params-table code {
    background: var(--api-surface);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
}

/* Tabs */
.api-tabs {
    display: flex;
    gap: 8px;
    margin: 24px 0;
    border-bottom: 1px solid var(--api-border);
}

.api-tab {
    background: transparent;
    border: none;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--api-text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.2s;
}

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

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

.api-tab-content {
    display: none;
}

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

/* Playground */
.api-playground {
    background: var(--api-surface);
    border: 1px solid var(--api-border);
    border-radius: 8px;
    padding: 24px;
    margin: 24px 0;
}

.api-playground-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    align-items: center;
}

.api-playground-method {
    padding: 8px 12px;
    border: 1px solid var(--api-border);
    border-radius: 6px;
    background: var(--api-bg);
    color: var(--api-text);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.api-playground-endpoint {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--api-border);
    border-radius: 6px;
    background: var(--api-bg);
    color: var(--api-text);
    font-size: 14px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
}

.api-playground-run {
    padding: 8px 20px;
    background: var(--api-primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.api-playground-run:hover {
    background: var(--api-primary-hover);
}

.api-playground-body {
    margin-bottom: 20px;
}

.api-playground-body label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--api-text);
}

.api-playground-textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid var(--api-border);
    border-radius: 6px;
    background: var(--api-bg);
    color: var(--api-text);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 14px;
    resize: vertical;
}

.api-playground-response label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--api-text);
}

.api-playground-output {
    background: var(--api-code-bg);
    border-radius: 6px;
    padding: 16px;
    overflow-x: auto;
    min-height: 100px;
}

.api-playground-output code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 14px;
    color: var(--api-code-text);
}

/* Footer */
.api-footer {
    background: var(--api-surface);
    border-top: 1px solid var(--api-border);
    padding: 32px 0;
    margin-top: 64px;
}

.api-footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 64px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.api-footer-links {
    display: flex;
    gap: 24px;
}

.api-footer-links a {
    color: var(--api-text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.api-footer-links a:hover {
    color: var(--api-text);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .api-container {
        grid-template-columns: 240px 1fr;
    }
    
    .api-main {
        padding: 32px 40px;
    }
}

@media (max-width: 768px) {
    .api-container {
        grid-template-columns: 1fr;
    }
    
    .api-sidebar {
        display: none;
    }
    
    .api-main {
        padding: 24px;
    }
    
    .api-h1 {
        font-size: 36px;
    }
    
    .api-h2 {
        font-size: 28px;
    }
    
    .api-nav-menu {
        gap: 16px;
    }
    
    .api-nav-link {
        font-size: 13px;
    }
    
    .api-footer-content {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Link styles */
a {
    color: var(--api-link);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--api-link-hover);
}

