:root {
    --bg-color: #fff;
    --text-color: #333;
    --heading-color: #222;
    --link-color: #0366d6;
    --pre-bg-color: #f6f8fa;
    --code-bg-color: rgba(27,31,35,.05);
    --border-color: #eee;
}

[data-theme='dark'] {
    --bg-color: #0d1117;
    --text-color: #c9d1d9;
    --heading-color: #c9d1d9;
    --link-color: #58a6ff;
    --pre-bg-color: #161b22;
    --code-bg-color: rgba(240,246,252,0.15);
    --border-color: #30363d;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    margin: 0;
    padding: 20px;
    display: flex;
}

.nav-container {
    width: 200px;
    position: fixed;
    height: 100%;
    overflow-y: auto;
    border-right: 1px solid var(--border-color);
    padding: 20px;
}

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

nav ul li a {
    text-decoration: none;
    color: var(--link-color);
    display: block;
    padding: 5px 0;
}

nav ul li a:hover {
    text-decoration: underline;
}

nav ul ul {
    padding-left: 20px;
}

.content-container {
    margin-left: 220px;
    padding: 40px;
    max-width: 800px;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    color: var(--heading-color);
}

h1 { font-size: 2.5em; border-bottom: 1px solid var(--border-color); padding-bottom: 0.3em; }
h2 { font-size: 2em; border-bottom: 1px solid var(--border-color); padding-bottom: 0.3em; }
h3 { font-size: 1.5em; }
h4 { font-size: 1.2em; }
h5 { font-size: 1em; }
h6 { font-size: 0.9em; color: #555; }

p {
    margin-bottom: 1em;
}

a {
    color: var(--link-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

ul, ol {
    margin-bottom: 1em;
    padding-left: 2em;
}

ul li, ol li {
    margin-bottom: 0.5em;
}

blockquote {
    margin: 1em 0;
    padding: 0.5em 1em;
    color: #6a737d;
    border-left: 0.25em solid #dfe2e5;
}

blockquote p {
    margin: 0;
}

code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
    background-color: var(--code-bg-color);
    border-radius: 3px;
    padding: 0.2em 0.4em;
}

pre {
    background-color: var(--pre-bg-color);
    border-radius: 3px;
    padding: 1em;
    overflow-x: auto;
    margin-bottom: 1em;
}

pre code {
    background-color: transparent;
    padding: 0;
}

.theme-switcher-container {
    margin-bottom: 20px;
}

.theme-switcher {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.theme-switcher input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:focus + .slider {
    box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

@media (max-width: 768px) {
    body {
        display: block;
        padding: 0;
    }

    .nav-container {
        position: static;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 10px;
        box-sizing: border-box;
    }

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

    h1 { font-size: 2em; }
    h2 { font-size: 1.75em; }
    h3 { font-size: 1.25em; }

    pre {
        white-space: pre-wrap;
        word-wrap: break-word;
    }
}