html {
    min-height: 100%;
    background: var(--bg);
    color: var(--text);
    transition:
        background-color var(--transition-normal),
        color var(--transition-normal);
}

body {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    overflow-x: hidden;
    background: transparent;
    color: var(--text);
    transition: color var(--transition-normal);
}

/* Фоновая атмосфера */

body::before,
body::after {
    position: fixed;
    z-index: -1;
    content: "";
    pointer-events: none;
    border-radius: 50%;
    filter: blur(75px);
    will-change: transform;
}

body::before {
    top: -35%;
    left: -15%;
    width: 75vw;
    height: 65vw;
    max-height: 900px;
    background: radial-gradient(
        ellipse,
        var(--wave-one) 0%,
        var(--wave-two) 38%,
        transparent 72%
    );
    animation: background-wave-one 28s ease-in-out infinite alternate;
}

body::after {
    right: -20%;
    bottom: -40%;
    width: 80vw;
    height: 70vw;
    max-height: 950px;
    background: radial-gradient(
        ellipse,
        var(--wave-three) 0%,
        var(--wave-two) 42%,
        transparent 72%
    );
    animation: background-wave-two 34s ease-in-out infinite alternate;
}

/* Прозрачность общей оболочки, чтобы фон был виден */

#app,
.app {
    background: transparent;
}

@keyframes background-wave-one {
    0% {
        transform: translate3d(0, 0, 0) scale(1);
    }

    50% {
        transform: translate3d(9vw, 7vh, 0) scale(1.12);
    }

    100% {
        transform: translate3d(15vw, -5vh, 0) scale(0.95);
    }
}

@keyframes background-wave-two {
    0% {
        transform: translate3d(0, 0, 0) scale(1);
    }

    50% {
        transform: translate3d(-9vw, -6vh, 0) scale(1.08);
    }

    100% {
        transform: translate3d(-14vw, 5vh, 0) scale(0.94);
    }
}

/* Плавная смена темы */

html.theme-transition,
html.theme-transition *,
html.theme-transition *::before,
html.theme-transition *::after {
    transition:
        background-color 0.3s ease,
        color 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease !important;
}

/* Выделение и фокус */

::selection {
    background: var(--accent-soft);
    color: var(--text);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* Уважение системной настройки уменьшения анимации */

@media (prefers-reduced-motion: reduce) {
    body::before,
    body::after {
        animation: none;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
