/* =======================================
 * Зимние эффекты: Снег (CSS Animation) и Украшения
 * ======================================= */

/* --- 1. Снег (CSS Animation) --- */
.winter-effects-wrap {
    width: 100%;
    height: 100%;
    position: fixed; /* Используем fixed, чтобы покрыть весь экран, даже при прокрутке */
    top: 0;
    left: 0;
    z-index: 99998; /* Высокий z-index, но ниже кнопки и гирлянды */
    pointer-events: none;
    transition: opacity 0.5s ease-in-out;
}

#snow-canvas {
    width: 100%;
    height: 100%;
    /* ❗ Используем ваши фоновые изображения снега */
    background-image: url("../images/snow1.png"), url("/images/snow2.png"), url("/images/snow3.png");
    background-repeat: repeat;
    background-color: transparent; /* Убедитесь, что фон прозрачный */
    animation: snow 20s linear infinite;
}

/* Если 'light-theme', применяем эффект */
body.light-theme #snow-canvas {
    filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.3));
}

/* Скрытое состояние (для кнопки "Выкл.") */
.winter-effects-wrap.winter-hidden {
    opacity: 0;
}
.winter-effects-wrap.winter-visible {
    opacity: 1;
}

@keyframes snow {
    0% {
        background-position: 0px 0px, 0px 0px, 0px 0px;
    }
    100% {
        /* Движение снежинок (смещение по X и Y) */
        background-position: 500px 1000px, 400px 400px, 300px 300px;
    }
}

/* Вам могут понадобиться префиксы, если вы не используете автопрефиксер */
@-webkit-keyframes snow {
    /* ... (то же самое, что и @keyframes snow) ... */
}
@-moz-keyframes snow {
    /* ... (то же самое, что и @keyframes snow) ... */
}
@-ms-keyframes snow {
    /* ... (то же самое, что и @keyframes snow) ... */
}


/* --- 2. Украшение для названия группы (Averin New Year Pic) --- */

.averin_newyear {
    position: relative; 
    display: inline-block; 
}

/* Украшение, которое позиционируется относительно H1 */
.averin_newyear_pic {
    position: absolute;
    top: -17px; 
    right: 190px; /* Позиционируем его справа от текста */
    width: 40px;
    height: 40px; 
    background: url('../images/images.png') no-repeat center center; 
    background-size: contain;
    transform: rotate(330deg);
    transition: 0.5s;
    filter: hue-rotate(0);
    z-index: 10;
}

.averin_newyear:hover .averin_newyear_pic {
    filter: hue-rotate(220deg);
    transform: rotate(-25deg) scale(1.1);
}

/* --- 3. Кнопка управления эффектами (Сохраняем) --- */
.winter-toggle-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100000;
    /* ... (остальные стили кнопки) ... */
}
/* ... (стили для кнопки active, hover и т.д.) ... */

/* --- Кнопка управления эффектами --- */
.winter-toggle-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000; /* Поверх гирлянды */
    background-color: rgba(77, 142, 255, 0.8); /* Синяя с прозрачностью */
    color: white;
    border: none;
    border-radius: 50px; /* Круглая форма */
    padding: 12px 18px;
    font-family: 'Gilroy-SemiBold', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.winter-toggle-button:hover {
    background-color: var(--blue);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.winter-toggle-button.active {
    background-color: rgba(255, 165, 0, 0.8); /* Оранжевый, когда эффекты включены */
}
.winter-toggle-button.active:hover {
    background-color: #ff8c00;
}

/* --- Стили для снежинок (JS генерирует) --- */
.snowflake {
    position: fixed;
    background-color: white;
    border-radius: 50%;
    pointer-events: none;
    user-select: none;
    opacity: 0.8;
    animation: fall linear infinite;
    z-index: 9998; /* Под гирляндой */
}

/* Ключевые кадры для анимации падения */
@keyframes fall {
    to {
        transform: translateY(100vh);
    }
}