:root {
    color-scheme: light;
    --primary: #16324f;
    --accent: #3498db;
    --text: #20364d;
    --muted-text: #4d647c;
    --bg-start: #f7fbff;
    --bg-end: #d7e7f5;
    --hero-gradient-start: #16324f;
    --hero-gradient-end: #3498db;
    --switcher-bg: rgba(255, 255, 255, 0.76);
    --switcher-border: rgba(155, 181, 206, 0.42);
    --switcher-shadow: 0 18px 36px rgba(31, 52, 75, 0.14);
    --switcher-group-bg: rgba(233, 242, 251, 0.86);
    --toggle-bg: linear-gradient(135deg, rgba(52, 152, 219, 0.16), rgba(93, 173, 226, 0.26));
    --toggle-hover-bg: linear-gradient(135deg, rgba(74, 170, 230, 0.28), rgba(121, 194, 241, 0.38));
    --toggle-color: #1f5686;
    --button-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.72) 0%, rgba(231, 242, 252, 0.54) 100%);
    --button-border: rgba(150, 183, 213, 0.42);
    --button-text: #17324a;
    --button-hover-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.88) 0%, rgba(205, 229, 248, 0.72) 100%);
    --button-hover-border: rgba(93, 173, 226, 0.45);
    --button-shadow: 0 14px 30px rgba(39, 63, 89, 0.12);
    --button-hover-shadow: 0 18px 36px rgba(39, 63, 89, 0.16);
    --footer-color: #45617d;
    --link-color: #16324f;
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --primary: #2c3e50;
        --text: #ecf0f1;
        --muted-text: #c9d6e2;
        --bg-start: #1e272e;
        --bg-end: #2c3e50;
        --hero-gradient-start: #ffffff;
        --hero-gradient-end: #3498db;
        --switcher-bg: rgba(20, 31, 43, 0.76);
        --switcher-border: rgba(255, 255, 255, 0.12);
        --switcher-shadow: 0 18px 36px rgba(5, 13, 20, 0.28);
        --switcher-group-bg: rgba(255, 255, 255, 0.08);
        --toggle-bg: linear-gradient(135deg, rgba(52, 152, 219, 0.18), rgba(93, 173, 226, 0.3));
        --toggle-hover-bg: linear-gradient(135deg, rgba(74, 170, 230, 0.3), rgba(121, 194, 241, 0.42));
        --toggle-color: #dbeafe;
        --button-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.08) 100%);
        --button-border: rgba(255, 255, 255, 0.18);
        --button-text: #f3f8fd;
        --button-hover-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.18) 0%, rgba(114, 187, 241, 0.12) 100%);
        --button-hover-border: rgba(143, 205, 255, 0.34);
        --button-shadow: 0 14px 30px rgba(5, 13, 20, 0.18);
        --button-hover-shadow: 0 18px 36px rgba(7, 16, 26, 0.22);
        --footer-color: #d0deea;
        --link-color: #dbeafe;
    }
}
html {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: linear-gradient(135deg, var(--bg-start) 0%, var(--bg-end) 100%);
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    width: 100%;
    padding: 2rem 1rem 5.75rem;
    box-sizing: border-box;
    position: relative;
    isolation: isolate;
}

@media (prefers-color-scheme: dark) {
    body {
        background-attachment: scroll;
        background-color: #050914;
        background-image:
            radial-gradient(ellipse at 17% 22%, rgba(96, 125, 195, 0.26) 0%, transparent 40%),
            radial-gradient(ellipse at 75% 61%, rgba(255, 226, 178, 0.08) 0%, transparent 34%),
            linear-gradient(116deg, transparent 22%, rgba(170, 193, 248, 0.06) 38%, rgba(255, 255, 255, 0.1) 47%, rgba(128, 165, 236, 0.06) 56%, transparent 72%),
            radial-gradient(circle at 5.1% 12.4%, rgba(255, 255, 255, 0.96) 0 1.65px, transparent 2.95px),
            radial-gradient(circle at 8.7% 58.6%, rgba(202, 225, 255, 0.62) 0 0.72px, transparent 1.32px),
            radial-gradient(circle at 14.9% 27.6%, rgba(255, 243, 208, 0.58) 0 0.9px, transparent 1.55px),
            radial-gradient(circle at 19.8% 74.8%, rgba(255, 255, 255, 0.42) 0 0.56px, transparent 1.06px),
            radial-gradient(circle at 24.1% 17.5%, rgba(186, 217, 255, 0.8) 0 1.1px, transparent 1.94px),
            radial-gradient(circle at 28.2% 47.3%, rgba(255, 255, 255, 0.36) 0 0.5px, transparent 0.96px),
            radial-gradient(circle at 32.6% 83.1%, rgba(255, 244, 214, 0.52) 0 0.78px, transparent 1.42px),
            radial-gradient(circle at 37.9% 9.1%, rgba(225, 236, 255, 0.56) 0 0.66px, transparent 1.22px),
            radial-gradient(circle at 42.2% 64.1%, rgba(255, 255, 255, 0.34) 0 0.48px, transparent 0.92px),
            radial-gradient(circle at 47.4% 23.7%, rgba(146, 201, 255, 0.46) 0 0.7px, transparent 1.28px),
            radial-gradient(circle at 52.7% 79.4%, rgba(255, 255, 255, 0.86) 0 1.2px, transparent 2.06px),
            radial-gradient(circle at 56.1% 39.4%, rgba(255, 243, 208, 0.44) 0 0.62px, transparent 1.16px),
            radial-gradient(circle at 60.4% 13.2%, rgba(202, 224, 255, 0.58) 0 0.84px, transparent 1.48px),
            radial-gradient(circle at 64.5% 55.1%, rgba(255, 255, 255, 0.32) 0 0.46px, transparent 0.9px),
            radial-gradient(circle at 69.3% 87.6%, rgba(255, 243, 208, 0.66) 0 1px, transparent 1.72px),
            radial-gradient(circle at 73.6% 22.4%, rgba(255, 255, 255, 0.52) 0 0.68px, transparent 1.24px),
            radial-gradient(circle at 78.5% 45.2%, rgba(160, 211, 255, 0.42) 0 0.62px, transparent 1.14px),
            radial-gradient(circle at 82.1% 68.7%, rgba(255, 255, 255, 0.38) 0 0.54px, transparent 1.02px),
            radial-gradient(circle at 87.4% 15.3%, rgba(255, 243, 208, 0.74) 0 1.28px, transparent 2.14px),
            radial-gradient(circle at 90.2% 54.7%, rgba(255, 255, 255, 0.34) 0 0.5px, transparent 0.96px),
            radial-gradient(circle at 94.1% 81.8%, rgba(188, 217, 255, 0.6) 0 0.88px, transparent 1.52px),
            radial-gradient(circle at 96.8% 30.6%, rgba(255, 255, 255, 0.44) 0 0.64px, transparent 1.18px),
            radial-gradient(circle at 6.7% 43.1%, rgba(255, 255, 255, 0.28) 0 0.42px, transparent 0.84px),
            radial-gradient(circle at 10.9% 87.6%, rgba(182, 214, 255, 0.34) 0 0.52px, transparent 0.98px),
            radial-gradient(circle at 15.8% 7.9%, rgba(255, 244, 214, 0.3) 0 0.48px, transparent 0.92px),
            radial-gradient(circle at 21.6% 60.4%, rgba(255, 255, 255, 0.24) 0 0.38px, transparent 0.8px),
            radial-gradient(circle at 26.3% 35.2%, rgba(189, 218, 255, 0.3) 0 0.46px, transparent 0.9px),
            radial-gradient(circle at 30.7% 72.8%, rgba(255, 255, 255, 0.26) 0 0.44px, transparent 0.86px),
            radial-gradient(circle at 35.1% 54.3%, rgba(255, 243, 208, 0.28) 0 0.42px, transparent 0.84px),
            radial-gradient(circle at 40.4% 18.6%, rgba(255, 255, 255, 0.22) 0 0.36px, transparent 0.76px),
            radial-gradient(circle at 45.2% 90.7%, rgba(176, 210, 255, 0.32) 0 0.5px, transparent 0.94px),
            radial-gradient(circle at 50.8% 47.1%, rgba(255, 255, 255, 0.24) 0 0.4px, transparent 0.82px),
            radial-gradient(circle at 58.3% 66.5%, rgba(255, 243, 208, 0.3) 0 0.46px, transparent 0.9px),
            radial-gradient(circle at 62.4% 28.1%, rgba(255, 255, 255, 0.26) 0 0.44px, transparent 0.86px),
            radial-gradient(circle at 67.6% 8.1%, rgba(185, 216, 255, 0.32) 0 0.5px, transparent 0.96px),
            radial-gradient(circle at 72.4% 81.3%, rgba(255, 255, 255, 0.22) 0 0.36px, transparent 0.76px),
            radial-gradient(circle at 76.8% 36.4%, rgba(255, 243, 208, 0.28) 0 0.42px, transparent 0.84px),
            radial-gradient(circle at 81.6% 57.1%, rgba(255, 255, 255, 0.24) 0 0.4px, transparent 0.82px),
            radial-gradient(circle at 85.9% 92.4%, rgba(183, 214, 255, 0.3) 0 0.48px, transparent 0.92px),
            radial-gradient(circle at 92.6% 23.5%, rgba(255, 255, 255, 0.26) 0 0.44px, transparent 0.88px),
            linear-gradient(135deg, var(--bg-start) 0%, var(--bg-end) 100%);
        background-size: auto;
        background-repeat: no-repeat;
    }

}

.language-switcher {
    position: fixed;
    top: 1.1rem;
    right: 1.1rem;
    z-index: 10000;
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 0;
    width: auto;
    max-width: calc(100vw - 1.5rem);
    padding: 0.5rem;
    background: var(--switcher-bg);
    border: 1px solid var(--switcher-border);
    border-radius: 999px;
    box-shadow: var(--switcher-shadow);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.language-switcher__toggle {
    display: inline-grid;
    place-items: center;
    width: 3.2rem;
    min-width: 3.2rem;
    height: 3.2rem;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 999px;
    background: var(--toggle-bg);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--toggle-color);
    box-shadow: 0 8px 18px rgba(14, 28, 41, 0.14);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.language-switcher__toggle:hover {
    transform: translateY(-1px);
    background: var(--toggle-hover-bg);
    box-shadow: 0 12px 22px rgba(14, 28, 41, 0.18);
}

.language-switcher__toggle:focus-visible {
    outline: 2px solid rgba(100, 181, 246, 0.45);
    outline-offset: 2px;
}

.language-switcher__icon {
    display: block;
    font-size: 1.75rem;
    line-height: 1;
}

.language-switcher__group {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    max-width: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 999px;
    background: var(--switcher-group-bg);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(0.35rem);
    transition:
        max-width 0.26s ease,
        opacity 0.18s ease,
        visibility 0.18s ease,
        transform 0.26s ease,
        padding 0.26s ease;
}

.language-switcher.is-expanded .language-switcher__group {
    max-width: 18rem;
    margin-left: 0.45rem;
    padding: 0.18rem;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
}

.language-switcher__button {
    width: auto;
    margin-top: 0;
    min-width: 3.6rem;
    padding: 0.56rem 0.9rem;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--link-color);
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: none;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.language-switcher__button:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.language-switcher__button.is-active {
    background: linear-gradient(135deg, #2f8fd6, #64b5f6);
    color: #fff;
    box-shadow: 0 8px 18px rgba(47, 143, 214, 0.34);
}

.language-switcher__button:focus-visible {
    outline: 2px solid rgba(100, 181, 246, 0.45);
    outline-offset: 2px;
}

.hero {
    text-align: center;
    width: min(100%, 760px);
    padding: 32px 20px 20px;
    animation: fadeIn 1.2s ease-out;
    box-sizing: border-box;
}
h1 {
    font-size: 4rem;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
    background: linear-gradient(to right, var(--hero-gradient-start), var(--hero-gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
p {
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--muted-text);
    max-width: 680px;
    margin: 0 auto 2rem;
}

.hero__actions {
    display: flex;
    flex-direction: column;
    gap: 0.68rem;
    align-items: stretch;
    width: min(100%, 420px);
    margin: 0 auto;
}

.btn {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    width: 100%;
    padding: 12px 16px;
    background: var(--button-bg);
    color: var(--button-text);
    text-decoration: none;
    border: 1px solid var(--button-border);
    border-radius: 18px;
    font-weight: 700;
    font-size: clamp(0.86rem, 1vw + 0.48rem, 1rem);
    line-height: 1.25;
    text-align: center;
    letter-spacing: 0.02em;
    overflow-wrap: anywhere;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
    box-shadow: var(--button-shadow);
    box-sizing: border-box;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--button-hover-shadow);
    background: var(--button-hover-bg);
    border-color: var(--button-hover-border);
}

.btn--library {
    width: 100%;
}

.site-footer {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    align-items: center;
    width: min(100%, 720px);
    margin-top: 1.75rem;
    align-self: center;
    text-align: center;
    color: var(--footer-color);
}

.site-footer * {
    font-size: 0.9rem;
    margin: 0;
}

.site-footer__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.85rem;
}

.site-footer a {
    color: var(--link-color);
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

    body {
        align-items: flex-start;
        padding: 5.75rem 0.9rem 1.5rem;
    }

    .hero {
        width: 100%;
        padding: 20px 0 12px;
    }

    .hero__actions {
        gap: 0.65rem;
        width: 100%;
    }

    .btn {
        min-height: 52px;
        padding: 0.95rem 1rem;
        font-size: 0.9rem;
        line-height: 1.35;
        border-radius: 16px;
    }

    .btn--library {
        width: 100%;
    }

    .site-footer {
        margin-top: 1.25rem;
        gap: 0.35rem;
    }

    .site-footer__links {
        gap: 0.7rem;
    }

    .language-switcher {
        top: 0.75rem;
        right: 0.75rem;
        gap: 0;
        padding: 0.42rem;
        max-width: calc(100vw - 1rem);
    }

    .language-switcher__toggle {
        width: 2.85rem;
        min-width: 2.85rem;
        height: 2.85rem;
    }

    .language-switcher__icon {
        font-size: 1.6rem;
    }

    .language-switcher__group {
        gap: 0.25rem;
    }

    .language-switcher.is-expanded .language-switcher__group {
        max-width: min(15.5rem, calc(100vw - 5.25rem));
        margin-left: 0.35rem;
    }

    .language-switcher__button {
        min-width: 3.1rem;
        padding: 0.46rem 0.66rem;
        font-size: 0.78rem;
    }
}

@media (max-width: 420px) {
    body {
        padding: 5.5rem 0.75rem 1.25rem;
    }

    h1 {
        font-size: 2.15rem;
        line-height: 1.08;
    }

    p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .hero__actions {
        gap: 0.55rem;
    }

    .btn {
        min-height: 50px;
        padding: 0.88rem 0.95rem;
        font-size: 0.84rem;
        border-radius: 15px;
    }
}
