/* --- Variáveis CSS (Modo Dark Permanente) --- */
:root {
    /* Paleta Cinema/Noturna */
    --bg-color: #121212;
    --text-color: #e0e0e0;       /* Texto principal */
    --text-muted: #a0a0a0;       /* Texto secundário/descrições */
    --header-bg: #1a1a1a;
    --card-bg: #1e1e1e;
    
    /* Cores da Marca */
    --primary-color: #3a86ff;
    --primary-hover: #60a5fa;
    --accent-color: #e63946;
    
    /* Estrutura */
    --border-color: #333333;
    --shadow: 0 4px 15px rgba(0,0,0,0.5);
    --container-width: 1100px;
    --transition: all 0.3s ease;
}

/* --- Reset & Base --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    scroll-behavior: smooth;
}
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* Tipografia Global */
h1, h2, h3, h4, strong { color: #fff; }
p { color: var(--text-muted); }

/* --- Layout --- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}
html { scroll-padding-top: 130px; }

main {
    flex: 1;
    /* !important mantém o layout fixo e ignora scripts externos */
    padding-top: 10px !important; 
    padding-bottom: 40px;
}

/* --- Smart Sticky Header --- */
.main-header {
    position: sticky;
    top: 0;
    width: 100%;
    height: 70px;
    background-color: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    z-index: 1000;
    
    /* Animação para esconder/mostrar */
    transition: transform 0.3s ease-in-out;
}

/* Classe adicionada pelo JS para esconder o menu */
.main-header.hidden {
    transform: translateY(-100%); /* Move o menu para cima (fora da tela) */
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}
/* Força logo a respeitar tamanho do header */
.logo img { 
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.1)); 
    height: 60px !important; 
    width: auto;
}

/* --- Navegação e Menu --- */
.nav-menu { display: flex; gap: 25px; align-items: center; }

/* ESTILO DO BOTÃO "CANAIS" */
.nav-link { 
    font-weight: 700;
    font-size: 1.1rem;          
    cursor: pointer; 
    color: #fff; 
    
    /* Visual de Botão */
    background-color: rgba(255, 255, 255, 0.05);
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-link:hover { 
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(58, 134, 255, 0.3);
}

/* --- Lógica do Dropdown (Clique) --- */
.dropdown { position: relative; }

/* Remove o hover automático */
.dropdown:hover .dropdown-content { display: none; } 

/* Ativa somente com clique (classe via JS) */
.dropdown.active .dropdown-content { 
    display: block; 
    animation: fadeIn 0.2s ease;
}

/* Caixa do Menu */
.dropdown-content {
    display: none;
    position: absolute;
    top: 120%; /* Distância do botão */
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--card-bg);
    min-width: 180px;
    box-shadow: var(--shadow);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 10px 0;
    z-index: 1001;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, 10px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

.dropdown-content li a {
    display: block;
    padding: 12px 20px;
    white-space: nowrap;
    color: var(--text-color);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.dropdown-content li a:hover {
    background-color: rgba(255,255,255,0.05);
    color: var(--primary-color);
}

/* --- Hero Section (Home) --- */
.hero {
    text-align: center;
    margin-bottom: 10px;
    padding: 10px 0 30px 0;
}
.hero h1 { 
    font-size: 2.5rem; 
    margin-bottom: 15px;
    line-height: 1.1; 
}
.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
}

/* --- Títulos de Seção --- */
.section-title {
    border-left: 5px solid var(--primary-color);
    padding-left: 15px;
    margin-bottom: 20px;
}

/* --- Cards de Canais --- */
.grid-channels {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
}
.channel-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: transform 0.2s, border-color 0.2s;
    display: block;
}
.channel-card:hover { 
    transform: translateY(-5px); 
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(58, 134, 255, 0.1); 
}
.channel-card a { display: block; }

/* Placeholder do Logo do Canal */
.channel-logo-placeholder {
    background: linear-gradient(135deg, #2a2a2a 0%, #1f1f1f 100%);
    height: 140px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    font-weight: bold;
    color: #fff;
    font-size: 1.5rem;
}

.channel-card h3 { margin-bottom: 5px; font-size: 1.1rem; }
.channel-card p { font-size: 0.85rem; color: var(--text-muted); }
.btn-text-link {
    display: inline-block;
    margin-top: 10px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
}

/* --- Box de Informação (SEO Text) --- */
.info-box {
    margin-top: 30px;
    padding: 40px;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 50px; /* Margem extra para segurança */
}
.info-box p { margin-top: 15px; }

/* --- Player Pages (Cabeçalho do Canal) --- */
.channel-header {
    margin-bottom: 25px;
    text-align: center;
}
.channel-header h1 { font-size: 2rem; margin-bottom: 10px; }

/* --- Video Container --- */
.video-container {
    background: #000;
    width: 100%;
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 25px;
    box-shadow: 0 0 20px rgba(0,0,0,0.8);
    border: 1px solid #333;
}
.video-container iframe {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%; border: 0;
}

/* --- Controles do Player --- */
.player-controls { margin-top: 20px; display: flex; gap: 15px; flex-wrap: wrap; }
.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-size: 0.95rem;
    flex: 1;
    color: #fff;
}
.btn-primary { background: var(--primary-color); box-shadow: 0 4px 10px rgba(58, 134, 255, 0.2); }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-2px); }
.btn-warning { background: transparent; border: 1px solid var(--accent-color); color: var(--accent-color); }
.btn-warning:hover { background: var(--accent-color); color: #fff; }

/* --- Listas de Programação --- */
.program-list {
    margin-top: 15px;
    margin-left: 20px;
    list-style: disc;
    color: var(--text-muted);
}
.program-list li { margin-bottom: 5px; }

/* --- Footer --- */
.main-footer {
    background-color: var(--header-bg);
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    text-align: center;
    font-size: 0.9rem;
    
    /* Espaçamento superior para desgrudar do conteúdo */
    margin-top: 70px !important;
}
.footer-links { margin-bottom: 20px; display: flex; justify-content: center; gap: 25px; flex-wrap: wrap; }
.footer-links a { font-weight: 500; color: #aaa; }
.footer-links a:hover { color: var(--primary-color); }

/* --- Mobile --- */
@media (max-width: 768px) {
    .header-content { padding: 0 15px; }
    .nav-menu { gap: 15px; }
    .btn-action { width: 100%; flex: 100%; }
}

/* --- Breadcrumbs (Trilha de Navegação) --- */
.breadcrumbs {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    display: flex;
    gap: 8px;
    align-items: center;
}
.breadcrumbs a { color: var(--text-muted); transition: color 0.2s; }
.breadcrumbs a:hover { color: var(--primary-color); text-decoration: underline; }
.breadcrumbs span { color: var(--text-color); font-weight: 600; }

/* --- Tabela de Programação (Estilo Acordeão) --- */
.schedule-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 40px;
}
.schedule-day {
    border-bottom: 1px solid var(--border-color);
}
.schedule-day:last-child { border-bottom: none; }

.schedule-day summary {
    padding: 15px;
    cursor: pointer;
    font-weight: 700;
    color: #fff;
    list-style: none; /* Remove a setinha padrão feia */
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.02);
    transition: background 0.2s;
}
.schedule-day summary:hover { background: rgba(255,255,255,0.05); }
.schedule-day summary::after { content: '+'; font-size: 1.2rem; color: var(--primary-color); }
.schedule-day[open] summary::after { content: '-'; }

.schedule-list {
    padding: 0;
    margin: 0;
    background: rgba(0,0,0,0.2);
}
.schedule-item {
    display: flex;
    padding: 10px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 0.9rem;
}
.schedule-item:last-child { border-bottom: none; }
.schedule-time {
    font-weight: 700;
    color: var(--primary-color);
    width: 70px; /* Largura fixa para alinhar */
    flex-shrink: 0;
}
.schedule-name { color: var(--text-color); }
/* Ajuste para centralizar a imagem dentro do card */
.channel-card img {
    height: 100px; /* Defina um tamanho fixo para sua logo */
    width: auto;
    margin: 0 auto 15px auto; /* Centraliza e adiciona margem inferior */
    display: block; /* Garante que o margin: auto funcione */
}

/* --- Redução do Player no Desktop (Somente o Container do Vídeo) --- */
@media (min-width: 769px) {
    /* Define o tamanho máximo e centraliza o container do vídeo */
    .video-container {
        max-width: 800px; 
        margin-left: auto; 
        margin-right: auto;
        margin-top: 20px;
        margin-bottom: 20px;
    }
}
/* FAQ Semântico */
.faq-item {
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
}
.faq-item summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--primary-color);
    list-style: none;
    display: flex;
    justify-content: space-between;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; color: #fff; }
.faq-item[open] summary::after { content: '-'; }
.faq-item p { margin-top: 10px; color: var(--text-muted); }

/* --- Player Externo (Correção) --- */
.external-player-link {
    display: block;
    position: absolute; /* Garante que cubra tudo */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    text-decoration: none;
    z-index: 10; /* Fica acima de tudo */
    background: #000; /* Fundo preto caso a imagem falhe */
}

.external-player-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5; /* Opacidade fixa, melhor para leitura */
}

.external-player-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 90%;
    z-index: 20;
    pointer-events: none; /* O clique passa pelo texto e pega no link atrás */
}

/* O Botão Vermelho estilo YouTube */
.yt-play-btn {
    width: 68px;
    height: 48px;
    background-color: #ff0000;
    border-radius: 25% / 20%; /* Curva suave igual do YouTube */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

/* O Triângulo Branco */
.yt-play-icon {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 0 10px 16px;
    border-color: transparent transparent transparent #ffffff;
}

.external-player-title {
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.9);
    font-size: 1.3rem;
    margin: 0;
    font-weight: 700;
}

.external-player-text {
    color: #eee;
    font-size: 0.95rem;
    margin-top: 8px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

/* --- Grade de Programação (Grid Layout) --- */
.program-highlight {
    /* Adiciona o destaque na lateral esquerda */
    border-left: 4px solid var(--primary-color);
}

.program-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 25px;
}

.program-column h3 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.program-list {
    list-style: none;
    padding: 0;
}

.program-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.95rem;
}

.program-list li:last-child {
    border-bottom: none;
}

.program-footer {
    margin-top: 30px;
    text-align: center;
}

/* Utilitário de espaçamento para as Seções */
.section-spacing {
    margin-top: 40px;
}
/* --- Utilitários de Limpeza (Fim dos estilos inline) --- */
.text-desc-player {
    margin-top: 20px;
}

.content-subtitle {
    margin-top: 20px;
    color: #fff;
}

.faq-title {
    color: #fff;
    margin-bottom: 20px;
}

.faq-text {
    font-size: 0.95rem;
}

/* Espaçamento padrão para seções que não tinham classe */
.section-gap {
    margin-top: 40px;
}
