/* ==========================================================================
   ESTRUTURA DAS SEÇÕES DE CATEGORIAS
   ========================================================================== */
.categoria-section {
    margin-bottom: 26px;
    padding-left: 4%;
}

/* Título de cada fileira usando a Inter Extra Bold */
.categoria-titulo {
    display: inline-flex;
    align-items: center;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--cor-texto);
    margin-bottom: 10px;
    letter-spacing: -0.5px;
    cursor: pointer;
    transition: color 0.3s ease;
}

/* Chevron ao lado do título */
.categoria-titulo::after {
    content: ' ›';
    font-size: 1.5rem;
    line-height: 1;
    color: var(--cor-suave);
    margin-left: 4px;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s ease;
}

.categoria-titulo:hover {
    color: var(--cor-destaque);
}

.categoria-titulo:hover::after {
    color: var(--cor-destaque);
    transform: translateX(4px);
}

/* ==========================================================================
   CARROSSEL HORIZONTAL (ESTILO STREAMING)
   ========================================================================== */
.carrossel-container {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 10px;
    padding-right: 4%;
    scrollbar-width: none;
}

.carrossel-container::-webkit-scrollbar {
    display: none;
}

.carrossel-track {
    display: flex;
    gap: 16px;
    width: max-content;
}

/* ==========================================================================
   ESTILO DO CARD CLEAN (SEM MOLDURA/CORTE DE FUNDO)
   ========================================================================== */
.card {
    width: 260px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    background: transparent; /* Remove o fundo que criava o bloco/corte */
    border: 1px solid transparent; /* Remove a borda que delimitava a caixa */
    box-shadow: none;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

/* Container da imagem com arredondamento próprio */
.card-image-wrapper {
    position: relative;
    width: 100%;
    height: 146px;
    border-radius: 12px; /* A própria imagem ganha o arredondamento perfeito */
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Textos e informações internas do card */
.card-info {
    padding: 10px 4px 4px 4px; /* Recuo limpo para o texto alinhar com a imagem */
}

.card-info p {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--cor-texto);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================================================
   EFEITOS DE HOVER SUAVE
   ========================================================================== */
@media (hover: hover) {
    .card:hover {
        transform: translateY(-4px);
    }

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

/* ==========================================================================
   SUPER HERO CARROSSEL TRIDIMENSIONAL (DEGRADÊ AZUL COMPACTO E SUAVE)
   ========================================================================== */
.hero-container {
    position: relative;
    width: 100%;
    height: 80vh;
    min-height: 580px;
    margin-bottom: 25px;
    overflow: visible; /* Permite a sobreposição de 2px vazar sem travar na caixa */
    background-color: var(--bg-principal, #21384E); 
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Fundo borrado usando o mesmo pôster que vem do JS */
.hero-media-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.hero-bg-img,
.hero-bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    filter: blur(12px) brightness(0.65) saturate(1.2); 
    transition: opacity 0.8s ease-in-out;
}

.hero-bg-img.active,
.hero-bg-video.active {
    opacity: 1;
}

/* SOBREPOSIÇÃO DE FUSÃO: Transição azul suave e pequena na base para eliminar cortes */
.hero-overlay {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: calc(100% + 2px);
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(33, 56, 78, 0.15) 50%,
        rgba(33, 56, 78, 0.6) 75%,
        rgba(33, 56, 78, 0.92) 90%,
        var(--bg-principal, #21384E) 100%
    );
    z-index: 2;
    pointer-events: none;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Layout centralizado que abraça o card vertical e os dots */
.hero-card-layout {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 3;
    width: 100%;
    max-width: 380px; /* Largura ideal para um pôster vertical proeminente */
    padding: 0 20px;
}

/* O CARD VERTICAL UNIFICADO */
.hero-poster-card {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3; /* Proporção perfeita de pôster */
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 
                0 0 0 1px rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

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

/* Fade gradiente sutil de baixo para cima dentro do card */
.hero-card-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 65%; /* Estende-se para dar ampla leitura para categoria, título e botões */
    background: linear-gradient(
        to top,
        rgba(10, 16, 22, 0.95) 0%,
        rgba(10, 16, 22, 0.7) 40%,
        rgba(10, 16, 22, 0) 100%
    );
    pointer-events: none;
    z-index: 2;
}

/* Informações e botões acoplados sobrepostos no card */
.hero-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    z-index: 3;
}

/* Categoria elegante no canto superior ou flutuando */
.hero-categoria {
    color: var(--cor-destaque);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* Título imponente e polido */
.hero-titulo {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--cor-texto);
    line-height: 1.2;
    letter-spacing: -0.8px;
    margin: 0;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Botões do card alinhados lado a lado */
.hero-buttons {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

/* Botão Play (Principal e fosco/translúcido sutil) */
.hero-btn-play {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--cor-texto);
    color: #111111;
    border: none;
    padding: 12px;
    font-size: 0.85rem;
    font-weight: 800;
    border-radius: 30px; /* Arredondado estilo cápsula do concorrente */
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
}

.hero-btn-play:hover {
    transform: scale(1.03);
    background-color: rgba(255, 255, 255, 0.9);
}

.hero-btn-play svg {
    display: block;
    width: 16px;
    height: 16px;
}

/* Botão "+ Mi lista" (Estilo Cápsula Translúcida) */
.hero-btn-mylist {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--cor-texto);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 30px; /* Arredondado igual ao Play */
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.2s, background-color 0.2s, border-color 0.2s;
}

.hero-btn-mylist:hover {
    transform: scale(1.03);
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.hero-btn-mylist svg {
    display: block;
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   NAVEGAÇÃO MANUAL (SETAS DISCRETAS E ELEGANTES NAS BORDAS DA TELA)
   ========================================================================== */
.hero-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--cor-texto);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 4;
    opacity: 0;
    transition: opacity 0.3s, background-color 0.2s;
}

.hero-container:hover .hero-nav-btn {
    opacity: 0.6;
}

.hero-nav-btn:hover {
    opacity: 1 !important;
    background: rgba(0, 0, 0, 0.5);
}

.hero-nav-btn.prev { left: 4%; }
.hero-nav-btn.next { right: 4%; }

/* ==========================================================================
   INDICADORES DE PONTOS (DOTS ALINHADOS ABAIXO DO CARD À DIREITA)
   ========================================================================== */
.hero-indicators-container {
    width: 100%;
    display: flex;
    justify-content: flex-end; /* Alinha à direita exatamente como o concorrente */
    margin-top: 14px; /* Espaço sutil entre a base do card e os pontinhos */
    padding-right: 6px;
}

.hero-indicators {
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 8px;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.hero-dot.active {
    background-color: var(--cor-destaque); /* Mantém o belo laranja de destaque */
    transform: scale(1.1);
}

/* ==========================================================================
   ESTRUTURA DO RODAPÉ DO SITE (FOOTER)
   ========================================================================== */
.site-footer {
    background: rgba(10, 16, 22, 0.4); /* Fundo sutil combinando com o vidro líquido */
    padding: 45px 4% 30px 4%;
    margin-top: 60px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Informações principais do projeto */
.footer-info p {
    color: var(--cor-suave);
    font-size: 0.9rem;
    line-height: 1.5;
    max-width: 600px;
    margin-top: 8px;
}

.footer-info .footer-copyright {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.25);
    margin-top: 10px;
    font-weight: 600;
}

/* Link estilizado para as redes sociais */
.footer-instagram-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--cor-texto);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.2s;
}

.footer-instagram-link:hover {
    color: var(--cor-destaque);
}

.footer-instagram-link svg {
    display: block;
}

/* Linha divisória minimalista */
.footer-divider {
    border: none;
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 5px 0;
}

/* Bloco de créditos de quem criou */
.footer-credits {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer-credits .created-by {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.2s;
    display: inline-block;
    width: max-content;
}

.footer-credits .created-by:hover {
    opacity: 0.8;
}

.footer-credits .partner-brand {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.85rem;
    margin: 0;
}

/* ==========================================================================
   ESTILOS ADICIONADOS PARA A BOLINHA DE PERFIL E MENU DO USUÁRIO
   ========================================================================== */

/* Estilo do botão contêiner da bolinha de perfil */
.btn-perfil-container {
    position: relative;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

.btn-perfil-container:hover {
    transform: scale(1.05);
}

/* Foto de perfil redonda com visual de borda sutil e corte proporcional */
.img-perfil-header {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    border: 1.5px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
    aspect-ratio: 1 / 1;
}

/* Alinhamento dos botões de controle no cabeçalho */
.header-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

/* Menu Flutuante Elegante (Estilo Vidro/Dark Tridimensional) */
.menu-flutuante {
    position: absolute;
    top: 45px;
    right: 0;
    width: 220px;
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), inset 0 1px 1px rgba(255, 255, 255, 0.1);
    padding: 8px 0;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    z-index: 9999;
}

/* Classe ativa que exibe o menu suavemente */
.menu-flutuante.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Cabeçalho do perfil dentro do menu flutuante (Estilo Netflix) */
.menu-perfil-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.menu-perfil-header:hover {
    background: rgba(255, 255, 255, 0.03);
}

.menu-perfil-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    border: 1px solid rgba(255, 255, 255, 0.2);
    aspect-ratio: 1 / 1;
}

.menu-perfil-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.menu-perfil-nome {
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.menu-perfil-sub {
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Itens do Menu */
.menu-flutuante-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    background: none;
    border: none;
    text-align: left;
    width: 100%;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.menu-flutuante-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--cor-destaque);
}

/* Divisor interno discreto */
.menu-flutuante-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 4px 0;
}

/* Destaque para o botão de sair */
.menu-flutuante-item.logout {
    color: #ff3b30;
}

.menu-flutuante-item.logout:hover {
    background: rgba(255, 59, 48, 0.08);
    color: #ff453a;
}

/* Pequeno triângulo indicador no topo do menu */
.menu-flutuante::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 12px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid rgba(15, 15, 15, 0.95);
}

/* ==========================================================================
   AJUSTES MÓVEIS (RESPONSIVIDADE)
   ========================================================================== */
@media (max-width: 480px) {
    .hero-container {
        height: auto;
        min-height: 520px;
        padding: 40px 16px 20px 16px;
        margin-bottom: 15px;
    }

    .hero-card-layout {
        max-width: 310px;
        padding: 0;
    }

    .hero-poster-card {
        border-radius: 16px;
    }

    .hero-card-content {
        padding: 16px 14px;
        gap: 6px;
    }

    .hero-titulo {
        font-size: 1.4rem;
        letter-spacing: -0.5px;
    }

    .hero-btn-play,
    .hero-btn-mylist {
        padding: 10px;
        font-size: 0.8rem;
    }

    .hero-nav-btn {
        display: none;
    }

    .hero-indicators-container {
        margin-top: 10px;
        justify-content: center;
        padding-right: 0;
    }

    .categoria-section {
        margin-bottom: 20px;
    }

    .categoria-titulo {
        font-size: 1.1rem;
        margin-bottom: 6px;
    }

    .card {
        width: 230px;
    }

    .card-image-wrapper {
        height: 130px;
    }

    .card-info {
        padding: 8px 2px 2px 2px;
    }

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

    .site-footer {
        padding: 35px 4% 25px 4%;
        margin-top: 40px;
    }
}
