

/* reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: poppins, sans-serif;
}


:root {
    --bg: linear-gradient(135deg, #011158, #210042);
    --card: rgba(255, 255, 255, 0.1);
    --text: white;
    --box: rgba(255, 255, 255, 0.15);
    --primary:white;
    --right: rgb(1, 3, 60, 0.20);
    --serachbtn:rgba(111, 111, 111, 0.5);
    --btnhover: rgb(255, 255, 255);
    --texthvr:rgb(0, 0, 0);
    --border: rgb(255, 255, 255);
    --boderhvr: rgb(0, 0, 0);
    
}


/* light mode */

body.light {
    --bg: linear-gradient(135deg, #9bacff, #ce9dff);
    --card: rgba(192, 192, 192, 0.3);
    --text: #222;
    --box: rgba(255, 255, 255, 0.312);
    --primary:black;
    --right: rgba(255, 255, 255, 0.2);
    --serachbtn:rgb(255, 255, 255);
    --btnhover: black;
    --texthvr:rgb(255, 255, 255);
    --border: rgb(0, 0, 0);
    --boderhvr: rgb(255, 255, 255);
 
}


/* body */
body {
    background: var(--bg);
    color: var(--text);
    display: flex;
    justify-content: center;
   padding: 100px 10px;
    height: 100%;
    background: var(--bg);
    transition: 0.3s;
}


/* main app */
.app {
    width: 1100px;
    height: 100%;
    padding: 24px;

    background: var(--card);

    display: table-column;
    border-radius: 25px;
    overflow: hidden;

    backdrop-filter: blur(25px);
    background: var(--card);
    color: var(--text);

    box-shadow: 0 10px 50px rgba(0,0, 0, 0.3);
    
}




/* top */

.top{
    display: flex;
    justify-content: space-between;
    align-items: center;
}


.top h1 {
    font-size: 36px;
}


/* theme toggle */

#themeToggle {
    width: 50px;
    height: 50px;
    
    
    padding: 10px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    font-size: 18px;
    background: var(--primary);
  
}








/* left side */
.left {
    width: 100%;
    padding: 20px;

    display: flex;
    flex-direction: column;
    
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;

    
}





/* search */
.search {
    display: flex;
    justify-content: center;
    gap: 10px;
    width: 70%;
   
    
}

.search input {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 50px;
    outline: none;
    width: 100%;
    background: var(--serachbtn);
    color: var(--text);
    border: 1px solid var(--border);
}

.search button {
    padding: 12px 18px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    background: var(--serachbtn);
    color: var(--text);
     border: 1px solid var(--border);
    
}





/* main-weaather */


.main-weather {
    text-align: center;
    margin-top: 20px;
    
}

.main-weather h2 {
    font-size: 28px;
    
}

.main-weather h1 {
    font-size: 80px;
    margin: 10px 0;
}

.main-weather p {
    font-size: 18px;
    opacity: 0.8;
    margin-bottom: 10px;
}



/* details */

.details {
    display: flex;
    gap: 20px;
    
   width: 50%;
    justify-content: center;
    align-items: center;
    
}

.box {
    flex: 1;
    padding: 20px;
    border-radius: 15px;
    text-align: center;

    background: var(--box);
    transition: 0.3s;
}

.box:hover {
    transform: translate(-5px);
}





/* right side */

.right {
    
    padding: 40px;
    background: var(--right);
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    gap: 0px;
    align-items: center;
}

.right h2 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--text);
}


/* forecast */

.forecast {
    
    display: flex;

    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    align-items: center;
}

.day {
    display: flex;
    justify-content: space-between;
    text-align: center;

    padding: 12px;
    border-radius: 10px;

    background: var(--box);
    transition: 0.3s;
    font-size: 14px;
    
}





/* hover effect */
.day:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.02);
}

.btn:hover {
    background: var(--btnhover);
    color: var(--texthvr);
    transition: 0.3s;
        border: 1px solid var(--boderhvr);
}




/* responsive tab */

@media (max-width: 800px) {


    /* body */
body {
    background: var(--bg);
    color: var(--text);
    display: flex;
    justify-content: center;
   padding: 10px 10px;
    height: 100%;
    background: var(--bg);
    transition: 0.3s;
}
   

    .app {
    width: 100%;
    height: 100%;
    padding: 24px;

    background: var(--card);

    display: table-column;
    border-radius: 25px;
    overflow: visible;

    backdrop-filter: blur(25px);
    background: var(--card);
    color: var(--text);

    box-shadow: 0 10px 50px rgba(0,0, 0, 0.3);
    
}




/* top */

.top{
    display: flex;
    justify-content: space-between;
    align-items: center;
}


.top h1 {
    font-size: 28px;
}


/* theme toggle */

#themeToggle {
    width: 50px;
    height: 50px;
    
    
    padding: 10px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    font-size: 18px;
    background: var(--primary);
  
}








/* left side */
.left {
    width: 100%;
    padding: 20px;

    display: flex;
    flex-direction: column;
    
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;

    
}





/* search */
.search {
    display: flex;
    justify-content: center;
    gap: 10px;
    width: 70%;
   
    
}

.search input {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 50px;
    outline: none;
    width: 100%;
    background: var(--serachbtn);
    color: var(--text);
    border: 1px solid var(--border);
}

.search button {
    padding: 12px 18px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    background: var(--serachbtn);
    color: var(--text);
     border: 1px solid var(--border);
    
}





/* main-weaather */


.main-weather {
    text-align: center;
    margin-top: 20px;
    
}

.main-weather h2 {
    font-size: 28px;
    
}

.main-weather h1 {
    font-size: 80px;
    margin: 10px 0;
}

.main-weather p {
    font-size: 18px;
    opacity: 0.8;
    margin-bottom: 10px;
}



/* details */

.details {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    
    width: 50%;
    
}

.box {
    flex: 1;
    padding: 20px;
    border-radius: 15px;
    text-align: center;

    height: 100%;
    width: 100%;

    background: var(--box);
    transition: 0.3s;
}

.box:hover {
    transform: translate(-5px);
}





/* right side */

.right {
    
    padding: 10px;
    background: var(--right);
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    gap: 0px;
    align-items: center;
}

.right h2 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--text);
}


/* forecast */

.forecast {
    
    display: flex;

    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    align-items: center;
}

.day {
    display: flex;
    justify-content: space-between;
    text-align: center;

    padding: 12px;
    border-radius: 10px;

    background: var(--box);
    transition: 0.3s;
    font-size: 14px;
    
}


}   





/* responsive mobile */

@media (max-width: 700px) {
    .app {
        padding: 16px;
    }

    .search {
        width: 100%;
        padding: 0px;
    }
    .search input {
        width: 100%;
    }
    

    .details {
        width: 100%;
    }
}