/* =========================================
   HIKOFLIX ULTIMATE CSS - v14.0
   Otimizado nativamente para Smart TVs (Tizen/WebOS)
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Netflix+Sans:wght@300;400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap');

/* --- VARIÁVEIS GERAIS --- */
:root {
    --netflix-red: #E50914;
    --bg-black: #050505;
    --card-glow: rgba(229, 9, 20, 0.5);
    /* Transição otimizada para evitar engasgos na TV (Hardware Accelerated) */
    --transition: transform 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.25s ease;

    /* Hierarquia de camadas (Z-Index) */
    --z-nav: 1000;
    --z-overlay: 1100;
    /* Busca e filtros de fundo */
    --z-modal: 1500;
    /* Detalhes de Filmes e Séries */
    --z-player: 2000;
    /* Player de vídeo */
    --z-toast: 9999;
}

/* --- NOTIFICAÇÕES (TOAST) --- */
.toast-container {
    position: fixed;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(40, 40, 40, 0.95);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    z-index: var(--z-toast);
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideUp 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    font-family: 'Segoe UI', sans-serif;
    font-weight: 500;
}

.toast-container.error {
    border-left: 5px solid #ff4444;
}

.toast-container.warning {
    border-left: 5px solid #ffbb33;
}

.toast-container.info {
    border-left: 5px solid #0099cc;
}

.toast-icon {
    font-size: 20px;
}

.toast-message {
    font-size: 16px;
}

.toast-container.fade-out {
    opacity: 0;
    transform: translate(-50%, 20px);
    transition: 0.5s;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, 100px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* --- BASE & RESET --- */
body {
    background-color: var(--bg-black);
    color: white;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    overflow-x: hidden;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--netflix-red);
}

/* --- NAVBAR --- */
.navbar {
    padding: 20px 50px;
    display: flex;
    align-items: center;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.98) 0%, transparent 100%);
    position: fixed;
    width: 100%;
    z-index: var(--z-nav);
    box-sizing: border-box;
    pointer-events: none;
    /* Previne que o degradê transpartente engula cliques nos cards embaixo dele */
}

/* Garante que tudo DENTRO da navbar volte a ser clicável */
.navbar * {
    pointer-events: auto;
}

#logo-btn {
    cursor: pointer;
    /* Transforma o cursor em mãozinha */
    user-select: none;
    /* Opcional: evita que o usuário selecione o texto ao clicar rápido */
}

.logo {
    color: var(--netflix-red);
    font-size: 38px;
    font-weight: 900;
    margin-right: 40px;
    letter-spacing: -2px;
    text-decoration: none;
    transition: var(--transition);
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.5));
}

.logo:hover {
    transform: scale3d(1.05, 1.05, 1);
    filter: drop-shadow(0 0 15px rgba(229, 9, 20, 0.8));
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
    padding: 0;
    margin: 0;
}

.nav-links li {
    cursor: pointer;
    color: #b3b3b3;
    transition: var(--transition);
    font-weight: 500;
    font-family: 'Segoe UI', sans-serif;
    padding: 5px 10px;
    border-radius: 5px;
}

.nav-links li.active {
    color: white;
    border-bottom: 3px solid var(--netflix-red);
    padding-bottom: 5px;
    border-radius: 0;
}

/* --- SEARCH --- */
.search-container {
    margin-left: auto;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #444;
    padding: 5px 15px;
    border-radius: 4px;
}

.search-container input {
    background: transparent;
    border: none;
    color: white;
    outline: none;
    padding: 5px;
    width: 200px;
    transition: width 0.4s ease;
}

.search-container input:focus {
    width: 320px;
}

.search-container input::selection,
#virtual-search-text::selection {
    background-color: #0078d4 !important;
    color: #ffffff !important;
}

.search-container button {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    outline: none;
}

/* --- HERO BANNER (SPOTLIGHT) --- */
#spotlight-container {
    position: relative;
    height: 80vh;
    display: flex;
    align-items: center;
    padding: 0 50px;
    overflow: hidden;
    margin-bottom: -30px;
}

.spotlight-bg {
    position: absolute;
    /* Removemos a "gambiarra" do -5% e 110% que esticava a imagem cortando as bordas */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background-size: cover;

    /* Centraliza a imagem perfeitamente (antes estava puxando pro topo para tentar pegar o rosto na capa vertical) */
    background-position: center;

    /* AUMENTAMOS O BRILHO! Antes estava 0.35 (quase preto). 
       Agora com banners em HD, 0.6 ou 0.7 deixa a arte visível sem atrapalhar a leitura do texto. */
    filter: brightness(0.65);

    z-index: 1;
    transition: background-image 0.8s ease-in-out;
    transform: translate3d(0,0,0);
}

.spotlight-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(5, 5, 5, 1) 15%, rgba(5, 5, 5, 0.4) 60%, transparent 100%),
        linear-gradient(to top, rgba(5, 5, 5, 1) 0%, transparent 20%);
    z-index: 2;
}

.spotlight-content {
    position: relative;
    z-index: 10;
    display: flex;
    width: 100%;
    max-width: 1400px;
    align-items: center;
    gap: 60px;
    margin-top: 60px;
}

.spotlight-info {
    flex: 1;
    max-width: 600px;
    animation: fadeIn 1.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.spotlight-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin: 0 0 15px 0;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.8);
    line-height: 1.1;
    letter-spacing: -1px;
}

.spotlight-desc {
    font-size: 1.1rem;
    color: #d2d2d2;
    margin-bottom: 30px;
    line-height: 1.6;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.8);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: 'Segoe UI', sans-serif;
}

.spotlight-actions {
    display: flex;
    gap: 15px;
}

.btn-play-hero,
.btn-fav-hero {
    border: none;
    padding: 12px 32px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    outline: none;
}

.btn-play-hero {
    background-color: white;
    color: black;
    position: relative;
    overflow: hidden;
    /* Mantém a barra de progresso dentro do botão */
}

.btn-play-hero:hover {
    background-color: #e6e6e6;
    transform: scale3d(1.05, 1.05, 1);
}

.btn-fav-hero {
    background-color: rgba(60, 60, 60, 0.9);
    color: white;
}

.btn-fav-hero:hover {
    background-color: rgba(90, 90, 90, 1);
    transform: scale3d(1.05, 1.05, 1);
}

.spotlight-poster-container {
    flex: 0 0 320px;
    animation: fadeInRight 1.2s ease-out;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

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

.spotlight-poster-container img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: block;
}

.carousel-indicators {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 20;
    align-items: center;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    cursor: pointer;
    transition: width 0.3s ease, background-color 0.3s ease;
    outline: none;
}

.carousel-dot:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

.carousel-dot.active {
    width: 30px;
    background-color: white;
    border-radius: 10px;
}

/* --- CAROUSEL GERAL (ROWS) & TOP 10 --- */
.main-content {
    position: relative;
    z-index: 5;
    padding-bottom: 50px;
}

.row {
    padding: 0;
    position: relative;
    z-index: 20;
}

/* Eleva a fileira inteira quando um card está focado, 
   para que o scale(1.5) pinte acima das fileiras adjacentes. */
.row:has(.tv-focused),
.top10-row:has(.tv-focused) {
    z-index: 100 !important;
}

.row-title,
.top10-row-title {
    font-size: 22px;
    font-weight: bold;
    padding-left: 50px;
    margin-bottom: 10px;
    color: #e5e5e5;
    font-family: 'Segoe UI', sans-serif;
    display: flex;
    align-items: center;
}

.top10-row-title {
    font-size: 26px;
    font-weight: 900;
    margin: 30px 0 10px 0;
    color: white;
    text-transform: uppercase;
}

.top10-row-title span {
    color: var(--netflix-red);
    margin-left: 10px;
}

.row-title.clickable {
    cursor: pointer;
    display: inline-block;
    transition: transform 0.3s ease;
}

.row-title.clickable:hover {
    color: var(--netflix-red);
    transform: translate3d(10px, 0, 0);
}

/* === ROW VIEWPORT (Clipping Layer) ===
   Limita o que é visível na tela sem usar overflow no container que vai rolar.
   Isso permite que o translate3d na GPU não seja cortado incorretamente. */
.row-viewport {
    overflow: hidden;
    /* Fallback para Tizen ≤ 6.0 (Chromium < 90) */
    overflow-x: clip;
    /* Corta cards que rolaram para fora horizontalmente */
    overflow-y: visible;
    /* Permite que cards com scale(1.5) pintem livremente na vertical */
    position: relative;
    width: 100%;
    /* [Nível 1] Barreira de Reflow sem paint containment. */
    contain: layout style;
}

.swiper-container-inner,
.top10-container {
    display: flex;
    width: max-content;
    /* [Fix] Força o container a ter o tamanho físico total. Previne que a TV crie uma textura GPU limitada ao 100% inicial e pare de renderizar os últimos cards nas rolagens */
    min-width: 100%;
    gap: 12px;
    /* Padding vertical mínimo (10px) pois overflow-y:visible no viewport
       já permite que o scale(1.5) se expanda livremente.
       Padding-right 90px evita que o último card seja cortado pela seta. */
    padding: 10px 90px 10px 50px;
    /* === GPU SCROLL ===
       overflow: visible + transform:translate3d = GPU-only scroll.
       A propriedade will-change foi removida do CSS e agora é aplicada 
       dinamicamente via JS apenas no container ativo para economizar VRAM. */
    overflow: visible;
    backface-visibility: hidden;
    transform: translate3d(0,0,0);
    /* [Nível 1] Proteção contra repaint lateral */
    contain: layout style;
    transition: transform 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.top10-container {
    gap: 70px;
    /* Padding lateral generoso para proteger o stroke do número "1" 
       e o último card contra a borda direita. */
    padding: 10px 120px 60px 100px;
}

/* Remove scrollbars residuais (legado) */
.swiper-container-inner::-webkit-scrollbar,
.top10-container::-webkit-scrollbar {
    display: none;
}

/* --- CARDS PADRÃO & TOP 10 --- */
/* Aceleração de hardware (translateZ) previne lentidão em animações na TV */
.card,
.top10-card {
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    outline: none;
    transform: translate3d(0,0,0);
    /* [OTM #8] will-change removido do CSS — aplicado dinamicamente via JS apenas no card focado */
}

.card {
    flex: 0 0 200px;
    width: 200px;
    background: #141414;
    position: relative;
    /* [BUGFIX #TV] overflow:hidden removido. 
       Ele cortava a hitbox dos botões de utilidade durante o scale(1.15). */
    /* overflow: hidden; */
    contain: layout style;
}

.top10-card {
    flex: 0 0 240px;
    height: 360px;
    display: flex;
    align-items: flex-end;
    border-radius: 8px;
    contain: layout style;
}

.card:hover {
    transform: scale3d(1.15, 1.15, 1);
    z-index: 10;
    box-shadow: 0 0 25px var(--card-glow);
}

.top10-card:hover {
    transform: scale3d(1.1, 1.1, 1) translate3d(0, -10px, 0);
    z-index: 30;
}

.card img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    display: block;
    /* Mantém o arredondamento visual agora que o CARD não tem overflow:hidden */
    border-radius: 4px;
    /* [BUGFIX #TV] Previne que a imagem roube cliques dos botões absolutos em motores WebOS/Tizen instáveis */
    pointer-events: none;
}

/* [BUGFIX #TV] Garante que textos, barras de progresso e outros overlays do card
   não interceptem os cliques que deveriam ir para os botões ou para o card pai. */
.card>*:not(.card-fav-btn):not(.card-delete-btn) {
    pointer-events: none;
}

.top10-poster {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.9);
    z-index: 2;
    position: relative;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.top10-number {
    position: absolute;
    left: -65px;
    bottom: -25px;
    font-size: 210px;
    font-weight: 900;
    color: var(--bg-black);
    -webkit-text-stroke: 5px #444;
    text-shadow: 5px 5px 15px rgba(0, 0, 0, 0.8);
    z-index: 1;
    letter-spacing: -15px;
    font-family: 'Arial Black', sans-serif;
    line-height: 1;
    pointer-events: none;
    transition: 0.3s;
}

.top10-card:hover .top10-number {
    -webkit-text-stroke-color: white;
    color: var(--netflix-red);
}

/* --- EAGER FEEDBACK (INPUT LAG OTIMIZAÇÃO) --- */
.loading-pulse {
    animation: pulseEager 0.6s infinite alternate !important;
    filter: brightness(0.5) contrast(1.2) !important;
    pointer-events: none;
}

@keyframes pulseEager {
    0% {
        opacity: 1;
        transform: scale3d(0.95, 0.95, 1);
    }

    100% {
        opacity: 0.7;
        transform: scale3d(0.95, 0.95, 1);
    }
}

/* --- CARD UTILS (PROGRESSO, BOTOES) --- */
.card-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 15;
}

.card-progress-bar {
    height: 100%;
    background: var(--netflix-red);
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.5);
}

.card-adult-title {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.6) 60%, transparent 100%);
    padding: 20px 10px 10px 10px;
    box-sizing: border-box;
    font-size: 13px;
    font-weight: bold;
    text-align: center;
    color: #fff;
    z-index: 10;
    pointer-events: none;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    font-family: 'Segoe UI', sans-serif;
    line-height: 1.2;
}

.card-fav-btn,
.card-delete-btn {
    position: absolute;
    top: 8px;
    background: rgba(0, 0, 0, 0.85);
    /* Substitui blur */
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: var(--transition);
    z-index: 100;
    outline: none;
    pointer-events: auto !important;
}

.card-fav-btn {
    right: 8px;
    font-size: 14px;
}

.card-delete-btn {
    left: 8px;
    font-size: 12px;
}

.card:hover .card-fav-btn,
.card-fav-btn.active,
.card:hover .card-delete-btn {
    opacity: 1;
}

.card-fav-btn:hover,
.card-delete-btn:hover {
    background: rgba(0, 0, 0, 0.95);
    /* [BUGFIX #TV] Removido o transform: scale(1.15) de botões absolutos!
       O motor Chromium antigo das TVs dessincroniza o hit-box do DOM em relação 
       ao render visual quando o elemento sofre scale dentro de um parent que também escala. */
    border-color: var(--netflix-red);
}

/* [BUGFIX #TV] Giant Hitbox Trap!
   Mesmo que o card inteiro esteja em scale(1.15) e o cursor perca sincronia,
   essa área expansiva invisível vai engolir o clique e repassar para o botão. */
.card-fav-btn::after,
.card-delete-btn::after {
    content: '';
    position: absolute;
    /* [BUGFIX #TV] Aumentei radicalmente a área de clique invisível.
       Isso "caça" o dedo/cursor mesmo se a hitbox se deslocar lateralmente pelo scale do parent. */
    top: -25px;
    bottom: -25px;
    left: -25px;
    right: -25px;
    z-index: 101;
    /* Garante que passe por cima de qualquer margem interna */
}

.clear-history-btn {
    font-size: 13px;
    color: #aaa;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 5px 12px;
    cursor: pointer;
    margin-left: 15px;
    transition: 0.3s;
    font-family: 'Segoe UI', sans-serif;
    outline: none;
}

.clear-history-btn:hover {
    color: white;
    border-color: var(--netflix-red);
    background: var(--netflix-red);
}

/* Estilo Base do Título */
.card-title {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: #b3b3b3;
    /* Cinza claro suave quando não focado */
    margin-top: 10px;
    padding: 0 5px;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Corta com "..." por padrão */
    transition: all 0.3s ease;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Estado de Foco (Controle Remoto / Mouse) */
.card.tv-focused .card-title,
.card:focus .card-title {
    color: #ffffff;
    font-weight: 700;
    text-overflow: clip;
    /* Remove os "..." para mostrar o texto todo */
    overflow: hidden;
}

/* Efeito Marquee: Texto rola se for muito longo no foco */
.card.tv-focused .card-title {
    display: block;
    position: relative;
}

/* O "Pulo do Gato": Animação de rolagem suave */
.card.tv-focused .card-title {
    animation: marquee 6s linear infinite;
    animation-delay: 1s;
    /* Espera 1s antes de começar a rolar */
}

@keyframes marquee {
    0% {
        transform: translate3d(0, 0, 0);
    }

    30% {
        transform: translate3d(0, 0, 0);
    }

    /* Pausa no início */
    70% {
        transform: translate3d(-50%, 0, 0);
    }

    /* Rola até a metade (ajustável) */
    100% {
        transform: translate3d(0, 0, 0);
    }

    /* Volta */
}

/* --- CONTROLES DE ROLAGEM (SETAS) --- */
.handle {
    position: absolute;
    top: 35px;
    bottom: 0;
    width: 60px;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    border: none;
    font-size: 45px;
    z-index: 20;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate3d(0,0,0);
    /* [OTM #8] will-change removido — handles não animam transform, só opacity */
}

.top10-row .handle {
    bottom: auto !important;
    top: 45px !important;
    /* Agora isso mede a partir do título do Top 10, e não do teto da página! */
    height: 360px !important;
    z-index: 40 !important;
}

.top10-row:hover .handle,
.row:hover .handle {
    opacity: 1;
}

.handle:hover {
    color: var(--netflix-red);
}

.handle-left {
    left: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
    border-radius: 0 8px 8px 0;
}

.handle-right {
    right: 0;
    background: linear-gradient(to left, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
    border-radius: 8px 0 0 8px;
}

/* --- GRIDS & PAGINAÇÃO DE CATEGORIAS --- */
.category-page-header,
.search-result-header {
    padding: 100px 50px 20px 50px;
}

.category-page-header h1,
.search-result-header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
    padding: 20px 50px 50px 50px;
}

.back-btn {
    background: transparent;
    border: 1px solid white;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-bottom: 20px;
    transition: 0.3s;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* --- MODAL DE SÉRIES --- */
.modal-series {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    /* Fundo sólido, substitui blur */
    z-index: var(--z-modal);
    overflow-y: auto;
}

.modal-series-content {
    display: flex;
    max-width: 1400px;
    height: 72vh;
    margin: 50px auto 20px auto;
    gap: 40px;
    padding: 40px;
    background: linear-gradient(135deg, rgba(25, 25, 25, 0.95) 0%, rgba(5, 5, 5, 0.98) 100%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8);
    cursor: default;
}

.series-poster-side {
    flex: 0 0 320px;
    display: flex;
    flex-direction: column;
    /* Organiza a imagem e o texto em coluna */
    gap: 20px;
    /* Adiciona o espaço entre a imagem e o texto */
}

.series-poster-side img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
}

.series-info-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Segoe UI', sans-serif;
}

.series-info-side h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.btn-fav {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 18px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    outline: none;
}

.btn-fav:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
}

/* --- BARRA DE SINOPSE (abaixo do banner do modal) --- */
.modal-synopsis-bar {
    width: 100%;
    padding: 0 5px 20px 5px;
    /* Padding no rodapé para o texto não colar no fundo do modal */
    background: transparent;
    border: none;
    box-shadow: none;
    margin: 0;

    /* A MÁGICA AQUI: Faz a div esticar até o final da coluna e permite rolar se o texto for muito longo */
    flex: 1;
    overflow-y: auto;
}

/* Esconde a barra de rolagem (Scrollbar) na lateral para manter o design limpo na TV, 
   mas ainda permite que o texto role no D-PAD/Mouse se for gigante */
.modal-synopsis-bar::-webkit-scrollbar {
    display: none;
}

.modal-synopsis-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--netflix-red);
    margin-bottom: 10px;
    font-family: 'Segoe UI', sans-serif;
}

.modal-synopsis-text {
    color: #c0c0c0;
    line-height: 1.5;
    font-size: 15px;
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    text-align: justify;

    /* REMOVIDAS as restrições de line-clamp e webkit-box que cortavam o texto! */
    display: block;
}

/* Estilos para a linha de metadados do modal */
.series-metadata {
    display: flex;
    align-items: center;
    gap: 15px;
    /* Espaçamento entre o ano, nota e gênero */
    margin-top: -5px;
    margin-bottom: 20px;
    font-size: 15px;
    font-weight: 500;
    color: #a3a3a3;
    /* Cinza claro para não roubar a atenção do título */
    font-family: 'Segoe UI', sans-serif;
}

/* Adiciona um separador visual (uma bolinha) entre os itens */
.series-metadata span:not(:last-child)::after {
    content: "•";
    margin-left: 15px;
    color: #666;
}

/* Destaque para a nota */
.rating-highlight {
    color: #46d369;
    /* Verde estilo "Match" da Netflix, ou pode usar #e5b109 para Dourado/IMDb */
    font-weight: 700;
}

.series-content-split {
    display: flex;
    flex: 1;
    gap: 30px;
    margin-top: 20px;
    overflow: hidden;
}

.season-selector {
    flex: 0 0 200px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    padding-right: 5px;
    scroll-behavior: smooth;
}

.season-selector-dropdown {
    position: relative;
    display: inline-block;
    z-index: 100;
}

.season-dropdown-toggle {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #eee;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    outline: none;
    min-width: 180px;
    justify-content: space-between;
}

.season-dropdown-toggle::after {
    content: '▼';
    font-size: 10px;
    opacity: 0.6;
    transition: transform 0.3s ease;
}

.season-dropdown-toggle.active::after {
    transform: rotate(180deg);
}

.season-dropdown-toggle:hover,
.season-dropdown-toggle.tv-focused {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--netflix-red);
    transform: scale3d(1.02, 1.02, 1);
}

.season-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    min-width: 220px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding: 8px;
    display: none;
    flex-direction: column;
    gap: 4px;
}

.season-dropdown-menu.visible {
    opacity: 1;
    display: flex;
    transform: translateY(0);
    pointer-events: auto;
}

.season-btn {
    background: transparent;
    border: none;
    color: #bbb;
    padding: 12px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    text-align: left;
    transition: all 0.2s ease;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.season-btn:hover,
.season-btn.tv-focused {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    padding-left: 20px;
}

.season-btn.active {
    color: var(--netflix-red);
    font-weight: 700;
}

.season-btn.active::after {
    content: '✓';
    font-size: 14px;
}

.episode-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    padding-right: 15px;
    scroll-behavior: smooth;
}

.ep-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 10px;
    cursor: pointer;
    display: grid;
    grid-template-columns: 60px 1fr 60px;
    align-items: center;
    transition: all 0.4s ease;
    border-left: 4px solid transparent;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    min-height: 80px;
    outline: none;
}

.ep-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-left-color: var(--netflix-red);
    transform: translate3d(10px, 0, 0);
}

.ep-number {
    font-size: 24px;
    font-weight: 800;
    color: #444;
}

.ep-title {
    font-size: 16px;
    font-weight: 500;
    color: #eee;
}

.ep-play-icon {
    text-align: right;
    color: var(--netflix-red);
    font-size: 20px;
    opacity: 0;
    transition: 0.3s;
}

.ep-card:hover .ep-play-icon {
    opacity: 1;
}

.ep-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--netflix-red);
    transition: width 0.3s ease;
    z-index: 5;
    opacity: 0.9;
}

.close-series {
    position: fixed;
    top: 25px;
    right: 45px;
    font-size: 45px;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1600;
    opacity: 0.5;
    transition: 0.3s;
    outline: none;
}

.close-series:hover {
    opacity: 1;
    color: var(--netflix-red);
}

/* --- MODAL SENHA (ADULTO) --- */
#password-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 3000;
    align-items: center;
    justify-content: center;
}

.pin-container {
    background: #141414;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #333;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    font-family: 'Segoe UI', sans-serif;
    width: 100%;
    max-width: 350px;
}

.pin-title {
    margin: 0 0 10px 0;
    color: white;
}

.pin-desc {
    color: #999;
    margin: 0 0 20px 0;
    font-size: 14px;
}

.pin-input {
    background: #222;
    border: 1px solid #444;
    color: white;
    font-size: 28px;
    padding: 15px;
    width: 140px;
    text-align: center;
    letter-spacing: 12px;
    border-radius: 6px;
    margin: 20px auto;
    outline: none;
    transition: 0.3s;
    display: block;
}

.pin-input:focus {
    border-color: var(--netflix-red);
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.3);
}

.pin-actions {
    display: flex;
    gap: 10px;
    width: 100%;
}

.btn-pin {
    flex: 1;
    justify-content: center;
    background: var(--netflix-red);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

.btn-pin-cancel {
    flex: 1;
    justify-content: center;
    background: transparent;
    border: 1px solid #555;
    color: white;
    padding: 10px;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

/* --- PLAYER DE VÍDEO --- */
#player-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: var(--z-overlay);
    font-family: 'Segoe UI', sans-serif;
}

#player-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
}

#hiko-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    outline: none;
    background: transparent;
    cursor: pointer;
    object-fit: contain;
}

#hiko-video::-webkit-media-controls {
    display: none !important;
}

.player-top-bar,
.player-controls {
    position: absolute;
    left: 0;
    width: 100%;
    padding: 20px 40px;
    box-sizing: border-box;
    transition: opacity 0.4s ease;
    z-index: 2005;
}

.player-top-bar {
    top: 0;
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
}

.player-controls {
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-bottom: 30px;
}

.idle .player-top-bar,
.idle .player-controls,
.idle #player-center-play {
    opacity: 0;
    cursor: none;
    pointer-events: none;
}

.idle #hiko-video {
    cursor: none;
}

#player-title {
    font-size: 24px;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.8);
}

.progress-container {
    width: 100%;
    height: 12px;
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.progress-bar-bg {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    position: relative;
    transition: height 0.2s;
}

.progress-container:hover .progress-bar-bg {
    height: 8px;
}

.progress-bar-fill {
    height: 100%;
    background: var(--netflix-red);
    border-radius: 2px;
    width: 0%;
    pointer-events: none;
    position: relative;
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.5);
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 12px;
    height: 12px;
    background: var(--netflix-red);
    border-radius: 50%;
    transition: transform 0.2s;
}

.progress-container:hover .progress-bar-fill::after {
    transform: translateY(-50%) scale(1);
}

.progress-hover-time {
    position: absolute;
    top: -30px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    display: none;
    transform: translateX(-50%);
    pointer-events: none;
    font-weight: bold;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.progress-container:hover .progress-hover-time {
    display: block;
}

#progress-container.tv-focused .progress-bar-bg {
    height: 8px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

#progress-container.tv-focused .progress-bar-fill::after {
    transform: translateY(-50%) scale(1.5);
    /* Aumenta a bolinha indicadora */
    box-shadow: 0 0 15px var(--netflix-red);
}

.controls-main {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: 80px !important;
    padding: 0 40px !important;
}

.controls-left,
.controls-right {
    display: flex !important;
    align-items: center !important;
    /* Todos os botões no mesmo eixo Y */
    gap: 25px !important;
}

.player-btn {
    /* Estilo Visual Original */
    background: none !important;
    border: none !important;
    color: white !important;
    font-size: 24px !important;
    cursor: pointer !important;
    transition: transform 0.2s, opacity 0.2s !important;
    opacity: 0.8 !important;
    outline: none !important;

    /* Estrutura Crítica para Navegação */
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px !important;
    /* Altura fixa para alinhar o centro Y */
    min-width: 50px !important;
    margin: 0 !important;
    padding: 0 15px !important;
    box-sizing: border-box !important;
}

.player-btn:hover {
    opacity: 1;
    transform: scale3d(1.1, 1.1, 1);
    color: var(--netflix-red);
}

.player-btn.text-btn {
    font-size: 16px !important;
    font-weight: bold !important;
    width: auto !important;
    padding: 10px 20px !important;
    /* Movido para a base */
    border-radius: 8px;
    /* Movido para a base */
}

/* 1. Efeito para botões circulares (Play, Rewind, Forward, Mute, Fullscreen) */
.player-btn.tv-focused {
    opacity: 1 !important;
    transform: scale3d(2.0, 2.0, 1) !important;
    color: var(--netflix-red) !important;
    text-shadow: 0 0 15px var(--netflix-red) !important;
}

/* 2. Efeito específico para botões de texto (Próximo e Episódios) */
.player-btn.text-btn.tv-focused {
    transform: scale3d(1.15, 1.15, 1) !important;
    background-color: var(--netflix-red) !important;
    color: white !important;
    box-shadow: 0 10px 30px rgba(229, 9, 20, 0.6) !important;
}

/* 3. Ajuste para que o ícone dentro do botão não suma no brilho */
.player-btn.tv-focused i,
.player-btn.tv-focused span {
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.time-display {
    font-size: 14px;
    color: #ddd;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.5px;
    margin-left: 10px;
}

.volume-container {
    position: relative;
    display: flex;
    align-items: center;
    height: auto;
    /* Fix bug #3: altura auto evita que o clickable area vaze para baixo do icone */
}

/* Fix Bug #3: Ancoragem exata do btn-mute para que a hitbox coincida com o icone visual */
#btn-mute {
    width: 48px !important;
    height: 48px !important;
    padding: 0 !important;
    min-width: unset !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0;
    position: relative;
    z-index: 2030;
}

.volume-slider-wrapper {
    position: absolute;
    bottom: 35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 20, 20, 0.9);
    padding: 15px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2020;
}

.volume-slider-wrapper::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 35px;
}

.volume-container:hover .volume-slider-wrapper {
    opacity: 1;
    visibility: visible;
}

#volume-slider {
    appearance: auto;
    writing-mode: vertical-lr;
    direction: rtl;
    width: 8px;
    height: 100px;
    cursor: pointer;
    accent-color: var(--netflix-red);
}

.player-center-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(2);
    color: rgba(255, 255, 255, 0.8);
    font-size: 60px;
    pointer-events: none;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2002;
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.5));
}

.player-center-icon.animate {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* --- MENU DE EPISÓDIOS DO PLAYER (REDESIGN FLUTUANTE) --- */
#player-episodes-menu {
    position: absolute;
    bottom: 110px;
    /* Posicionado acima da barra de controles */
    right: 60px;
    width: 360px;
    /* Largura reduzida para formato retangular vertical */
    height: auto;
    max-height: 70vh;
    transform: translateY(30px) scale(0.95);
    /* Animação vindo de baixo */
    background: rgba(12, 12, 12, 0.88);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    z-index: 2010;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#player-episodes-menu.hidden {
    display: none !important;
}

#player-episodes-menu:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.ep-menu-header {
    padding: 20px 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.03);
}

.ep-menu-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: #fff;
}

#close-ep-menu {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: white;
    font-size: 20px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0.75;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s, background 0.2s;
}

#close-ep-menu:hover,
#close-ep-menu.tv-focused {
    opacity: 1;
    background: rgba(229, 9, 20, 0.6);
    border-color: var(--netflix-red);
    transform: scale(1.15);
}

#ep-menu-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    scrollbar-width: thin;
    scrollbar-color: rgba(229, 9, 20, 0.4) transparent;
}

.player-ep-season-title {
    padding: 12px 18px;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin: 8px 0 2px 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s, color 0.2s, transform 0.2s;
    border-radius: 8px;
    outline: none;
    position: relative;
}

/* Indicador de expansão (Seta) */
.player-ep-season-title::after {
    content: '▼';
    font-size: 10px;
    opacity: 0.5;
    transition: transform 0.3s ease;
}

.player-ep-season-title.expanded::after {
    transform: rotate(180deg);
}

.player-ep-season-title:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.player-ep-list {
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.2s;
    opacity: 1;
}

.player-ep-list.collapsed {
    display: none !important;
    /* Usamos display: none para garantir que o D-pad ignore os elementos internos */
}

.player-ep-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.15s ease;
    border-radius: 10px;
    color: #bbb;
    outline: none;
    margin-bottom: 4px;
    border: 1px solid transparent;
}

.player-ep-thumb {
    width: 90px;
    height: 52px;
    border-radius: 7px;
    object-fit: cover;
    flex-shrink: 0;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.player-ep-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.player-ep-num {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.player-ep-title {
    font-size: 14px;
    color: #ddd;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-ep-item:hover {
    background: rgba(255, 255, 255, 0.07);
    color: white;
    border-color: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
}

.player-ep-item.playing {
    border-left: 3px solid var(--netflix-red);
    border-color: rgba(229, 9, 20, 0.3);
    background: rgba(229, 9, 20, 0.08);
    color: white;
}

.player-ep-item.playing .player-ep-title {
    color: white;
    font-weight: 700;
}

/* Feedback visual para navegação com D-PAD no menu de episódios */
.player-ep-item.tv-focused {
    background: rgba(229, 9, 20, 0.15) !important;
    color: white !important;
    border-color: rgba(229, 9, 20, 0.4) !important;
    transform: translateX(6px) !important;
    box-shadow: 0 4px 16px rgba(229, 9, 20, 0.2) !important;
}

.player-ep-item.tv-focused .player-ep-title {
    color: white !important;
}

.player-ep-season-title.tv-focused,
#close-ep-menu.tv-focused {
    color: var(--netflix-red) !important;
    background: rgba(229, 9, 20, 0.08) !important;
    text-shadow: 0 0 10px rgba(229, 9, 20, 0.4);
}

/* =========================================
   NAVEGAÇÃO TV SUTIL E VISÍVEL (D-PAD)
   Otimizado para TV 4K 55"
   ========================================= */

/* Feedback visual para os títulos de categorias clicáveis na TV */
.row-title.clickable.tv-focused {
    color: var(--netflix-red) !important;
    transform: translateX(10px) !important;
    text-shadow: 0 0 15px rgba(229, 9, 20, 0.6) !important;
    outline: none !important;
}

/* 🚀 1. O "CURATIVO" PARA O CORTE NOS MODOS GRADE (Vertical Grids) */
.main-content {
    padding-bottom: 150px !important;
    overflow: visible !important;
}

.grid-layout,
#special-mode-container,
#search-results-area,
#my-list-container {
    overflow: visible !important;
    padding-bottom: 60px !important;
}

/* 🚀 2. O "CURATIVO" PARA O CORTE NAS FILEIRAS HORIZONTAIS (Swiper Rows) */
.row {
    padding-top: 20px !important;
    padding-bottom: 20px !important;
}

.swiper-container-inner,
.top10-container {
    padding-top: 50px !important;
    padding-bottom: 50px !important;
    margin-top: -30px;
    margin-bottom: -30px;

    /* Restaura as paredes do carrossel e blinda a página de rolar horizontalmente */
    overflow-x: auto !important;
    overflow-y: hidden !important;
}

/* 🔥 3. O CSS DO CARD NORMAL (Zoom 1.6) */
.card.tv-focused {
    transform: scale(1.5) !important;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.95) !important;
    z-index: 9999 !important;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out !important;
    overflow: hidden !important;
}

/* 🔥 4. O CSS DO CARD TOP 10 (Zoom 1.3) */
.top10-card.tv-focused {
    transform: scale(1.15) !important;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.9) !important;
    z-index: 9999 !important;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out !important;
    overflow: visible !important;
}

/* Garante que a imagem do Top 10 não sofra distorção */
.top10-card.tv-focused .top10-poster {
    transform: scale(1) !important;
}

/* Ajustes visuais sutis para menus e pesquisa ao receber foco */
.nav-links li.tv-focused {
    color: white !important;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

#search-input.tv-focused {
    background-color: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
}

/* Seleção de texto no campo de busca (força o fundo azul como em apps nativos) */
#search-input::selection,
#virtual-search-text::selection {
    background: rgba(10, 132, 255, 0.95) !important;
    color: #ffffff !important;
}

/* Remove a borda azul/pontilhada nativa e feia que o navegador da TV coloca */
*:focus {
    outline: none !important;
}

/* 🚀 5. "CURATIVO" ESPECÍFICO PARA OS CARDS DO TOP 10 */
.top10-row {
    position: relative;
    /* Isso é a mágica que prende as setas dentro do trilho! */
    overflow: visible !important;
    /* Mantém a regra que você já tinha para a TV */
}

.top10-container {
    padding-top: 50px !important;
    padding-bottom: 50px !important;
    margin-top: -50px !important;
    margin-bottom: -50px !important;
    padding-left: 30px !important;
    padding-right: 30px !important;
    /* Adicionamos a blindagem de scroll aqui novamente para garantir! */
    overflow-x: auto !important;
    overflow-y: hidden !important;
}

.top10-card {
    overflow: visible !important;
}

.top10-card img {
    overflow: visible !important;
}

/* =========================================
   FOCO NOS BOTÕES E INDICADORES DO CARROSSEL
   ========================================= */

/* 1. Botões Assistir e Minha Lista (Herdam o exato mesmo efeito do Hover) */
.btn-play-hero.tv-focused {
    background-color: #e6e6e6 !important;
    transform: scale(1.05) !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5) !important;
}

.btn-fav-hero.tv-focused {
    background-color: rgba(90, 90, 90, 1) !important;
    transform: scale(1.05) !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5) !important;
}

/* 2. Indicadores (Rodas/Dots) do carrossel */
.carousel-dot.tv-focused {
    background-color: rgba(255, 255, 255, 0.9) !important;
    transform: scale(1.4) !important;
    /* Cresce um pouco para indicar onde o controle está */
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.4) !important;
}

/* Garante que, se o Dot focado for também o Dot "Ativo", ele fique ainda mais visível */
.carousel-dot.active.tv-focused {
    background-color: var(--netflix-red) !important;
    transform: scale(1.1) !important;
}

/* =========================================
   MODAL DE SÉRIES - FEEDBACK VISUAL (D-PAD)
   ========================================= */

/* 🎯 Regra 8: Feedback Temporadas (Scale 1.15 e transição suave) */
.season-btn.tv-focused {
    transform: scale(1.15) !important;
    background-color: var(--netflix-red) !important;
    color: white !important;
    box-shadow: 0 10px 20px rgba(229, 9, 20, 0.4) !important;
    transition: transform 0.2s ease-in-out, background-color 0.2s ease, box-shadow 0.2s ease !important;
    z-index: 10;
}

/* 🎯 Regra 8: Feedback Episódios (Cópia exata do hover) */
.ep-card.tv-focused {
    background: rgba(255, 255, 255, 0.08) !important;
    border-left-color: var(--netflix-red) !important;
    transform: translateX(10px) !important;
    outline: none !important;
}

.ep-card.tv-focused .ep-play-icon {
    opacity: 1 !important;
}

/* Feedback do Botão Minha Lista (dentro do modal) */
.btn-fav.tv-focused {
    background: rgba(255, 255, 255, 0.3) !important;
    border-color: white !important;
    transform: scale(1.05) !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5) !important;
}

/* 🚀 6. "CURATIVO" PARA CORTE (CLIPPING) NO MODAL DE SÉRIES */

/* Libera barreiras no contêiner principal do modal e nos splits */
.modal-series-content,
.series-content-split {
    overflow: visible !important;
}

/* Libera espaço lateral na coluna de temporadas para o Scale(1.15) */
.season-selector {
    /* Adicionamos espaço de respiração generoso nas laterais e fundo */
    padding: 30px !important;

    /* A margem negativa puxa o contêiner de volta, anulando o espaço extra no layout */
    margin: -30px !important;

    /* ESSENCIAL: Permite que o scale(1.15) e a sombra vazem sem cortes laterais */
    overflow: visible !important;

    /* Mantém a rolagem vertical funcionando */
    overflow-y: auto !important;
}

/* Libera espaço lateral na coluna de episódios para o translateX(10px) */
.episode-list {
    /* Espaço de respiração generoso */
    padding: 30px !important;
    margin: -30px !important;

    /* Libera para o movimento translateX e o brilho */
    overflow: visible !important;

    /* Mantém a rolagem vertical */
    overflow-y: auto !important;
}

/* Pequeno ajuste visual para garantir que os botões não grudem nas bordas */
.season-btn {
    margin-left: 5px;
    margin-right: 5px;
}

/* =========================================
   PLAYER AVANÇADO - UI E PREVIEW
   ========================================= */

/* 1. Removemos o botão de fechar (A navegação será gerida pelo botão Voltar) */
/* Oculto por padrão (TVs sem mouse) */
#close-player-btn {
    display: none;
    position: absolute;
    top: 15px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    font-size: 28px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s ease, background 0.2s ease;
    z-index: 2100;
    pointer-events: auto;
}

#close-player-btn:hover {
    opacity: 1;
    background: rgba(229, 9, 20, 0.8);
}

/* Mostra apenas em dispositivos com mouse */
@media (hover: hover) and (pointer: fine) {
    #close-player-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* 2. Tooltip de Preview de Tempo (substitui o seek thumbnail) */
#time-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    /* Sempre acima da barra de progresso */
    left: 0;
    transform: translateX(-50%);
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Segoe UI', system-ui, sans-serif;
    letter-spacing: 0.5px;
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 2200;
    will-change: left, opacity;
}

/* 5. Transição suave na barra durante o Seek Progressivo */
.progress-bar-fill {
    transition: width 0.1s linear;
    /* Deixa o avanço progressivo mais fluido */
}

#progress-container {
    position: relative !important;
    width: 100%;
    height: 20px;
    /* Aumentei um pouco para facilitar o foco/toque */
    display: flex;
    align-items: center;
    cursor: pointer;
}


/* --- TOAST NOTIFICATION --- */
#toast-notification {
    position: fixed;
    bottom: -100px;
    right: 30px;
    background: rgba(20, 20, 20, 0.95);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    font-weight: bold;
    font-family: 'Segoe UI', sans-serif;
    z-index: var(--z-toast);
    transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-left: 4px solid var(--netflix-red);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    pointer-events: none;
}

/* =========================================
   OVERLAY DE BUSCA (VIRTUAL KEYBOARD)
   ========================================= */
#search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.98);
    /* Quase preto sólido para performance */
    z-index: var(--z-overlay);
    display: flex;
    opacity: 1;
    transition: opacity 0.3s ease;
}

#close-search-btn {
    position: absolute;
    top: 40px;
    right: 40px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: white;
    font-size: 26px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s ease;
    outline: none;
}

#close-search-btn:hover,
#close-search-btn.tv-focused {
    background: var(--netflix-red);
    border-color: var(--netflix-red);
    transform: scale(1.15);
    box-shadow: 0 0 20px rgba(229, 9, 20, 0.4);
}

#search-overlay.hidden {
    display: none !important;
    opacity: 0;
}

.search-overlay-content {
    display: flex;
    width: 100%;
    height: 100%;
    padding: 60px 80px;
    box-sizing: border-box;
    gap: 60px;
}

/* --- TECLADO (LADO ESQUERDO) --- */
.search-left-panel {
    flex: 0 0 450px;
    display: flex;
    flex-direction: column;
}

.virtual-input-display {
    height: 70px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 2px solid #333;
    color: white;
    font-size: 28px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    margin-bottom: 30px;
    font-weight: bold;
    letter-spacing: 2px;
}

.cursor-blink {
    animation: blink 1s step-end infinite;
    color: var(--netflix-red);
    margin-left: 2px;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.keyboard-container {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    /* Grade perfeita de 6 colunas */
    gap: 12px;
    width: 100%;
}

.keyboard-key {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    color: white;
    border-radius: 6px;
    height: 60px;
    /* Altura confortável para TV */
    font-size: 24px;
    /* Letras grandes */
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    transition: transform 0.15s, background 0.15s;
    transform: translateZ(0);
}

/* Os 3 Botões de Ação Inferiores (Apagar, Espaço, Limpar) */
.keyboard-key.action-btn {
    grid-column: span 2;
    /* Cada botão ocupa 2 espaços (6 no total) */
    height: 60px;
    margin-top: 10px;
    /* Separa da linha de números */
}

/* Transição dos ícones SVG dentro dos botões */
.keyboard-key svg {
    transition: transform 0.2s ease;
}

/* Feedback Visual do D-PAD no Teclado e nos Ícones */
.keyboard-key.tv-focused {
    background-color: var(--netflix-red) !important;
    transform: scale(1.15) !important;
    box-shadow: 0 10px 25px rgba(229, 9, 20, 0.6) !important;
    z-index: 10;
    color: white !important;
}

.keyboard-key:hover svg,
.keyboard-key.tv-focused svg {
    transform: scale(1.15);
}

/* --- RESULTADOS (LADO DIREITO) --- */
.search-right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.search-results-title {
    margin-top: 0;
    color: #fff;
    font-size: 32px;
    margin-bottom: 20px;
}

.virtual-search-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 50px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 60px;
    /* Padding extra generoso para o zoom 1.5x não cortar */
    align-content: start;
    align-items: start;
}

/* 🚀 O SEGREDO DO ÚLTIMO CARD: Espaço fantasma flexível AJUSTADO */
.swiper-container-inner::after,
.top10-container::after {
    content: '';
    display: block;
    /* Reduzido de 100vw para 150px. 
       Espaço suficiente apenas para o scale(1.15) crescer sem cortar a borda direita! */
    flex: 0 0 150px !important;
    height: 1px;
}

#toast-notification.show {
    bottom: 30px;
}

/* =========================================
   MODAIS IMERSIVOS (Estilo Netflix / Max)
   ========================================= */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    cursor: pointer;
}

.modal-series {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85) !important;
    backdrop-filter: blur(8px);
    z-index: var(--z-modal) !important;
    overflow-y: auto !important;
    /* Permite rolar a página toda */
}

.modal-series-content.immersive {
    z-index: 2;
    max-width: 1100px;
    width: 95%;
    margin: 50px auto 100px auto !important;
    height: auto !important;
    min-height: 80vh;
    background: #141414 !important;
    border-radius: 16px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.9) !important;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: visible !important;
    padding: 0 !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

/* Modal de Filme pode ser um pouco menor pois não tem episódios */
.modal-series-content.immersive.movie-immersive {
    min-height: 60vh;
}

/* O Banner Hero do Modal */
.modal-hero-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 550px;
    z-index: 0;
}

#modal-hero-bg,
#movie-modal-hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
}

.modal-hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, #141414 0%, rgba(20, 20, 20, 0.6) 40%, transparent 100%);
}

/* Conteúdo sobreposto */
.modal-main-info {
    position: relative;
    z-index: 10;
    padding: 300px 50px 0 50px;
    display: flex;
    flex-direction: column;
}

.modal-main-info h1 {
    font-size: 3.2rem !important;
    margin: 0 0 10px 0 !important;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.9);
    font-weight: 900;
}

.modern-meta {
    margin-bottom: 25px !important;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.8);
}

.modern-synopsis-bar {
    overflow-y: visible !important;
}

.modern-synopsis {
    max-width: 750px;
    font-size: 1.15rem !important;
    line-height: 1.6 !important;
    color: #e5e5e5 !important;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.9);
    margin-bottom: 30px !important;
}

.modern-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
}

/* Botão Fechar Moderno */
.close-series-modern {
    position: absolute;
    top: 25px;
    right: 25px;
    width: 45px;
    height: 45px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: 0.3s;
    outline: none;
}

.close-series-modern:hover,
.close-series-modern.tv-focused {
    background: white;
    color: black;
    transform: scale(1.1);
}

/* Abas Horizontais para Temporadas */
.modern-split {
    padding: 0 50px 50px 50px !important;
    flex-direction: column !important;
    margin-top: 0 !important;
}

.modern-seasons {
    flex-direction: row !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    gap: 30px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px !important;
    margin-bottom: 25px !important;
    scrollbar-width: none;
}

.modern-seasons::-webkit-scrollbar {
    display: none;
}

.modern-seasons .season-btn {
    background: transparent !important;
    padding: 0 0 10px 0 !important;
    border-radius: 0 !important;
    font-size: 1.3rem;
    color: #888 !important;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
}

.modern-seasons .season-btn.active {
    color: white !important;
    border-bottom-color: var(--netflix-red) !important;
    box-shadow: none !important;
    font-weight: bold;
}

.modern-seasons .season-btn.tv-focused {
    color: white !important;
    transform: scale(1.1) translateY(-2px) !important;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

/* Lista de Episódios Espaçosa */
.modern-episodes {
    overflow-y: visible !important;
    /* Deixa o Modal principal fazer o scroll */
    flex: none !important;
}

/* =========================================
   NOVO MODAL PADRÃO NETFLIX (CORRIGIDO PARA POP-UP EMBAÇADO)
   ========================================= */
.modal-netflix {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Fundo levemente escurecido com o efeito de desfoque (blur) */
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    /* Suporte essencial para navegadores de TV */
    z-index: var(--z-modal);
    overflow-y: auto;
    font-family: 'Netflix Sans', 'Inter', sans-serif;

    /* Suaviza a entrada do modal */
    animation: fadeInModal 0.3s ease-out;
}

@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-netflix-content {
    background-color: #181818;
    max-width: 950px;
    width: 95%;
    margin: 40px auto;
    border-radius: 10px;
    position: relative;
    z-index: 2;
    /* 🎯 A CORREÇÃO: Garante que o conteúdo fique *à frente* do fundo transparente que fecha o modal. */
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    /* Mantém as bordas arredondadas com a imagem */
    padding-bottom: 40px;
    
    /* Pequena animação de "salto" vindo de baixo ao abrir */
    animation: slideUpModal 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes slideUpModal {
    from {
        transform: translateY(50px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.movie-content {
    min-height: auto;
}

.close-netflix-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    background: rgba(24, 24, 24, 0.7);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    outline: none;
}

.close-netflix-btn:hover,
.close-netflix-btn.tv-focused {
    background: white;
    color: #181818;
    transform: scale(1.1);
}

/* 1. Hero Banner */
.modal-hero {
    position: relative;
    height: 480px;
    width: 100%;
}

.modal-hero-bg-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.modal-hero-bg-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.hero-vignette-bottom {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to top, #181818 0%, rgba(24, 24, 24, 0.8) 20%, transparent 100%);
}

.hero-vignette-left {
    position: absolute;
    top: 0;
    left: 0;
    width: 60%;
    height: 100%;
    background: linear-gradient(to right, #181818 0%, rgba(24, 24, 24, 0.7) 40%, transparent 100%);
}

.modal-hero-info {
    position: absolute;
    bottom: 40px;
    left: 40px;
    width: 70%;
    z-index: 10;
}

.netflix-title {
    font-size: 3rem;
    font-weight: 900;
    margin: 0 0 20px 0;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.6);
}

/* Botões do Hero */
.modal-actions {
    display: flex;
    gap: 10px;
}

.modal-btn-primary,
.modal-btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 24px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    transition: 0.2s;
    outline: none;
}

.modal-btn-primary {
    background: white;
    color: black;
    position: relative;
    overflow: hidden;
    /* Corta a barra de progresso nas bordas arredondadas do botão */
}

.modal-btn-primary:hover,
.modal-btn-primary.tv-focused {
    background: #fff !important;
    color: #000 !important;
    transform: scale(1.1) !important;
    border: 3px solid var(--netflix-red) !important;
    box-shadow: 0 0 20px var(--netflix-red), 0 10px 30px rgba(0,0,0,0.6) !important;
    z-index: 10;
}

/* Barra de Progresso Sutil dentro do Botão */
.modal-btn-progress-track {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.modal-btn-progress-fill {
    height: 100%;
    background: var(--netflix-red);
    box-shadow: 0 0 8px rgba(229, 9, 20, 0.6);
    transition: width 0.3s ease;
}

.modal-btn-secondary {
    background: rgba(109, 109, 110, 0.7);
    color: white;
}

.modal-btn-secondary:hover,
.modal-btn-secondary.tv-focused {
    background: rgba(109, 109, 110, 0.9) !important;
    transform: scale(1.1) !important;
    border: 3px solid white !important;
    box-shadow: 0 0 15px rgba(255,255,255,0.4), 0 10px 30px rgba(0,0,0,0.6) !important;
    z-index: 10;
}

/* 2. Metadados Grid */
.modal-details-grid {
    display: block;
    padding: 0 40px;
    margin-top: 20px;
}

.metadata-row {
    display: flex;
    gap: 15px;
    align-items: center;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.meta-rating {
    color: #46d369;
    font-weight: bold;
}

.modal-synopsis {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #fff;
    margin: 0;
}

.cast-row {
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 10px;
}

.meta-label {
    color: #777;
}

.meta-value {
    color: #fff;
}

/* 3. Lista de Episódios */
.modal-episodes-container {
    padding: 0 40px;
    margin-top: 40px;
}

.episodes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.episodes-title {
    font-size: 1.5rem;
    margin: 0;
}

.season-selector-dropdown .season-btn {
    background: #242424;
    color: white;
    border: 1px solid #4d4d4d;
    padding: 8px 16px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    outline: none;
    margin-right: 10px;
}

.season-selector-dropdown .season-btn.active {
    background: white;
    color: black;
}

.season-selector-dropdown .season-btn.tv-focused {
    transform: scale(1.05);
    border-color: white;
}

/* Cards horizontais Netflix Style */
.netflix-episode-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ep-row-card {
    display: flex;
    align-items: center;
    padding: 20px;
    background: transparent;
    border-bottom: 1px solid #404040;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    outline: none;
}

.ep-row-card:hover,
.ep-row-card.tv-focused {
    background: #333;
}

.ep-row-card.tv-focused {
    transform: scale(1.02);
    border-left: 4px solid var(--netflix-red);
}

.ep-row-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: #d2d2d2;
    width: 40px;
    text-align: center;
}

.ep-row-thumb {
    width: 140px;
    height: 80px;
    border-radius: 4px;
    background-color: #222;
    margin: 0 20px;
    object-fit: cover;
    position: relative;
    overflow: hidden;
}

/* Progress bar no card horizontal */
.ep-row-thumb .ep-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: var(--netflix-red);
    z-index: 2;
}

.ep-row-info {
    flex: 1;
}

.ep-row-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.ep-row-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: white;
}

.ep-row-duration {
    font-size: 0.9rem;
    color: #a3a3a3;
}

.ep-row-desc {
    font-size: 0.95rem;
    color: #d2d2d2;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =========================================
   SISTEMA DE FEEDBACK VISUAL (PRESS EFFECT)
   Otimizado para GPU (Sem Reflow/Main Thread)
   ========================================= */

.card:active,
.top10-card:active,
.nav-links li:active,
.player-btn:active,
.btn-play-hero:active,
.btn-fav-hero:active,
.season-btn:active,
.ep-row-card:active,
.keyboard-key:active,
.modal-btn-primary:active,
.modal-btn-secondary:active,
.close-series-btn:active,
.close-movie-btn:active,
.back-btn:active,
.carousel-dot:active,
#logo-btn:active,
#search-btn:active,
#verify-pin-btn:active,
#cancel-pin-btn:active,
#vk-backspace:active,
#vk-space:active,
#vk-clear:active {
    transform: scale(0.95) !important;
    transition: transform 0.05s ease-out !important;
    filter: brightness(0.8) !important;
}

/* =========================================
   FEEDBACK DE BUSCA NO PLAYER (TIMESTAMPS)
   ========================================= */

#preview-container {
    position: absolute;
    bottom: 28px;
    /* Acima da barra de progresso */
    left: 0;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.92);
    border: 2px solid var(--netflix-red);
    color: white;
    padding: 0;
    border-radius: 6px;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, left 0.08s linear;
    z-index: 50;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#preview-canvas {
    display: block;
    width: 213px;
    height: 120px;
    object-fit: cover;
    background: #111;
    /* Exibe um padrão de xadrez enquanto o frame não carrega */
    background-image: linear-gradient(45deg, #1a1a1a 25%, transparent 25%),
        linear-gradient(-45deg, #1a1a1a 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #1a1a1a 75%),
        linear-gradient(-45deg, transparent 75%, #1a1a1a 75%);
    background-size: 10px 10px;
    background-position: 0 0, 0 5px, 5px -5px, -5px 0px;
}

#preview-time {
    display: block;
    width: 100%;
    text-align: center;
    padding: 5px 10px;
    font-size: 15px;
    font-weight: bold;
    letter-spacing: 1px;
    background: rgba(229, 9, 20, 0.15);
    border-top: 1px solid rgba(229, 9, 20, 0.4);
    box-sizing: border-box;
}

#preview-container.active {
    opacity: 1;
    visibility: visible;
}

@keyframes centerPlayAnim {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }

    30% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }

    70% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.3);
    }
}

/* Garante visibilidade do PIN sobre a busca */
#password-modal {
    z-index: var(--z-modal) !important;
}

/* =========================================
   [NOVO] CONTADOR DE AUTO-PLAY (GLASSMORPHISM)
   ========================================= */
.autoplay-next-container {
    position: absolute;
    bottom: 120px;
    right: 40px;
    z-index: 2100;
    transition: opacity 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 15px;
}

.autoplay-next-container.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(20px) scale(0.9) !important;
}

.autoplay-skip-btn {
    background: rgba(40, 40, 40, 0.6) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    padding: 12px 30px !important;
    border-radius: 50px !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
    transition: all 0.25s ease !important;
    white-space: nowrap !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    outline: none !important;
}

.autoplay-skip-btn.tv-focused {
    background: var(--netflix-red) !important;
    border-color: var(--netflix-red) !important;
    transform: scale(1.1) !important;
    box-shadow: 0 0 40px rgba(229, 9, 20, 0.6) !important;
}

.autoplay-skip-btn:active {
    transform: scale(0.95) !important;
}
/* =========================================
   FEEDBACK VISUAL GERENCIAMENTO DE PERFIS
   ========================================= */
.profile-card.tv-focused {
    transform: scale(1.1);
    border: 3px solid #fff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
    outline: none;
}

.profile-manager-btn.tv-focused,
#btn-manage-profiles-mode.tv-focused,
#btn-new-profile.tv-focused {
    transform: scale(1.1);
    background: #fff !important;
    color: #000 !important;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
    outline: none;
}

/* =========================================
   MELHORIA NO GRID DE BUSCA GRUPADO
   ========================================= */
.search-group-title {
    color: #E50914;
    font-size: 1.6rem;
    font-weight: normal;
    margin: 30px 10px 15px 10px;
    padding-bottom: 30px;
    border-bottom: 1px solid #222;
    width: 100%;
}

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 50px; /* Espao generoso entre cards */
    width: 100%;
    padding: 20px 10px 40px 10px;
    align-items: start;
    align-content: start;
}
