/* Global Styles */
body {
    background: linear-gradient(to bottom, #f76da2, #a163f3);
    color: #ffffff;
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Title */
.title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* Search Form */
.search-form {
    display: flex;
    gap: 0.5rem;
    max-width: 400px;
    margin: 0 auto 2rem;
}

.search-input {
    flex: 1;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border: none;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-button {
    padding: 10px 20px;
    background-color: #ffc107; /* Red button */
    color: black;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.search-button:hover {
    background-color: #ffca28;
}

/* Weather Container */
.weather-container {
    padding: 20px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.2);
    margin: 20px auto;
    width: 90%;
    max-width: 400px;
    backdrop-filter: blur(10px);
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

.weather-container.hidden {
    opacity: 0;
    transform: translateY(20px);
}

.weather-container.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Weather Header */
.weather-header {
    margin-bottom: 20px;
}

.weather-header div:first-child {
    font-size: 24px;
    font-weight: bold;
}

.weather-header .current-weather {
    font-size: 16px;
    font-weight: normal;
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.8);
}

/* Weather Display */
.weather-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.weather-condition {
    display: flex;
    align-items: center;
    gap: 10px;
    color: White;
}

.weather-condition-text {
    font-size: 1rem;
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
}

.weather-condition img {
    width: 60px;
    height: 60px;
}

.weather-temp {
    font-size: 45px;
    font-weight: bold;
    color: white;
}

.weather-high-low {
    text-align: right;
    font-size: 16px;
    line-height: 1.5;
    color: white;
}

/* Weather Section */
.weather-section {
    margin-top: 20px;
}

/* Hourly and Daily Forecast */
.hourly-forecast, .daily-forecast {
    display: flex;
    justify-content: space-between;
    overflow-x: auto;
}

.hourly-item, .daily-item {
    flex: 1;
    margin: 5px;
    text-align: center;
}

/* Weather Details */
.weather-details {
    display: flex;
    justify-content: space-between; /* Ensure even spacing */
    align-items: stretch; /* Stretch boxes to the same height */
    gap: 10px; /* Space between the boxes */
    padding: 20px; /* Padding around the container */
    max-width: 100%; /* Ensure the container doesn't overflow */
    box-sizing: border-box; /* Include padding in calculations */
}

.detail-box {
    flex: 1; /* Ensure all boxes take equal width */
    max-width: 30%; /* Fit three boxes in a row */
    padding: 10px;
    background-color: transparent; /* Set colors individually below */
    border-radius: 10px;
    text-align: center;
    color: black;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 150px; /* Uniform height */
    box-sizing: border-box;
}

.detail-box img {
    width: 30px; /* Adjust icon size */
    margin: 0 auto 5px; /* Center icon */
}

.detail-box h4 {
    font-size: 0.8rem; /* Smaller heading size */
    margin: 5px 0;
    color: #333;
    word-wrap: break-word; /* Wrap long text */
}

.detail-box p {
    font-size: 1.1rem; /* Adjust font size for values */
    font-weight: bold;
    margin: 0;
}

/* Card Colors */
.detail-box:nth-child(1) {
    background-color: #caa2ef; /* Purple for Precipitation */
}

.detail-box:nth-child(2) {
    background-color: #b4d4a7; /* Green for Humidity */
}

.detail-box:nth-child(3) {
    background-color: #f9aa83; /* Orange for Wind */
}
/* Error Message */
.error-message {
    max-width: 400px;
    margin: 0 auto 1rem;
    padding: 1rem;
    background-color: rgba(255, 0, 0, 0.1);
    border-radius: 4px;
    text-align: center;
    display: none;
}

/* Spinner */
.spinner {
    display: none;
    font-size: 20px; /* Adjust size as needed */
    animation: spin 1s linear infinite;
}

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

/* Initial Message */
.initial-message {
    text-align: center;
    font-size: 1rem;
    margin-top: 0rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 2s ease-in-out;
}

@supports (-webkit-appearance: none) {
    .section-separator {
        border-bottom: 1px solid rgba(255, 255, 255, 0.5);
        margin: 15px 0;
    }
    }
