:root { 
    --color-primary : #4d0de5 ; 
    --color-secondary : #7da1f7 ; 
    --color-warning : #fae362 ; 
    --color-error : #f75e4b ;  
}

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

body { 
    max-width: 1200px;
    margin: auto;
}

#search { 
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 100px 10px 200px;

    border-radius: 0 0 40px 40px;
    background: linear-gradient(
        13deg , 
        var(--color-primary) 47% , 
        var(--color-secondary) 100% 
    );
    box-shadow: var(--color-secondary) 0px 20px 100px 0px;
}

#location { 
    width: 45px;
    margin-right: 10px;
    cursor: pointer;
    transition: all 0.1s ease-in;
}

#location:hover { 
    transform: scale(1.3);
}
#search input { 
    width: 300px ;
    height: 35px;
    border: none;
    outline: none;
    padding: 10px;
    color: var(--color-primary);
    font-size: 16px;
    border-radius: 10px 0 0 10px;
}
#search button { 
    border: none;
    background-color: var(--color-warning);
    height: 35px ;
    padding: 10px;
    border-radius: 0 10px 10px 0 ;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.1s ease-in;
}
#search button:hover { 
    color: var(--color-primary);
}

#weather { 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    width: 500px;
    min-height: 200px;
    margin: auto;
    margin-bottom: 50px;
    position: relative;
    bottom: 80px;
    padding: 30px;
    border-radius: 30px;
    box-shadow: var(--color-secondary) 0px 25px 80px -25px; 
}

#weather h1  {
    color: var(--color-primary);
    font-size: 2rem;
    margin-bottom: 20px;
}


#weather #main { 
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

#weather #main span {
    margin: 0 30px 0 10px;
    color: grey;
}

#weather #info { 
    width: 100%;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
}


#weather #info span { 
    color: var(--color-secondary);
    margin-left: 5px;
}

#forecast { 
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

#forecast div { 
    width: 150px;
    padding: 20px 10px 30px;
    text-align: center;
    border-radius: 20px;
    box-shadow: var(--color-secondary) 0px 25px 80px -25px;
    margin-bottom: 40px;
}

#forecast h3 { 
    color: var(--color-primary);
    margin-bottom: 30px;
}

#forecast p { 
    margin-bottom: 10px;
}

#forecast span { 
    color: var(--color-secondary);
}


#modal { 
    background-color: rgba(128, 128, 128, 0.7);
    position:absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display:none;
    justify-content: center;
    align-items: center ; 
}

#modal > div { 
    background-color: #fff;
    width: 500px;
    border-radius: 20px;
    padding: 30px;
}

#modal span { 
    background-color: var(--color-error);
    color: #fff;
    font-weight: 900;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.1s ease-in;
    padding: 5px 10px ;
    border-radius: 10px;
}
#modal p { 
    margin-top: 40px;
    color: var(--color-error);
}

#loader { 
    width: 100px;
    height: 100px;
    border: 7px solid var(--color-primary);
    border-bottom-color:transparent ;
    border-top-color:transparent ;
    border-radius: 50%;
    display: inline-block;
    animation: rotation 0.8s linear infinite;
}


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

@media (max-width: 500px) { 
    #weather { 
        width: 95%;
    }

    #forecast { 
        width: 95%;
        margin: auto;
    }
    #weather #info { 
        flex-direction: column;
    }
    #weather #info P:last-child { 
        margin-top: 15px;
    }
    #modal > div { 
        width: 80%;
        margin: auto;
    }
}

