﻿/* =========================================================
   CONTAINER
   ========================================================= */

.movies-carousel-wrapper {
    position: relative;
    width: 100%;
}


/* =========================================================
   TRACK
   ========================================================= */

.movies-track {
    display: flex;
    gap: 18px;
    width: 100%;
    padding: 6px 2px 20px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
}


    .movies-track::-webkit-scrollbar {
        display: none;
    }


/* =========================================================
   CARD
   ========================================================= */

.movie-card {
    width: 185px;
    min-width: 185px;
    flex: 0 0 185px;
    cursor: pointer;
    scroll-snap-align: start;
    transition: transform 0.25s ease;
}


    .movie-card:hover {
        transform: translateY(-6px);
    }


/* =========================================================
   POSTER
   ========================================================= */

.movie-poster {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 13px;
    background: #14171d;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}


.movie-card:hover .movie-poster {
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.55);
}


.movie-poster img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.4s ease, filter 0.3s ease;
}


.movie-card:hover .movie-poster img {
    transform: scale(1.06);
    filter: brightness(0.68);
}


/* =========================================================
   GRADIENTE
   ========================================================= */

.poster-gradient {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient( 180deg, transparent 45%, rgba(5, 6, 8, 0.1) 60%, rgba(5, 6, 8, 0.95) 100% );
    opacity: 0.55;
    transition: opacity 0.25s ease;
}


.movie-card:hover .poster-gradient {
    opacity: 1;
}


/* =========================================================
   FAVORITO
   ========================================================= */

.favorite-button {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    color: #fff;
    background: rgba(7, 8, 11, 0.62);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}


    .movie-card:hover .favorite-button,
    .favorite-button.favorited {
        opacity: 1;
        transform: translateY(0);
    }


    .favorite-button:hover {
        background: #fff;
        color: #16181d;
    }


    .favorite-button.favorited {
        color: #ff3158;
    }


        .favorite-button.favorited:hover {
            color: #ff3158;
        }


    .favorite-button i {
        font-size: 15px;
    }


/* =========================================================
   TOP
   ========================================================= */

.top-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 8px;
    border-radius: 7px;
    background: rgba(12, 13, 17, 0.78);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.7px;
}


    .top-badge i {
        color: #ff405f;
        font-size: 11px;
    }


/* =========================================================
   HOVER
   ========================================================= */

.movie-hover-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 20px;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}


.movie-card:hover .movie-hover-content {
    opacity: 1;
    transform: translateY(0);
}


/* =========================================================
   PLAY
   ========================================================= */

.play-button {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #fff;
    color: #090a0d;
    cursor: pointer;
    box-shadow: 0 7px 25px rgba(0, 0, 0, 0.35);
    transition: transform 0.18s ease, background 0.18s ease;
}


    .play-button:hover {
        transform: scale(1.08);
        background: #ff3158;
        color: #fff;
    }


    .play-button i {
        margin-left: 3px;
        font-size: 25px;
    }


.play-label {
    color: rgba(255, 255, 255, 0.82);
    font-size: 10px;
    font-weight: 600;
}


/* =========================================================
   INFORMAÇÕES
   ========================================================= */

.movie-info {
    padding: 11px 3px 0;
}


.movie-title {
    margin: 0;
    overflow: hidden;
    color: #ebedf2;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
    text-overflow: ellipsis;
    transition: color 0.18s ease;
}


.movie-card:hover .movie-title {
    color: #fff;
}


/* =========================================================
   META
   ========================================================= */

.movie-metadata {
    min-height: 20px;
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 5px;
    color: #686e79;
    font-size: 10px;
}


.movie-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #afb3bd;
    font-weight: 600;
}


    .movie-rating i {
        color: #f5b942;
        font-size: 10px;
    }


.metadata-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #494e58;
}


.review-count {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}


/* =========================================================
   SETAS
   ========================================================= */

.carousel-arrow {
    position: absolute;
    top: 42%;
    z-index: 20;
    width: 43px;
    height: 75px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    color: #fff;
    background: rgba(7, 8, 11, 0.72);
    backdrop-filter: blur(7px);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease;
}


.movies-carousel-wrapper:hover .carousel-arrow {
    opacity: 1;
}


.carousel-arrow:hover {
    background: rgba(255, 49, 88, 0.9);
}


.carousel-arrow-left {
    left: -12px;
    border-radius: 0 10px 10px 0;
}


.carousel-arrow-right {
    right: -12px;
    border-radius: 10px 0 0 10px;
}


.carousel-arrow i {
    font-size: 18px;
}


/* =========================================================
   SKELETON
   ========================================================= */

.movies-skeleton {
    display: flex;
    gap: 18px;
    overflow: hidden;
}


.movie-skeleton-card {
    min-width: 185px;
    width: 185px;
}


.skeleton-poster {
    width: 185px;
    aspect-ratio: 2 / 3;
    border-radius: 13px;
    background: linear-gradient( 90deg, #13161c 25%, #1b1e25 50%, #13161c 75% );
    background-size: 200% 100%;
    animation: skeletonLoading 1.4s infinite;
}


.skeleton-title {
    width: 75%;
    height: 10px;
    margin-top: 13px;
    border-radius: 5px;
    background: #181b21;
}


.skeleton-info {
    width: 45%;
    height: 8px;
    margin-top: 8px;
    border-radius: 5px;
    background: #14171c;
}


@keyframes skeletonLoading {

    from {
        background-position: 200% 0;
    }

    to {
        background-position: -200% 0;
    }
}


/* =========================================================
   RESPONSIVO
   ========================================================= */

@media (max-width: 700px) {

    .movies-track {
        gap: 12px;
    }


    .movie-card {
        width: 145px;
        min-width: 145px;
        flex-basis: 145px;
    }


    .carousel-arrow {
        display: none;
    }


    .favorite-button {
        opacity: 1;
        width: 32px;
        height: 32px;
        transform: none;
    }


    .movie-hover-content {
        display: none;
    }
}
