*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Poppins',sans-serif;
}

body{
    min-height:100vh;
    display:flex;
    justify-content:center;
    align-items:center;

    padding:40px;
    color:white;
    background:linear-gradient(
        135deg,
        #3d2b72,
        #5a4ba8,
        #2d3d8f
    );
    transition:0.5s;
}

body.sunny{
    background:linear-gradient(
        135deg,
        #56ccf2,
        #2f80ed
    );
}

body.cloudy{
    background:linear-gradient(
        135deg,
        #7f8fa6,
        #576574
    );
}

body.rainy{
    background:linear-gradient(
        135deg,
        #2c3e50,
        #4ca1af
    );
}

body.storm{
    background:linear-gradient(
        135deg,
        #232526,
        #414345
    );
}

body.night{
    background:linear-gradient(
        135deg,
        #050816,
        #0b1d3a,
        #13294b
    );
}

.container{
    width:100%;
    max-width:1200px;
}

header{
    text-align:center;
    margin-bottom:35px;
}

header h3{
    font-size:20px;
    margin-bottom:12px;
}

header h1{
    font-size:45px;
    font-weight:700;
    margin-bottom:15px;
}

header p{
    opacity:.85;
}

.search-box{
    display:flex;
    justify-content:center;
    gap:15px;
    margin-bottom:25px;
}

.search-box input{
    width:500px;
    padding:16px 20px;
    border:none;
    outline:none;
    border-radius:18px;
    font-size:17px;
    background:rgba(255,255,255,.10);
    backdrop-filter:blur(28px);
    color:white;
}

.search-box input::placeholder{
    color:#ddd;
}

.search-box button{
    padding:16px 25px;
    border:none;
    border-radius:18px;
    cursor:pointer;
    background:#ffd34f;
    color:#222;
    font-weight:600;
    transition:.3s;
}

.search-box button:hover{
    transform:translateY(-2px);
    background:white;
}

.cities{
    display:flex;
    justify-content:center;
    gap:15px;
    flex-wrap:wrap;
    margin-bottom:35px;
}

.cities button{
    border:none;
    padding:10px 18px;
    border-radius:30px;
    cursor:pointer;
    background:rgba(255,255,255,.15);
    backdrop-filter:blur(15px);
    color:white;
    transition:.3s;
}

.cities button:hover{
    background:white;
    color:#333;
}


.weather-card{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:20px;
    padding:40px;
    border-radius:30px;

    opacity:0;
    transform:translateY(20px);

    background:linear-gradient(
          135deg,
          rgba(255,255,255,.18),
          rgba(255,255,255,.05)
   );
    backdrop-filter:blur(28px);
    border:1px solid rgba(255,255,255,.18);
    box-shadow:0 15px 40px rgba(0,0,0,.18);

    margin-bottom:30px;

    transition:
     opacity .6s ease,
     transform .6s ease;
}

.weather-left{
    flex:1;
}

.weather-left h2{
    font-size:40px;
    margin:10px 0;
}

.weather-left h1{
    font-size:78px;
    font-weight:700;
}

.weather-left p{
    margin-top:8px;
    opacity:.9;
}

.time{
    letter-spacing:2px;
    font-size:13px;
    opacity:.75;
}

.weather-right{
    flex:1;
    display:flex;
    justify-content:center;
}

.weather-right img{
    width:260px;
    object-fit:contain;
    animation: float 4s ease-in-out infinite;
    filter:
        drop-shadow(0 0 30px rgba(255,215,0,.55))
        drop-shadow(0 0 60px rgba(255,215,0,.30));
}

@keyframes float{
0%{
transform:translateY(0);
}
50%{
transform:translateY(-10px);
}
100%{
transform:translateY(0);
}
}

.details{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:20px;
}

.card{
    background:rgba(255,255,255,.12);
    backdrop-filter:blur(18px);
    border-radius:20px;
    padding:25px;
    text-align:center;
    border:1px solid rgba(255,255,255,.15);
    transition:.3s;
}

.card:hover{
    transform:translateY(-6px);
}

.card h3{
    font-size:18px;
    margin-bottom:15px;
}

.card p{
    font-size:26px;
    font-weight:600;
}

.loader{
    display:none;
    text-align:center;
    margin:30px 0;
}

.spinner{
    width:60px;
    height:60px;
    border:6px solid rgba(255,255,255,.3);
    border-top:6px solid white;
    border-radius:50%;
    margin:auto;
    animation:spin 1s linear infinite;
}

.loader p{
    margin-top:15px;
    font-size:18px;
}

@keyframes spin{
    0%{
        transform:rotate(0deg);
    }
    100%{
        transform:rotate(360deg);
    }
}

.location-box{
    display:flex;
    justify-content:center;
    margin-bottom:20px;
}

#locationBtn{
    padding:14px 22px;
    border:none;
    border-radius:18px;
    cursor:pointer;
    background:#ffffff;
    color:#333;
    font-weight:600;
    transition:.3s;
}

#locationBtn:hover{
    transform:translateY(-3px);
    background:#ffd34f;
}

.forecast{
    margin-top:40px;
}

.forecast h2{
    text-align:center;
    margin-bottom:25px;
    font-size:30px;
}

.forecast-cards{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(140px,1fr));
    gap:20px;
}

.forecast-card{
    background:rgba(255,255,255,.12);
    backdrop-filter:blur(18px);
    border-radius:20px;
    padding:20px;
    text-align:center;
    border:1px solid rgba(255,255,255,.15);
    transition:.3s;
}

.forecast-card:hover{
    transform:translateY(-6px);
}

.forecast-card img{
    width:60px;
    margin:12px 0;
}

.forecast-card h3{
    font-size:18px;
    margin-bottom:10px;
    font-weight:600;
}

.forecast-card:first-child{
    border:2px solid #ffd34f;
    transform:scale(1.05);
}

.forecast-card p{
    margin-top:8px;
    font-size:15px;
}

.hourly{
    margin-top:40px;
}

.hourly h2{
    text-align:center;
    margin-bottom:20px;
    font-size:30px;
}

.hourly-cards{
    display:flex;
    gap:18px;
    overflow-x:auto;
    padding-bottom:10px;
    scroll-behavior:smooth;
}

.hourly-cards::-webkit-scrollbar{
    height:8px;
}

.hourly-cards::-webkit-scrollbar-thumb{
    background:rgba(255,255,255,.4);
    border-radius:20px;
}

.hour-card{
    min-width:120px;
    background:rgba(255,255,255,.12);
    backdrop-filter:blur(18px);
    border:1px solid rgba(255,255,255,.15);
    border-radius:18px;
    padding:20px;
    text-align:center;
    transition:.3s;
}

.hour-card:hover{
    transform:translateY(-5px);
}

.hour-card img{
    width:50px;
    margin:10px 0;
}

.hour-card h3{
    font-size:17px;
}

.hour-card p{
    font-size:22px;
    font-weight:600;
}

.sun-times{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:20px;
    margin-top:35px;
}

.sun-card{
    background:rgba(255,255,255,.12);
    backdrop-filter:blur(18px);
    border:1px solid rgba(255,255,255,.15);
    border-radius:20px;
    padding:25px;
    text-align:center;
}

.sun-card h3{
    margin-bottom:12px;
}

.sun-card p{
    font-size:28px;
    font-weight:600;
}

@media(max-width:700px){
    .sun-times{
        grid-template-columns:1fr;
    }
}

@media(max-width:900px){

.weather-card{
flex-direction:column;
text-align:center;
}

.details{
grid-template-columns:repeat(2,1fr);
}

.search-box{
flex-direction:column;
align-items:center;
}

.search-box input{
width:100%;
}
}

#backgroundEffect{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    overflow:hidden;
    pointer-events:none;
    z-index:-1;
}



@media(max-width:600px){

.details{
grid-template-columns:1fr;
}

header h1{
font-size:30px;
}

.weather-left h1{
font-size:78px;
font-weight:700;
}

.weather-right img{
width:160px;
}
}

.footer{
    margin-top:40px;
    text-align:center;
    opacity:0.8;
    font-size:15px;
}

.footer a{
    color:#ffd34f;
    text-decoration:none;
    font-weight:600;
    transition:0.3s;
}

.footer a:hover{
    color:#ffffff;
    text-decoration:underline;
}