[data-theme="light"] {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface2: #f1f5f9;
    --surface3: #e2e8f0;
    --border: #e2e8f0;
    --border2: rgba(16, 185, 129, 0.28);
    --text: #0f172a;
    --text2: #334155;
    --text3: #64748b;
    --text4: #94a3b8;
}

[data-theme="dark"] {
    --bg: #090a0f;
    --surface: #12131c;
    --surface2: #191b28;
    --surface3: #232638;
    --border: rgba(255, 255, 255, 0.07);
    --border2: rgba(16, 185, 129, 0.28);
    --text: #f3f4f6;
    --text2: #cbd5e1;
    --text3: #94a3b8;
    --text4: #64748b;
}
@import url('https://fonts.googleapis.com/css2?family=Google+Sans+Flex:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&family=Manrope:wght@400;500;600;700&display=swap');

:root {
    --primary: #7c3aed;
    --primary-light: #a78bfa;
    --secondary: #06b6d4;
    --secondary-light: #38bdf8;
    --bg: #090a0f;
    --surface: #12131c;
    --surface2: #191b28;
    --surface3: #232638;
    --border: rgba(255, 255, 255, 0.07);
    --border2: rgba(124, 58, 237, 0.28);
    --text: #f3f4f6;
    --text2: #cbd5e1;
    --text3: #94a3b8;
    --text4: #64748b;
    --font: "Google Sans Flex", "Manrope", sans-serif;
    --mono: "JetBrains Mono", monospace;
    --radius: 14px;
    --radius-sm: 8px;
    --shadow-glow: 0 8px 25px -4px rgba(124, 58, 237, 0.35);
}

body {
    font-family: var(--font);
    background-color: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.7;
    margin: 0;
    padding: 0;
}

/* Header bar */
.header {
    background: rgba(18, 19, 28, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 0 24px;
    border-bottom: 1px solid var(--border);
    z-index: 1020;
}

/* Sidebar Styles */
.doc-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    padding: 1.5rem 0;
    z-index: 1040;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    scrollbar-width: thin;
    scrollbar-color: var(--surface3) transparent;
}

/* Mobile Sidebar Drawer */
@media (max-width: 991px) {
    .doc-sidebar {
        transform: translateX(-100%);
    }

    .doc-sidebar.show {
        transform: translateX(0);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    }
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 1030;
    display: none;
}

.sidebar-backdrop.show {
    display: block;
}

/* Sidebar Logo & Menu Header */
.doc-logo {
    padding: 0.5rem 1.5rem 1.5rem;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
    background: linear-gradient(180deg, rgba(124, 58, 237, 0.08) 0%, transparent 100%);
}

.doc-logo span {
    background: linear-gradient(135deg, var(--text) 30%, var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.doc-menu-header {
    padding: 0.75rem 1.5rem 0.35rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1.2px;
    color: var(--text4);
    margin-top: 1rem;
}

.doc-menu-item {
    display: flex;
    align-items: center;
    padding: 0.65rem 1.5rem;
    color: var(--text3);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.25s ease;
    border-left: 3px solid transparent;
    margin: 2px 0;
}

.doc-menu-item:hover {
    background: var(--surface2);
    color: var(--text);
    padding-left: 1.75rem;
}

.doc-menu-item.active {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.16), rgba(6, 182, 212, 0.08));
    color: var(--primary-light);
    border-left-color: var(--primary);
    font-weight: 700;
}

/* Content Area - Spacious Layout */
.doc-content {
    margin-left: 280px;
    padding: 6rem 3.5rem 3rem 3.5rem;
    min-height: 100vh;
    max-width: 1280px;
}

@media (max-width: 991px) {
    .doc-content {
        margin-left: 0;
        padding: 5.5rem 1.25rem 2rem;
        max-width: 100%;
    }
}

/* Typography */
.doc-content h1 {
    font-size: 2.3rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #ffffff 40%, var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.doc-content .lead {
    font-size: 1.1rem;
    color: var(--text3) !important;
    margin-bottom: 2rem;
    font-weight: 400;
}

.doc-content h2, .doc-content .h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.doc-content h2::before {
    content: "#";
    color: var(--primary-light);
    font-weight: 800;
    opacity: 0.6;
}

.doc-content p {
    color: var(--text2);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
}

/* Cards Overrides */
.card {
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
    color: var(--text) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25) !important;
    overflow: hidden;
    margin-bottom: 1.75rem;
}

.card:hover {
    border-color: var(--border2) !important;
}

.card-header {
    background: var(--surface2) !important;
    border-bottom: 1px solid var(--border) !important;
    padding: 1.1rem 1.5rem !important;
    color: var(--text) !important;
}

.card-header h5, .card-header h6, .card-header .h5, .card-header .h6 {
    color: var(--text) !important;
    font-weight: 700 !important;
}

.card-body {
    background: var(--surface) !important;
    padding: 1.75rem !important;
    color: var(--text2) !important;
}

.text-muted {
    color: var(--text3) !important;
}

.btn-light {
    background: var(--surface3) !important;
    color: var(--text) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-sm) !important;
}

.btn-light:hover {
    background: var(--primary) !important;
    color: white !important;
    border-color: var(--primary) !important;
}

.bg-light {
    background: var(--surface2) !important;
}

/* Alert Callouts */
.alert {
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    border: 1px solid var(--border);
}

.alert-info {
    background: var(--surface2) !important;
    border-left: 4px solid var(--secondary) !important;
    color: var(--text) !important;
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.08);
}

.alert-info i {
    color: var(--secondary-light);
    font-size: 1.25rem;
}

.alert-info strong {
    color: var(--text);
    font-weight: 700;
}

.alert-info small {
    color: var(--text3);
}

/* Code Blocks & Terminal Windows */
.code-block {
    background: #06070a;
    border: 1px solid var(--border2);
    border-radius: var(--radius);
    overflow: hidden;
    margin: 1.5rem 0;
    box-shadow: var(--shadow-glow);
    position: relative;
}

.code-block::before {
    content: "●  ●  ●";
    display: block;
    padding: 9px 18px;
    background: var(--surface2);
    font-size: 10px;
    letter-spacing: 3px;
    color: var(--text4);
    border-bottom: 1px solid var(--border);
}

.code-block .btn-copy {
    position: absolute;
    top: 5px;
    right: 12px;
    z-index: 10;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 6px;
    background: var(--surface3);
    color: var(--text2);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s ease;
}

.code-block .btn-copy:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary-light);
}

.code-block pre {
    margin: 0;
    padding: 1.25rem 1.5rem;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--surface3) transparent;
}

.code-block code {
    color: #e2e8f0;
    font-family: var(--mono);
    font-size: 0.88rem;
    line-height: 1.7;
    white-space: pre;
    word-break: normal;
    display: block;
}

.code-block code .text-warning {
    color: #f59e0b !important;
    font-weight: 600;
}

.code-block code .text-danger {
    color: #f43f5e !important;
    font-weight: 600;
}

/* Param Tag */
.param-tag {
    background: rgba(124, 58, 237, 0.18);
    color: var(--primary-light);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: var(--mono);
    border: 1px solid rgba(124, 58, 237, 0.35);
}

code {
    background: var(--surface3);
    color: var(--secondary-light);
    padding: 0.2rem 0.45rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: var(--mono);
}

/* Modern Dark Tables */
.table {
    color: var(--text);
    vertical-align: middle;
    margin: 1.5rem 0;
    border-color: var(--border) !important;
}

.table th {
    background: var(--surface2) !important;
    color: var(--text3) !important;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--border) !important;
}

.table td {
    background: var(--surface) !important;
    color: var(--text2) !important;
    font-size: 0.9rem;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border) !important;
}

.table-bordered {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border) !important;
}

/* Badges */
.badge {
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 20px;
}

.badge.bg-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    color: white;
}

.badge.bg-secondary {
    background: var(--surface3) !important;
    color: var(--text3) !important;
}

/* Lists */
.doc-content ul, .doc-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text2);
}

.doc-content li {
    color: var(--text2);
    margin-bottom: 0.5rem;
}

/* Mobile Toggle */
.mobile-menu-toggle {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-glow);
}

@media (max-width: 991px) {
    .mobile-menu-toggle {
        display: flex;
    }
}

.sidebar-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--surface2);
    border: 1px solid var(--border);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--text3);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

@media (max-width: 991px) {
    .sidebar-close {
        display: flex;
    }
}