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

body{
    display:flex;
    background:rgb(5,11,30);
}

.main{
    flex:1;
    height:100vh;
    overflow-y:auto;
    padding:32px;
    background:linear-gradient(180deg,rgb(9,21,47),rgb(5,11,30));
}

.main::-webkit-scrollbar{
    width:8px;
}

.main::-webkit-scrollbar-thumb{
    background:rgb(91,108,255);
    border-radius:20px;
}

.main::-webkit-scrollbar-track{
    background:transparent;
}

.topbar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:28px;
}

.search-box{
    width:78%;
    height:64px;
    background:rgb(15,28,56);
    border:1px solid rgba(255,255,255,.06);
    border-radius:35px;
    display:flex;
    align-items:center;
    padding:0 22px;
    transition:.3s;
}

.search-box:hover{
    border-color:rgb(91,108,255);
    box-shadow:0 0 20px rgba(91,108,255,.18);
}

.search-box>i{
    color:rgb(73,168,255);
    font-size:18px;
}

.search-box input{
    flex:1;
    height:100%;
    margin:0 18px;
    background:none;
    border:none;
    outline:none;
    color:white;
    font-size:17px;
}

.search-box input::placeholder{
    color:rgb(111,125,168);
}

.search-box button{
    width:46px;
    height:46px;
    border:none;
    border-radius:50%;
    cursor:pointer;
    color:white;
    background:linear-gradient(135deg,rgb(91,108,255),rgb(110,125,255));
    transition:.3s;
}

.search-box button:hover{
    transform:scale(1.08);
}

.top-actions{
    display:flex;
    align-items:center;
    gap:18px;
}

.unit-toggle{
    display:flex;
    background:rgb(15,28,56);
    padding:5px;
    border-radius:16px;
}

.unit-toggle button{
    width:48px;
    height:42px;
    border:none;
    background:none;
    color:white;
    cursor:pointer;
    border-radius:12px;
    transition:.3s;
}

.unit-toggle button:hover{
    transform: translateY(-3px);
}

.unit-toggle .active{
    background:rgb(91,108,255);
}

.hero{
    min-height:500px;
    border-radius:30px;
    overflow:hidden;
    background-size:cover;
    background-position:center bottom;
    box-shadow:0 18px 40px rgba(0,0,0,.35);
}

.hero-overlay{
    min-height:500px;
    padding:38px;
    display:flex;
    flex-direction:column;
    justify-content:space-between;
    position: relative;
    background:linear-gradient(
        90deg,
        rgba(9,22,52,.92),
        rgba(9,22,52,.62),
        rgba(9,22,52,.15)
    );
}

.loader{
    position:absolute;
    inset:0;
    background:rgba(8,15,40,.78);
    backdrop-filter:blur(12px);
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    gap:20px;
    border-radius:35px;
    z-index:100;
    opacity:0;
    visibility:hidden;
    transition:.35s;
}

.loader.active{
    opacity:1;
    visibility:visible;
}

.spinner{
    width:65px;
    height:65px;
    border-radius:50%;
    border:5px solid rgba(255,255,255,.15);
    border-top:5px solid #4db8ff;
    animation:spin 1s linear infinite;
}

.loader h3{
    color:white;
    font-size:20px;
    font-weight:500;
    letter-spacing:1px;
}

@keyframes spin{
    from{
        transform:rotate(0deg);
    }
    to{
        transform:rotate(360deg);
    }
}

.hero-header{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
}

.location h2{
    color:white;
    font-size:32px;
    margin-bottom:10px;
}

.location h2 i{
    color:rgb(84,199,255);
    margin-right:8px;
}

.location p{
    color:rgb(214,217,227);
    font-size:18px;
}

.time{
    display:flex;
    align-items:center;
    gap:10px;
    padding:12px 22px;
    border-radius:40px;
    color:white;
    backdrop-filter:blur(12px);
    background:rgba(255,255,255,.08);
}


.hero-body{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin:45px 0;
}

.weather h1{
    color:white;
    font-size:120px;
    line-height:1;
    font-weight:700;
}

.weather h3{
    margin-top:18px;
    color:white;
    font-size:30px;
    font-weight:500;
}

.weather p{
    margin-top:15px;
    color:rgb(214,217,227);
    font-size:22px;
}

.hero-body img{
    width:240px;
    filter:drop-shadow(0 0 25px rgba(255,255,255,.2));
    animation:float 4s ease-in-out infinite;
}


.weather-details{
    display:flex;
    justify-content:space-between;
    align-items:center;
    height:100px;
    padding:0 35px;
    border-radius:24px;
    background:rgba(18,32,60,.60);
    backdrop-filter:blur(18px);
    border:1px solid rgba(255,255,255,.08);
}

.detail{
    display:flex;
    align-items:center;
    gap:16px;
}

.detail i{
    font-size:28px;
    color:rgb(84,199,255);
}

.detail span{
    display:block;
    color:rgb(158,168,199);
    font-size:15px;
}

.detail h4{
    margin-top:6px;
    color:white;
    font-size:26px;
}

.divider{
    width:1px;
    height:50px;
    background:rgba(255,255,255,.08);
}


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

/* toast */
.toast{
    position: fixed;
    top: 25px;
    right: 25px;
    min-width: 280px;
    max-width: 350px;
    padding: 15px 20px;
    border-radius: 10px;
    background: #222;
    color: white;
    font-family: sans-serif;
    font-size: 15px;
    box-shadow: 0 8px 20px rgba(0,0,0,.3);
    opacity: 0;
    visibility: hidden;
    transform: translateX(120%);
    transition: all .35s ease;
    z-index: 9999;
}
.toast.show{
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}
.toast.success{
    background: #16a34a;
}
.toast.error{
    background: #dc2626;
}
.toast.warning{
    background: #f59e0b;
}
.toast.info{
    background: #2563eb;
}


/* middle */

.middle{
    display:flex;
    gap:28px;
    margin-top:28px;
}

.middle-left{
    flex:2;
    display:flex;
    flex-direction:column;
    gap:28px;
}

.middle-right{
    flex:1;
    display:flex;
}

.forecast{
    flex:2.2;
    background:rgb(15,28,56);
    border:1px solid rgba(255,255,255,.05);
    border-radius:28px;
    padding:28px;
    min-height: 320px;
    box-shadow:0 12px 30px rgba(0,0,0,.28);
    position: relative;
}

.section-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:28px;
}

.section-header h2{
    color:white;
    font-size:22px;
    font-weight:600;
}


.forecast-list{
    display:flex;
    justify-content:space-between;
    gap:14px;
}

.forecast-card{
    flex:1;
    background:rgba(22,39,72,.75);
    border:1px solid rgba(255,255,255,.05);
    border-radius:22px;
    padding:18px 15px;
    text-align:center;
    transition:.35s;
    backdrop-filter:blur(14px);
    cursor:pointer;
}

.forecast-card:hover{
    transform:translateY(-8px);
    background:rgba(29,50,88,.9);
    box-shadow:0 12px 25px rgba(91,108,255,.18);
}

.forecast-card h4{
    color:white;
    font-size:18px;
    margin-bottom:4px;
}

.forecast-card span{
    color:rgb(158,168,199);
    font-size:13px;
}

.forecast-card i{
    display:block;
    margin:18px 0;
    font-size:36px;
}

.forecast-card:nth-child(1) i{
    color:rgb(255,200,87);
}

.forecast-card:nth-child(2) i{
    color:rgb(235,240,255);
}

.forecast-card:nth-child(3) i{
    color:rgb(84,199,255);
}

.forecast-card:nth-child(4) i{
    color:rgb(255,170,0);
}

.forecast-card:nth-child(5) i{
    color:rgb(255,220,120);
}

.forecast-card h3{
    color:white;
    font-size:24px;
    margin-bottom:6px;
}

.forecast-card p{
    color:rgb(158,168,199);
    font-size:15px;
}

.aqi{
    flex:1;
    background:rgb(15,28,56);
    border:1px solid rgba(255,255,255,.05);
    border-radius:28px;
    padding:28px;
    box-shadow:0 12px 30px rgba(0,0,0,.28);
    height:100%;
    position: relative;
}
.aqi>h2{
    color:white;
    font-size:22px;
    margin-bottom:25px;
}

.aqi-circle{
    width:210px;
    height:210px;
    margin:0 auto 30px;
    border-radius:50%;
    background:
    conic-gradient(
        rgb(57,217,138) 0deg,
        rgb(57,217,138) 250deg,
        rgb(245,196,81) 250deg,
        rgb(245,196,81) 310deg,
        rgb(26,42,72) 310deg
    );
    display:flex;
    justify-content:center;
    align-items:center;
    position:relative;
}
.aqi-circle::before{
    content:"";
    position:absolute;
    width:160px;
    height:160px;
    border-radius:50%;
    background:rgb(15,28,56);
}
.aqi-value{
    position:relative;
    text-align:center;
}
.aqi-value h2{
    color:white;
    font-size:54px;
    margin-bottom:5px;
}
.aqi-value p{
    color:rgb(57,217,138);
    font-size:18px;
    font-weight:600;
}

.aqi-list{
    display:flex;
    flex-direction:column;
}
.aqi-item{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:15px 0;
    border-bottom:1px solid rgba(255,255,255,.05);
}
.aqi-item:last-child{
    border-bottom:none;
}
.aqi-item span:first-child{
    color:rgb(158,168,199);
    font-size:16px;
}
.aqi-item span:last-child{
    color:white;
    font-size:16px;
    font-weight:600;
}

/* additional info section */
.card{
    flex:1;
    background:rgb(15,28,56);
    border:1px solid rgba(255,255,255,.05);
    border-radius:28px;
    padding:28px;
    box-shadow:0 12px 30px rgba(0,0,0,.28);
    transition:.35s;
    width:100%;
    position: relative;
}
.card h2{
    color:white;
    font-size:22px;
    margin-bottom:25px;
}
.info-grid{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:18px;
}
.info-box{
    background:rgba(22,39,72,.75);
    border:1px solid rgba(255,255,255,.05);
    border-radius:20px;
    padding:22px;
    text-align:center;
    transition:.35s;
    cursor:pointer;
}
.info-box:hover{
    transform:translateY(-8px);
    background:rgba(30,52,92,.9);
}
.info-box i{
    font-size:30px;
    margin-bottom:15px;
}
.info-box h4{
    color:white;
    font-size:24px;
    margin:10px 0;
}
.info-box p{
    color:rgb(158,168,199);
    font-size:14px;
}
.info-box:nth-child(1) i{
    color:rgb(255,200,87);
}
.info-box:nth-child(2) i{
    color:rgb(84,199,255);
}
.info-box:nth-child(3) i{
    color:rgb(57,217,138);
}
.info-box:nth-child(4) i{
    color:rgb(255,94,115);
}

::-webkit-scrollbar-thumb{
    background:rgb(91,108,255);
    border-radius:20px;
}
::-webkit-scrollbar-track{
    background:transparent;
}

.middle>*,
.hero{
    animation:fadeUp .6s ease;
}

@keyframes fadeUp{
    from{
        opacity:0;
        transform:translateY(20px);
    }
    to{
        opacity:1;
        transform:translateY(0);
    }
}

/* sidebar for mobile */
#menu-btn{
    display:none;
}
#overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.5);
    backdrop-filter:blur(3px);
    opacity:0;
    visibility:hidden;
    transition:.3s;
    z-index:999;
}
#overlay.open{
    opacity:1;
    visibility:visible;
}
@media (max-width:768px){
    #menu-btn{
        display:flex;
        align-items:center;
        justify-content:center;
        width:45px;
        height:45px;
        border:none;
        outline:none;
        border-radius:12px;
        background:#25375d;
        color:#fff;
        font-size:20px;
        cursor:pointer;
        transition:.3s;
        flex-shrink:0;
    }
    #menu-btn:hover{
        background:#31508d;
    }
    .top-bar{
        gap:12px;
    }
    .sidebar{
        position:fixed;
        top:0;
        left:-320px;
        width:300px;
        height:100vh;
        z-index:1000;
        transition:left .35s ease;
        overflow-y:auto;
        border-radius:0 20px 20px 0;
    }
    .sidebar.open{
        left:0;
    }
}

@media (max-width:480px){
    .sidebar{
        width:270px;
        left:-290px;
    }
}