:root {
    --background-color: #f4f4f4;
    --text-color: #333;
    --primary-color: #4CAF50;
    --main-bg-color: white;
    --font-family: 'Helvetica Neue', 'Arial', sans-serif;
}

:root[data-theme='dark'] {
    --background-color: #121212;
    --text-color: #f4f4f4;
    --primary-color: #5cb85c;
    --main-bg-color: #1E1E1E;
}

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    transition: background-color 0.3s, color 0.3s;
    overflow: hidden; /* Hide scrollbars from snow */
    position: relative; /* For the ::after pseudo-element */
}

body::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px; /* Height of the snow layer */
    background: white;
    z-index: 0; /* Below main content, above background */
    border-top-left-radius: 50% 20px;
    border-top-right-radius: 50% 20px;
}

header {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

#theme-toggle {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#theme-toggle:hover {
    background: #45a049;
}

main {
    padding: 2em;
    background: var(--main-bg-color);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: background-color 0.3s;
    z-index: 1;
}

h1 {
    color: var(--primary-color);
    font-size: 2.5em;
}

.snow-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
}

.snowflake {
    position: absolute;
    top: -10px;
    background: white;
    border-radius: 50%;
    opacity: 0.8;
    animation: fall linear infinite;
}

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

/* Responsive Design */
@media (max-width: 600px) {
    h1 {
        font-size: 2em;
    }
    main {
        padding: 1em;
    }
}

.winter-scene {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px; /* Adjust as needed */
    z-index: 1; /* Changed from 0 to 1 */
}

.winter-scene div {
    position: absolute;
    font-size: 50px; /* Adjust size */
}

.snowman {
    bottom: 20px;
    left: 10%;
}

.house {
    bottom: 20px;
    right: 10%;
}

.tree {
    bottom: 20px;
}

.tree:nth-of-type(2) {
    left: 20%;
}

.tree:nth-of-type(3) {
    right: 20%;
}

.sledding-child {
    bottom: 20px;
    animation: sledding 10s linear infinite;
}

@keyframes sledding {
    0% {
        left: -10%;
    }
    100% {
        left: 110%;
    }
}
