@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap");

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: url('images/background1.jpg'); /* Initial background image */
    background-size: cover;
    background-position: center;
    transition: background 1s ease-in-out; /* Smooth transition for background change */
    opacity: 1; /* Start fully visible */
}

.fade-out {
    opacity: 0; /* Fade out */
    transition: opacity 1s ease-in-out; /* Transition for fading out */
}

.fade-in {
    opacity: 1; /* Fade in */
    transition: opacity 1s ease-in-out; /* Transition for fading in */
}

.container {
    position: relative;
    width: 400px;
    height: 120px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 20px;
    color: #fff;
    transition: height 0.3s ease;
    overflow: hidden;
}

/* Initially hidden; shown after search */
.weather-box,
.weather-details {
    display: none;
}

/* Expanded container for showing weather details */
.container.expanded {
    height: 555px; /* Adjusted for showing all details */
}

.searchbox {
    position: relative;
    width: 100%;
    height: 55px;
    display: flex;
    align-items: center;
}

.searchbox i {
    position: absolute;
    left: 10px;
    font-size: 28px;
    color: #fff;
}

.searchbox input {
    width: 100%;
    height: 100%;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    outline: none;
    font-size: 18px;
    color: #fff;
    padding-left: 50px;
}

.searchbox input::placeholder {
    color: #fff;
}

.searchbox button {
    position: absolute;
    right: 10px;
    background: transparent;
    border: none;
    outline: none;
    font-size: 28px;
    color: #fff;
    cursor: pointer;
}

.weather-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-top: 20px;
}

.weather-box img {
    width: 80px;
    height: auto;
}

.weather-box .temperature {
    font-size: 64px;
    font-weight: 700;
    margin: 20px 0 10px;
}

.weather-box .temperature span {
    font-size: 24px;
}

.weather-box .description {
    font-size: 18px;
    font-weight: 500;
    text-transform: capitalize;
}

/* Weather details for humidity and wind */
.weather-details {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.weather-details.show {
    opacity: 1;
}

.weather-details > div {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.weather-details i {
    font-size: 36px;
    margin-bottom: 8px;
}

.weather-details .text {
    text-align: center;
    color: #fff;
}

.weather-details .humidity span,
.weather-details .wind span {
    font-size: 18px;
    font-weight: 500;
    color: #fff;
}
