:root {
    --ifm-color-primary: #0004a9;
    --ifm-color-primary-dark: #000498;
    --ifm-color-primary-darker: #00038f;
    --ifm-color-primary-darkest: #000376;
    --ifm-color-primary-light: #0005ba;
    --ifm-color-primary-lighter: #0005c3;
    --ifm-color-primary-lightest: #0006dc;
    --ifm-code-font-size: 95%;
    --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
}

[data-theme='dark'] {
    --ifm-color-primary: #4d8cff;
    --ifm-color-primary-dark: #2a7aff;
    --ifm-color-primary-darker: #1971ff;
    --ifm-color-primary-darkest: #005ae6;
    --ifm-color-primary-light: #709eff;
    --ifm-color-primary-lighter: #81a7ff;
    --ifm-color-primary-lightest: #b5c9ff;
    --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    background-color: #f9fafb;
    color: #1f2a44;
    transition: background-color 0.3s, color 0.3s;
}

[data-theme='dark'] body {
    background-color: #1f2a44;
    color: #f9fafb;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

h1 {
    font-size: 3rem;
    color: var(--ifm-color-primary);
    text-align: center;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

p.intro {
    font-size: 1.25rem;
    text-align: center;
    margin-bottom: 2rem;
    color: #4b5563;
}

[data-theme='dark'] p.intro {
    color: #d1d5db;
}

.theme-toggle {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--ifm-color-primary);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.2s;
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.theme-toggle .sun-icon {
    display: none;
}

.theme-toggle .moon-icon {
    display: block;
}

[data-theme='dark'] .theme-toggle .sun-icon {
    display: block;
}

[data-theme='dark'] .theme-toggle .moon-icon {
    display: none;
}

[data-theme='dark'] .theme-toggle {
    background: var(--ifm-color-primary-light);
}

.theme-toggle:hover {
    background: var(--ifm-color-primary-dark);
}

[data-theme='dark'] .theme-toggle:hover {
    background: var(--ifm-color-primary-lighter);
}

.back-link {
    display: inline-block;
    margin-bottom: 2rem;
    text-decoration: none;
    color: var(--ifm-color-primary);
    font-size: 1.1rem;
    font-weight: 500;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--ifm-color-primary-lighter);
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.2rem;
    }

    .container {
        padding: 2rem 1rem;
    }
}