:root {
    --bg: #fafafa;
    --surface: #f0f0f0;
    --text-primary: #1a1a1a;
    --text-secondary: #555555;
    --accent: #2d5a27;
    --accent-hover: #3d7a37;
    --border: #d0d0d0;
    --code-bg: #e8e8e8;
}

[data-theme="dark"] {
    --bg: #1a1a1a;
    --surface: #252525;
    --text-primary: #e8e8e8;
    --text-secondary: #a0a0a0;
    --accent: #7cb87c;
    --accent-hover: #9cd49c;
    --border: #3a3a3a;
    --code-bg: #2a2a2a;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Courier Prime', 'Courier New', monospace;
    background-color: var(--bg);
    color: var(--text-primary);
    line-height: 1.7;
    transition: background-color 0.3s, color 0.3s;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    z-index: 100;
    transition: background-color 0.3s, border-color 0.3s;
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
}

.logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 5px 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    border-radius: 3px;
    transition: all 0.2s;
}

.theme-toggle:hover {
    background: var(--border);
}

.github-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.github-link:hover {
    color: var(--accent);
}

.github-icon {
    width: 20px;
    height: 20px;
}

.repo-name {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.container {
    display: flex;
    margin-top: 50px;
    min-height: calc(100vh - 50px);
    justify-content: center;
}

.sidebar {
    width: 200px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 20px;
    position: absolute;
    left: calc(50% - 400px);
    top: 50px;
    bottom: 0;
    overflow-y: auto;
    transition: background-color 0.3s, border-color 0.3s, transform 0.3s;
}

.content {
    flex: 1;
    margin-left: 200px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 700px;
}

.sidebar {
    width: 200px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 20px;
    position: fixed;
    top: 50px;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    transition: background-color 0.3s, border-color 0.3s, transform 0.3s;
}

.mobile-close {
    display: none;
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

.nav-section {
    margin-bottom: 25px;
}

.nav-header {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    padding-left: 10px;
}

.nav-link {
    display: block;
    padding: 8px 10px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    border-left: 2px solid transparent;
    transition: all 0.2s;
}

.nav-link:hover {
    background: var(--border);
    border-radius: 0 3px 3px 0;
}

.nav-link.active {
    color: var(--accent);
    border-left-color: var(--accent);
    background: var(--bg);
    border-radius: 0 3px 3px 0;
}

.content {
    flex: 1;
    min-width: 0;
    margin-left: 200px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mobile-toggle {
    display: none;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 10px 20px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    margin-bottom: 20px;
    width: 100%;
    max-width: 700px;
    border-radius: 3px;
}

.document {
    max-width: 700px;
    width: 100%;
    overflow-wrap: break-word;
}

.document h1 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}

.document h2 {
    font-size: 1.3rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.document h3 {
    font-size: 1.1rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.document p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.document ul,
.document ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

.document li {
    margin-bottom: 0.5rem;
}

.document a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.document a:hover {
    border-bottom-color: var(--accent);
}

.document strong {
    color: var(--text-primary);
}

.document code {
    background: var(--code-bg);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9rem;
}

.document pre {
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 15px 20px;
    overflow-x: auto;
    max-width: 100%;
    margin: 1rem 0;
}

.document pre code {
    background: none;
    padding: 0;
    font-size: 0.85rem;
    line-height: 1.6;
}

.nav-buttons {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.nav-btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 3px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.nav-btn:hover {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
}

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

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

    .mobile-close {
        display: block;
    }

    .content {
        margin-left: 0;
        padding: 20px;
    }

    .mobile-toggle {
        display: block;
    }

    .repo-name {
        display: none;
    }

    .document pre {
        overflow-x: hidden;
        white-space: pre-wrap;
        word-break: break-word;
    }
}