
body {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-family: 'Inria Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* Top spacing for fixed navbar */
.doc-page {
    margin-top: 80px;
    min-height: calc(100vh - 80px);
}

.doc-header-bg {
    background: var(--gradient-main);
    color: #ffffff;
    padding: 60px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.doc-header-bg::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to top, var(--bg-secondary), transparent);
}

.doc-header-bg h1 {
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: 800;
    margin: 0 0 10px;
    letter-spacing: -0.02em;
}

.doc-header-bg p {
    font-size: 1.1rem;
    color: #94a3b8;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 400;
}

.doc-layout {
    max-width: 1240px;
    margin: 0 auto;
    padding: 40px 24px 80px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 48px;
}

/* Sidebar Navigation */
.doc-sidebar {
    position: sticky;
    top: 100px;
    height: calc(100vh - 140px);
    overflow-y: auto;
    padding-right: 16px;
    border-right: 1px solid var(--border);
}

.doc-sidebar::-webkit-scrollbar {
    width: 4px;
}

.doc-sidebar::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.doc-sidebar-group {
    margin-bottom: 28px;
}

.doc-sidebar-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    margin: 0 0 12px 10px;
}

.doc-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 4px;
}

.doc-sidebar a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 500;
    transition: var(--transition);
}

.doc-sidebar a:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.doc-sidebar a.active {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.06);
    font-weight: 600;
}

/* Main Content area */
.doc-main {
    min-width: 0;
}

.doc-section {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 36px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
    scroll-margin-top: 100px;
}

.doc-section h2 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-top: 0;
    margin-bottom: 18px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.02em;
}

.doc-section h2 iconify-icon {
    color: #2563eb;
}

.doc-section p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    margin-top: 0;
    margin-bottom: 16px;
}

/* Parameter Table */
.doc-table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    margin: 20px 0;
}

.doc-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.doc-table th {
    background: var(--bg-secondary);
    padding: 12px 16px;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
}

.doc-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    vertical-align: top;
}

.doc-table tr:last-child td {
    border-bottom: none;
}

.doc-table code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    background: var(--bg-tertiary);
    color: #e11d48;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-required {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid rgba(220, 38, 38, 0.1);
}

.badge-optional {
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid rgba(75, 85, 99, 0.1);
}

.badge-post {
    background: #ecfdf5;
    color: #059669;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
}

/* Callout Box */
.callout {
    display: flex;
    gap: 14px;
    padding: 16px 20px;
    border-radius: 12px;
    margin: 20px 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

.callout-info {
    background: #eff6ff;
    border-left: 4px solid #2563eb;
    color: #1e3a8a;
}

.callout-warning {
    background: #fffbeb;
    border-left: 4px solid #d97706;
    color: #78350f;
}

.callout iconify-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.callout-info iconify-icon { color: #2563eb; }
.callout-warning iconify-icon { color: #d97706; }

/* API Endpoint box */
.endpoint-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 14px 18px;
    border-radius: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    color: var(--text-primary);
    overflow-x: auto;
    margin-bottom: 20px;
}

/* Code Playground Panel */
.code-playground {
    background: #0b0f19;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    margin: 24px 0 0;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.25);
}

.code-tabs-wrapper {
    background: #111827;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    overflow-x: auto;
    scrollbar-width: none;
}

.code-tabs-wrapper::-webkit-scrollbar {
    display: none;
}

.code-tabs {
    display: flex;
    padding: 0 8px;
}

.code-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    background: transparent;
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 500;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.code-tab:hover {
    color: #f1f5f9;
}

.code-tab.active {
    color: #38bdf8;
    border-bottom-color: #38bdf8;
    background: rgba(56, 189, 248, 0.04);
    font-weight: 600;
}

.code-tab iconify-icon {
    font-size: 1.1rem;
}

.code-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: #0f172a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.code-file-name {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    display: inline-block;
}

.code-actions {
    display: flex;
    gap: 12px;
}

.code-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.code-btn:hover {
    color: #f1f5f9;
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.code-btn.copied {
    border-color: #10b981;
    color: #10b981;
    background: rgba(16, 185, 129, 0.06);
}

.code-content-wrapper {
    position: relative;
    max-height: 480px;
    overflow-y: auto;
    background: #090d16;
}

.code-content-wrapper::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.code-content-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.code-content {
    display: none;
    margin: 0;
    padding: 24px;
    color: #e2e8f0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.88rem;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre;
}

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

/* Token Highlighting */
.code-content .cmt { color: #64748b; font-style: italic; }
.code-content .kw { color: #f472b6; font-weight: 600; }
.code-content .str { color: #34d399; }
.code-content .fn { color: #38bdf8; }
.code-content .var { color: #fb7185; }
.code-content .typ { color: #a78bfa; }
.code-content .number { color: #fb923c; }

/* JSON/Pre format */
.json-block {
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 12px;
    padding: 18px;
    margin: 16px 0;
    overflow-x: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.88rem;
    line-height: 1.5;
}

/* Responsive Layout */
@media (max-width: 1024px) {
    .doc-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .doc-sidebar {
        position: static;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding-right: 0;
        padding-bottom: 20px;
        display: flex;
        flex-wrap: wrap;
        gap: 16px;
    }

    .doc-sidebar-group {
        margin-bottom: 0;
        flex: 1 1 200px;
    }
}

@media (max-width: 640px) {
    .doc-section {
        padding: 24px;
    }

    .endpoint-box {
        font-size: 0.85rem;
    }
}
