:root {
    --sidebar-width: 280px;
    --primary: #3b82f6;
    --primary-dark: #1e40af;
    --primary-light: #60a5fa;
    --dark-bg: #0f172a;
    --darker-bg: #0a0f1f;
    --card-bg: #1a2744;
    --border-color: #2d3e5f;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --code-bg: #0f1729;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    overflow-x: hidden;
    background: var(--dark-bg);
    color: var(--text-primary);
    font-weight: 400;
    line-height: 1.6;
}

.navbar {
    background: linear-gradient(180deg, rgba(10, 15, 31, 0.95) 0%, rgba(15, 23, 42, 0.8) 100%);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--primary-light) !important;
}

.navbar-brand i {
    font-size: 1.3rem;
}

.nav-link {
    color: var(--text-secondary) !important;
    transition: all 0.25s ease;
    position: relative;
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-link:hover {
    color: var(--primary-light) !important;
}

.nav-link.active {
    color: var(--primary-light) !important;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.sidebar-container {
    display: flex;
    min-height: calc(100vh - 56px);
    margin-top: 56px;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 56px;
    height: calc(100vh - 56px);
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--darker-bg) 0%, rgba(10, 15, 31, 0.8) 100%);
    border-right: 1px solid var(--border-color);
    color: var(--text-primary);
    overflow-y: auto;
    z-index: 999;
    padding: 1.5rem 0;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
    transition: background 0.2s;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

.sidebar-header {
    padding: 0 1.5rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.sidebar-header h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    color: var(--primary-light);
    letter-spacing: -0.5px;
}

.sidebar-header p {
    margin: 0.5rem 0 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin: 0.25rem 0;
}

.sidebar-link {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    font-weight: 500;
    font-size: 0.95rem;
}

.sidebar-link:hover {
    background: rgba(59, 130, 246, 0.08);
    color: var(--primary-light);
    border-left-color: var(--primary);
    padding-left: 1.7rem;
}

.sidebar-link.active {
    background: rgba(59, 130, 246, 0.12);
    border-left-color: var(--primary);
    color: var(--primary-light);
    font-weight: 600;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2.5rem 2rem;
    min-height: calc(100vh - 56px);
}

.content-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.footer {
    margin-left: var(--sidebar-width);
    padding: 2.5rem 2rem;
    border-top: 1px solid var(--border-color);
    background: linear-gradient(180deg, rgba(10, 15, 31, 0.5) 0%, var(--darker-bg) 100%);
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-content p {
    margin-bottom: 0.5rem;
}

.footer-content a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
}

.footer-content a:hover {
    color: var(--primary);
}

.page-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.page-header h1 {
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

.page-header .lead {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 400;
}

.content-section {
    margin-bottom: 3.5rem;
}

.content-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
    letter-spacing: -0.5px;
}

.content-section h2:first-child {
    margin-top: 0;
}

.content-section h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
}

.content-section h4 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
}

.content-section p {
    line-height: 1.75;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.content-section ul,
.content-section ol {
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    padding-left: 1.75rem;
}

.content-section li {
    margin-bottom: 0.6rem;
}

.content-section strong {
    color: var(--text-primary);
    font-weight: 600;
}

code {
    background: var(--code-bg);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875em;
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.2);
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-weight: 500;
}

pre {
    background: var(--code-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

pre code {
    background: transparent;
    padding: 0;
    color: #cbd5e1;
    border: none;
    font-size: 0.875rem;
    line-height: 1.6;
    font-weight: 400;
}

.alert {
    border-left: 4px solid;
    border-radius: 6px;
    background: var(--card-bg);
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.alert strong {
    color: var(--text-primary);
    font-weight: 600;
}

.alert-info {
    border-left-color: var(--primary);
    background: rgba(59, 130, 246, 0.05);
}

.alert-warning {
    border-left-color: #f59e0b;
    background: rgba(245, 158, 11, 0.05);
}

.alert-success {
    border-left-color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}

.alert-danger {
    border-left-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.table {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.table th {
    background: rgba(59, 130, 246, 0.08);
    font-weight: 600;
    color: var(--text-primary);
    border-color: var(--border-color);
    padding: 0.875rem;
}

.table td {
    border-color: var(--border-color);
    padding: 0.875rem;
}

.table-dark {
    --bs-table-bg: var(--card-bg);
    --bs-table-striped-bg: rgba(59, 130, 246, 0.04);
    --bs-table-border-color: var(--border-color);
}

.table-dark tbody tr:hover {
    background-color: rgba(59, 130, 246, 0.06);
}

.folder-tree {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    background: var(--code-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    line-height: 1.7;
    color: var(--text-secondary);
    overflow-x: auto;
    font-size: 0.875rem;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
    white-space: pre;
    word-wrap: normal;
    overflow-wrap: normal;
}

.folder-tree .folder {
    color: var(--primary-light);
    font-weight: 500;
}

.card-custom {
    background: linear-gradient(135deg, rgba(26, 39, 68, 0.8) 0%, var(--card-bg) 100%);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.card-custom:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.card-custom h5 {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-weight: 600;
    font-size: 1.05rem;
}

.badge-custom {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 0.4rem 0.75rem;
    border-radius: 5px;
    font-weight: 600;
    display: inline-block;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.feature-card {
    background: linear-gradient(135deg, rgba(26, 39, 68, 0.6) 0%, var(--card-bg) 100%);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.75rem;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: var(--primary);
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.12);
    transform: translateY(-4px);
    background: linear-gradient(135deg, rgba(26, 39, 68, 0.9) 0%, rgba(26, 39, 68, 0.7) 100%);
}

.feature-card i {
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 1rem;
    display: block;
}

.feature-card h4 {
    color: var(--text-primary);
    margin: 0 0 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.feature-card p {
    margin-bottom: 0;
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.highlight-box {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0.04) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.highlight-box h3 {
    color: var(--primary-light);
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.highlight-box p {
    margin-bottom: 0;
    line-height: 1.75;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 500;
}

a:hover {
    color: var(--primary);
    text-decoration: underline;
}

@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 1.5rem 1rem;
    }

    .footer {
        margin-left: 0;
    }

    .sidebar-container {
        flex-direction: column;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .content-section h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .feature-grid {
        grid-template-columns: 1fr;
    }

    .main-content {
        padding: 1rem;
    }

    .page-header {
        margin-bottom: 1.5rem;
    }

    .highlight-box {
        padding: 1.5rem;
    }

    code {
        font-size: 0.8em;
    }

    pre {
        padding: 1rem;
        font-size: 0.8rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}