:root {
    --app-height: var(--app-height);
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Serif', serif;
    overflow: hidden;
    width: 100vw;
    height: var(--app-height);
    position: relative;
    background: #ffffff;
}

/* Слои для плавной смены градиентов */
.gradient-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    transition: opacity 1.5s ease-in-out;
}

#gradient-layer-1 {
    z-index: 1;
}

#gradient-layer-2 {
    z-index: 2;
}

/* Начальная анимация логотипа */
.logo-intro {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: var(--app-height);
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    z-index: 1000;
    transition: opacity 1.5s ease-in-out;
}

.logo-intro.fade-out {
    opacity: 0;
    pointer-events: none;
}

.logo-circle {
    width: 25vmax;
    height: 25vmax;
    background: radial-gradient(circle at center, #FD5155 0%, #D70026 100%);
    border-radius: 50%;
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    animation: circleDropAndExpand 4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes circleDropAndExpand {
    0% {
        top: -50%;
        width: 25vmax;
        height: 25vmax;
        border-radius: 50%;
    }

    20% {
        top: 50%;
        width: 25vmax;
        height: 25vmax;
        border-radius: 50%;
    }

    40% {
        top: 50%;
        width: 25vmax;
        height: 25vmax;
        border-radius: 50%;
    }

    65% {
        top: 50%;
        width: 250vmax;
        height: 250vmax;
        border-radius: 50%;
    }

    85% {
        top: 50%;
        width: 280vmax;
        height: 280vmax;
        border-radius: 30%;
    }

    100% {
        top: 50%;
        width: 300vmax;
        height: 300vmax;
        border-radius: 0;
    }
}

.logo {
    width: 12vmax;
    height: auto;
    z-index: 2;
    position: relative;
    animation: logoFade 4s ease-out forwards;
}

@keyframes logoFade {

    0%,
    55% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(1.3);
    }
}

/* Контейнер слайдов */
.slides-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: var(--app-height);
    z-index: 100;
}

.slide {
    display: flex;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
}

.slide.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
}

.slide-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    color: #ffffff;
    text-align: center;
    padding: 20px;
    position: relative;
    max-height: 74vh;
    padding: 23px;
}

/* Логотип - статичный в верхней части */
.logo-wrapper {
    z-index: 10;
}

.slide-logo {
    width: 11vmax;
    height: auto;
    transition: transform 0.4s ease-in-out;
}

/* Анимация пульсации логотипа */
.slide-logo.pulse {
    animation: logoPulse 0.8s ease-in-out;
}

@keyframes logoPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(0.85);
    }

    100% {
        transform: scale(1);
    }
}

/* Изображение конфеты - анимация справа */
.candy-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    z-index: 5;
}

.candy-image.active {
    opacity: 1;
}

.candy-image.slide-in-right {
    animation: slideInFromRight 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.candy-image.fade-out-left {
    animation: fadeOutToLeft 1s cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards;
}

@keyframes slideInFromRight {
    0% {
        opacity: 0;
        transform: translate(100%, -50%) scale(0.8);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes fadeOutToLeft {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(-150%, -50%) scale(0.9);
    }
}

.candy-image img {
    max-width: 50vmax;
    height: auto;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
    max-height: 272px;
}

/* Текст - статичный внизу */
.text-content {
    width: 90%;
    max-width: 1000px;
    z-index: 10;
}

.text-content h2 {
    font-size: 3vmax;
    font-weight: 400;
    font-style: italic;
    margin-bottom: 1vmax;
    line-height: 1.3;
}

.text-content p {
    font-size: 1.5vmax;
    font-weight: 300;
    opacity: 0.9;
    line-height: 1.5;
}

/* Адаптивность */
@media (max-width: 768px) {
    .logo {
        width: 15vmax;
    }

    .logo-wrapper {
        top: 4vmax;
    }

    .slide-logo {
        width: 12vmax;
    }

    .candy-image img {
        max-width: 55vmax;
    }

    .text-content {
        bottom: 6vmax;
    }

    .text-content h2 {
        font-size: 4vmax;
    }

    .text-content p {
        font-size: 2vmax;
    }
}

@media (max-width: 480px) {
    .logo {
        width: 18vmax;
    }

    .logo-wrapper {
        top: 3vmax;
    }

    .slide-logo {
        width: 15vmax;
    }

    .candy-image img {
        max-width: 40vmax;
        max-height: 165px;
    }

    .text-content {
        bottom: 5vmax;
    }

    .text-content h2 {
        font-size: 4.5vmax;
    }

    .text-content p {
        font-size: 2.2vmax;
    }
}

/* Ориентация */
@media (orientation: landscape) and (max-height: 600px) {
    .logo-wrapper {
        top: 3vmax;
    }

    .slide-logo {
        width: 7vmax;
    }

    .candy-image img {
        max-width: 40vmax;
        max-height: 50vh;
    }

    .text-content {
        bottom: 4vmax;
    }

    .text-content h2 {
        font-size: 2.5vmax;
    }

    .text-content p {
        font-size: 1.3vmax;
    }
}