/* background.css - 动态渐变背景 */
body {
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}
:root {
    --bg-yellow: #FFFDE7; /* 浅黄 */
    --bg-blue:   #E3F2FD; /* 淡蓝 */
}

body {
    background: linear-gradient(180deg, var(--bg-yellow) 0%, var(--bg-blue) 100%);
    background-attachment: fixed; /* 固定背景，滚动时不移动 */
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    overflow: hidden;
    transition: background-color 0.5s ease;
}

/* Light Theme (Default) */
[data-theme="light"] {
    background: linear-gradient(to bottom, #87CEEB, #B0E0E6);
}

/* Dark Theme */
[data-theme="dark"] {
    background: linear-gradient(to bottom, #232526, #414345);
}
[data-theme="dark"] .snowflake {
    color: #999;
}

/* Winter Theme */
[data-theme="winter"] {
    background: linear-gradient(to bottom, #a1c4fd, #c2e9fb);
}
[data-theme="winter"] .background-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to top, white, rgba(255, 255, 255, 0));
    z-index: -1;
    border-radius: 50% 50% 0 0 / 20px;
    box-shadow: 0 -10px 20px rgba(255, 255, 255, 0.5);
}


#snowflake-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.snowflake {
    position: absolute;
    top: -10%;
    color: white;
    font-size: 20px;
    user-select: none;
    animation: fall linear infinite;
}

@keyframes fall {
    to {
        transform: translateY(105vh) rotate(360deg);
    }
}

#frost-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://www.transparenttextures.com/patterns/ice-age.png') repeat;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease-in-out;
    z-index: 100;
}

#frost-overlay.is-frosted {
    opacity: 0.3;
}