@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Noto+Sans+JP:wght@100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&display=swap');
*{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body{
    background-image:url("assets/few-clouds.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    font-family: 'Montserrat', sans-serif;
    width: 100%;
    min-height: 100vh;
    background-color: #000;
    overflow-x: hidden;  
}

header{
    padding: 3em;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header img{
    width:80px;
    height: 80px;
}

.weather-display{
    background-color: rgba(255, 255, 255, 0.2);
    color: #000;
    position:absolute;
    right: 0;
    top: 0;
    backdrop-filter: blur(10px); 
    -webkit-backdrop-filter: blur(10px);
    width: 500px;
    height: 100vh;
    padding: 4em;

}

.location-search-visible{
    position: relative;
}

.location-search-visible input, .location-search-hidden input{
    width: 100%;
    border: none;
    border-bottom: 2px solid #FFFFFF;
    padding-bottom: 10px;
    background-color: transparent;
    font-size: 1.5rem;
    outline: none;
}

.location-search-visible input:focus, .location-search-hidden input:focus{
    outline: none;
    background-color: transparent;
}

.search-icon{
    width: 25px;
    height: 25px;
    position: absolute;
    top: 40%;
    right: 10px;
    transform: translateY(-50%);
    cursor: pointer;
}

.location-search-hidden {
    position: relative; 
    display: flex; 
    align-items: center;
}

.location-search-hidden .search-icon {
    position: absolute;
    right: 10px; 
    top: 40%;
    transform: translateY(-50%);
    width: 25px;
    height: 25px;
    cursor: pointer;
}


.location-search-visible input::placeholder, .location-search-hidden input::placeholder {
    color: #FFFFFF;
  }

  .location-search-hidden{
    display: none;
  }

.details{
    padding-top: 2em;
}

.details h2{
    font-size: 1.2rem;
    font-weight: 400;
    color: #000;
}

.details p{
    font-size: 1.3rem;
    color: #000;
    padding-top: 1em;
}

.city-details{
    padding-bottom: 2em;
}

.city-details h2, .weather-details h2{
    font-family: 'Poppins', sans-serif;
    color: #FFFFFF;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.city-details p{
    font-family: 'Raleway', sans-serif;
    color:#E0A800;
    font-weight: 500;
}

hr{
    border-image: linear-gradient(to right, #B0BEC5, rgba(255,255,255,0)) 1;

}

.weather-details{
    padding: 2em 0;  
}

#weather-description{
    color:#FFFFFF;
    font-weight: 700;
}

.temperatures{
    display: flex;
    align-items: center;
    gap: 20px;
    font-family: 'Raleway', sans-serif;
}

#temperature-max{
    color:#FF5733;
    font-weight: 700;
}

#temperature-min{
    color: #3498DB;
    font-weight: 700;
}

#wind-speed{
    font-family: 'Raleway', sans-serif;
    color: #42A5F5;
    font-weight: 700;
}

#humidity{
    font-family: 'Raleway', sans-serif;
    color:  #4CAF50;
    font-weight: 700;
}

.weather-icons{
    width: 40px;
    margin-top: 1em;
    display: none;
}

.city-temp-details{
    padding: 3em;
    position:absolute;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 40px;    
}

.city-temp-details h3{
    font-size: 6rem;
    font-weight: 800;
    color: #FFD700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

#selected-city-name{
    font-size: 3rem;
    font-weight: 700;
    color: #E0E0E0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

#feels-like, #date{
    font-size: 1.3rem;
    font-weight: 500;
    color: #D0D0D0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.city-temp-details img{
    width: 50px;
    height: 50px;
}

/*media queries*/
@media (max-width: 1200px) {

    body {
        background-size: cover;
        height: 100vh;
        min-height: 100vh;
    }
    
    .weather-display {
        right: 0;
        left: 0;
        top: 100%;
        bottom: 0;
        width: 100vw;
        height: 100vh;
    }

    .location-search-visible {
        display: none;
    }

    .location-search-hidden {
        display: block;
    }

}


@media (max-width: 992px) {
    body {
        background-size: cover;
        height: 100vh;
        min-height: 100vh;
    }

    .weather-display {
        right: 0;
        left: 0;
        top: 70%;
        width: 100vw;
        height: 60%;
    }

    .city-temp-details {
        top: 5%;
    }

    .weather-display,
    .city-temp-details{
        text-align: center;
    }

    .temperatures{
        justify-content: center;
    }
}


@media (max-width: 768px) {
    .weather-display {
        right: 0;
        left: 0;
        top: 70%;
        width: 100vw;
        height: 60%;
    }

    .city-temp-details {
        top: 20%;
    }

    .city-temp-details h3 {
        font-size: 4rem;
    }

    #selected-city-name {
        font-size: 2rem;
    }

    #feels-like,
    #date {
        font-size: 1.2rem;
    }

    .weather-icons {
        width: 30px;
    }

    .search-icon {
        width: 20px;
        height: 20px;
    }
}

/* Media Query for 576px */
@media (max-width: 576px) {

    header img {
        width: 60px;
        height: 60px;
    }

    .weather-display {
        right: 0;
        left: 0;
        top: 80%;
        width: 100vw;
        height: 90%;
    }

    .city-temp-details {
        padding: 1.5em;
        text-align: center;
    }

    .city-temp-details h3 {
        font-size: 3.5rem;
    }

    #selected-city-name {
        font-size: 1.8rem;
    }

    #feels-like,
    #date {
        font-size: 1rem;
    }

    .search-icon {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    header{
        display: flex;
        flex-direction: column;
        gap: 30px;
    }

    .weather-display {
        height: 70%;
    }

    .city-temp-details {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding:0 3em;
    }

    .city-temp-details h3{
        font-size: 6rem;
    }

    #selected-city-name {
        font-size: 2.2rem;
    }

    #feels-like,
    #date {
        font-size: 1.5rem;
    }

    .search-icon {
        width: 16px;
        height: 16px;
    }

    .details h2 {
        font-size: 1rem;
    }

    .details p {
        font-size: 1.1rem;
    }
}


@media (max-width: 390px) {
    .weather-display {
        height: 90%;
        top: 90%;
    }

    .city-temp-details h3{
        font-size: 5rem;
    }

    #selected-city-name {
        font-size: 2rem;
    }

    #feels-like,
    #date {
        font-size: 1.2rem;
    }

    .search-icon {
        width: 16px;
        height: 16px;
    }

    .details h2 {
        font-size: 1rem;
    }

    .details p {
        font-size: 1.1rem;
    }
}

@media(max-width:350px){
    .city-temp-details h3{
        font-size: 4rem;
    }

    #selected-city-name {
        font-size: 1.8rem;
    }

    #feels-like,
    #date {
        font-size: 1rem;
    }
}
