/**
 * Стили для праздничных эффектов
 * Адаптивные для desktop и mobile
 */

/* Общий контейнер эффектов */
#holiday-effects-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

/* Контейнер баннера */
#holiday-banner-container {
    position: relative;
    z-index: 9997;
}

/* Праздничный баннер */
.holiday-banner {
    width: 100%;
    padding: 12px 20px;
    text-align: center;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    animation: bannerSlideDown 0.5s ease-out;
}

.holiday-banner a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.3s;
}

.holiday-banner a:hover {
    opacity: 0.8;
}

@keyframes bannerSlideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Снежинки */
.snowflake {
    position: absolute;
    color: white;
    text-shadow: 0 0 5px rgba(255,255,255,0.8);
    user-select: none;
    pointer-events: none;
}

@keyframes snowfall {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
    }
    100% {
        transform: translateY(100vh) translateX(100px) rotate(360deg);
    }
}

/* Гирлянды */
.holiday-garland {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    z-index: 9998;
    pointer-events: none;
}

@keyframes garlandBlink {
    0%, 100% { 
        opacity: 1;
        filter: brightness(1);
    }
    50% { 
        opacity: 0.6;
        filter: brightness(0.8);
    }
}

/* Цветы */
.flower {
    position: absolute;
    user-select: none;
    pointer-events: none;
    filter: drop-shadow(0 0 3px rgba(0,0,0,0.2));
}

@keyframes flowerFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0.5;
    }
}

/* Сердечки */
.heart {
    position: absolute;
    user-select: none;
    pointer-events: none;
    filter: drop-shadow(0 0 5px rgba(255,192,203,0.5));
}

@keyframes heartRise {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    50% {
        transform: translateY(-50vh) scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: translateY(-100vh) scale(1.5);
        opacity: 0;
    }
}

/* Конфетти */
.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    pointer-events: none;
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Фейерверки */
.firework {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    pointer-events: none;
}

@keyframes fireworkExplode {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--x), var(--y)) scale(0);
        opacity: 0;
    }
}

/* Адаптивность для планшетов */
@media (max-width: 768px) {
    .holiday-banner {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .holiday-garland {
        height: 40px;
    }
    
    /* Уменьшаем количество снежинок на мобильных */
    .snowflake:nth-child(n+30) {
        display: none;
    }
    
    /* Уменьшаем размер эффектов */
    .flower, .heart {
        transform: scale(0.8);
    }
}

/* Адаптивность для мобильных */
@media (max-width: 480px) {
    .holiday-banner {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .holiday-garland {
        height: 30px;
    }
    
    /* Еще больше уменьшаем снежинки */
    .snowflake:nth-child(n+20) {
        display: none;
    }
    
    /* Уменьшаем размер эффектов */
    .flower, .heart {
        transform: scale(0.6);
    }
    
    .snowflake {
        font-size: 12px !important;
    }
}

/* Оптимизация производительности */
@media (prefers-reduced-motion: reduce) {
    .snowflake,
    .flower,
    .heart,
    .confetti,
    .firework {
        animation: none;
        display: none;
    }
    
    .holiday-garland {
        animation: none;
    }
}

/* Темная тема (если используется) */
@media (prefers-color-scheme: dark) {
    .snowflake {
        color: #e0e0e0;
        text-shadow: 0 0 5px rgba(255,255,255,0.5);
    }
}

/* Эффект мерцания для огней */
.twinkle {
    animation: twinkle 1.5s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.9);
    }
}

/* Пульсация */
.pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

/* Плавное появление */
.fade-in {
    animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Закрытие баннера */
.holiday-banner-close {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.1);
    border: none;
    color: inherit;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    pointer-events: all;
}

.holiday-banner-close:hover {
    background: rgba(0,0,0,0.2);
}

/* Overlay для модальных праздничных окон */
.holiday-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9996;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
}

.holiday-modal {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* GPU ускорение для анимаций */
.snowflake,
.flower,
.heart,
.confetti,
.firework {
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Защита от overflow на мобильных */
@media (max-width: 768px) {
    body.holiday-effects-active {
        overflow-x: hidden;
    }
}

