/* === LAYER GLOBAL === */
.snow-wrap {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 9999;
}

/* === SALJU EMAS NEON === */
.snowflake {
    position: absolute;
    top: -10vh;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%,
    #ffe600 0 45%,
    #fff4a3 55%,
    rgba(20, 255, 220, 0) 70%);
    filter: drop-shadow(0 0 10px rgb(80, 255, 252)) blur(0.3px);
    opacity: 0.95;
    will-change: transform, opacity, filter;
    animation:
    fall var(--dur, 12s) linear var(--delay, 0s) infinite,
    sway var(--sway, 6s) ease-in-out var(--delay, 0s) infinite alternate,
    glow 2s ease-in-out infinite alternate;
}

.snowflake.-sm {
    width: 4px;
    height: 4px;
    opacity: 0.8;
}

.snowflake.-lg {
    width: 12px;
    height: 12px;
    opacity: 0.98;
}

/* jatuh & goyang */
@keyframes fall {
    to {
        transform: translate3d(var(--drift, 0px), 110vh, 0) rotate(var(--rot, 180deg));
    }
}

@keyframes sway {
    from {
        margin-left: -14px;
    }

    to {
        margin-left: 14px;
    }
}

@keyframes glow {

    0%,
    100% {
        filter: drop-shadow(0 0 6px rgba(255, 240, 120, 0.8));
    }

    50% {
        filter: drop-shadow(0 0 18px rgba(255, 220, 80, 0.9));
    }
}

/* === KEMBANG API === */
.firework {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    z-index: 10000;
    background: radial-gradient(circle, #fff 0, #ffe7b5 40%, transparent 70%);
    animation: firework-burst 1.8s ease-out forwards;
}

/* percikan kembang api (box-shadow jadi pecahan) */
.firework::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    box-shadow:
    0 -25px 0 0 #ffd86b,
    18px -18px 0 0 #ff9b6b,
    25px 0 0 0 #fff1b8,
    18px 18px 0 0 #ff6b9b,
    0 25px 0 0 #ffe66b,
    -18px 18px 0 0 #ffb36b,
    -25px 0 0 0 #fff7c4,
    -18px -18px 0 0 #ff7b6b;
}

@keyframes firework-burst {
    0% {
        transform: translate(-50%, -50%) scale(0.2);
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    60% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.8);
        opacity: 0;
    }
}

/* HORMATI prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {

    .snowflake,
    .firework,
    .firework::before {
        animation: none !important;
    }
}
