/* ========================================= */
/* ESTILOS BASE IPTV-FLIX (Para Desktop) */
/* ========================================= */
body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #0c0c0c; /* Preto mais escuro */
    color: white;
    margin: 0;
    padding: 0;
}

/* 1. CABEÇALHO */
.cabecalho-principal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    background-color: #0c0c0c;
    position: fixed;
    top: 0; /* Começa no topo */
    width: calc(100% - 80px); 
    z-index: 1000;
    transition: top 0.3s ease-in-out; 
}

/* CLASSE PARA ESCONDER O HEADER COM JAVASCRIPT */
.header-hidden {
    top: -80px; /* Move o cabeçalho para fora da tela (para cima) */
}

.logo {
    color: #E50914; /* Vermelho Netflix */
    font-size: 26px;
    font-weight: 700;
}

.menu-navegacao a {
    color: white; /* Cor mais clara para menu principal */
    text-decoration: none;
    /* AJUSTE PARA QUATRO LINKS: Reduzindo a margem */
    margin-left: 20px; 
    font-size: 18px; 
    font-weight: 600;
    transition: color 0.3s;
}

.menu-navegacao a:hover, .menu-navegacao a.ativo {
    color: #E50914; /* Destaque em vermelho */
}

.acoes-usuario a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
    font-size: 14px;
}
.icone-perfil {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    vertical-align: middle;
}

/* 2. DESTAQUE (FILME CARAMELO) */
.secao-hero-live {
    /* Gradiente e Fundo do Filme */
    background: 
        linear-gradient(to bottom, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0.6) 85%, rgba(0, 0, 0, 0.9) 100%),
        linear-gradient(to right, rgba(0, 0, 0, 0.7) 10%, rgba(0, 0, 0, 0.2) 50%, rgba(0, 0, 0, 0.0) 100%),
        url('capa_caramelo.jpg') center/cover no-repeat;
    
    height: 80vh;
    display: flex;
    align-items: flex-end; 
    padding-bottom: 50px;
    padding-left: 40px;
    margin-top: 60px; 
    position: relative;
}

.player-miniatura {
    max-width: 600px;
    padding-bottom: 20px; 
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
    padding-top: 30px; 
}

/* Ícone de estrela para filme/destaque (MELHORIA DE BRILHO) */
.player-miniatura .fa-star {
    color: gold; 
    font-size: 60px; 
    margin-bottom: 15px;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.9)); 
}

.player-miniatura p { /* Estiliza o "DESTAQUE DA SEMANA" */
    font-size: 1.1em; 
    margin: 0 0 5px 0;
    font-weight: 500;
    letter-spacing: 2px; 
    text-transform: uppercase;
}

.titulo-canal {
    font-size: 3.5em;
    margin: 0 0 10px 0;
    line-height: 1.1;
}

.botoes-live button {
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    margin-right: 15px;
    transition: opacity 0.3s;
}

.btn-assistir {
    background-color: #E50914; 
    color: white;
}
.btn-assistir:hover {
    opacity: 0.9;
}

.btn-grade { /* Usado como "Mais Informações" */
    background-color: rgba(109, 109, 110, 0.7); 
    color: white;
}
.btn-grade:hover {
    opacity: 0.9;
}

/* 3. & 4. SEÇÕES DE CARROSSEL */
.secoes-carrossel {
    padding-top: 50px;
}

.carrossel {
    margin-bottom: 40px;
    padding-left: 40px;
}

.carrossel h2 {
    font-size: 1.6em;
    margin-bottom: 15px;
    font-weight: 500;
}

.lista-miniaturas {
    display: flex;
    overflow-x: scroll; 
    padding-bottom: 15px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.lista-miniaturas::-webkit-scrollbar {
    display: none;
}

/* Estilo para Miniaturas VOD (Filmes/Séries) */
.miniatura {
    width: 280px; 
    margin-right: 10px;
    flex-shrink: 0;
    transition: transform 0.3s;
    position: relative; 
}

.miniatura:hover {
    transform: scale(1.05); 
    z-index: 1;
}

.miniatura img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.barra-progresso {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background-color: #E50914;
}

/* Estilo para Miniaturas de Canais (Live TV) - Mantido para flexibilidade */
.miniatura-canal {
    width: 200px; 
    height: 120px;
    margin-right: 15px;
    flex-shrink: 0;
    border: 3px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    transition: border-color 0.3s;
}

.miniatura-canal:hover {
    border-color: #E50914; 
}

.miniatura-canal img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
}

/* 5. BARRA DE STATUS/RODAPÉ INFERIOR (IPTV) */
.barra-inferior {
    display: flex;
    justify-content: center;
    padding: 20px;
    background-color: #1a1a1a;
    border-top: 1px solid #333;
}

.link-iptv {
    color: #999;
    text-decoration: none;
    margin: 0 30px;
    font-size: 1.1em;
    transition: color 0.3s;
}
.link-iptv:hover {
    color: white;
}
.link-iptv i {
    margin-right: 8px;
    color: #E50914;
}


/* ========================================= */
/* ESTILOS DA GRADE DE CANAIS (guia_canais.html) */
/* ========================================= */

.secao-catalogo {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0; 
    padding-top: 80px; 
    height: 100vh;
    box-sizing: border-box;
    background-color: #0c0c0c;
}

/* 1. MENU LATERAL DE CATEGORIAS */
.menu-categorias {
    background-color: #1a1a1a;
    padding: 0;
    height: 100%;
    overflow-y: hidden; 
    display: flex;
    flex-direction: column;
}

.busca-categoria {
    padding: 20px 15px;
    border-bottom: 1px solid #333;
    position: relative;
}
.busca-categoria input {
    background: #333;
    border: none;
    padding: 10px 10px 10px 40px;
    border-radius: 5px;
    color: white;
    width: calc(100% - 60px);
}
.busca-categoria .fa-search {
    position: absolute;
    margin-top: 12px;
    margin-left: 10px;
    color: #999;
    font-size: 1em;
    pointer-events: none; 
}

/* Lista de Categorias (Área de Rolagem) */
.lista-categorias {
    flex-grow: 1; 
    overflow-y: auto; 
}

.item-categoria {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    text-decoration: none;
    color: #ccc;
    font-size: 1em;
    border-left: 5px solid transparent;
    transition: background-color 0.2s, color 0.2s;
}

.item-categoria:hover {
    background-color: #2a2a2a;
    color: white;
}

.item-categoria.ativo {
    background-color: #2a2a2a;
    color: white;
    border-left-color: #E50914; 
    font-weight: 600;
}

.contagem {
    color: #999;
    font-weight: normal;
    font-size: 0.9em;
}


/* 2. GRADE DE CANAIS (VISUALIZAÇÃO) */
.grade-canais-visualizacao {
    padding: 20px;
    overflow-y: auto; 
}

.grade-canais-visualizacao h1 {
    font-size: 1.8em;
    margin-top: 0;
    margin-bottom: 25px;
    padding-bottom: 5px;
    border-bottom: 2px solid #333;
}

.grid-logos {
    display: grid;
    /* 5 colunas por padrão, com ajuste automático */
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 15px;
}

/* LOGO-CANAL (Com Nome Abaixo) */
.logo-canal {
    display: flex; 
    flex-direction: column; 
    justify-content: flex-start;
    align-items: center;
    
    background-color: #1a1a1a;
    border-radius: 8px;
    padding: 15px 5px 10px 5px; 
    
    transition: transform 0.2s;
    text-decoration: none;
    text-align: center;
    color: white; 
    height: 100%; 
}

.logo-canal:hover {
    transform: scale(1.05);
    border: 1px solid #E50914;
}

.logo-canal img {
    width: 100%;
    max-width: 100px;
    height: auto;
    object-fit: contain;
    margin-bottom: 5px; 
}

/* NOME ABAIXO DO LOGO */
.nome-logo {
    font-size: 0.8em;
    color: #ccc; 
    margin-top: 5px;
    white-space: normal; 
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical;
    line-height: 1.2em; 
    min-height: 1.2em; 
}

/* REMOVENDO A BARRA DE ROLAGEM PADRÃO DO BROWSER NAS LISTAS */
.lista-canais-lateral::-webkit-scrollbar,
.guia-programacao-lateral::-webkit-scrollbar,
.lista-miniaturas::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

.lista-canais-lateral::-webkit-scrollbar-thumb,
.guia-programacao-lateral::-webkit-scrollbar-thumb,
.lista-miniaturas::-webkit-scrollbar-thumb {
    background-color: #555;
    border-radius: 10px;
}
.lista-canais-lateral::-webkit-scrollbar-track,
.guia-programacao-lateral::-webkit-scrollbar-track,
.lista-miniaturas::-webkit-scrollbar-track {
    background-color: #1a1a1a;
}


/* ========================================= */
/* ESTILOS DE NAVEGAÇÃO POR GÊNERO (ABAS/TABS) */
/* ========================================= */
.navegacao-generos {
    width: 100%;
    padding: 20px 40px 0 40px;
    background-color: #0c0c0c;
    border-bottom: 1px solid #222;
}

.lista-generos {
    display: flex;
    overflow-x: scroll;
    padding-bottom: 10px; 
    white-space: nowrap; 
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}
/* Esconder barra de rolagem no WebKit (Chrome, Safari) */
.lista-generos::-webkit-scrollbar {
    display: none;
}

.tab-genero {
    background: none;
    border: none;
    color: #999;
    padding: 10px 15px;
    margin-right: 15px;
    font-size: 1.1em;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s, border-bottom 0.3s;
    border-bottom: 3px solid transparent;
    flex-shrink: 0; 
}

.tab-genero:hover {
    color: white;
}

.tab-genero.ativo {
    color: #E50914; 
    font-weight: 700;
    border-bottom-color: #E50914;
}

/* ========================================= */
/* ESTILOS ESPECÍFICOS DE SÉRIES/FILMES */
/* ========================================= */
.secao-hero-series {
    background: 
        linear-gradient(to bottom, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0.6) 85%, rgba(0, 0, 0, 0.9) 100%),
        linear-gradient(to right, rgba(0, 0, 0, 0.7) 10%, rgba(0, 0, 0, 0.2) 50%, rgba(0, 0, 0, 0.0) 100%),
        url('stranger_things_5.png') center/cover no-repeat;
    
    height: 90vh; 
    display: flex;
    align-items: flex-end; 
    padding-bottom: 70px;
    padding-left: 40px;
    margin-top: 60px;
}
.secao-hero-filmes { 
    background: 
        linear-gradient(to bottom, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0.6) 85%, rgba(0, 0, 0, 0.9) 100%),
        linear-gradient(to right, rgba(0, 0, 0, 0.7) 10%, rgba(0, 0, 0, 0.2) 50%, rgba(0, 0, 0, 0.0) 100%),
        url('capa_destaque_filme.png') center/cover no-repeat;
    
    height: 90vh; 
    display: flex;
    align-items: flex-end; 
    padding-bottom: 70px;
    padding-left: 40px;
    margin-top: 60px;
}

.conteudo-destaque {
    max-width: 600px;
    color: white;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.9);
}

.titulo-serie {
    font-size: 4.5em;
    margin: 0 0 10px 0;
    line-height: 1.1;
}

.genero-serie {
    font-size: 1.4em;
    color: #ccc;
    margin-bottom: 25px;
}

.btn-principal, .btn-secundario {
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    margin-right: 15px;
    transition: opacity 0.3s;
}

.btn-principal {
    background-color: #E50914; 
    color: white;
}

.btn-secundario {
    background-color: rgba(109, 109, 110, 0.7); 
    color: white;
}

/* Estilos da Grade de Conteúdo (Séries e Filmes) */
.secao-catalogo-series,
.secao-catalogo-filmes {
    padding: 40px 40px;
    min-height: 50vh;
}

.grid-catalogo {
    display: grid;
    /* Garante que caibam entre 5 e 6 miniaturas de 200px de largura por linha (Desktop) */
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 25px;
}

.grid-catalogo .miniatura {
    width: 100%; 
    margin-right: 0;
    transform: none; 
    transition: transform 0.2s;
    flex-shrink: 1;
}

.grid-catalogo .miniatura:hover {
    transform: scale(1.03); 
    z-index: 1;
}

/* ========================================= */
/* ESTILOS DO MODAL DE LOGIN SIMPLIFICADO (HARMONIZADO) */
/* ========================================= */

.modal-backdrop {
    /* Fundo escuro que cobre toda a tela */
    display: none; /* Começa escondido */
    position: fixed;
    z-index: 2000; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9); /* Escuro, transparente */
    justify-content: center; /* Centraliza horizontalmente */
    align-items: center; /* Centraliza verticalmente */
}

.modal-content {
    background-color: #1a1a1a; /* Cor de fundo do site */
    padding: 35px 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    max-width: 450px; /* Largura padrão */
    width: 90%;
    position: relative;
    text-align: center;
    border: 1px solid #333; /* Adiciona uma borda sutil */
}

.fechar-modal {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    background: none;
    border: none;
    cursor: pointer;
}

.fechar-modal:hover,
.fechar-modal:focus {
    color: white;
    text-decoration: none;
    cursor: pointer;
}

.modal-titulo {
    color: #E50914; /* Vermelho padrão */
    font-size: 1.8em;
    margin-bottom: 5px;
}

.modal-subtitulo {
    color: #ccc;
    font-size: 1em;
    margin-bottom: 25px;
}

/* ESTILOS PARA GRUPOS DE INPUT (LABEL + CAMPO) */
.modal-content .input-group {
    position: relative;
    margin-bottom: 20px;
    text-align: left; 
}

.modal-content .input-group label {
    display: block; 
    color: #ccc;
    font-size: 0.9em;
    margin-bottom: 5px;
    font-weight: bold;
}

.modal-content .input-group input[type="text"],
.modal-content .input-group input[type="email"],
.modal-content .input-group input[type="password"] {
    width: 100%; /* Ajusta para a largura total do grupo */
    padding: 15px 15px; 
    border: 1px solid #444; 
    border-radius: 8px; 
    background-color: #2a2a2a; 
    color: white;
    font-size: 1em;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.modal-content .input-group input:focus {
    border-color: #E50914; 
    box-shadow: 0 0 0 2px rgba(229, 9, 20, 0.3); 
    outline: none;
}

/* Botão de Envio (Estilo principal) */
.modal-content .btn-enviar {
    width: 100%;
    padding: 18px; /* Mais padding */
    background-color: #E50914;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.2em; /* Texto maior */
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 15px;
}

.modal-content .btn-enviar:hover:not(:disabled) {
    background-color: #ff0017;
    transform: translateY(-2px); 
}

.modal-content .btn-enviar:disabled {
    background-color: #555;
    cursor: not-allowed;
    opacity: 0.7;
}

.modal-content .btn-enviar i {
    margin-right: 10px;
}

/* Mensagem de Status (Ajuste para erros) */
.status-mensagem {
    margin-top: 15px;
    font-weight: bold;
    color: #ccc; /* Cor padrão */
    min-height: 1.2em; /* Evita que o layout pule */
}

.status-mensagem.erro {
    color: #ff4d4d; /* Vermelho mais vibrante para erro */
    background-color: rgba(255, 77, 77, 0.1); /* Fundo sutil */
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #E50914;
}

.aviso-privacidade {
    font-size: 0.85em;
    color: #888;
    margin-top: 25px;
}

/* ========================================= */
/* RESPONSIVIDADE (Ajustes para Telas Pequenas/Celular) */
/* ========================================= */
@media (max-width: 768px) {
    
    /* 1. CABEÇALHO (Manter) */
    .cabecalho-principal {
        padding: 10px 20px;
        width: calc(100% - 40px);
        flex-wrap: wrap; 
        height: auto; 
    }
    
    .menu-navegacao {
        display: flex; 
        width: 100%; 
        justify-content: space-between; 
        order: 3; 
        margin-top: 10px;
        padding: 0 5px; 
    }

    .menu-navegacao a {
        font-size: 12px; 
        margin: 0; 
    }

    .logo {
        font-size: 22px;
    }

    .acoes-usuario {
        order: 2; 
    }

    .acoes-usuario a:nth-child(1) span, 
    .acoes-usuario a:nth-child(2) span { 
        display: none; 
    }
    
    /* 2. DESTAQUE AO VIVO (INDEX.HTML) (Manter) */
    .secao-hero-live {
        height: 50vh; 
        padding-left: 20px;
        margin-top: 100px; 
    }
    .player-miniatura .fa-star {
        font-size: 40px;
    }
    .titulo-canal {
        font-size: 2.5em; 
    }
    .botoes-live button {
        padding: 10px 15px;
        font-size: 1em;
        margin-right: 10px;
    }

    /* 3. & 4. CARROSSEL (INDEX.HTML) (Manter) */
    .secoes-carrossel {
        padding-top: 30px;
    }
    .carrossel {
        padding-left: 20px;
    }
    .carrossel h2 {
        font-size: 1.3em;
    }
    .miniatura {
        width: 150px; 
    }
    .miniatura-canal {
        width: 140px;
        height: 80px;
    }

    /* ************************************** */
    /* RESPONSIVIDADE DO CATÁLOGO DE CANAIS */
    /* ************************************** */
    .secao-catalogo {
        grid-template-columns: 1fr;
        padding: 100px 0 0 0; 
        height: auto; 
    }
    
    /* MENU DE CATEGORIAS (CANAIS) */
    .menu-categorias {
        flex-direction: row; 
        overflow-x: scroll; 
        height: auto;
        padding-bottom: 0;
        background-color: transparent;
        border-bottom: 1px solid #333;
        order: 2;
    }
    
    /* REMOVIDO: Regra display: none para busca-categoria AQUI */
    .busca-categoria {
        display: block !important; 
        padding: 10px 20px; 
        border-bottom: none; 
        order: 1; 
    }
    .busca-categoria input {
        width: calc(100% - 40px);
    }

    .lista-categorias {
        display: flex; 
        flex-grow: 0;
        overflow-x: visible; 
        padding-left: 20px;
    }
    .item-categoria {
        padding: 10px 15px;
        flex-shrink: 0; 
        border-left: none; 
        border-bottom: 2px solid transparent;
        margin-right: 5px;
    }
    .item-categoria.ativo {
        border-left-color: transparent;
        border-bottom-color: #E50914; 
        background-color: transparent;
    }
    .contagem {
        display: none; 
    }
    
    .grade-canais-visualizacao {
        padding: 20px;
        height: auto;
        order: 3;
    }
    .grid-logos {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
    .logo-canal img {
        max-width: 80px;
    }
    .nome-logo {
        font-size: 0.7em;
    }
    
    /* **************************************************** */
    /* RESPONSIVIDADE DE FILMES E SÉRIES */
    /* **************************************************** */
    
    /* 1. Grade Principal */
    .secao-catalogo-series,
    .secao-catalogo-filmes {
        padding: 20px; 
    }
    
    /* 2. Menu de Gêneros */
    .navegacao-generos {
        padding: 15px 0 0 0; 
        overflow-x: scroll;
        -webkit-overflow-scrolling: touch; 
        border-bottom: none !important;
    }

    .navegacao-generos::-webkit-scrollbar {
        display: none;
    }

    .navegacao-generos .lista-generos {
        padding-left: 20px; 
        padding-right: 20px;
        flex-wrap: nowrap;
    }
    
    /* 4. Hero Section */
    .secao-hero-series,
    .secao-hero-filmes {
        padding-left: 20px;
        padding-bottom: 50px;
        height: 60vh;
        margin-top: 100px; 
    }
    .titulo-serie {
        font-size: 2.8em;
    }
    .genero-serie {
        font-size: 1em;
    }

    /* 5. Ajuste da Grade de Séries/Filmes */
    .grid-catalogo {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); 
    }

    /* 6. RODAPÉ */
    .barra-inferior {
        flex-direction: column;
        align-items: center;
        padding: 15px;
    }
    .link-iptv {
        margin: 5px 0;
        font-size: 1em;
    }
}