/* style.css */

/* === RESET E BASE === */
* { box-sizing: border-box; }

body {
    background-color: #000;
    color: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0; padding: 0;
    overflow: hidden; /* Evita scroll na tela principal */
}

/* === NOVA TELA DE LOGIN PROFISSIONAL (Split Screen) === */
.login-wrapper {
    display: flex;
    width: 100%;
    height: 100vh;
    background: #000;
}

/* Lado Esquerdo (Info/Imagem) */
.login-info {
    flex: 1.2;
    /* Imagem de fundo de cinema/TV */
    background: url('https://img.freepik.com/free-photo/movie-background-collage_23-2149876004.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px;
    color: white;
}
.info-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.95) 10%, rgba(200,0,0,0.6) 100%);
    z-index: 1;
}
.info-content {
    position: relative; z-index: 2; max-width: 500px;
}
.login-info h1 { font-size: 4rem; font-style: italic; margin-bottom: 20px; line-height: 1; text-shadow: 0 5px 15px rgba(0,0,0,0.5); }
.login-info h3 { font-size: 2rem; margin-bottom: 15px; font-weight: 300; }
.login-info p { font-size: 1.1rem; color: #ccc; margin-bottom: 30px; line-height: 1.6; }
.feature-list { display: flex; flex-direction: column; gap: 15px; }
.feature-list span { font-size: 1.1rem; display: flex; align-items: center; gap: 10px; font-weight: 500; }
.feature-list i { color: #ff6600; }

/* Lado Direito (Formulário) */
.login-form-container {
    flex: 0.8;
    background: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
}

.login-box {
    width: 100%;
    max-width: 400px;
    padding: 40px;
}
.mobile-logo { display: none; font-size: 2.5rem; font-weight: bold; font-style: italic; text-align: center; margin-bottom: 30px; }

.login-box h2 { font-size: 1.8rem; margin-bottom: 5px; color: #fff; }
.subtitle { color: #666; font-size: 0.9rem; margin-bottom: 30px; }

/* Inputs Modernos */
.input-group {
    position: relative;
    margin-bottom: 20px;
}
.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 1.1rem;
}
.login-box input, .login-box select {
    width: 100%;
    padding: 15px 15px 15px 45px; /* Espaço para o ícone */
    background: #151515;
    border: 1px solid #333;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}
.login-box select { cursor: pointer; appearance: none; }
.login-box input:focus, .login-box select:focus {
    border-color: #ff6600;
    background: #1a1a1a;
    box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.2);
}

/* Botão Entrar */
.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(90deg, #ff6600, #ff3d00);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex; justify-content: center; align-items: center; gap: 10px;
}
.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 61, 0, 0.4);
}

.login-footer {
    margin-top: 40px; text-align: center; font-size: 0.8rem; color: #444;
}

#login-status { margin-top: 20px; font-weight: bold; text-align: center; }


/* === DASHBOARD === */
.dashboard-container { 
    height: 100vh; 
    padding: 20px 30px; 
    display: flex; 
    flex-direction: column; 
    background: radial-gradient(circle at top right, #111, #000 80%);
}

/* Header */
.top-bar { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 15px; 
}
.logo-area h1 { margin: 0; font-style: italic; letter-spacing: -1px; }
.info-area, .search-area { color: #aaa; font-size: 0.9rem; }
.icons-area i { 
    cursor: pointer; font-size: 1.2rem; transition: color 0.3s; 
}
.icons-area i:hover { color: #ff6600; }

/* === GRID PRINCIPAL === */
.main-grid {
    display: grid;
    grid-template-columns: 0.6fr 1.6fr 1fr 0.7fr; 
    gap: 15px; 
    flex-grow: 1;
    height: 100%;
}

/* Estilo Geral dos Cards */
.card {
    position: relative; 
    border-radius: 12px; 
    overflow: hidden; 
    cursor: pointer; 
    border: 1px solid #222; 
    background: #0a0a0a;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}
.card:hover { 
    transform: translateY(-5px); 
    border-color: #555; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.7);
    z-index: 10;
}

/* COLUNA 1: Live TV */
.live-tv { 
    grid-row: span 2; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
}
.live-tv .card-bg { 
    position: absolute; top:0; left:0; width:100%; height:100%; 
    background-size: cover; background-position: center;
    opacity: 0.7; 
}
.live-tv .overlay-gradient {
    position: absolute; top:0; left:0; width:100%; height:100%;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.3) 100%);
}
.live-tv .content-text { 
    position: relative; z-index: 2; 
    text-align: center; 
    margin-bottom: 20px;
}
.live-tv h3 { margin-top: 15px; font-weight: 800; letter-spacing: 1px; font-size: 1.1rem; }

.footer-card { 
    position: absolute; bottom:0; width:100%; 
    background: rgba(0,0,0,0.85); 
    padding: 8px 10px; 
    font-size: 0.7rem; 
    color: #ccc;
    z-index: 3; 
    display: flex; justify-content: space-between; align-items: center;
    border-top: 1px solid #333;
}

/* COLUNA 2: Filmes e Séries */
.col-middle { 
    display: flex; flex-direction: column; gap: 15px; height: 100%; 
}
.col-middle .card { 
    flex: 1; display: flex; flex-direction: row; 
}

.media-bg {
    flex: 1.6; 
    background-size: cover;
    background-position: center center; 
    background-repeat: no-repeat;
    position: relative;
    box-shadow: inset -80px 0 100px -20px rgba(0,0,0,1); 
    background-color: #111; 
}

.side-panel { 
    width: 35%; 
    display: flex; flex-direction: column; 
    align-items: center; justify-content: center; 
    color: white;
    text-align: center;
    padding: 10px;
    z-index: 2; 
}
.side-panel h3 { font-size: 1.2rem; margin: 0 0 5px 0; font-weight: 900; }
.side-panel i { margin-bottom: 8px; opacity: 0.9; }
.side-panel .sub-text { font-size: 0.65rem; text-transform: uppercase; opacity: 0.8; letter-spacing: 1px; }

.side-panel.red { background: linear-gradient(135deg, #b71c1c, #7f0000); }
.side-panel.orange { background: linear-gradient(135deg, #ef6c00, #a83f00); }

/* COLUNA 3: Banner */
.poster img { width: 100%; height: 100%; object-fit: cover; }

/* COLUNA 4: Menu */
.col-right { 
    display: flex; flex-direction: column; gap: 15px; height: 100%; 
}
.btn-menu {
    flex: 1; 
    border-radius: 12px; 
    display: flex; flex-direction: column; 
    align-items: center; 
    justify-content: center;
    padding: 10px; 
    font-weight: bold; 
    font-size: 0.8rem; 
    cursor: pointer; 
    transition: 0.2s;
    text-align: center;
    gap: 8px;
    border: 1px solid rgba(255,255,255,0.05);
}
.btn-menu:hover { transform: translateX(-5px); filter: brightness(1.2); }
.btn-menu.purple { background: linear-gradient(135deg, #7c4dff, #6200ea); }
.btn-menu.blue { background: linear-gradient(135deg, #00b0ff, #0277bd); }
.btn-menu.green { background: linear-gradient(135deg, #00e676, #00c853); }
.btn-menu i { font-size: 1.5rem; margin: 0; }
.btn-menu span { letter-spacing: 0.5px; }

.bottom-bar {
    margin-top: 10px; display: flex; justify-content: space-between; color: #555; font-size: 0.75rem;
}


/* === CONTENT MODAL (CATEGORIAS ESTILO SMARTERS V3) === */
.content-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: #080808; z-index: 100; display: flex; flex-direction: column;
    /* Imagem de fundo opcional para a tela de categorias */
    background-image: url('https://img.freepik.com/premium-photo/empty-modern-studio-room-background-with-spotlight-effect-mixing-red-blue-color_145677-227.jpg');
    background-size: cover;
    background-position: center;
}
/* Máscara escura sobre a imagem de fundo */
.content-modal::before {
    content: ''; position: absolute; top:0; left:0; width:100%; height:100%;
    background: rgba(0,0,0,0.92); z-index: -1;
}

.modal-header { 
    padding: 15px 25px; background: rgba(20,20,20,0.95); 
    display: flex; align-items: center; gap: 20px; 
    border-bottom: 1px solid #333; 
}
.back-btn { 
    background: #333; color: white; border: none; padding: 10px 20px; 
    cursor: pointer; border-radius: 5px; font-weight: bold;
}
.back-btn:hover { background: #555; }

.modal-body { 
    flex: 1; overflow-y: auto; padding: 25px; 
    scrollbar-width: thin; scrollbar-color: #0097a7 #111;
}

/* Grade de Categorias (2 Colunas - Barras) */
.grid-list { 
    display: grid; 
    grid-template-columns: 1fr 1fr; /* Duas colunas */
    gap: 15px; 
}

/* Estilo da Barra de Categoria */
.category-bar {
    background: rgba(255, 255, 255, 0.08); /* Translúcido */
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 5px solid transparent;
    border-radius: 4px;
}

/* Hover Azul (Teal) igual Smarters */
.category-bar:hover {
    background: rgba(0, 151, 167, 0.9);
    border-left: 5px solid #ffffff;
    transform: translateX(5px);
}

.cat-left {
    display: flex; align-items: center; gap: 15px; overflow: hidden;
}
.cat-icon {
    font-size: 1.2rem; color: #eee; min-width: 30px; text-align: center;
    border: 1px solid rgba(255,255,255,0.2); border-radius: 4px; padding: 5px;
}
.cat-name {
    font-size: 0.95rem; font-weight: 600; text-transform: uppercase; color: #fff;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cat-right { color: #888; }
.category-bar:hover .cat-right { color: #fff; }


/* === PLAYER MODAL (Fullscreen) === */
.player-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: black; z-index: 200;
    display: flex; align-items: center; justify-content: center;
}
.player-modal video { width: 100%; height: 100%; outline: none; }
.close-player-btn {
    position: absolute; top: 20px; right: 20px; 
    background: rgba(200,0,0,0.7); 
    border: none; color: white;
    font-size: 1.5rem; cursor: pointer; z-index: 201; 
    padding: 10px 15px; border-radius: 8px;
    transition: background 0.2s;
}
.close-player-btn:hover { background: rgba(255,0,0,0.9); }


/* === LAYOUT V3 (TELA DE CANAIS/FILMES - LISTA + PLAYER) === */
.v3-container {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: #0b0b0b; z-index: 100;
    display: flex; flex-direction: column;
}

/* Header V3 */
.v3-header {
    height: 60px; background: #111; border-bottom: 2px solid #222;
    display: flex; align-items: center; padding: 0 20px; gap: 20px;
}
.v3-header h2 { flex: 1; font-size: 1.2rem; text-transform: uppercase; color: #ddd; }

/* Corpo V3 Dividido */
.v3-body { display: flex; flex: 1; overflow: hidden; }

/* Sidebar (Lista Esquerda) */
.v3-sidebar {
    width: 35%; 
    background: #080808;
    border-right: 1px solid #222;
    display: flex; flex-direction: column;
}
.v3-list-header {
    padding: 10px 15px; background: #1a1a1a; color: #888; font-size: 0.8rem; font-weight: bold;
    display: flex; justify-content: space-between;
}
.channel-list {
    flex: 1; overflow-y: auto;
    scrollbar-width: thin; scrollbar-color: #0097a7 #111;
}

/* Item da Lista (Canais/Episodios) */
.list-item {
    display: flex; align-items: center; padding: 12px 15px;
    border-bottom: 1px solid #1a1a1a; cursor: pointer;
    transition: background 0.2s; color: #aaa;
}
.list-item:hover { background: #151515; color: white; }
.list-item.active {
    background: #0097a7; 
    color: white;
    border-left: 4px solid #fff;
}
.item-number { width: 30px; font-size: 0.8rem; opacity: 0.7; }
.item-logo { width: 40px; height: 30px; object-fit: contain; margin-right: 15px; background: #000; border-radius: 4px;}
.item-name { font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }


/* SEPARADOR DE TEMPORADAS (Estilo Novo) */
.season-header {
    background: #1a1a1a; 
    color: #ff6600; /* Destaque laranja */
    padding: 12px 15px;
    font-weight: 800;
    font-size: 0.85rem;
    text-transform: uppercase;
    border-bottom: 1px solid #333;
    border-top: 1px solid #333;
    pointer-events: none;
    letter-spacing: 1px;
    margin-top: 5px;
}


/* MAIN AREA (Direita) - CORREÇÃO DE FUNDO CLARO */
.v3-main-area {
    flex: 1; display: flex; flex-direction: column;
    /* Fundo Escuro para garantir contraste */
    background: #050505; 
    background-image: radial-gradient(circle at center, #1a1a1a 0%, #000 100%);
    position: relative;
}

/* Player Box */
.v3-player-box {
    height: 60%; 
    background: black;
    position: relative;
    border-bottom: 2px solid #0097a7;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    margin: 20px; 
    border-radius: 8px; overflow: hidden;
}
.v3-player-box video { width: 100%; height: 100%; object-fit: contain; }

/* Overlay (Capa, Botão Play, Texto Aguardando) */
#player-overlay {
    position: absolute; top:0; left:0; width:100%; height:100%;
    display: flex; flex-direction: column; /* Texto abaixo da imagem */
    align-items: center; justify-content: center; 
    background: #000;
    z-index: 10;
}

/* Poster Preview */
#poster-preview { 
    max-height: 100%; max-width: 100%; 
    opacity: 0.5; /* Escuro para destacar o botão play */
}
#poster-preview[src=""] { display: none; } /* Esconde se vazio */

/* Texto "Aguardando Conteúdo" */
.waiting-text {
    color: #666; font-size: 1.2rem; margin-top: 15px; 
    font-weight: bold; text-transform: uppercase;
}

/* Botão Play Gigante */
.big-play-btn {
    position: absolute;
    font-size: 5rem;
    color: rgba(255,255,255,0.9);
    cursor: pointer;
    filter: drop-shadow(0 0 15px rgba(0,0,0,0.8));
    transition: transform 0.2s, color 0.2s;
    z-index: 20;
}
.big-play-btn:hover {
    color: #d50000;
    transform: scale(1.1);
}


/* Info Box */
.v3-info-box {
    flex: 1;
    padding: 0 20px 20px 20px;
    color: white;
    overflow-y: auto;
}
.info-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.badge { background: #0097a7; padding: 2px 8px; font-size: 0.7rem; border-radius: 2px; font-weight: bold; }
#info-title { font-size: 1.5rem; margin: 0; }
.epg-time { color: #0097a7; font-weight: bold; margin-bottom: 10px; }
.epg-desc { font-size: 0.9rem; color: #ccc; line-height: 1.5; }

/* Responsivo Mobile */
@media (max-width: 900px) {
    /* Login Mobile */
    .login-wrapper { flex-direction: column; }
    .login-info { display: none; }
    .login-form-container { flex: 1; width: 100%; background: #000; }
    .mobile-logo { display: block; }
    .login-box { padding: 20px; }

    /* Dashboard Mobile */
    .grid-list { grid-template-columns: 1fr; }
    .v3-body { flex-direction: column; }
    .v3-sidebar { width: 100%; height: 40%; border-bottom: 1px solid #333; }
    .v3-main-area { height: 60%; }
}
/* === BOTÃO DE SAIR NO HEADER === */
.btn-header-logout {
    background-color: #d50000; /* Vermelho */
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px; /* Espaço entre ícone e texto */
    font-size: 0.85rem;
    transition: background 0.2s, transform 0.2s;
    outline: none;
}

.btn-header-logout:hover {
    background-color: #b71c1c; /* Vermelho mais escuro */
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(213, 0, 0, 0.4);
}

.btn-header-logout i {
    font-size: 1rem;
    margin: 0; /* Reseta margem padrão dos ícones */
}