body {
    background: linear-gradient(to bottom, #4facfe, #00f2fe) no-repeat;
    background-size: cover;
    color: #000;
    text-align: center;
    min-height: 100vh; 
    display: flex;
    flex-direction: column;
    font-family: Arial, sans-serif;
    margin: 0;
}

.weather-container {
    padding: 20px;
    margin: 100px auto;
    max-width: 800px;
    background: rgba(255, 255, 255, 0.9);
    border: 3px solid #000;
    border-radius: 18px;
    box-shadow: 4px 4px 0px 0px #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1; 
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #000;
    font-weight: 700;
}

#search {
    padding: 10px;
    border: 2px solid #000;
    border-radius: 13px;
    width: 60%;
    margin: 10px auto;
    box-shadow: 4px 4px 0px 0px #000;
    background-color: #A3E636;
    color: #000;
}

.search-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

#search-button {
    padding: 10px;
    border: 2px solid #000;
    border-radius: 13px;
    background-color: #88cc19;
    color: #fff;
    cursor: pointer;
    box-shadow: 4px 4px 0px 0px #000;
}

#search-button:hover {
    background-color: #c70039;
}

#search-button:active {
    transform: translateY(2px);
    box-shadow: 2px 2px 0px 0px #000;
}

.horizontal-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
}

.small-box {
    padding: 10px;
    margin: 20px;
    max-width: 300px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #000;
    border-radius: 13px;
    box-shadow: 4px 4px 0px 0px #000;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.small-box h2, h3, p {
    margin: 5px 0;
    border: 1px solid #000;
    padding: 5px;
    box-shadow: 2px 2px 0px 0px #000;
    background: #A3E636;
    color: #000;
    border-radius: 13px;
}

#default-city-weather {
    padding: 10px;
    margin: 20px auto;
    max-width: 300px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #000;
    border-radius: 13px;
    box-shadow: 4px 4px 0px 0px #000;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#default-city-weather h2, h3, p {
    margin: 5px 0;
    border: 1px solid #000;
    padding: 5px;
    box-shadow: 2px 2px 0px 0px #000;
    background: #A3E636;
    color: #000;
    border-radius: 13px;
}

#weather-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    width: 100%;
    border-top: 3px solid #000;
    padding-top: 20px;
}

#weather-info h2, h3, p {
    margin: 10px 0;
    flex: 1 1 30%;
    border: 2px solid #000;
    padding: 10px;
    box-shadow: 4px 4px 0px 0px #000;
    background: #A3E636;
    color: #000;
    border-radius: 13px;
}

#weather-info h2 {
    background: #A3E636;
}

#weather-info h3 {
    background: #ff9999; 
}

#weather-info p {
    background: #99ccff; 
}

#forecast {
    margin-top: 20px;
    width: 100%;
    border-top: 3px solid #000;
    padding-top: 20px;
}

.forecast-day {
    background: #A3E636;
    border: 2px solid #000;
    padding: 10px;
    margin: 10px;
    box-shadow: 4px 4px 0px 0px #000;
    flex: 1 1 30%;
    color: #000;
    border-radius: 13px;
}

#forecast h3 {
    background: #ff9999; 
}

#forecast .forecast-day {
    background: #99ccff;
}

#air-quality {
    margin-top: 20px;
    width: 100%;
    border-top: 3px solid #000;
    padding-top: 20px;
}

#air-quality p {
    margin: 10px 0;
    border: 2px solid #000;
    padding: 10px;
    box-shadow: 4px 4px 0px 0px #000;
    background: #A3E636;
    color: #000;
    border-radius: 13px;
}

#air-quality h3 {
    background: #ff9999;
}

#air-quality p {
    background: #99ccff; 
}

.hidden {
    display: none !important;
}

footer {
    margin-top: 20px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: #eeefe9;
    text-align: center;
    width: 100%;
    border-radius: 13px;
}

#error-message {
    color: red;
    font-weight: bold;
    margin-top: 20px;
}

#loading-spinner {
    border: 16px solid #f3f3f3;
    border-top: 16px solid #3498db;
    border-radius: 50%;
    width: 120px;
    height: 120px;
    animation: spin 2s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#date-time {
    font-size: 1.5rem;
    margin-top: 10px;
    color: #000;
}

@media (max-width: 600px) {
    .horizontal-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .small-box {
        max-width: 100%;
    }

    #search {
        width: 80%;
    }
}
