@import "resets.css";
@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

@import url('https://fonts.googleapis.com/css2?family=Russo+One&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap');

:root {
    --grey: #E8E9EB;
    --red: red;
    --transition: 0.3s;
    --movie-title: 'Russo One', sans-serif;
}

body {
    background-color: black;
}

.movie-title, .loading {
    font-family: var(--movie-title);
}
ul {
    display: flex;
    gap: 20px;
}

#autocomplete-list {
    list-style: none;
    position: absolute;
    z-index: 4;
    max-height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 5px;
    max-width: 200px;
}
.list {
    width: 100%;
    background-color: #ffffff;
    border-radius: 0 0 5px 5px;
    position: relative;
    z-index: 3;
    top: 64px;
}
.list-items {
    padding: 10px 5px;
}
.list-items:hover {
    background-color: #dddddd;
}

.nav-genre {
    color: white;
    font-family: Bebas Neue;
    font-size: 25px;
    text-decoration: none;
}

.nav-genre:hover {
    font-weight: bolder;
    color: var(--red);
    font-size: 28px;
}

.carousel-container {
    height: 80vh;
    display: flex;
    align-items: center;
    overflow-x: auto;
}



.sidebar {
    position: absolute;
    color: #000;
    min-width: 14em;
    width: 14em;
    font-size: 1.5em;
    padding-left: 2em;
    text-align: center;
}

h2 {
    font-family: 'Lexend Tera', sans-serif;
}

.icon {
    font-size: 2.5em;
    animation: pointRight 1.5s ease-in-out infinite;
}

.scrolling-carousel {
    height: 70%;
    display: flex;
    flex-direction: row;
    padding-right: 1em;
    animation: peekIn 1.5s ease-in-out;

    .carousel-card {
        border-radius: 0.5em;
        background: #fff;
        min-width: 20em;
        width: 20em;
        margin-left: 1em;
        overflow: hidden;
        position: relative;
        -webkit-box-shadow: 0px 11px 35px -6px rgba(27, 32, 36, 1);
        -moz-box-shadow: 0px 11px 35px -6px rgba(27, 32, 36, 1);
        box-shadow: 0px 11px 35px -6px rgba(27, 32, 36, 1);
        transition: transform transition-time var(--transition) ease-in-out, box-shadow transition-time var(--transition) ease-in-out;
        background-size: cover;
        background-position: center;

        &::after {
            content: '';
            height: 100%;
            width: 20em;
            background: rgb(9, 33, 46);
            background: linear-gradient(0deg, rgba(9, 33, 46, 1) 10%, rgba(9, 33, 46, 0) 100%);
            position: absolute;
            z-index: 2;
        }

        .card-details {
            color: #fff;
            position: absolute;
            bottom: 2em;
            left: 1.5em;
            z-index: 3;
            width: 85%;

            .card-header {
                transition: transform transition-time var(--transition) ease-in-out;

                .card-title {
                    margin-bottom: 0.25em;
                }

                .card-description {
                    font-size: 0.75em;
                    line-height: 1.5em;
                    margin-bottom: 1em;
                }
            }

            .star-rating {
                display: none;
                position: absolute;
                bottom: -0.25em;

                .star-icon {
                    color: white;
                    text-decoration: none;
                    opacity: 0;
                    transform: translateY(3px);
                    animation: fadeIn 0.5s ease-in-out forwards;

                    &:nth-of-type(1) {
                        animation-delay: 0s;
                    }

                    &:nth-of-type(2) {
                        animation-delay: 0.1s;
                    }

                    &:nth-of-type(3) {
                        animation-delay: 0.15s;
                    }

                    &:nth-of-type(4) {
                        animation-delay: 0.175s;
                    }

                    &:nth-of-type(5) {
                        animation-delay: 0.2s;
                    }
                }
            }
        }

        .card-call-to-action {
            opacity: 0;
            position: absolute;
            right: 0em;
            bottom: 0.5em;
            transform: translateY(1.5em);
            transition: transform transition-time var(--transition) ease-in-out, opacity transition-time var(--transition) ease-in-out;
        }

        &:hover {
            transform: scale(1.10);
            cursor: pointer;
            -webkit-box-shadow: 0px 33px 81px -7px rgba(27, 32, 36, 1);
            -moz-box-shadow: 0px 33px 81px -7px rgba(27, 32, 36, 1);
            box-shadow: 0px 33px 81px -7px rgba(27, 32, 36, 1);

            .card-header {
                transform: translateY(-1.5em);
            }

            .star-rating {
                display: block;
            }

            .card-call-to-action {
                opacity: 1;
            }
        }
    }
}

.card-btn {
    background: none;
    color: #fff;
    border: 1px solid #fff;
    padding: 0.5em 1em;
    border-radius: 0.25em;
    margin-left: 0.25em;
    transition: background transition-time var(--transition) ease-in-out, color transition-time var(--transition) ease-in-out, transform transition-time var(--transition) ease-in-out;

    &:hover {
        cursor: pointer;
        transform: scale(1.1);
    }

    &:focus {
        outline: none;
    }

    &.primary {
        background: #fff;
        color: #1b2024;
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(0.5em);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes peekIn {
    0% {
        transform: translateX(0);
    }
    35% {
        transform: translateX(0.25em);
    }
    65% {
        transform: translateX(-1em);
    }
    100% {
        transform: translateX(0);
    }
}

@keyframes pointRight {
    0% {
        transform: translateX(0);
    }
    15% {
        transform: translateX(-0.25em);
    }
    35% {
        transform: translateX(0.15em);
    }
    55% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(0);
    }
}


.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all ease 0.3s;
    z-index: 999;
}

.modal-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(10px);
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 650px;
    padding: 30px;
    border-radius: 20px;
    color: white;
    background-color: black;
    transition: all ease 0.3s;
}

.modal-header {
    display: flex;
    justify-content: center;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all ease 0.3s;

    &:hover {
        background-color: var(--grey);
        color: black;
    }
}

.developers a {
    text-decoration: underline;
    color: white;


    &:hover {
        font-weight: bolder;
        color:red;
        font-family: Bebas Neue;
        font-size: 30px;
    }
}

.developers img {
    height: 50px;
    width: 50px;
}


/* Define the keyframe animation for the dots */
@keyframes loadingDots {
    0%, 20% {
        content: ".";
    }
    40% {
        content: "..";
    }
    60% {
        content: "...";
    }
    80% {
        content: "....";
    }
    100% {
        content: "";
    }
}

/* Style the container for the loading animation */


/* Style the dots */
.loading-dots::before, .loading-dots::after {
    content: "";
    display: inline-block;
    width: 0;
    animation: loadingDots 2s infinite steps(5);
}

.loading-dots::after {
    animation-delay: 1s;
}

.big-movie-desc {
width: 50%;
}
@media screen and (max-width: 768px) {
    .big-movie-desc {
        width: 100%;
    }

    .carousel-container {
        height: 60vh;
    }

    .carousel-card {
        min-width: 15em;
        width: 15em;
    }

    .sidebar {
        display: none;
    }
}




