/* style.css */

/* Обнуление и типографика пропущены ради краткости, можно добавить отдельно */

:root {
    --bg: #ffffff;
    --fg: #3F3F3F;
    --link: #6ca2d8;
    --visited: #a26cd8;
    --code-bg: #cccccc;
    --blockquote: #cccccc;
}

html.theme-dark {
    --bg: #121212;
    --fg: #e0e0e0;
    --link: #66ccff;
    --visited: #bb86fc;
    --code-bg: #2b2b2b;
    --blockquote: #444444;
}

body {
    background-color: var(--bg);
    color: var(--fg);
    font-family: serif;
    font-size: 16px;
    line-height: 1.4;
    width: 90%;
    max-width: 800px;
    margin: auto;
    box-sizing: border-box;
}

a, a:link {
    text-decoration: underline;
    color: var(--link);
}
a:visited {
    color: var(--visited);
}

code, pre {
    font-family: monospace;
    font-size: 0.85rem;
    background-color: var(--code-bg);
    padding: 0.2rem;
    border-radius: 0.2rem;
}

blockquote {
    border-left: 0.3rem solid var(--blockquote);
    padding-left: 1rem;
    font-style: italic;
    margin-bottom: 1rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

body.blog header {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 1rem;
}

body.blog header h1 {
    font-size: 3rem;
}

.toolbar {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

#toggle-theme {
    background: transparent;
    border: 2px solid currentColor;
    border-radius: 50%;
    width: 2.2rem;
    height: 2.2rem;
    font-size: 1.2rem;
    line-height: 1.8rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

#toggle-theme:hover {
    background-color: rgba(0, 0, 0, 0.05);
    transform: scale(1.05);
}

html.theme-dark #toggle-theme:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

#theme-icon {
    transition: opacity 0.3s ease;
}

select#chapter-select {
    font-size: 0.9rem;
    padding: 0.3rem;
}
