/* General Body and Typography */
body {
    font-family: 'Montserrat', sans-serif; /* Modern, clean font */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background: linear-gradient(135deg, #6dd5ed 0%, #2193b0 100%); /* Vibrant blue gradient */
    color: #ecf0f1; /* Light text for contrast */
    text-align: center;
    overflow-x: hidden; /* Prevent horizontal scroll */
    padding: 20px; /* Add some padding around the edges */
    box-sizing: border-box;
}

/* Main Container */
.container {
    background-color: rgba(255, 255, 255, 0.98); /* Almost opaque white */
    padding: 30px 20px; /* Responsive padding */
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25); /* Deeper shadow */
    width: 100%; /* Mobile-first full width */
    max-width: 700px; /* Max width for larger screens */
    box-sizing: border-box;
    animation: fadeIn 1s ease-out forwards; /* Ensure animation stays at end state */
    transform: translateY(0); /* Reset transform for animation */
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Header */
header {
    margin-bottom: 25px;
}

h1 {
    font-family: 'Montserrat', sans-serif;
    color: #2c3e50;
    font-size: clamp(1.8em, 5vw, 2.8em); /* More aggressive responsive font sizing */
    font-weight: 700;
    line-height: 1.2;
    margin: 0; /* Reset default margin */
}

/* Counter Display */
.counter {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on small screens */
    justify-content: center;
    gap: 10px; /* Spacing between segments */
    margin: 30px 0;
}

.time-segment {
    background-color: #e74c3c; /* Incident red */
    color: #fff;
    padding: 15px 10px; /* Adjusted padding for mobile */
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    min-width: 80px; /* Minimum width for segments */
    flex: 1 1 auto; /* Allow segments to grow and shrink */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Open Sans', sans-serif; /* Different font for numbers */
    font-weight: 600;
    font-size: clamp(1.8em, 8vw, 3.5em); /* Responsive font size for numbers */
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.time-segment:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.time-segment .label {
    font-size: 0.4em; /* Smaller label relative to number */
    font-weight: 400;
    text-transform: uppercase;
    margin-top: 5px;
    opacity: 0.8;
}

/* Last Incident Time */
#last-incident-time {
    font-family: 'Open Sans', sans-serif;
    font-size: clamp(0.9em, 2.5vw, 1.2em);
    color: #7f8c8d;
    margin-top: 25px;
    font-weight: 600;
}

/* Footer */
footer {
    margin-top: 30px;
    color: #95a5a6;
    font-size: 0.85em;
    font-family: 'Open Sans', sans-serif;
}

/* Responsive Adjustments */
@media (min-width: 480px) {
    .time-segment {
        min-width: 100px;
        padding: 20px 15px;
    }
    .counter {
        gap: 15px;
    }
}

@media (min-width: 768px) {
    .container {
        padding: 50px;
    }
    h1 {
        font-size: 3.2em;
    }
    .time-segment {
        min-width: 120px;
        font-size: 4em;
    }
    .time-segment .label {
        font-size: 0.35em;
    }
}
