:root {
    --text-muted: #c2c7e0;
}

/* Корневой контейнер */

.holiday-decor-root {
    position: relative;
    z-index: 1;
}

/* Слой фиксированных элементов (гирлянды, ряды иконок, графические полосы, спрайты) */

.decor-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    pointer-events: none;
    z-index: 98;
}

/* Гирлянда (лампочки-игрушки) */

.garland {
    position: fixed;
    left: 0;
    width: 100%;
    height: 46px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    pointer-events: none;
}

.garland-top {
    top: 0;
    padding-top: 4px;
}

/* сами «игрушки» */

.garland .bulb {
    position: relative;
    width: 26px;
    height: 26px;
    margin: 0 7px;
    border-radius: 50%;
    background:
            radial-gradient(circle at 30% 20%, #ffffff, rgba(255, 255, 255, 0.7) 30%, rgba(255, 255, 255, 0) 55%),
            radial-gradient(circle at 50% 120%, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0)),
            radial-gradient(circle at 50% 50%, #ffb84a, #f27633 70%);
    box-shadow: 0 0 22px rgba(255, 184, 74, 0.75);
    animation: garlandBlink 1.4s infinite alternate;
}

.garland .bulb:nth-child(3n+1) {
    background:
            radial-gradient(circle at 30% 20%, #ffffff, rgba(255, 255, 255, 0.7) 30%, rgba(255, 255, 255, 0) 55%),
            radial-gradient(circle at 50% 120%, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0)),
            radial-gradient(circle at 50% 50%, #ff6b8b, #e84265 70%);
    box-shadow: 0 0 22px rgba(255, 107, 139, 0.8);
}

.garland .bulb:nth-child(3n+2) {
    background:
            radial-gradient(circle at 30% 20%, #ffffff, rgba(255, 255, 255, 0.7) 30%, rgba(255, 255, 255, 0) 55%),
            radial-gradient(circle at 50% 120%, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0)),
            radial-gradient(circle at 50% 50%, #6bffda, #32e2b4 70%);
    box-shadow: 0 0 22px rgba(107, 255, 218, 0.9);
}

/* «крышечка» игрушки */

.garland .bulb::before {
    content: "";
    position: absolute;
    top: -7px;
    left: 50%;
    width: 12px;
    height: 7px;
    margin-left: -6px;
    border-radius: 3px;
    background: linear-gradient(to bottom, #ffffff, #dde2ec);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

/* лёгкое свечение вокруг */

.garland .bulb::after {
    content: "";
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border-radius: 50%;
    box-shadow: 0 0 26px rgba(255, 220, 160, 0.7);
}

@keyframes garlandBlink {
    0% {
        opacity: 0.5;
        transform: translateY(0);
    }
    100% {
        opacity: 1;
        transform: translateY(2px);
    }
}

/* Дополнительные крупные «игрушки» по краям (если включены) */

.ornament {
    position: fixed;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background:
            radial-gradient(circle at 30% 20%, #ffffff, rgba(255, 255, 255, 0.6) 28%, rgba(255, 255, 255, 0) 55%),
            radial-gradient(circle at 50% 120%, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0)),
            radial-gradient(circle at 50% 50%, #ffb84a, #f27633 70%);
    box-shadow: 0 0 26px rgba(255, 184, 74, 0.9);
    pointer-events: none;
}

.ornament-left {
    top: 70px;
    left: 22px;
}

.ornament-right {
    top: 110px;
    right: 24px;
}

.ornament-small {
    top: 150px;
    left: 68px;
    width: 28px;
    height: 28px;
}

/* FA-ряды фиксированных элементов */

.fixed-row {
    position: fixed;
    left: 0;
    width: 100%;
    text-align: center;
    pointer-events: none;
    z-index: 98;
}

.fixed-row-top {
    top: 0;
    padding-top: 52px; /* чуть ниже гирлянды */
}

.fixed-row-bottom {
    bottom: 0;
    padding-bottom: 10px;
}

.fixed-row i {
    margin: 0 6px;
    font-size: 24px;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
}

/* Полосы с картинками (header/footer) */

.fixed-strip {
    position: fixed;
    left: 0;
    width: 100%;
    pointer-events: none;
    z-index: 98;
    background-repeat: repeat-x;
    background-position: 0 0;

    height: clamp(40px, 50%, 100px) !important;
}

.fixed-strip-top {
    top: 0;
}

.fixed-strip-bottom {
    bottom: 0;
}

/* Спрайты (HTML/CSS/JS) */

.fixed-sprite {
    position: fixed;
    left: 0;
    width: 100%;
    z-index: 98;
}

/* для спрайтов разрешаем взаимодействие */
.decor-layer .fixed-sprite {
    pointer-events: auto;
}

/* Слой падающих элементов */

.snow-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 97;
    overflow: hidden;
}

.snowflake {
    position: fixed;
    top: -5%;
    animation-name: holidecor-fall;
    animation-timing-function: linear;
    animation-iteration-count: 1;
    will-change: transform, opacity;
}

@keyframes holidecor-fall {
    0% {
        transform: translate3d(0, -10vh, 0) rotate(0deg);
    }
    100% {
        transform: translate3d(0, 110vh, 0) rotate(360deg);
    }
}

/* Эффект по клику */

.snowball {
    --holidecor-ball-color: #ffb84a;

    position: fixed;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    pointer-events: none;
    will-change: transform, opacity;
    color: #ffffff;
}

/* «игрушка» (круглый шарик) */

.snowball[data-shape="circle"] {
    animation: holidecor-snowball-ball 0.8s ease-out forwards;
    background:
            radial-gradient(circle at 30% 20%, #ffffff, rgba(255, 255, 255, 0.75) 30%, rgba(255, 255, 255, 0) 55%),
            radial-gradient(circle at 50% 120%, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0)),
            radial-gradient(circle at 50% 50%, var(--holidecor-ball-color), var(--holidecor-ball-color));
    box-shadow: 0 0 26px rgba(255, 184, 74, 0.9);
}

/* крышечка шара */

.snowball[data-shape="circle"]::before {
    content: "";
    position: absolute;
    top: -7px;
    left: 50%;
    width: 13px;
    height: 7px;
    margin-left: -6.5px;
    border-radius: 3px;
    background: linear-gradient(to bottom, #ffffff, #dfe4ef);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

/* мягкое свечение */

.snowball[data-shape="circle"]::after {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    box-shadow: 0 0 26px rgba(255, 200, 120, 0.85);
}

/* другие формы (снежинки, сердечки, иконки и т.п.) */

.snowball[data-shape="flake"],
.snowball[data-shape="heart"],
.snowball[data-shape="flower"],
.snowball[data-shape="candy"],
.snowball[data-shape="spark"],
.snowball[data-shape="pumpkin"],
.snowball[data-shape="fa"] {
    background: transparent;
    animation: holidecor-snowball 0.8s ease-out forwards;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.9);
}

.snowball i {
    font-size: 24px;
}

@keyframes holidecor-snowball-ball {
    0% {
        transform: scale(0.4) translate3d(0, 0, 0);
        opacity: 0;
    }
    40% {
        transform: scale(1.05) translate3d(0, -35px, 0);
        opacity: 1;
    }
    100% {
        transform: scale(0.95) translate3d(0, -70px, 0);
        opacity: 0;
    }
}

@keyframes holidecor-snowball {
    0% {
        transform: scale(0.4) translate3d(0, 0, 0);
        opacity: 0;
    }
    40% {
        transform: scale(1.1) translate3d(0, -40px, 0);
        opacity: 1;
    }
    100% {
        transform: scale(0.9) translate3d(0, -80px, 0);
        opacity: 0;
    }
}

/* Панель предпросмотра — внизу экрана:
   слева подсказка, справа переключатели */

.decor-hint {
    position: fixed;
    bottom: 15px;
    left: 15px;
    padding: 6px 10px;
    background: rgba(13, 18, 48, 0.9);
    color: #ffffff;
    font-size: 12px;
    border-radius: 4px;
    z-index: 121;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
    max-width: 420px;
}

.decor-controls {
    position: fixed;
    bottom: 15px;
    right: 15px;
    padding: 10px 12px;
    background: rgba(18, 24, 64, 0.96);
    color: #f5f6ff;
    font-size: 13px;
    border-radius: 6px;
    z-index: 120;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55);
    max-width: 260px;
}

.decor-controls h4 {
    margin: 0 0 8px 0;
    font-size: 13px;
    font-weight: 600;
}

.decor-controls-row {
    margin-bottom: 6px;
}

.decor-controls-row label {
    cursor: pointer;
}

.decor-controls-row input[type="checkbox"] {
    margin-right: 4px;
}

/* Выключение через класс на body */

body.decor-off-snow .snow-layer {
    display: none;
}

body.decor-off-garlands .decor-layer {
    display: none;
}

/* Курсор-иконка (Font Awesome) */

.holidecor-cursor-icon {
    position: fixed;
    z-index: 130;
    pointer-events: none;
    transform: translate3d(-9999px, -9999px, 0);
    font-size: 22px;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.4);
}

.holidecor-cursor-icon i {
    font-size: 22px;
}



/* Орнаменты Хэллоуина */
.halloween-ornament {
    position: fixed;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #ff9b42;
    text-shadow: 0 0 15px rgba(255, 155, 66, 0.9);
    pointer-events: none;
    z-index: 98;
    animation: halloweenFloat 3s infinite alternate ease-in-out;
}

.halloween-ornament-left {
    top: 70px;
    left: 22px;
    animation-delay: 0.5s;
}

.halloween-ornament-right {
    top: 110px;
    right: 24px;
    animation-delay: 1s;
}

@keyframes halloweenFloat {
    0% {
        transform: translateY(0) scale(1);
    }
    100% {
        transform: translateY(-8px) scale(1.05);
    }
}

/* Полосы для Хэллоуина */
.halloween-header,
.halloween-footer {
    position: fixed;
    left: 0;
    width: 100%;
    pointer-events: none;
    z-index: 98;
    background-repeat: repeat-x;
    background-position: 0 0;
}

.halloween-header {
    top: 0;
}

.halloween-footer {
    bottom: 0;
}
