:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --accent-color: #4299e1;
    --border-color: #e2e8f0;
    --code-bg: #f7fafc;
    --sidebar-width: 280px;
}

[data-theme="dark"] {
    --bg-primary: #1a202c;
    --bg-secondary: #2d3748;
    --text-primary: #f7fafc;
    --text-secondary: #a0aec0;
    --accent-color: #63b3ed;
    --border-color: #4a5568;
    --code-bg: #2d3748;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-primary);
    background: var(--bg-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

nav {
    padding: 1rem;
}

.nav-section {
    margin-bottom: 1.5rem;
}

.nav-section-title {
    font-size: 0.875rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    padding: 0 0.5rem;
    font-weight: 600;
}

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

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

.nav-link {
    display: block;
    padding: 0.5rem;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 0.375rem;
    transition: background-color 0.2s, color 0.2s;
}

.nav-link:hover,
.nav-link.active {
    background-color: var(--accent-color);
    color: white;
}

.content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 2rem;
    transition: margin-left 0.3s ease;
    position: relative;
}

.content-header {
    position: sticky;
    top: 0;
    background: var(--bg-primary);
    padding: 1rem 2rem;
    margin: -2rem -2rem 2rem -2rem;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.theme-toggle {
    display: flex;
    align-items: center;
}

.theme-toggle button {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s;
    color: var(--text-primary);
}

.theme-toggle button:hover {
    background-color: var(--bg-secondary);
}


.doc-content {
    max-width: 768px;
    margin: 0 auto;
}

.doc-content h1 {
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.doc-content h2 {
    font-size: 1.875rem;
    margin: 2rem 0 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.doc-content h3 {
    font-size: 1.5rem;
    margin: 1.5rem 0 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.doc-content p {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.doc-content code {
    background: var(--code-bg);
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
    font-family: 'Fira Code', monospace;
}

.doc-content pre {
    background: var(--code-bg);
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1rem 0;
}

.doc-content pre code {
    background: none;
    padding: 0;
}

.doc-content ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.doc-content li {
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: 1000;
    }

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

    .menu-toggle {
        display: block;
    }

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