*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;    
    font-family: "IBM Plex Sans", sans-serif;
}

body{
    background-color: #000;
}

/* NAVBAR */
.navbar{
    width:100%;
    height:10vh;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    margin:1rem 0;
}

.searchbar{
    width:60vw;
    height:75%;
    display: flex;
    justify-content: center;
    border-radius: 50px;
    background-color: #293248;
}

.input{
    width:90%;
    height:100%;
    font-size:1.2rem;
    border-top-left-radius: 50px;
    border-bottom-left-radius: 50px;
    color: #fff;
    padding-left: 0.8rem;
    border: none;
    background-color: #293248;
}

.search-icon{
    width:50px;
    padding:2px;
    font-size:1.2rem;
    align-self: center
}

main{
    height: 100%;
    width:100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

/* WEATHER CARD */
.weather-card{
    width: 87%;
    height: 40vh;   
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 0.8rem;
    box-shadow: 0 0 20px rgba(255,255,255,0.4);
    backdrop-filter:blur(1px);  
    background: rgba(0,0,0,0.5);
}

.city{
    background-color: transparent;
    color: #d8d8d8;
    width: 100%;
    height:40%;
    font-size: 3.5rem;
    display: flex;
    align-items: flex-end;
    padding-left: 5rem;
    font-weight: 500;
}

.card-grid{
    height: 60%;
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

.grid{
    height: 60%;
    width:50%;
    display: flex;
    flex-direction: row;
    padding-left: 5rem;
}

.temp{
    background-color: transparent;
    height:100%;
    display: flex;
    align-items: flex-end;
    flex-direction: row;
    font-size: 5rem;
    font-weight: 600;
    color: #ffa34e;
}

.description{
    background-color: transparent;
    display: flex;
    align-items: flex-end;
    width: 800px; 
    height: 100%;
    font-size: 2.5rem;
    font-weight: 700;
    padding-left: 1rem;
    color: #d8d8d8;
}

.grid2{
    height: 60%;
    width: 50%;
    display: flex;
    flex-direction: column;
}

.min-max{
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    gap: 2rem;
}

.min-max div{
    width: 30%;
}

.preci p:first-child{
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    width: 70%;   
}

.preci p:nth-child(2){
    width: 20%;   
}

.common2{
    height: 50%;
    display: flex;
    align-items: center;
    justify-content: end;
    font-size:1.8rem ;
    padding-right: 3rem;
    color: #d8d8d8;

}

.rain{
    width:100%
}


/* CARD2 (EXTRA DETAILS) */
.extra{
    width: 100%;
    height: 50vh;
    display: flex;  
    justify-content: center;
    flex-direction: column;
    margin-bottom: 2rem;
    align-items: center;
}

.card-headings{
    width: 100%;
    height: 15%;
    color: white;
    font-weight: 600;
    padding-left: 1em;
    padding-top: 0.2em;
    font-size: 1.5em;
}

.card-details{
    height: 90%;
    width: 90%;
    display: flex;
    flex-direction: row;
    justify-content: space-around;  
}

.card{
    width:39%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 0.8rem;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
    backdrop-filter:blur(1px);
    background:rgba(0,0,0,0.4);
}

.card2{
    width:100%;
    height: 100%;
    padding: 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
    gap:1rem;
}

.common{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex: 0 0 23%;
    aspect-ratio: 1/1;
    border-radius: 0.5em;
    background-color: transparent;
    background: rgba(0,0,0,0.45);
    font-weight: 500;
}

.common p{
    text-align: center;
    width: 100%;
    height: 50%;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.common p:first-child{
    font-size: 1rem;
    color: #b2adad;
    align-content: flex-end;
    padding-bottom: 0.2rem;
}

.common p:nth-child(2){
    font-size: 1rem;
    font-weight: normal;
    color: white;
    padding-top:0.2rem;
    align-items: flex-start;
}

/* TOMORROW WEATHER  */
.tomorrow{
    height:100%;
    width:45%;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 0.8rem;
    box-shadow: 0 0 20px rgba(255,255,255,0.4);
    backdrop-filter:blur(1px);
    background:rgba(0,0,0,0.4);
}

.graph{
    width: 87%;
    height: 40vh;   
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 0.8rem;
    box-shadow: 0 0 20px rgba(255,255,255,0.4);
    backdrop-filter:blur(1px);
    background: rgba(0,0,0,0.5);
    margin-bottom: 1em;
}

.graph p{
    padding: 0.5em 1em;
    font-size: 1.5em;
    font-weight: 600;
    height: 10%;
    width: 100%;
    color: white;
}

.hourly-canvas{
    width: 100%;
    height: 95%;
}

#hourly, #forecastCanvas{
    width:100% !important;
    height:94% !important;
}

@media (max-width: 768px){
    
    .searchbar{
        width: 90%;
    }

    main{
        gap:0;
    }

    .city{
        font-size: 2.5rem;
        height: 20%;
        padding-left: 1rem;
    }
    
    .temp{
        font-size: 4.5rem;
    }

    .description{
        font-size: 2.2rem;   
    }

    .card-grid{
        height: 80%;
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap   ;
    }

    .grid{
        padding: 1rem;
        width: 100%;
    }

    .grid2{
        width: 100%;
        justify-content: center;
    }

    .min-max div{
        width: 100%;
    }

    .min-max{
        justify-content: center;
        gap: 0;
    }

    .common2 {
        justify-content: center;
        padding: 0;
    }
    
    .preci p:first-child{   
        justify-content: center;
        width: 65%;
        padding-left: 3rem;
    }

    .preci p:nth-child(2){
        justify-content: center;
        width: 35%;
    }

    .extra{
        height: 70vh;    
    }
     
    .card-details{
        flex-direction: column;
        gap: 1rem;
    }

    .card{
        width: 100%;
    }

    .tomorrow{
        width:100%;
        height: 50%;
    }

    .common{
        flex: 0 0 28%;
    }

    #hourly{
        min-width:520px !important;
        height:92% !important;
    }

    .hourly-canvas{
        width: 100%;
        overflow-x:auto;
        overflow-y:hidden;
    }
    .hourly-canvas::-webkit-scrollbar{
        display:none;
    }
}
