/* === НОВОГОДНИЕ ЭФФЕКТЫ === */
/* Для отключения удалите подключение этого файла из index.html */

/* Делаем контейнер страницы относительным для позиционирования */
.page.active .container {
    position: relative;
}

/* Контейнер для снежинок */
#snowflakes-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    pointer-events: none;
    z-index: 10;
    overflow: visible;
}

/* Снежинка */
.snowflake {
    position: absolute;
    color: #fff;
    font-size: 1em;
    user-select: none;
    pointer-events: none;
    animation: snowfall linear infinite;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

/* Анимация падения снежинки */
@keyframes snowfall {
    0% {
        transform: translateY(-10px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0.8;
    }
}

/* Гирлянда */
#garland {
    position: relative;
    width: 100%;
    height: 60px;
    pointer-events: none;
    z-index: 5;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, transparent 100%);
    padding: 10px 0;
    margin-top: 20px;
    margin-bottom: 10px;
}

/* Волнистая линия гирлянды */
#garland::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 2px;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 10px,
        rgba(255, 215, 0, 0.3) 10px,
        rgba(255, 215, 0, 0.3) 20px
    );
}

/* Огоньки гирлянды */
.garland-light {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: relative;
    animation: blink 1.5s infinite;
    box-shadow: 0 0 10px currentColor, 0 0 20px currentColor;
}

/* Разные цвета для огоньков */
.garland-light:nth-child(6n+1) {
    background: #ff4757;
    color: #ff4757;
    animation-delay: 0s;
}

.garland-light:nth-child(6n+2) {
    background: #ffd700;
    color: #ffd700;
    animation-delay: 0.3s;
}

.garland-light:nth-child(6n+3) {
    background: #00d4aa;
    color: #00d4aa;
    animation-delay: 0.6s;
}

.garland-light:nth-child(6n+4) {
    background: #6366f1;
    color: #6366f1;
    animation-delay: 0.9s;
}

.garland-light:nth-child(6n+5) {
    background: #8b5cf6;
    color: #8b5cf6;
    animation-delay: 1.2s;
}

.garland-light:nth-child(6n+6) {
    background: #ff6b9d;
    color: #ff6b9d;
    animation-delay: 1.5s;
}

/* Анимация мигания огоньков */
@keyframes blink {
    0%, 49%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50%, 99% {
        opacity: 0.3;
        transform: scale(0.8);
    }
}

/* Крепление огонька к линии */
.garland-light::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 8px;
    background: rgba(255, 215, 0, 0.3);
}

/* Адаптация для мобильных */
@media (max-width: 480px) {
    #garland {
        height: 50px;
    }

    .garland-light {
        width: 10px;
        height: 10px;
    }

    .snowflake {
        font-size: 0.8em;
    }
}

/* Снижаем количество эффектов на слабых устройствах */
@media (prefers-reduced-motion: reduce) {
    .snowflake {
        animation-duration: 20s;
    }

    .garland-light {
        animation: none;
        opacity: 0.8;
    }
}

/* Новогодний акцент для заголовка */
.christmas-title {
    position: relative;
    display: inline-block;
}

.christmas-title::before {
    content: '🎄';
    position: absolute;
    left: -40px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    animation: sway 2s ease-in-out infinite;
}

.christmas-title::after {
    content: '🎁';
    position: absolute;
    right: -40px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    animation: sway 2s ease-in-out infinite reverse;
}

/* Анимация покачивания для елочки и подарка */
@keyframes sway {
    0%, 100% {
        transform: translateY(-50%) rotate(-5deg);
    }
    50% {
        transform: translateY(-50%) rotate(5deg);
    }
}

/* Снежный эффект для карточек при наведении */
.glass-card.christmas-effect:hover {
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.25),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
}

/* Новогодние частички для кнопок */
.glass-button.christmas-button {
    position: relative;
    overflow: hidden;
}

.glass-button.christmas-button::before {
    content: '❄️';
    position: absolute;
    top: 50%;
    left: -30px;
    transform: translateY(-50%);
    opacity: 0;
    transition: all 0.5s ease;
}

.glass-button.christmas-button:hover::before {
    left: 10px;
    opacity: 0.7;
}
