@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;400;600&display=swap');

/* Basic Colors */
:root {
    --veryDark: #10111f;
    --bgDarkBlue: #22254b;
    --bgMediumBlue: #3a3e7c;
    --lightBlue: aliceblue;
    --white: #fff;
}

* {
    box-sizing: border-box;
    margin: 0;
}

.clr {
    clear: both;
}

body {
    background: var(--bgDarkBlue);
    font-family: 'Poppins', sans-serif;
    transition: .1s ease;
}

header {
    background: var(--bgMediumBlue);
    display: flex;
    justify-content: flex-end;
    padding: 1.5rem;
    transition: .1s ease;
}

.movie-title {
    color: var(--white);
    float: left;
    margin: 5px 0 0;
    transition: .1s ease;
}

#mode {
    background: var(--lightBlue);
    border: 2px solid var(--bgDarkBlue);
    border-radius: 50%;
    outline: none;
    float: left;
    padding: 5px 9px;
    margin: 0 15px 0 0;
}

#mode > img {
    width: 18px;
}

#search {
    background: transparent;
    border: 2px solid var(--bgDarkBlue);
    border-radius: 50px;
    color: var(--white);
    padding: .5rem 2rem;
    font-weight: bold;
    letter-spacing: .5px;
    float: right;
    outline: none;
    transition: .3s ease;
}

#search::placeholder {
    letter-spacing: .5px;
    color: #a3a2d6;
}

#search:focus {
    outline: none;
    background: var(--bgDarkBlue);
    color: rgb(221, 220, 247);
}

main {
    display: flex;
    flex-wrap: wrap;
}

.movie {
    position: relative;
    width: 29%;   
    border-radius: 4px;
    color: var(--lightBlue);
    background: var(--bgMediumBlue);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    margin: 1.5rem;
    overflow: hidden;
    transition: .1s ease;
}

.movie img {
    width: 100%;

}

.movie-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    letter-spacing: 1px;
}

.movie-info h3 {
    margin: 0;
}

.movie-info span {
    background: var(--bgDarkBlue);
    border-radius: 3px;
    font-weight: bold;
    padding: 0.5rem 1rem;
    margin: 0 0 0 8px;
}
.movie-info span.green {
    color: rgb(17, 206, 17);
}
.movie-info span.orange {
    color: rgb(255, 217, 0);
}
.movie-info span.red {
    color: rgb(255, 94, 0);
}

.overview {
    position: absolute;
    background: var(--lightBlue);
    color: var(--veryDark);
    max-height: 100%;
    overflow: auto;
    padding: 2rem;
    right: 0;
    left: 0;
    bottom: 0;
    transition: .3s ease-in;
    transform: translateY(100%);
}

.overview h5 {
    margin-top: 0;
    font-weight: bold;
}

.movie:hover .overview {
    transform: translateY(0);
}

footer {
    display: flex;
    justify-content: center;
    background: var(--bgMediumBlue);
    color: var(--lightBlue);
    padding: 3rem;
    transition: .1s ease;
}

#previous, #next {
    background: transparent;
    outline: none;
    color: var(--white);
    padding: .6rem 1rem;
    border: 2px solid var(--bgDarkBlue);
    border-radius: 3px;
    transition: .3s ease;
}

button > img {
    width: 15px;
}

#previous:hover, #next:hover {
    cursor: pointer;
    background: var(--bgDarkBlue);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
#next {
    float: right;
}
.footer-info {
    margin: 5px 0 0 80px;
    font-size: 22px;
    letter-spacing: .8px;
    transition: .1s ease;
}
#page {
    font-size: 28px;
    letter-spacing: 1px;
    margin-left: 10px;
}

#up {
    background: transparent;
    outline: none;
    color: var(--white);
    border: none;
    margin: 3px 0 0 30px;
    float: right;
}
#up > img {
    width: 40px;
    background: var(--lightBlue);
    border-radius: 50%;
}
.up-animation {
    animation: up 1.5s infinite ease-in-out;
}
@keyframes up {
    0% {
        margin: 0;
    }
    35% {
        margin: -25px 0 25px;
    }
    100% {
        margin: 0;
    }
}


#mode {
    background: var(--lightBlue);
    border: 2px solid var(--bgDarkBlue);
    border-radius: 50%;
    outline: none;
    padding: 5px 9px;
}
#mode > img {
    width: 18px;
}


/*  RESPONSIVE  */

@media only screen and (max-width: 1199px) {
    .movie {
        width: 29.9%;   
        margin: 1.5rem 1rem;
    
    }
}

@media only screen and (max-width: 991px) {
    .movie {
        width: 43%;
        margin: 1.5rem;
    }
}

@media only screen and (max-width: 767px) {
    .movie-title {
        float: none;
        margin: 10px auto 15px;
        text-align: center;
    }

    #search {
        padding: .2rem 1rem;
        display: flex;
        margin: 10px auto;
        float: none;
    }
    .movie {
        width: 99%;
        margin: 2rem .5rem;
    }

    /* FOOTER */
    footer {
        padding: 2rem 0;
    }
    
    #previous, #next {
        padding: .2rem .6rem;
    }
    
    button > img {
        width: 13px;
    }
    
    #next {
        float: right;
        margin: 8px 0;
    }
    .footer-info {
        margin: 15px 10px 0 20px;
    }
    
    #up {
        margin: 5px 0 0 30px;
    }
    #up > img {
        width: 35px;
    }
    @keyframes up {
        0% {
            margin: 0;
        }
        35% {
            margin: -20px 0 20px;
        }
        100% {
            margin: 0;
        }
    }
}
@media only screen and (max-width: 450px) {
    #previous {
        float: none;
        display: inline-block;
        justify-content: flex-end;
        margin: 8px 20px;
    }
    #next {
        float: none;
        display: flex;
        padding: 0.32rem .6rem;
        margin: -115px 0 0 265px;
    }
    .footer-info {
        display: flex;
        justify-content: center;
        margin: 15px auto;
    }  
}
