/*
 * snow.css
 * This file styles the snowflakes and the custom background fade.
 */

#snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh; /* Dynamic height for mobile */
    overflow: hidden;
    pointer-events: none; /* So it doesn't block clicks */
    display: none; /* Hidden by default */
    z-index: 9998; /* Just behind modals */
    
    background-color: rgba(0, 0, 0, 0.7); /* This is the FINAL color */
    opacity: 0; /* Start fully transparent */
}

#snow-container.is-snowing {
    display: block;
    animation: fadeInBg 2s ease-out forwards; /* 2-second fade-in */
}

#snow-container.is-fading-out {
    display: block; /* Keep it visible during the fade */
    animation: fadeOutBg 2s ease-in forwards; /* 2-second fade-out */
}

.snowflake {
    position: absolute;
    top: -10%; 
    background: white;
    
    /* CHANGED: Removed border-radius to make them sharp squares */
    border-radius: 0;
    
    /* CHANGED: Made the glow "bolder" and sharper */
    box-shadow: 0 0 10px 4px #fff; 
    
    animation-name: snowfall;
    animation-iteration-count: 1;
    animation-timing-function: linear;
    animation-fill-mode: forwards; 
    will-change: transform;
}

@keyframes snowfall {
    0% { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 0.8; }
    100% { transform: translate3d(var(--drift, 5vw), 110vh, 0) rotate(var(--rotation, 360deg)); opacity: 0; }
}

@keyframes fadeInBg {
    0%   { opacity: 0; }
    30%  { opacity: 0.2; }
    60%  { opacity: 0.5; }
    100% { opacity: 0.7; }
}

@keyframes fadeOutBg {
    0%   { opacity: 0.7; }
    40%  { opacity: 0.4; }
    70%  { opacity: 0.2; }
    100% { opacity: 0; }
}