/* Baby Animation CSS - Анимированные детские предметы для фона */
/* Создано для сайта babyjo.ru */

/* Контейнер для анимированных элементов */
.baby-floating-items {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

/* Базовые стили для летающих предметов */
.baby-item {
    position: absolute;
    font-size: 24px;
    color: rgba(255, 192, 203, 0.3); /* Розовый полупрозрачный */
    pointer-events: none;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}

/* Разные цвета для предметов */
.baby-item.blue {
    color: rgba(135, 206, 235, 0.3); /* Голубой полупрозрачный */
}

.baby-item.yellow {
    color: rgba(255, 255, 0, 0.3); /* Желтый полупрозрачный */
}

.baby-item.green {
    color: rgba(144, 238, 144, 0.3); /* Светло-зеленый полупрозрачный */
}

.baby-item.purple {
    color: rgba(221, 160, 221, 0.3); /* Сиреневый полупрозрачный */
}

/* Анимации движения */
@keyframes float-right {
    0% {
        transform: translateX(-100px) translateY(0px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateX(calc(100vw + 100px)) translateY(-50px) rotate(360deg);
        opacity: 0;
    }
}

@keyframes float-left {
    0% {
        transform: translateX(calc(100vw + 100px)) translateY(0px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateX(-100px) translateY(-50px) rotate(-360deg);
        opacity: 0;
    }
}

@keyframes float-up {
    0% {
        transform: translateY(calc(100vh + 100px)) translateX(0px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) translateX(50px) rotate(180deg);
        opacity: 0;
    }
}

@keyframes float-diagonal {
    0% {
        transform: translateX(-100px) translateY(calc(100vh + 100px)) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateX(calc(100vw + 100px)) translateY(-100px) rotate(270deg);
        opacity: 0;
    }
}

@keyframes gentle-bounce {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(90deg);
    }
    50% {
        transform: translateY(-5px) rotate(180deg);
    }
    75% {
        transform: translateY(-15px) rotate(270deg);
    }
}

/* Конкретные элементы с разными анимациями */

/* Бутылочки 🍼 */
.baby-item.bottle-1 {
    top: 10%;
    left: -100px;
    animation: float-right 25s linear infinite;
    animation-delay: 0s;
}

.baby-item.bottle-2 {
    top: 60%;
    right: -100px;
    animation: float-left 30s linear infinite;
    animation-delay: 8s;
}

.baby-item.bottle-3 {
    bottom: -100px;
    left: 20%;
    animation: float-up 22s linear infinite;
    animation-delay: 15s;
}

/* Мишки 🧸 */
.baby-item.bear-1 {
    top: 30%;
    left: -100px;
    animation: float-right 28s linear infinite;
    animation-delay: 5s;
    font-size: 28px;
}

.baby-item.bear-2 {
    bottom: 20%;
    right: -100px;
    animation: float-left 26s linear infinite;
    animation-delay: 12s;
    font-size: 32px;
}

.baby-item.bear-3 {
    bottom: -100px;
    right: 30%;
    animation: float-up 24s linear infinite;
    animation-delay: 20s;
    font-size: 26px;
}

/* Пустышки 🍼 (используем как соску) */
.baby-item.pacifier-1 {
    top: 50%;
    left: -100px;
    animation: float-right 20s linear infinite;
    animation-delay: 3s;
    font-size: 20px;
}

.baby-item.pacifier-2 {
    top: 80%;
    right: -100px;
    animation: float-left 25s linear infinite;
    animation-delay: 10s;
    font-size: 22px;
}

/* Коляски 🛒 (используем как детская коляска) */
.baby-item.stroller-1 {
    bottom: -100px;
    left: 10%;
    animation: float-diagonal 35s linear infinite;
    animation-delay: 7s;
    font-size: 30px;
}

.baby-item.stroller-2 {
    top: 20%;
    right: -100px;
    animation: float-left 32s linear infinite;
    animation-delay: 18s;
    font-size: 28px;
}

/* Погремушки (используем звездочки) ⭐ */
.baby-item.rattle-1 {
    top: 70%;
    left: -100px;
    animation: float-right 18s linear infinite;
    animation-delay: 6s;
    font-size: 24px;
}

.baby-item.rattle-2 {
    bottom: -100px;
    right: 15%;
    animation: float-up 27s linear infinite;
    animation-delay: 13s;
    font-size: 26px;
}

.baby-item.rattle-3 {
    top: 40%;
    right: -100px;
    animation: float-left 23s linear infinite;
    animation-delay: 21s;
    font-size: 22px;
}

/* Сердечки 💖 */
.baby-item.heart-1 {
    bottom: -100px;
    left: 50%;
    animation: float-up 29s linear infinite;
    animation-delay: 4s;
    font-size: 20px;
}

.baby-item.heart-2 {
    top: 25%;
    left: -100px;
    animation: float-right 31s linear infinite;
    animation-delay: 16s;
    font-size: 24px;
}

.baby-item.heart-3 {
    top: 85%;
    right: -100px;
    animation: float-left 21s linear infinite;
    animation-delay: 9s;
    font-size: 18px;
}

/* Облачка ☁️ */
.baby-item.cloud-1 {
    top: 15%;
    right: -100px;
    animation: float-left 40s linear infinite;
    animation-delay: 2s;
    font-size: 32px;
}

.baby-item.cloud-2 {
    bottom: -100px;
    right: 25%;
    animation: float-up 35s linear infinite;
    animation-delay: 14s;
    font-size: 28px;
}

/* Луна и звезды 🌙 */
.baby-item.moon-1 {
    top: 5%;
    left: -100px;
    animation: float-right 45s linear infinite;
    animation-delay: 11s;
    font-size: 30px;
}

.baby-item.star-1 {
    bottom: -100px;
    left: 70%;
    animation: float-diagonal 33s linear infinite;
    animation-delay: 17s;
    font-size: 16px;
}

.baby-item.star-2 {
    top: 65%;
    right: -100px;
    animation: float-left 19s linear infinite;
    animation-delay: 22s;
    font-size: 18px;
}

/* Адаптивные стили для мобильных устройств */
@media screen and (max-width: 768px) {
    .baby-item {
        font-size: 18px;
    }

    .baby-item.bear-1,
    .baby-item.bear-2,
    .baby-item.bear-3 {
        font-size: 22px;
    }

    .baby-item.stroller-1,
    .baby-item.stroller-2 {
        font-size: 24px;
    }

    .baby-item.cloud-1,
    .baby-item.cloud-2 {
        font-size: 26px;
    }
}

@media screen and (max-width: 480px) {
    .baby-item {
        font-size: 16px;
    }

    /* Уменьшаем количество элементов на очень маленьких экранах */
    .baby-item.bottle-3,
    .baby-item.bear-3,
    .baby-item.rattle-3,
    .baby-item.heart-3,
    .baby-item.star-2 {
        display: none;
    }
}

/* Эффект при наведении на страницу - элементы слегка замедляются */
body:hover .baby-item {
    animation-duration: calc(var(--duration, 25s) * 1.2);
}

/* Дополнительные эффекты свечения для некоторых элементов */
.baby-item.heart-1,
.baby-item.heart-2,
.baby-item.heart-3 {
    text-shadow: 0 0 10px rgba(255, 192, 203, 0.5);
}

.baby-item.star-1,
.baby-item.star-2 {
    text-shadow: 0 0 8px rgba(255, 255, 0, 0.4);
}

.baby-item.moon-1 {
    text-shadow: 0 0 15px rgba(135, 206, 235, 0.4);
}

/* Пульсирующий эффект для некоторых элементов */
@keyframes gentle-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.5;
    }
}

.baby-item.heart-1,
.baby-item.star-1 {
    animation: float-up 29s linear infinite, gentle-pulse 3s ease-in-out infinite;
}

.baby-item.moon-1 {
    animation: float-right 45s linear infinite, gentle-pulse 4s ease-in-out infinite;
}
