body {
    margin: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #f5f7fa, #c3cfe2);
    font-family: 'Arial', sans-serif;
    color: #333;
    overflow: auto; /* Allow scrolling if content overflows */
}

.container {
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px; /* Reduced padding for smaller screens */
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    max-width: 90%; /* Ensure container doesn't exceed viewport width */
    margin: 20px; /* Add margin to prevent edge clipping */
}

h1 {
    font-size: 2em; /* Slightly smaller heading for mobile */
    margin-bottom: 10px;
    color: #2c3e50;
}

p {
    font-size: 1em; /* Smaller text for mobile */
    margin-bottom: 15px;
    color: #34495e;
}

.countdown {
    display: flex;
    flex-wrap: wrap; /* Allow time boxes to wrap on small screens */
    justify-content: center;
    gap: 10px; /* Reduced gap for compactness */
}

.time-box {
    background: #3498db;
    color: white;
    padding: 15px; /* Smaller padding */
    border-radius: 8px;
    min-width: 60px; /* Smaller minimum width */
    text-align: center;
    flex: 1; /* Allow boxes to grow/shrink evenly */
    max-width: 80px; /* Limit box width to prevent overflow */
}

.time-box span {
    font-size: 1.8em; /* Smaller font for numbers */
    font-weight: bold;
    display: block;
}

.time-box p {
    margin: 3px 0 0;
    font-size: 0.9em; /* Smaller label text */
    color: white;
}

/* Media query for mobile screens (below 600px) */
@media (max-width: 600px) {
    .container {
        padding: 15px;
        margin: 10px;
    }

    h1 {
        font-size: 1.5em;
    }

    p {
        font-size: 0.9em;
    }

    .countdown {
        flex-direction: column; /* Stack time boxes vertically */
        gap: 8px;
    }

    .time-box {
        padding: 10px;
        min-width: 0; /* Remove min-width constraint */
        max-width: 100%; /* Allow full width of container */
    }

    .time-box span {
        font-size: 1.5em;
    }

    .time-box p {
        font-size: 0.8em;
    }
}