/* ===== RESET GLOBAL ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background-color: #1a1a1a;
    color: #ffffff;
    overflow-x: hidden;
}

/* ===== PARTÍCULAS DE FUNDO ===== */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(180deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
}

/* ===== NAVBAR ===== */
/* Navbar */
.navbar {
    padding: 10px 20px;
    background-color: transparent;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

.navbar-brand .logo {
    max-height: 400px;
    animation: slideInOut 10s ease-in-out infinite;
}

.navbar-brand .logo:hover {
    transform: scale(1.1);
}

@keyframes slideInOut {
    0% {
        transform: translateX(-150%);
        /* Começa fora da tela à esquerda */
        opacity: 0;
    }

    10% {
        transform: translateX(0);
        opacity: 1;
    }

    80% {
        transform: translateX(0);
        /* Fica parado no lugar */
        opacity: 1;
    }

    100% {
        transform: translateX(-150%);
        /* Sai da tela de novo */
        opacity: 0;
    }
}

.nav-link {
    color: #fff !important;
    margin: 0 15px;
    font-size: 1rem;
}

.nav-link:hover {
    color: #ff0000 !important;
}

/* Exibe o dropdown ao passar o mouse */
.nav-item.dropdown:hover .dropdown-menu {
    display: block;
    margin-top: 0;
}

/* Estilo do menu dropdown */
.dropdown-menu {
    background-color: #222;
    /* fundo escuro opcional */
    border: none;
}

/* Estilo dos itens dentro do dropdown */
.dropdown-menu .dropdown-item {
    color: #ffffff;
    /* vermelho */
}

/* Quando o mouse passa sobre o item */
.dropdown-menu .dropdown-item:hover {
    background-color: #444;
    color: #ff0000;
}


.search-btn {
    margin-left: 0;
    /* já tem gap no container */
    color: #ff0000;
    font-size: 1.2rem;
}

/* ===== MOBILE NAV (igual index) ===== */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: #000;
    border-top: 1px solid #222;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1050;
}
.mobile-nav .nav-item { color: #fff; font-size: 12px; text-decoration: none; flex-grow: 1; cursor: pointer; }
.mobile-nav .nav-item i { font-size: 20px; display: block; }
.mobile-nav .nav-item:hover { color: #ff0000; }
.mobile-nav #avatar { width: 36px !important; height: 36px !important; border-radius: 50%; object-fit: cover; border: 2px solid red; }


.fixed-top-right {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 1100;
    /* maior que o offcanvas */
    border-radius: 50%;
    width: 44px;
    height: 44px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff0000 !important;
    /* força vermelho */
    background-color: transparent !important;
    /* fundo transparente */
    border-color: #ff0000 !important;
    /* borda vermelha */
}

.fixed-top-right:hover {
    color: #ff0000;
    background-color: #00000000;
}

#offcanvasSearch {
    background: linear-gradient(145deg, rgba(16,16,16,0.95), rgba(32,32,32,0.85));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-left: 1px solid rgba(255,255,255,0.08);
    box-shadow: -12px 0 30px rgba(0,0,0,0.6);
}

#offcanvasSearch .offcanvas-header {
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

#offcanvasSearch .offcanvas-title {
    font-weight: 700;
}

#offcanvasSearch .input-group-text {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
}

#offcanvasSearch .form-control {
    background: rgba(255,255,255,0.06);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.12);
}

#offcanvasSearch .form-control:focus {
    border-color: #e50914;
    box-shadow: 0 0 0 0.2rem rgba(229,9,20,0.25);
}

#resultadosBusca .card {
    background: rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#resultadosBusca .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(229,9,20,0.25);
}

.user-avatar {
    margin-left: 15px;
    border: 2px solid #e50914;
    border-radius: 50%;
    padding: 2px;
}

.user-avatar::after {
    display: none !important;
}

.user-dropdown {
    background: #111;
    min-width: 220px;
    padding: 0;
    border: none;
}

.mobile-nav .dropdown-toggle::after {
    display: none !important;
}

.mobile-nav .nav-item:hover {
    color: #ff0000;
}

.mobile-nav .nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 1%;
    transform: translateX(-50%);
    width: 33px;
    height: 33px;
    background-color: red;
    border-radius: 50%;
    z-index: -1;
}

.user-dropdown .dropdown-item {
    color: #fff;
    padding: 12px 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.25s ease;
}

.user-dropdown .dropdown-item i {
    color: #e50914;
    font-size: 1rem;
}

.user-dropdown .dropdown-item:hover {
    background: #1b1b1b;
    color: #fff;
}

.user-dropdown .dropdown-divider {
    margin: 0;
    border-color: #333;
}


.favorite-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 1.5rem;
    color: white;
    z-index: 10;
    cursor: pointer;
    transition: color 0.3s ease;
}

.favorite-icon:hover {
    color: #ff4d4d;
}

.favorite-icon i {
    transition: color 0.3s ease;
    color: white;
}


/* ===== FOOTER ===== */
footer {
    background-color: #222;
    padding: 20px 0;
    text-align: center;
}

footer a {
    color: #fff;
    margin: 0 10px;
    text-decoration: none;
    transition: transform 0.3s ease, color 0.3s ease;
}

footer a:hover {
    color: #1e90ff;
    transform: translateY(-5px);
}

footer .bi {
    font-size: 1.5rem;
    margin: 0 5px;
}

footer .bi:hover {
    color: #ff0000;
    transform: translateY(-10px);
}

/* ===== MOBILE NAV ===== */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: #000;
    border-top: 1px solid #222;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1050;
}

.mobile-nav .nav-item {
    color: white;
    font-size: 12px;
    text-align: center;
    flex-grow: 1;
    cursor: pointer;
}

.mobile-nav .nav-item i {
    font-size: 20px;
    display: block;
}

.mobile-nav .nav-item:hover {
    color: #ff0000;
}

.mobile-nav .nav-item.active {
    transform: translateY(-6px);
}

.mobile-nav .nav-item span {
    display: block;
    font-size: 11px;
    margin-top: 6px;
}

/* ===== RESPONSIVO ===== */
@media (max-width: 768px) {
    .navbar {
        display: none;
    }

    .conterneFimes {
        padding-top: 60px;
    }

    .movie-card {
        min-width: 120px;
    }

    .banner-section {
        padding: 20px 10px;
    }

    /* Desabilitar animações pesadas no mobile */
    .movie-card::before,
    .card-hover::before,
    .top3-card::before {
        display: none;
    }

    /* Simplificar glassmorphism no mobile */
    .btn,
    .search-btn,
    .carousel-btn-top {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(255, 255, 255, 0.1) !important;
    }

    /* Reduzir efeito neon no mobile */
    .badge {
        animation: none;
        box-shadow: 0 0 5px rgba(229, 9, 20, 0.4);
    }

    /* Ajustar banner mobile */
    #banner {
        height: 60vh;
        padding: 30px 20px;
    }

    #banner .content {
        max-width: 100%;
    }

    #banner h1 {
        font-size: 1.8rem;
    }

    #banner p {
        font-size: 0.85rem;
    }

    /* Skeleton cards responsivo */
    .skeleton-card {
        width: 150px;
        height: 225px;
    }
}

@media (max-width: 576px) {
    .movie-card img {
        height: 200px;
    }

    .movie-card p {
        font-size: 12px;
    }

    .movie-card button {
        font-size: 0.8rem;
        padding: 4px 8px;
    }

    /* Ajustes finos para telas pequenas */
    .section-title {
        font-size: 1.2rem;
    }

    #banner {
        height: 50vh;
        padding: 20px 15px;
    }

    #banner h1 {
        font-size: 1.5rem;
    }

    #banner .btn {
        font-size: 0.85rem;
        padding: 6px 12px;
    }

    .top3-section h2 {
        font-size: 1.3rem;
    }

    /* Otimizar scroll mobile */
    .movie-carousel {
        scroll-snap-type: x mandatory;
    }

    .movie-card {
        scroll-snap-align: start;
    }
}

#banner {
    height: 100vh;
    background-size: cover;
    background-position: center;
    position: relative;
    padding: 60px;
    display: flex;
    align-items: center;
    color: #fff;
    overflow: hidden;
}

#banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(229, 9, 20, 0.1) 50%, rgba(0, 0, 0, 0.8) 100%);
    animation: gradientShift 10s ease infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        opacity: 0.8;
    }

    50% {
        opacity: 0.6;
    }
}

.parallax-layer {
    position: absolute;
    inset: 0;
    background: inherit;
    transform: translateZ(0);
    will-change: transform;
}

#banner .content {
    position: relative;
    z-index: 1;
    max-width: 400px;
    /* Mantém o conteúdo restrito como na imagem */
    color: #fff;
    text-align: center;
    /* Centraliza o texto como na imagem */
}

.card-img-top {
    border-radius: 8px;
    max-width: 140px;
    margin-bottom: 15px;
}

.card-img-wrapper .card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    margin-bottom: 0;
    max-width: none;
}

.card {
    overflow: hidden;
}

#banner h1 {
    font-size: 2.5rem;
    /* Reduzido para se adequar ao tamanho do texto na imagem */
    font-weight: bold;
    margin-bottom: 5px;
    /* Ajustado para espaçamento mínimo */
}

#banner p {
    font-size: 0.9rem;
    /* Reduzido para combinar com o texto da descrição */
    margin-bottom: 15px;
    /* Ajustado para espaçamento */
}

.info {
    display: flex;
    align-items: center;
    gap: 10px;
    /* Aumentado para melhor espaçamento entre gênero e botões */
    justify-content: center;
    /* Centraliza os elementos */
}

.genre {
    font-size: 0.8rem;
    /* Ajustado para se alinhar ao tamanho na imagem */
    color: #ccc;
}

.btn {
    padding: 8px 15px;
    /* Reduzido para botões menores como na imagem */
    font-size: 0.9rem;
    /* Ajustado para tamanho de fonte dos botões */
}

.wrapper-center {
    display: flex;
    justify-content: center;
    overflow-x: auto;
}

/* Contêiner de plataformas */
#filtros-container-plataformas,
#filtros-container-generos {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    white-space: nowrap;
    gap: 8px;
    padding: 8px 10px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    background-color: #000;
    width: max-content;
    /* Garante que o conteúdo ocupe apenas o necessário */
}

/* Oculta scrollbar */
#filtros-container-plataformas::-webkit-scrollbar,
#filtros-container-generos::-webkit-scrollbar {
    display: none;
}

/* Estilo para filtros (plataformas e gêneros) */
#filtros-container-plataformas .filtro,
#filtros-container-generos .filtro {
    flex: 0 0 auto;
    padding: 6px 12px;
    /* Menor padding para celular */
    border-radius: 20px;
    background-color: #333;
    color: #000000;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-size: 12px;
    /* Fonte menor para celular */
    font-weight: 500;
    line-height: 1.4;
    user-select: none;
    text-align: center;
    min-width: 60px;
    /* Tamanho mínimo para legibilidade */
}

/* Efeito hover para desktop */
#filtros-container-plataformas .filtro:hover,
#filtros-container-generos .filtro:hover {
    background-color: #e50914;
    /* Vermelho da Netflix */
    transform: scale(1.05);
}

/* Estilo para filtro ativo */
#filtros-container-plataformas .filtro.ativo,
#filtros-container-generos .filtro.ativo {
    background-color: #e50914;
    transform: scale(1.05);
}

/* Desativa hover em dispositivos de toque */
@media (hover: none) {

    #filtros-container-plataformas .filtro:hover,
    #filtros-container-generos .filtro:hover {
        background-color: #333;
        transform: none;
    }
}

/* Media query para smartphones (ajuste fino) */
@media (max-width: 480px) {

    #filtros-container-plataformas,
    #filtros-container-generos {
        gap: 6px;
        padding: 6px 8px;
    }

    #filtros-container-plataformas .filtro,
    #filtros-container-generos .filtro {
        padding: 5px 10px;
        font-size: 11px;
        min-width: 50px;
    }
}

/* Acessibilidade */
#filtros-container-plataformas .filtro:focus,
#filtros-container-generos .filtro:focus {
    outline: 2px solid #e50914;
    outline-offset: 2px;
}

.card-img-wrapper {
    position: relative !important;
    width: 100%;
    height: 280px;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.card-img-wrapper:hover img {
    transform: scale(1.1);
}

.card-img-wrapper .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.9));
    color: #fff;
    padding: 12px 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    max-height: 80px;
    overflow: hidden;
}

.card-img-wrapper:hover .overlay {
    opacity: 1;
}

#plataformas button,
#generos button {
    flex-shrink: 0;
}

.movie-carousel {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    width: calc(100vw - 40px);
    /* Full viewport width minus 20px on each side */
    margin-left: calc(-50vw + 50% + 20px);
    /* Center with 20px left padding */
    margin-right: calc(-50vw + 50% + 20px);
    /* Center with 20px right padding */
}

.movie-carousel::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari */
}

section {
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    /* Ensure section takes full width */
}

.movie-card {
    min-width: 220px;
    margin: 0 10px;
    transition: transform 0.3s ease;
}

.carousel-btn-top {
    background-color: #111;
    color: #fff;
    border: none;
    font-size: 1.5rem;
    padding: 4px 12px;
    margin: 0 2px;
    cursor: pointer;
    border-radius: 17px;
    transition: background 0.2s ease;
}

.carousel-btn-top:hover {
    background-color: #e50914;
    color: #fff;
}

.carousel-btn-wrapper {
    position: absolute;
    right: 20px;
    top: 0;
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

section {
    position: relative;
}

.section-title {
    font-size: 1.5rem;
    color: #fff;
    margin-left: calc(-50vw + 50% + 20px);
}

/* Top 3 cards container */
#top3-cards {
    display: flex;
    flex-wrap: nowrap;
    /* Keep cards in a single row */
    overflow-x: auto;
    /* Enable horizontal scrolling */
    scroll-behavior: smooth;
    gap: 20px;
    /* Space between cards */
    padding: 10px 20px;
    /* 20px padding on left and right */
    width: calc(100vw - 40px);
    /* Full viewport width minus 20px per side */
    margin-left: calc(-50vw + 50% + 20px);
    /* Center with 20px left padding */
    margin-right: calc(-50vw + 50% + 20px);
    /* Center with 20px right padding */
    scrollbar-width: none;
    /* Hide scrollbar for Firefox */
    -ms-overflow-style: none;
    /* Hide scrollbar for IE/Edge */
}

#top3-cards::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar for Chrome, Safari */
}

/* Top 3 card styles */
.top3-card {
    width: 400px;
    height: 280px;
    border-radius: 15px !important;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    /* Prevent cards from shrinking */
    transition: transform 0.3s ease;
    background-color: #1c1c1c;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.05);
}

.top3-card:hover {
    transform: scale(1.05);
    z-index: 10;
    /* Bring forward on hover */
}

.top3-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0 !important;
    transition: transform 0.5s ease;
}

.top3-card:hover img {
    transform: scale(1.1);
}

.top3-card .info-overlay {
    position: absolute;
    bottom: 0;
    width: 100%;
    color: #fff;
    padding: 8px 15px;
    box-sizing: border-box;
    text-align: left;
    font-size: 0.9rem;
}

.top3-card .info-overlay h6 {
    margin: 0 0 6px 0;
    font-size: 1rem;
}

.top3-card .info-overlay .stars {
    color: #ff0000;
    margin-bottom: 6px;
    font-size: 1.1rem;
}

.top3-card .info-overlay p {
    margin: 0 0 10px 0;
    font-size: 0.85rem;
    opacity: 0.8;
}

.top3-card .info-overlay button {
    background-color: #e50914;
    border: none;
    color: #fff;
    padding: 6px 12px;
    border-radius: 0;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.top3-card .info-overlay button:hover {
    background-color: #ff1f1f;
}

.top3-card .badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background-color: #e50914;
    color: white;
    font-weight: bold;
    padding: 4px 8px;
    border: none;
    font-size: 1.1rem;
}

.top3-card iframe.trailer-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    border: none;
    z-index: 1;
    border-radius: 0;
}

/* Ensure section takes full width */
section {
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .top3-card {
        width: 320px;
        /* Smaller card width for tablets */
        height: 213px;
        /* Maintain aspect ratio (320/420 * 280 ≈ 213) */
    }

    .top3-card .info-overlay {
        padding: 6px 12px;
        /* Slightly smaller padding */
        font-size: 0.85rem;
        /* Adjust font size */
    }

    .top3-card .info-overlay h6 {
        font-size: 0.95rem;
    }

    .top3-card .info-overlay .stars {
        font-size: 1rem;
    }

    .top3-card .info-overlay p {
        font-size: 0.8rem;
    }

    .top3-card .info-overlay button {
        padding: 5px 10px;
        font-size: 0.85rem;
    }

    .top3-card .badge {
        font-size: 1rem;
        padding: 3px 6px;
    }

    #top3-cards {
        gap: 15px;
        /* Smaller gap for tablets */
        padding: 10px 15px;
        /* Slightly smaller edge padding */
        width: calc(100vw - 30px);
        /* Adjust for 15px per side */
        margin-left: calc(-50vw + 50% + 15px);
        margin-right: calc(-50vw + 50% + 15px);
    }
}

@media (max-width: 768px) {
    .top3-card {
        width: 250px;
        /* Smaller card width for smaller tablets/mobile */
        height: 167px;
        /* Maintain aspect ratio (250/420 * 280 ≈ 167) */
    }

    .top3-card .info-overlay {
        padding: 5px 10px;
        font-size: 0.8rem;
    }

    .top3-card .info-overlay h6 {
        font-size: 0.9rem;
    }

    .top3-card .info-overlay .stars {
        font-size: 0.95rem;
    }

    .top3-card .info-overlay p {
        font-size: 0.75rem;
    }

    .top3-card .info-overlay button {
        padding: 4px 8px;
        font-size: 0.8rem;
    }

    .top3-card .badge {
        font-size: 0.9rem;
        padding: 2px 5px;
    }

    #top3-cards {
        gap: 10px;
        /* Smaller gap for mobile */
        padding: 10px 10px;
        /* Smaller edge padding */
        width: calc(100vw - 20px);
        /* Adjust for 10px per side */
        margin-left: calc(-50vw + 50% + 10px);
        margin-right: calc(-50vw + 50% + 10px);
    }
}

@media (max-width: 480px) {
    .top3-card {
        width: 180px;
        /* Smallest card width for mobile */
        height: 120px;
        /* Maintain aspect ratio (180/420 * 280 ≈ 120) */
    }

    .top3-card .info-overlay {
        padding: 4px 8px;
        font-size: 0.75rem;
    }

    .top3-card .info-overlay h6 {
        font-size: 0.85rem;
    }

    .top3-card .info-overlay .stars {
        font-size: 0.9rem;
    }

    .top3-card .info-overlay p {
        font-size: 0.7rem;
    }

    .top3-card .info-overlay button {
        padding: 3px 6px;
        font-size: 0.75rem;
    }

    .top3-card .badge {
        font-size: 0.8rem;
        padding: 2px 4px;
    }

    #top3-cards {
        gap: 8px;
        /* Minimal gap for small screens */
        padding: 10px 8px;
        /* Minimal edge padding */
        width: calc(100vw - 16px);
        /* Adjust for 8px per side */
        margin-left: calc(-50vw + 50% + 8px);
        margin-right: calc(-50vw + 50% + 8px);
    }
}

.card-hover {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border: none !important;
    /* remove qualquer borda */
    background: none;
    /* remove bg escuro para não aparecer borda */
}

.card-hover img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
    border-radius: 0;
    /* remove borda arredondada da imagem */
}

.card-hover .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2px 2px;
    /* pequeno padding vertical e horizontal */
    color: #fff;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
    border-radius: 0;
    font-size: 0.85rem;
    /* texto um pouco menor */
    line-height: 1.1;
    max-height: 50px;
    /* limite a altura */
    overflow: hidden;
    /* esconde o que ultrapassar */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Hover no desktop */
@media (hover: hover) and (pointer: fine) {
    .card-hover:hover img {
        transform: scale(1.05);
    }

    .card-hover:hover .overlay {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Acessibilidade e toque */
.card-hover:focus-within .overlay,
.card-hover:focus .overlay {
    opacity: 1;
    transform: translateY(0);
}

.badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background-color: #ff0000;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 0.9rem;
    z-index: 10;
}

@media (min-width: 1920px) and (max-height: 1080px) {
    .carousel-btn-top {
        display: none !important;
    }

    .movie-card {
        margin-left: calc(-50vw + 50% + 20px);
    }

}

#userMenu img {
    display: inline-block;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    object-fit: cover;
}

/* Estilo padrão para celular (não centralizado, alinhado à esquerda) */
#filtros-container {
    display: flex;
    justify-content: flex-start;
    /* alinhado à esquerda */
    align-items: center;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.5rem 0;
    max-width: 100%;
}

/* Itens internos */
#plataformas,
#generos {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Nav padrão */
nav.text-white.p-3 {
    height: 80px;
    /* altura fixa */
    display: flex;
    align-items: center;
}

#plataformas button,
#generos button {
    opacity: 0;
    transform: translateX(-20px);
    animation-fill-mode: forwards;
    animation-name: fadeSlideIn;
    animation-duration: 0.5s;
    animation-timing-function: ease-out;
}

/* Delay incremental para cada botão */
#plataformas button:nth-child(1),
#generos button:nth-child(1) {
    animation-delay: 0.2s;
}

#plataformas button:nth-child(2),
#generos button:nth-child(2) {
    animation-delay: 0.4s;
}

#plataformas button:nth-child(3),
#generos button:nth-child(3) {
    animation-delay: 0.6s;
}

/* continue adicionando delays conforme o número de botões que você tiver */

@keyframes fadeSlideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}


/* A partir de 768px (tablet e desktop), centraliza */
@media (min-width: 768px) {
    #filtros-container {
        justify-content: center;
        /* centraliza horizontalmente */
        gap: 2rem;
    }

    nav.text-white.p-3 {
        justify-content: center;
        /* centraliza nav */
    }
}

/* Para navegadores baseados em WebKit (Chrome, Edge, Safari) */
::-webkit-scrollbar {
    width: 12px;
    /* Largura da barra */
}

::-webkit-scrollbar-track {
    background: #00000000;
    /* Cor do fundo da barra */
}

::-webkit-scrollbar-thumb {
    background-color: red;
    /* Cor da barra de rolagem */
    border-radius: 6px;
    border: 3px solid red;
    /* Espaço ao redor da barra */
}

/* ===== SKELETON LOADING ===== */
.skeleton-container {
    display: flex;
    gap: 20px;
    padding: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.skeleton-card {
    width: 200px;
    height: 300px;
    border-radius: 8px;
    background: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    position: relative;
    overflow: hidden;
}

.skeleton-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmerSlide 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

@keyframes shimmerSlide {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* ===== GLASSMORPHISM BUTTONS ===== */
.btn,
.search-btn,
.carousel-btn-top {
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 8px 32px 0 rgba(229, 9, 20, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:hover,
.search-btn:hover,
.carousel-btn-top:hover {
    background: rgba(229, 9, 20, 0.2) !important;
    border: 1px solid rgba(229, 9, 20, 0.4) !important;
    box-shadow: 0 8px 32px 0 rgba(229, 9, 20, 0.4);
    transform: translateY(-2px);
}

/* ===== CARDS COM EFEITO BRILHO ===== */
.movie-card,
.card-hover {
    position: relative;
    overflow: hidden;
    height: 100%;
}

.top3-card {
    position: relative;
    overflow: hidden;
}

.movie-card::before,
.card-hover::before,
.top3-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
    z-index: 1;
    pointer-events: none;
}

.movie-card:hover::before,
.card-hover:hover::before,
.top3-card:hover::before {
    left: 100%;
}

.movie-card .card,
.card-hover .card {
    border-radius: 8px;
    border: 1px solid rgba(229, 9, 20, 0.2);
    background: rgba(20, 20, 20, 0.8);
}

.top3-card .card {
    border-radius: 0;
    border: none;
    background: transparent;
}

.movie-card,
.card-hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
}

.top3-card {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.movie-card:hover,
.card-hover:hover {
    box-shadow: 0 10px 35px rgba(229, 9, 20, 0.5), 0 0 25px rgba(229, 9, 20, 0.3);
    transform: translateY(-12px) scale(1.05);
}

.top3-card:hover {
    box-shadow: 0 8px 30px rgba(229, 9, 20, 0.4), 0 0 20px rgba(229, 9, 20, 0.2);
    transform: translateY(-8px) scale(1.03);
}

@media (min-width: 992px) {
  .movie-carousel .movie-card { position: relative; }
  .movie-carousel .movie-card.expanded {
    position: absolute;
    left: 0;
    width: 520px;
    transform: translateX(16px);
    z-index: 50;
    box-shadow: 0 8px 30px rgba(229, 9, 20, 0.4), 0 0 20px rgba(229, 9, 20, 0.2);
    transition: transform 0.3s ease, width 0.3s ease;
  }
  .movie-carousel .movie-card.expanded-left {
    position: absolute;
    right: 0;
    width: 520px;
    transform: translateX(-16px);
    z-index: 50;
    box-shadow: 0 8px 30px rgba(229, 9, 20, 0.4), 0 0 20px rgba(229, 9, 20, 0.2);
    transition: transform 0.3s ease, width 0.3s ease;
  }
  .movie-card.expanded .card-img-wrapper,
  .movie-card.expanded-left .card-img-wrapper {
    height: 292px;
  }
  .movie-card.expanded .card-img-top,
  .movie-card.expanded-left .card-img-top { display: none; }
  .movie-card.expanded .overlay,
  .movie-card.expanded-left .overlay { opacity: 0; pointer-events: none; }
  .movie-card.expanded .movie-trailer,
  .movie-card.expanded-left .movie-trailer {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 5;
    border: none;
  }
}

.yt-mask {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 140px;
  height: 32px;
  background: linear-gradient(to left, rgba(0,0,0,0.9), rgba(0,0,0,0));
  z-index: 6;
  pointer-events: none;
}

.volume-toggle {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 6;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== BADGES ANIMADAS COM EFEITO NEON ===== */
.badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, #e50914, #ff1f1f);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 0.9rem;
    z-index: 10;
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.6), 0 0 20px rgba(229, 9, 20, 0.4), 0 0 30px rgba(229, 9, 20, 0.2);
    animation: neonPulse 2s infinite;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

@keyframes neonPulse {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(229, 9, 20, 0.6), 0 0 20px rgba(229, 9, 20, 0.4), 0 0 30px rgba(229, 9, 20, 0.2);
    }

    50% {
        box-shadow: 0 0 15px rgba(229, 9, 20, 0.8), 0 0 30px rgba(229, 9, 20, 0.6), 0 0 45px rgba(229, 9, 20, 0.4);
    }
}

/* ===== ANIMAÇÕES DE ENTRADA ===== */
@media (prefers-reduced-motion: no-preference) {

    .movie-carousel,
    .top3-card,
    section {
        opacity: 0;
        animation: fadeInUp 0.8s ease forwards;
    }
}

@media (prefers-reduced-motion: reduce) {

    .movie-carousel,
    .top3-card,
    section {
        opacity: 1;
        animation: none;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Delay nas animações */
section:nth-child(1) {
    animation-delay: 0.1s;
}

section:nth-child(2) {
    animation-delay: 0.2s;
}

section:nth-child(3) {
    animation-delay: 0.3s;
}

section:nth-child(4) {
    animation-delay: 0.4s;
}

section:nth-child(5) {
    animation-delay: 0.5s;
}

/* ===== EFEITOS DE SCROLL SUAVE ===== */
@media (prefers-reduced-motion: no-preference) {
    .section-title {
        opacity: 0;
        transform: translateX(-30px);
        animation: slideInLeft 0.6s ease forwards;
    }
}

@media (prefers-reduced-motion: reduce) {
    .section-title {
        opacity: 1;
        transform: translateX(0);
        animation: none;
    }
}

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== PERFORMANCE OTIMIZATIONS ===== */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.movie-card,
.card-hover,
.top3-card {
    will-change: transform;
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Reduzir animações em dispositivos low-end */
@media (max-width: 768px) {
    * {
        animation-duration: 0.3s !important;
        transition-duration: 0.2s !important;
    }
}
