/* ❄️ 크리스마스 눈 내리는 효과 - 유니코드 눈송이 방식 */

/* 눈송이 컨테이너 */
.snowfall-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* 클릭 방해 안되게 */
    z-index: 9999;
    overflow: hidden;
}

/* 개별 눈송이 */
.snowflake {
    position: absolute;
    top: -10%;
    color: #fff;
    font-size: 1em;
    user-select: none;
    pointer-events: none;
    animation: snowfall linear infinite;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

/* 떨어지는 애니메이션 */
@keyframes snowfall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(110vh) rotate(360deg);
        opacity: 0.3;
    }
}

/* 좌우 흔들림 애니메이션 */
@keyframes sway {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(20px);
    }
}

/* 흔들리면서 떨어지는 눈송이 */
.snowflake.sway {
    animation: snowfall linear infinite, sway 3s ease-in-out infinite;
}

/* 온/오프 토글 버튼 */
.snowfall-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.snowfall-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.snowfall-toggle.active {
    background: linear-gradient(135deg, #93c5fd 0%, #c084fc 50%, #f472b6 100%);
    color: white;
    border-color: #c084fc;
}

/* 다크모드 대응 */
@media (prefers-color-scheme: dark) {
    .snowfall-toggle {
        background: rgba(50, 50, 50, 0.9);
        border-color: #444;
        color: white;
    }
}

/* 모바일 최적화 - 눈송이 개수 줄이기 */
@media (max-width: 768px) {
    .snowflake {
        font-size: 0.8em;
    }

    .snowfall-toggle {
        width: 45px;
        height: 45px;
        font-size: 20px;
        bottom: 15px;
        right: 15px;
    }
}

/* 애니메이션 줄이기 선호 사용자 존중 */
@media (prefers-reduced-motion: reduce) {
    .snowflake {
        animation: none;
        display: none;
    }
}

/* 숨김 상태 */
.snowfall-container.hidden {
    display: none;
}

