.weather-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px; /* Consistent gap for spacing */
    width: 100%;
    max-width: 100%; /* Consistent full width on mobile */
    margin: auto;
    padding: 0px; /* Consistent padding for spacing */
    box-sizing: border-box; /* Consistent box-sizing for element's total width and height */
}

.weather-item {
    flex: 1 1 calc(50% - 10px); /* Consistent two items per row on mobile */
    background-color: var(--background-color, #ffffff);
    border-radius: 15px;
    padding: 15px;
    transition: transform 0.5s ease, background-color 0.5s ease;
    opacity: 0;
    animation: fadeIn 1s forwards;
    margin-bottom: 10px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@media (min-width: 768px) {
    .weather-item {
        flex: 2 1 200px; /* Consistent size on larger screens */
    }
}

.weather-item .label {
    font-family: "Inter Tight";
    font-weight: bold;
    font-size: 16px;
    color: var(--text-color, #000);
    display: flex;
    align-items: center;
    transition: color 0.5s ease;
    margin-bottom: 5px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.weather-item .label img {
    margin-left: 5px;
    margin-right: 5px; /* Consistent side padding */
    width: 16px;
    height: 16px;
    filter: var(--image-filter, none);
}

.weather-item .value {
    font-family: "Inter Tight";
    font-size: 24px;
    font-weight: bold;
    margin: 5px;
    color: var(--text-color, #000);
    transition: color 0.5s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@media (max-width: 768px) {
    .weather-item .label {
        font-size: 18px; /* Adjusted font size for mobile */
    }
    .weather-item .value {
        font-size: 30px; /* Adjusted font size for mobile */
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Dark mode variations */
body.dark-mode {
    --background-color: #2c2c2c;
    --text-color: #ffffff;
    --image-filter: brightness(0) invert(1);
}

body.dark-mode .weather-item:hover {
    background-color: #444;
}