/* ===========================
   GOOGLE FONT
=========================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Poppins',sans-serif;
}

body{

    height:100vh;
    overflow:hidden;

    display:flex;
    justify-content:center;
    align-items:center;

    background:linear-gradient(135deg,#4facfe,#00f2fe);

    transition:1s;

    position:relative;
}

/*========================*/

.overlay{

    position:absolute;
    width:100%;
    height:100%;

    background:rgba(0,0,0,.25);

    z-index:0;
}

/*========================*/

.container{

    width:900px;
    max-width:95%;

    position:relative;
    z-index:100;

    text-align:center;

}

/*========================*/

.title{

    color:white;
    font-size:45px;
    font-weight:700;

    margin-bottom:10px;

}

.subtitle{

    color:white;

    margin-bottom:40px;

    font-size:18px;
}

/*========================*/

.search-box{

    display:flex;
    justify-content:center;
    align-items:center;
    gap:15px;

    margin-bottom:40px;

}

.search-box input{

    width:500px;
    max-width:70%;

    padding:18px 25px;

    border:none;
    outline:none;

    border-radius:50px;

    font-size:18px;

    background:rgba(255,255,255,.25);

    backdrop-filter:blur(12px);

    color:white;

}

.search-box input::placeholder{

    color:#eee;

}

.search-box button{

    border:none;
    outline:none;

    padding:18px 35px;

    border-radius:50px;

    cursor:pointer;

    font-size:17px;

    color:white;

    background:#0077ff;

    transition:.3s;

}

.search-box button:hover{

    transform:translateY(-3px);

    background:#005ce6;

    box-shadow:0 10px 30px rgba(0,0,0,.3);

}

/*========================*/

.weather-card{

    width:100%;

    padding:35px;

    border-radius:30px;

    background:rgba(255,255,255,.18);

    backdrop-filter:blur(25px);

    box-shadow:0 20px 50px rgba(0,0,0,.25);

    color:white;

    animation:show .7s;

}

@keyframes show{

    from{

        opacity:0;
        transform:translateY(40px);

    }

    to{

        opacity:1;
        transform:translateY(0);

    }

}

/*========================*/

.top{

    display:flex;

    justify-content:space-between;

    align-items:center;

}

.top img{

    width:130px;

}

/*========================*/

.temperature{

    margin:25px 0;

}

.temperature h1{

    font-size:80px;

    font-weight:700;

}

.temperature h3{

    font-size:28px;

    font-weight:500;

}

/*========================*/

.details{

    display:grid;

    grid-template-columns:repeat(4,1fr);

    gap:20px;

    margin-top:35px;

}

.box{

    background:rgba(255,255,255,.18);

    padding:25px;

    border-radius:20px;

    transition:.4s;

}

.box:hover{

    transform:translateY(-8px);

    background:rgba(255,255,255,.28);

}

.box i{

    font-size:35px;

    margin-bottom:12px;

}

.box h4{

    margin-bottom:10px;

}

.box span{

    font-size:20px;

    font-weight:600;

}

/*========================*/
/* LOADING */
/*========================*/

.loading{

    color:white;

}

.loader{

    width:90px;
    height:90px;

    margin:auto;

    border:8px solid rgba(255,255,255,.25);

    border-top:8px solid white;

    border-radius:50%;

    animation:spin 1s linear infinite;

}

.loading h3{

    margin-top:20px;

    letter-spacing:2px;

}

@keyframes spin{

    100%{

        transform:rotate(360deg);

    }

}

/*========================*/

.hidden{

    display:none;

}

/*========================*/
/* WEATHER BACKGROUNDS */
/*========================*/

body.clear{

background:
linear-gradient(#00c6ff,#0072ff);

}

body.clouds{

background:
linear-gradient(#6d7d92,#b9c6d3);

}

body.rain{

background:
linear-gradient(#283048,#859398);

}

body.snow{

background:
linear-gradient(#d7d2cc,#304352);

}

body.thunder{

background:
linear-gradient(#141e30,#243b55);

}

/*========================*/
/* RAIN ANIMATION */
/*========================*/

#rain{

position:absolute;

width:100%;
height:100%;

overflow:hidden;

pointer-events:none;

display:none;

}

.drop{

position:absolute;

bottom:100%;

width:2px;
height:25px;

background:white;

opacity:.6;

animation:rain 1s linear infinite;

}

@keyframes rain{

0%{

transform:translateY(0);

}

100%{

transform:translateY(120vh);

}

}

/*========================*/
/* CLOUD ANIMATION */
/*========================*/

#clouds{

position:absolute;

width:100%;
height:100%;

overflow:hidden;

display:none;

pointer-events:none;

}

.cloud{

position:absolute;

width:220px;
height:70px;

background:white;

opacity:.30;

border-radius:100px;

animation:cloudMove 40s linear infinite;

}

.cloud::before{

content:"";

position:absolute;

width:90px;
height:90px;

background:white;

border-radius:50%;

top:-40px;
left:30px;

}

.cloud::after{

content:"";

position:absolute;

width:120px;
height:120px;

background:white;

border-radius:50%;

top:-60px;
right:30px;

}

@keyframes cloudMove{

from{

left:-300px;

}

to{

left:120%;

}

}

/*========================*/
/* SUN ANIMATION */
/*========================*/

#sunshine{

position:absolute;

top:60px;

right:80px;

width:140px;

height:140px;

border-radius:50%;

background:#FFD93D;

box-shadow:
0 0 60px #FFD93D,
0 0 120px #FFD93D,
0 0 180px #FFD93D;

display:none;

animation:sunPulse 3s infinite;

}

@keyframes sunPulse{

50%{

transform:scale(1.08);

}

}

/*========================*/

@media(max-width:900px){

.details{

grid-template-columns:repeat(2,1fr);

}

.temperature h1{

font-size:65px;

}

}

@media(max-width:650px){

.search-box{

flex-direction:column;

}

.search-box input{

max-width:100%;
width:100%;

}

.search-box button{

width:100%;

}

.details{

grid-template-columns:1fr;

}

.title{

font-size:35px;

}

.temperature h1{

font-size:55px;

}

.top{

flex-direction:column;

gap:20px;

}

}