.docs-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    position: relative;

    padding-top: 2rem;
    padding-bottom: 2rem;
}

.docs-sidebar {
    position: sticky;
    top: 100px;
    height: calc(100vh - 120px);
    overflow-y: auto;
    padding-right: 1rem;
}

.docs-sidebar h3 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-weight: 700;
}

.docs-nav {
    list-style: none;
    margin-bottom: 2rem;
}

.docs-nav li a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.docs-nav li a:hover,
.docs-nav li a.active {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    opacity: 1;
    text-decoration: none;
}

.docs-content {
    min-width: 0;
}

.docs-section {
    margin-bottom: 4rem;
    scroll-margin-top: 100px;
}

.code-block {
    background: #1e1e1e;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 1.5rem 0;
    position: relative;
    overflow: hidden;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #333;
}

.method-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.method-post {
    background: var(--primary);
    color: white;
}

.method-get {
    background: #10b981;
    color: white;
}

.endpoint {
    font-family: monospace;
    color: #e2e8f0;
}

pre {
    color: #e2e8f0;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

th,
td {
    text-align: left;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

th {
    font-weight: 600;
    color: var(--text-dark);
    background: var(--bg-light);
}

/* Table scroll wrapper */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1rem 0;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
}

.table-wrapper table {
    margin: 0;
    min-width: 500px;
}

.param-required {
    color: var(--error);
    font-size: 0.75rem;
    vertical-align: super;
}

/* SDK Download Banner */
.sdk-download-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 1rem;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 2rem 0;
    color: white;
    box-shadow: var(--shadow-md);
}

.sdk-download-banner h4 {
    margin: 0 0 0.25rem;
    font-size: 1.1rem;
}

.sdk-download-banner p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

.sdk-download-banner .btn {
    background: white;
    color: var(--primary);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    white-space: nowrap;
}

.sdk-download-banner .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Mobile Toggle Button */
.mobile-nav-toggle {
    display: none;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
    width: 100%;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.mobile-nav-toggle i {
    transition: transform 0.3s;
}

.mobile-nav-toggle.active i {
    transform: rotate(180deg);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .docs-container {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 1rem;
    }

    .docs-sidebar {
        position: relative;
        top: 0;
        height: auto;
        overflow: visible;
        padding-right: 0;
        display: none;
    }

    .docs-sidebar.show {
        display: block;
        background: var(--bg-white);
        border: 1px solid var(--border);
        border-radius: 1rem;
        padding: 1rem;
        margin-bottom: 1rem;
        box-shadow: var(--shadow-sm);
    }

    .mobile-nav-toggle {
        display: flex;
    }

    .docs-section {
        scroll-margin-top: 80px;
    }

    .code-block {
        padding: 1rem;
        font-size: 0.85rem;
    }

    .code-block pre {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Table responsive styling for mobile */
    .table-wrapper {
        margin: 0.75rem 0;
    }

    .table-wrapper table {
        min-width: 450px;
    }

    table th,
    table td {
        padding: 0.6rem 0.5rem;
        font-size: 0.8rem;
    }

    .sdk-download-banner {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1.25rem 1rem;
    }

    .sdk-download-banner h4 {
        font-size: 1rem;
    }

    .sdk-download-banner p {
        font-size: 0.85rem;
    }

    h1.display-6 {
        font-size: 1.5rem;
    }

    h2.fw-bold {
        font-size: 1.25rem;
    }

    h5.fw-bold {
        font-size: 1rem;
    }

    .card-body {
        padding: 1rem !important;
    }

    .alert {
        font-size: 0.85rem;
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .docs-container {
        padding: 0.75rem;
    }

    h1.display-6 {
        font-size: 1.35rem;
    }

    h2.fw-bold {
        font-size: 1.15rem;
    }

    table th,
    table td {
        padding: 0.5rem 0.4rem;
        font-size: 0.75rem;
    }

    .code-block {
        padding: 0.75rem;
        font-size: 0.8rem;
        border-radius: 0.5rem;
    }

    .method-badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
    }

    .endpoint {
        font-size: 0.8rem;
    }
}

/* Language Tabs */
.lang-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.lang-tab {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    background: var(--bg-light);
    color: var(--text-muted);
    border: 1px solid transparent;
}

.lang-tab:hover {
    color: var(--text-dark);
}

.lang-tab.active {
    background: var(--primary);
    color: white;
}

.lang-content {
    display: none;
}

.lang-content.active {
    display: block;
}