/* 
 * Lightweight CSS Snowfall Effect
 * Optimized for performance with minimal DOM elements
 */

/* Snowfall Container */
#snowfall-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

/* Individual Snowflake */
.snowflake {
    position: absolute;
    top: -10px;
    color: #fff;
    font-size: 1em;
    font-family: Arial, sans-serif;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
    pointer-events: none;
    animation-timing-function: linear;
    animation-iteration-count: 1;
    animation-fill-mode: forwards;
}

/* Snowflake falling animation */
@keyframes fall {
    0% {
        opacity: 1;
        transform: translateY(0) rotate(0deg);
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(100vh) rotate(360deg);
    }
}

/* Accumulated snow at bottom */
#snow-accumulation {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0.5) 100%);
    pointer-events: none;
    z-index: 9998;
    transition: height 2s ease-in-out;
}

#snow-accumulation.show {
    height: 30px;
}

/* Snowflake variations for different sizes */
.snowflake.small {
    font-size: 0.8em;
    animation-duration: 20s;
}

.snowflake.medium {
    font-size: 1.2em;
    animation-duration: 25s;
}

.snowflake.large {
    font-size: 1.5em;
    animation-duration: 30s;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .snowflake {
        animation: none !important;
        display: none;
    }
    
    #snow-accumulation {
        display: none;
    }
}

/* Mobile optimization - fewer snowflakes */
@media (max-width: 768px) {
    .snowflake:nth-child(n+16) {
        display: none;
    }
}
