body {
    font-family: 'Poppins', sans-serif;
    /* Default background image */
    background-image: url('backgrounds\rain.jpg');
    background-size: cover;
    background-position: center;
    transition: background-image 1.5s ease-in-out; /* Smooth transition for background image */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    position: relative; /* Needed for the overlay */
}

/* Overlay to make text more readable on any background */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4); /* Dark overlay */
    z-index: 1;
}

.weather-app {
    background: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    text-align: center;
    width: 90%;
    max-width: 500px;
    position: relative; /* To bring it above the overlay */
    z-index: 2;
}

h1 {
    color: #333;
    margin-bottom: 20px;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#city-input {
    flex-grow: 1;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 10px;
    font-size: 16px;
}

#search-btn {
    background-color: #5995b6;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#search-btn:hover {
    background-color: #3b7492;
}

.weather-info {
    margin-top: 20px;
    opacity: 0; /* Initially hidden for animation */
}

/* Animation class for fade-in effect */
.fade-in {
    animation: fadeIn 1s ease-out forwards;
}

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


#city-name {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 10px;
}

#temperature {
    font-size: 48px;
    font-weight: 700;
    margin: 10px 0;
}

#description {
    font-size: 20px;
    text-transform: capitalize;
    margin-bottom: 10px;
}

#weather-icon {
    width: 100px;
    height: 100px;
}

.forecast-container {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    overflow-x: auto;
    opacity: 0; /* Initially hidden for animation */
}

.forecast-day {
    background: rgba(0, 0, 0, 0.05);
    padding: 10px;
    border-radius: 8px;
    min-width: 80px; /* Minimum width for each day */
    text-align: center;
    margin-right: 10px;
}

.forecast-day p {
    margin: 5px 0;
    font-size: 14px;
}

.forecast-day img {
    width: 50px;
    height: 50px;
}