:root{
    --deepblue:#021639;
}

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

body{
    width: 100vw;
    min-height: 100vh;

    /* background-color: #000000; */
}

.wrapper{
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Navbar */
#nav-section{
    width: 100%;
    position: relative;
    background-color: var(--deepblue);
}
.navbar{
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;

    padding: 15px 20px;
    background-color: var(--deepblue);
    color: #f5f5f5;
}

/* logo */
.nav-logo{
    font-size: 16px;
    font-weight: bold;
}

/* nav items */
.nav-items{
    background-color: var(--deepblue);
    width: 100%;

    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    gap: 20px;
}

/* search */
.search-bar{
    display: flex;
    justify-content: center;
    width: 100%;
    margin-right: -25px;
}
.search-bar input{
    width: 80%;
    padding: 8px;
    border: none;
    border-radius: 50px;
    background: rgb(255, 255, 255);
}
.search-bar input:hover, .search-bar input:focus{
    outline: 3px solid  rgb(10, 108, 255);
}

/* nav buttons */
.nav-buttons{
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}
.nav-buttons a{
    color: #f5f5f5;
    text-decoration: none;
}
.nav-btn{
    padding: 8px;
    border-radius: 5px;
    font-size: 18px;

    background-color: var(--deepblue);
    color: aliceblue;
    border: none;
}
.nav-btn:hover{
    outline: 2px solid rgb(10, 108, 255);
}

/* auth section */
#auth-section{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    white-space: nowrap;
    gap: 10px;

}
.btn-logout{
    background-color:rgb(0, 94, 117);
}
.user-name{
    background-color: rgb(94, 0, 101);
}
.user-name:hover{
    outline: 2px solid rgb(10, 108, 255);
}

/* menu button */
.menu-btn{
    font-size: 25px;
    cursor: pointer;
    display: none;
}

/* close button */
.close-btn{
    font-size: 25px;
    cursor: pointer;
    display: none;
    align-self: flex-end;
}

/* overlay */
.overlay{
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.005);
    pointer-events: none;
    transition: 0.3s;
    opacity: 0;
}

/* ---------------Movie Section------------------ */

.container{
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px;
  
}
 
#movies-container{
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 20px ;
   
}

#cart-container{
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 20px ;
   
}


.movie-poster{
    width: 100%;
    height: 350px;
    overflow: hidden;
}

.movie-poster img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.movie-card{
    cursor: pointer;
    box-shadow: rgba(0,0,0,0.35) 0px 5px 15px;
    background-color: #f5f5f5;
}

.movie-info{
    padding: 16px;
}

.movie-title{
    font-size: 16px;
    margin-bottom: 8px;
    color: #333;
}

.movie-year{
    font-size: 14px;
    margin-bottom: 8px;
    color: #666;
}

.movie-rating{
    margin-bottom: 4px;
    color: goldenrod;
} 
.movie-buttons{
    display: flex;
    justify-content: space-between;
    align-items: center;
}




/* mobile */
@media (max-width:768px) {
    .menu-btn {
        display: block;
    }
    .nav-logo{
        font-size: 14px;
    }

    .nav-items {
        position: fixed;
        top: 0;
        right: 0;

        width: 65%;
        height: 100%;

        background-color: var(--deepblue);
        box-shadow: -5px 0 15px rgba(0,0,0,0.3);

        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;

        padding: 20px;
        gap: 20px;

        transform: translateX(100%);
        transition: 0.3s;
        z-index: 1;
    }

    .nav-buttons{
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        
    }

    .nav-btn{
        font-size: 16px;
    }

    .close-btn{
        display: block;
    }
    .search-bar{
        width: 100%;
        justify-content: flex-start;
        flex: unset;
    }

    .search-bar input{
        width: 100%;
        padding: 12px;
    }

    /* auth section */
    #auth-section {
    
        flex-direction: column;
        align-items: flex-start;
        white-space: nowrap;
        gap: 15px;

    }

    /* active */
    .navbar.active .nav-items{
        transform: translateX(0);
    }

    .overlay.active{
        opacity: 1;
        pointer-events: auto;
    }
}