@import url("https://fonts.googleapis.com/css2?family=Merriweather:ital,opsz,wght@0,18..144,300..900;1,18..144,300..900&display=swap");
@import url('https://fonts.googleapis.com/css2?family=Birthstone&display=swap');
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    width: 100%;
    min-height: 100vh;
    background-image: url(assets/back.png);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    font-family: "Merriweather", serif;
}

.logo{
    position: absolute;
    top: 0;
    left: 1.5rem;
    color: white;
    font-size: clamp(2.5rem, 10vw, 3rem);
    font-family: "Birthstone", cursive;
    letter-spacing: 1px;
}

.container {
    width: clamp(23rem, 100%, 25rem);
    height: 5em;
    background-color: rgba(48, 48, 48, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 40px;
    border: 1px solid #6e6e6e;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.7s ease-in-out;
    padding: 1rem;
    flex-wrap: wrap;
}

.search-box {
    width: 100%;
    max-width: 21rem;
    height: 3em;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
}

.search-box input {
    flex: 1;
    min-width: 8em;
    height: 2.5rem;
    background-color: #ffffff;
    border-radius: 20px;
    border: none;
    font-size: clamp(0.9rem,1.2vw, 1rem);
    padding: 0.5rem 1rem;
    outline: none;
    text-transform: capitalize;
    margin-right: 10px;
}

.search-box input::placeholder {
    font-size: 14px;
}

.search-box button {
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    border-radius: 50%;
    font-size: 1rem;
    transition: 0.3s ease-in-out;
    cursor: pointer;
}

.search-box button:hover {
    background-color: rgb(129, 129, 129);
    color: white;
}

.search-box button:active {
    transform: scale(0.85);
}

.container.extended {
    width: clamp(20rem, 90%, 50rem);
    height: 32rem;
    border-radius: 20px;
    background-color: rgba(26, 26, 26, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    margin-top: 20px;
}

.container.extended .search-box {
    width: clamp(15rem, 80%, 25rem);
    position: absolute;
    top: 20px;
    right: 25px;
    padding-top: 2rem;
}

.cityname {
    position: absolute;
    top: 25px;
    left: 60px;
    font-size: clamp(0.8rem, 2.5vw, 1.1rem);
    color: white;
    text-transform: capitalize;
    letter-spacing: 1px;
    padding-top: 1rem;
}

.weather-box {
    margin-top: 60px;
    width: 100%;
    max-width: 42rem;
    height: auto;
    display: flex;
    flex-wrap: wrap;
    align-content: space-around;
    justify-content: center;
    padding: 1rem;
    animation: popUp 0.8s ease-in-out;
    gap: 1.5rem;
}

.mainweather {
    flex: 1 1 250px;
    max-width: 20em;
    display: flex;
    align-items: center;
    justify-self: center;
    margin-bottom: 1.5rem;
}

.mainweather img {
    width: clamp(120px, 15vw, 180px);
}

.mainweather .tempcon h1 {
    font-size: clamp(1.2rem, 4vw, 2rem);
    color: white;
}

.mainweather .tempcon h1 sup {
    font-size: clamp(0.8rem, 1.5vw, 1.2rem);
}

.mainweather .tempcon p {
    color: white;
    font-size: clamp(0.9rem, 3vw, 1.2rem);
    text-transform: capitalize;
}

.extras {
    width: 100%;
    max-width: 40rem;
    height: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-around;
    gap: 1rem;
}

.extras .col {
    flex: 1 1 45%;
    height: 3rem;
    display: flex;
    align-items: center;
}

.extras .col p {
    display: flex;
    flex-direction: column;
    font-size: clamp(0.8rem, 2vw, 1rem);
    color: white;
    letter-spacing: 1px;
    margin-left: 15px;
}

.extras span {
    padding-top: 5px;
    font-size: clamp(0.8rem, 2vw, 1rem);
    font-weight: 300;
}

.extras img {
    width: clamp(20px, 5vw, 40px);
    margin-left: 15px;
}

@keyframes popUp {
    from {
        opacity: 0;
        transform: scale(0.2);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width:600px) {
    
    .cityname{
        top: 6.5rem;
        left: auto;
        margin-bottom:px;
    }

    .mainweather{
        margin-top: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .extras .col{
        flex:1 1 45%;
    }
}

