/* css/style.css - TV Difusão (Estilos Globais e Responsivos) */

:root {
    --bg-color: #0d0d0d;
    --text-color: #ffffff;
    --accent-red: #cc0000;
    --border-color: #222222;
    --card-bg: #161616;
    --text-muted: #aaaaaa;
}

[data-theme="light"] {
    --bg-color: #f4f4f5;
    --text-color: #111111;
    --border-color: #e4e4e7;
    --card-bg: #ffffff;
    --text-muted: #666666;
}

*, *::before, *::after { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; 
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    background-color: var(--bg-color); 
    color: var(--text-color); 
    transition: background 0.3s, color 0.3s; 
    min-height: 100vh; 
    display: flex; 
    flex-direction: column; 
}

a, a:visited, a:active { color: var(--text-color); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-red); }

/* TRAVA DE SEGURANÇA GLOBAL PARA A LOGO (NUNCA FICA GIGANTE EM NENHUMA PÁGINA) */
header img, 
.logo-area img, 
.header-left img, 
img.header-logo {
    max-height: 50px !important;
    height: 50px !important;
    width: auto !important;
    display: block;
    object-fit: contain;
}

/* CABEÇALHO PADRONIZADO (3 COLUNAS: LOGO ESQUERDA | TÍTULO CENTRO | AÇÕES DIREITA) */
header { padding: 15px 20px; border-bottom: 3px solid var(--accent-red); background: #000000; }
.header-top { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; gap: 15px; }
.header-left { flex: 1; display: flex; justify-content: flex-start; align-items: center; }
.header-center { flex: 1; text-align: center; }
.header-right { flex: 1; display: flex; justify-content: flex-end; align-items: center; gap: 15px; }

.channel-title { font-size: 24px; font-weight: 900; letter-spacing: 1.5px; color: #ffffff; text-transform: uppercase; white-space: nowrap; }
.channel-title span { color: var(--accent-red); }
.link-seu-programa { font-size: 12px; font-weight: bold; color: var(--accent-red); white-space: nowrap; }

.theme-toggle-btn { background: #222; color: #fff; border: 1px solid #444; padding: 6px 12px; cursor: pointer; border-radius: 4px; font-size: 11px; font-weight: bold; }

/* MENU DE NAVEGAÇÃO */
nav.menu-barra { background: #000000; padding: 0; border-bottom: 1px solid var(--border-color); position: sticky; top: 0; z-index: 1000; }
nav.menu-barra ul { display: flex; justify-content: center; list-style: none; flex-wrap: wrap; max-width: 1280px; margin: 0 auto; }
nav.menu-barra ul li a { color: #fff !important; text-decoration: none; padding: 14px 16px; font-size: 12px; font-weight: 700; text-transform: uppercase; display: block; border-bottom: 3px solid transparent; transition: 0.2s; }
nav.menu-barra ul li a:hover, nav.menu-barra ul li a.active { border-bottom-color: var(--accent-red); background: rgba(204,0,0,0.15); }
.menu-btn-mobile { display: none; }

.container { max-width: 1200px; margin: 25px auto; padding: 0 15px; flex: 1; width: 100%; box-sizing: border-box; }

/* ESTRUTURA DA TV AO VIVO & CHAT */
.layout-tv-live { display: flex; gap: 20px; flex-wrap: wrap; width: 100%; }
.area-player { flex: 2; min-width: 320px; position: relative; overflow: hidden; border-radius: 8px; }
.area-chat { flex: 1; min-width: 300px; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 8px; display: flex; flex-direction: column; height: 580px; }

/* PLAYER E EPG */
.player-wrapper { position: relative; width: 100%; background: #000; border-radius: 8px; overflow: hidden; border: 2px solid var(--border-color); box-shadow: 0 10px 30px rgba(0,0,0,0.8); margin-bottom: 25px; }
.video-js-custom { width: 100% !important; height: auto !important; aspect-ratio: 16/9; }
.player-controls-info { background: var(--card-bg); padding: 15px 20px; border-radius: 6px; border: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.badge-live { background: var(--accent-red); color: #fff; padding: 4px 10px; font-size: 11px; font-weight: bold; border-radius: 3px; display: inline-flex; align-items: center; gap: 5px; text-transform: uppercase; }
.badge-live::before { content: ""; width: 8px; height: 8px; background: #fff; border-radius: 50%; display: inline-block; animation: blink 1s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.2; } }

/* OVERLAY GUIA EPG */
#epgDrawer { position: absolute; top: 0; bottom: 0; right: -100%; width: 80%; max-width: 450px; background: rgba(0,0,0,0.95); z-index: 90; transition: right 0.4s ease, visibility 0.4s ease; padding: 20px; color: #fff; border-left: 2px solid var(--accent-red); overflow-y: auto; visibility: hidden; }
#epgDrawer.open { right: 0; visibility: visible; }
.btn-epg-toggle { background: #222; color: #fff; border: 1px solid var(--accent-red); padding: 8px 14px; border-radius: 4px; font-size: 12px; font-weight: bold; cursor: pointer; }

/* BANNER APOIADOR */
#bannerApoiador { position: absolute; top: 15px; left: 15px; z-index: 99; background: rgba(204, 0, 0, 0.95); color: #fff; padding: 10px 18px; border-radius: 6px; font-weight: 900; font-size: 14px; border: 2px solid #fff; box-shadow: 0 4px 15px rgba(0,0,0,0.8); display: none; transition: all 0.5s ease; }

/* CHAT E REDES SOCIAIS */
.chat-header { padding: 12px; background: #000; border-bottom: 1px solid var(--border-color); font-weight: bold; font-size: 13px; color: #fff; display: flex; justify-content: space-between; align-items: center; }
.chat-body { flex: 1; padding: 12px; overflow-y: auto; font-size: 13px; color: var(--text-color); }
.chat-msg { margin-bottom: 10px; line-height: 1.4; border-bottom: 1px solid var(--border-color); padding-bottom: 6px; }
.chat-msg strong { color: var(--accent-red); }
.chat-footer { padding: 10px; background: #000; border-top: 1px solid var(--border-color); }

.share-bar { display: flex; gap: 8px; margin: 15px 0; flex-wrap: wrap; }
.btn-share { padding: 8px 12px; border-radius: 4px; color: #fff !important; font-size: 11px; font-weight: bold; border: none; cursor: pointer; text-decoration: none; }

/* CARDS E FORMULÁRIOS */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.card-item { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 6px; overflow: hidden; transition: transform 0.3s, border-color 0.3s; }
.card-item:hover { transform: translateY(-4px); border-color: var(--accent-red); }
.card-item img { width: 100%; height: 180px; object-fit: cover; display: block; }
.card-body { padding: 15px; }
.card-body h3 { font-size: 16px; margin-bottom: 8px; color: var(--text-color); }
.card-body p { font-size: 13px; color: var(--text-muted); line-height: 1.5; margin-bottom: 10px; }

.form-container { background: var(--card-bg); padding: 30px; border-radius: 8px; border: 1px solid var(--border-color); max-width: 800px; margin: 0 auto; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: bold; margin-bottom: 6px; color: var(--text-color); }
.form-control { width: 100%; padding: 12px; background: var(--bg-color); color: var(--text-color); border: 1px solid var(--border-color); border-radius: 4px; font-size: 14px; outline: none; }
.form-control:focus { border-color: var(--accent-red); }
.btn-submit { background: var(--accent-red); color: #fff; padding: 14px 25px; border: none; font-weight: bold; font-size: 15px; border-radius: 4px; cursor: pointer; width: 100%; transition: opacity 0.2s; }
.btn-submit:hover { opacity: 0.9; }

/* RODAPÉ PADRONIZADO (3 COLUNAS: TEXTO ESQUERDA | LOGO CENTRO | LINKS DIREITA) */
footer { background: #000000; color: #888888; padding: 20px; margin-top: 50px; font-size: 13px; border-top: 4px solid var(--accent-red); }
.footer-container { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; }
.footer-left { flex: 1; text-align: left; }
.footer-center { flex: 1; text-align: center; }
.footer-center img.footer-logo { max-height: 48px !important; height: 48px !important; width: auto !important; display: inline-block; opacity: 0.95; transition: opacity 0.2s; object-fit: contain; }
.footer-center img.footer-logo:hover { opacity: 1; }
.footer-right { flex: 1; text-align: right; }
.footer-right a { color: #aaaaaa !important; text-decoration: none; margin: 0 5px; }
.footer-right a:hover { color: var(--accent-red) !important; }

@media (max-width: 992px) {
    .header-top { flex-direction: column; text-align: center; gap: 10px; }
    .header-left, .header-center, .header-right { justify-content: center; text-align: center; width: 100%; }
    .menu-btn-mobile { display: block !important; background: #000; color: #fff; padding: 14px; width: 100%; border: none; font-weight: bold; cursor: pointer; text-transform: uppercase; }
    nav.menu-barra ul { display: none; flex-direction: column; width: 100%; }
    nav.menu-barra ul.active { display: flex; }
    .footer-container { flex-direction: column; text-align: center; }
    .footer-left, .footer-center, .footer-right { text-align: center; width: 100%; }
}