body {
    margin: 0;
    padding: 20px 20px 0; /* Top, Horizontal, Bottom padding */
    font-family: 'Baloo 2', cursive;
    background: #f0f0f0;
    min-height: 100vh;
    display: flex;
    flex-direction: column; /* Stack children vertically */
    align-items: center; /* Center children horizontally */
    justify-content: space-between; /* Distribute space, helps center main content */
    color: #333;
    box-sizing: border-box; /* Ensure padding doesn't add to min-height */
    position: relative; /* For positioning pseudo-elements like stars */
}

.container {
    text-align: center;
    padding: 0; /* Removed padding */
    background: #fff;
    border-radius: 30px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 650px; /* Reduced max-width */
    /* margin-top: 0; removed as body padding handles top spacing */
    border: 2px solid #e0e0e0;
    /* position: relative; and z-index: 10; removed */
    margin-bottom: 20px; /* Space between container and image if screen is short */
}

h1 {
    font-size: 6rem; /* Further increased font size for h1 */
    margin-bottom: 1rem; /* Reduced margin for h1 */
    color: #333;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    font-weight: bold;
}

.countdown {
    font-size: 2.5rem; /* Increased font size for countdown */
    margin: 1.5rem 0; /* Reduced margin for countdown */
    color: #666;
    font-family: 'Baloo 2', cursive;
}

.img-container {
    /* position: absolute; bottom; left; right; z-index removed */
    display: flex;
    justify-content: center;
    width: 100%; /* Ensure it spans width for centering image */
    margin-top: auto; /* This pushes the image to the bottom if space is available */
}

img {
    max-width: 450px; /* Default max-width for larger screens */
    width: 60%;       /* Default width for larger screens */
    height: auto;
    margin: 0;
}

/* Mobile specific styles */
@media (max-width: 600px) {
    body {
        padding: 10px 10px 0; /* Top, Horizontal, Bottom padding for mobile */
        justify-content: flex-start; /* Align to top, allowing container margin to push it down */
    }

    .container {
        padding: 0; /* Removed padding on mobile */
        margin-bottom: 15px; /* Adjust margin if needed */
        margin-top: 10vh; /* Push container down from the top on mobile */
    }

    h1 {
        font-size: 4.5rem; /* Further increased title size on mobile */
    }

    .countdown {
        font-size: 2rem; /* Increased countdown size on mobile */
    }

    img {
        max-width: 90%; /* Make image larger on mobile, relative to screen */
        width: 80%;    /* Make image take more width on mobile */
    }
}

/* Time-based themes */
body.day-theme {
    background: linear-gradient(to bottom, #87CEEB, #B0E0E6); /* Sky blue to lighter sky blue */
    transition: background 0.5s ease-in-out;
}

body.night-theme {
    background: linear-gradient(to bottom, #0f1a2d, #1c2a4a); /* Deep night blue to slightly lighter */
    transition: background 0.5s ease-in-out;
}

/* Stars for night theme */
body.night-theme::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        /* Star 1 */
        radial-gradient(white 0.8px, transparent 0.8px) 10% 20% / 2px 2px,
        /* Star 2 */
        radial-gradient(white 1px, transparent 1px) 25% 45% / 2px 2px,
        /* Star 3 */
        radial-gradient(white 0.6px, transparent 0.6px) 30% 85% / 1px 1px,
        /* Star 4 */
        radial-gradient(white 1.2px, transparent 1.2px) 50% 30% / 3px 3px,
        /* Star 5 */
        radial-gradient(white 0.7px, transparent 0.7px) 60% 70% / 1px 1px,
        /* Star 6 */
        radial-gradient(white 1px, transparent 1px) 75% 50% / 2px 2px,
        /* Star 7 */
        radial-gradient(white 0.8px, transparent 0.8px) 90% 15% / 1px 1px,
        /* Star 8 */
        radial-gradient(white 1px, transparent 1px) 85% 90% / 2px 2px,
        /* Star 9 */
        radial-gradient(white 1.2px, transparent 1.2px) 5% 50% / 3px 3px,
        /* Star 10 */
        radial-gradient(white 0.6px, transparent 0.6px) 95% 60% / 1px 1px,
        /* Star 11 */
        radial-gradient(white 1px, transparent 1px) 40% 5% / 2px 2px,
        /* Star 12 */
        radial-gradient(white 0.9px, transparent 0.9px) 65% 95% / 2px 2px;
    background-repeat: no-repeat;
    pointer-events: none; /* So it doesn't interfere with mouse interactions */
    z-index: -1; /* To ensure it's behind the main content like .container */
}

/* Container adjustments for night theme */
body.night-theme .container {
    background: #2c3e50; /* Dark slate gray */
    border-color: #1a2533; /* Even darker border */
    transition: background 0.5s ease-in-out, border-color 0.5s ease-in-out;
}

body.night-theme .container h1 {
    color: #ecf0f1; /* Light gray, almost white */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); /* Adjust shadow for dark bg */
}

body.night-theme .container .countdown {
    color: #bdc3c7; /* Lighter gray for countdown */
}
