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

:root {
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 60px;
    --sidebar-bg: #1a1a1a;
    --sidebar-hover: #2a2a2a;
    --sidebar-active: #3a3a3a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --accent-color: #3b82f6;
    --accent-hover: #2563eb;
    --border-color: #333333;
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --code-bg: #1e1e1e;
    --code-border: #333333;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: width 0.3s ease;
}

.sidebar-header {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
}

.sidebar-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.sidebar-header .subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-list {
    list-style: none;
}

.nav-item {
    margin-bottom: 0.25rem;
}

.nav-toggle {
    width: 100%;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-toggle:hover {
    background-color: var(--sidebar-hover);
    color: var(--accent-color);
}

.nav-toggle.active {
    background-color: var(--sidebar-active);
    color: var(--accent-color);
}

.toggle-icon {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
    color: var(--text-secondary);
}

.nav-toggle.active .toggle-icon {
    transform: rotate(180deg);
}

.nav-sublist {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: rgba(0, 0, 0, 0.2);
}

.nav-sublist.expanded {
    max-height: 2000px;
}

.nav-sublist li {
    padding: 0;
}

.nav-sublist a {
    display: block;
    padding: 0.625rem 1rem 0.625rem 2.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
}

.nav-sublist a:hover {
    background-color: var(--sidebar-hover);
    color: var(--accent-color);
    border-left-color: var(--accent-color);
    padding-left: 2.75rem;
}

.nav-sublist a.active {
    background-color: var(--sidebar-active);
    color: var(--accent-color);
    border-left-color: var(--accent-color);
    font-weight: 500;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.content-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
}

.content-section h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

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

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

.content-section ul,
.content-section ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.content-section li {
    margin-bottom: 0.5rem;
    line-height: 1.8;
}

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

.content-section code {
    background-color: var(--code-bg);
    border: 1px solid var(--code-border);
    border-radius: 4px;
    padding: 0.125rem 0.375rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    color: #d4d4d4;
}

.content-section pre {
    background-color: var(--code-bg);
    border: 1px solid var(--code-border);
    border-radius: 8px;
    padding: 1.25rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.content-section pre code {
    background: none;
    border: none;
    padding: 0;
    color: #d4d4d4;
    font-size: 0.875rem;
    line-height: 1.6;
}

.content-section blockquote {
    border-left: 4px solid var(--accent-color);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    color: var(--text-secondary);
    font-style: italic;
}

/* Table Styles */
.content-section table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
}

.content-section table th,
.content-section table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.content-section table th {
    background-color: var(--sidebar-active);
    color: var(--text-primary);
    font-weight: 600;
}

.content-section table td {
    color: var(--text-secondary);
}

.content-section table tr:hover {
    background-color: var(--sidebar-hover);
}

/* Scrollbar Styles */
.sidebar::-webkit-scrollbar,
.main-content::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track,
.main-content::-webkit-scrollbar-track {
    background: var(--sidebar-bg);
}

.sidebar::-webkit-scrollbar-thumb,
.main-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover,
.main-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: var(--sidebar-collapsed-width);
    }

    .sidebar-header h1,
    .sidebar-header .subtitle {
        display: none;
    }

    .nav-toggle span:first-child {
        display: none;
    }

    .nav-sublist a {
        padding-left: 1rem;
    }

    .main-content {
        margin-left: var(--sidebar-collapsed-width);
    }

    .content-wrapper {
        padding: 1rem;
    }

    .content-section h1 {
        font-size: 2rem;
    }

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

/* Link Styles */
.content-section a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.content-section a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Badge/Tag Styles */
.content-section .badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--accent-color);
    color: white;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin: 0 0.25rem;
}

/* Highlight Styles */
.content-section .highlight {
    background-color: rgba(59, 130, 246, 0.1);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    color: var(--accent-color);
}

/* Divider */
.content-section hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 2rem 0;
}

/* Alert/Info Boxes */
.content-section .alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border-left: 4px solid;
}

.content-section .alert-info {
    background-color: rgba(59, 130, 246, 0.1);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.content-section .alert-warning {
    background-color: rgba(251, 191, 36, 0.1);
    border-color: #fbbf24;
    color: #fbbf24;
}

.content-section .alert-success {
    background-color: rgba(34, 197, 94, 0.1);
    border-color: #22c55e;
    color: #22c55e;
}
