/*
 * style_player.css
 * Estilos CSS para o player de IPTV (index.php) corrigido para telas menores
 * Autor: Manus AI
 * Data: Mar 05, 2026
 */

/* Estilos gerais para o corpo da página e HTML */
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background: #000;
    overflow: hidden;
    font-family: sans-serif;
    color: white;
}

/* Estilos para a tela de login */
body.login-page {
    background: url('img/fundo.jpeg') no-repeat center center fixed;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.login-box {
    background: rgba(0,0,0,0.85);
    padding: 30px;
    border-radius: 15px;
    width: 280px;
    text-align: center;
    border: 1px solid #444;
}

.login-box input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    background: #111;
    border: 1px solid #333;
    color: #fff;
    border-radius: 8px;
    box-sizing: border-box;
}

.login-box button {
    width: 100%;
    padding: 15px;
    background: #ff6600;
    border: none;
    color: #fff;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
}

.login-box .error {
    color: #ff4444;
    font-size: 14px;
    margin-bottom: 15px;
}

/* Centralização do vídeo na tela */
#video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 1;
    background: #000;
}

.video-js {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
}

.vjs-tech {
    object-fit: contain !important;
    width: 100% !important;
    height: 100% !important;
    
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
}

#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000 url('img/fundo.jpeg') no-repeat center center;
    background-size: cover;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 8;
}

.logo-load {
    width: 150px;
    margin-bottom: 20px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

#click-shield {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
}

/* --- AJUSTE NO UI OVERLAY --- */
#ui-overlay {
    position: absolute;
    bottom: -280px;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    background: linear-gradient(transparent, rgba(0,0,0,0.98) 25%);
    z-index: 10;
    transition: bottom 0.4s ease;
}

#ui-overlay.visible {
    bottom: 0 !important;
}

/* --- BARRA DE CATEGORIAS --- */
.cat-bar {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    background: rgba(0,0,0,0.95) !important;
    height: 55px !important;
    padding: 0 20px !important;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden !important;
}

.cat-fixed-left {
    display: flex;
    gap: 15px;
}

.cat-selector-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.08);
    padding: 6px 15px;
    border-radius: 5px;
    border: 1px solid #444;
}

.selector-label {
    font-size: 10px;
    color: #ff6600;
    font-weight: bold;
}

#catSelect {
    background: transparent;
    color: white;
    border: none;
    font-size: 14px;
    font-weight: bold;
    outline: none;
    cursor: pointer;
}

#catSelect option {
    background: #111;
    color: white;
}

.cat-item {
    cursor: pointer;
    color: #ccc;
    font-size: 12px;
    font-weight: bold;
    white-space: nowrap;
    padding: 8px 15px;
}

.cat-active {
    color: #fff;
    background: #ff6600;
    border-radius: 20px;
}

/* --- ESTILO DA BUSCA E BOTÃO SAIR --- */
.cat-actions {
    display: flex !important;
    align-items: center !important;
    gap: 12px;
    flex-shrink: 0 !important;
    padding-left: 15px;
}

#canalSearch {
    width: 130px;
    height: 30px;
    background: #222;
    border: 1px solid #444;
    color: white;
    padding: 0 10px;
    border-radius: 5px;
    font-size: 13px;
}

.btn-sair {
    color: #ff4444 !important;
    text-decoration: none !important;
    font-weight: bold;
    font-size: 13px;
    white-space: nowrap;
}

/* --- LISTA DE CANAIS --- */
#channel-list {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    padding: 10px 30px;
    gap: 15px;
    scrollbar-width: none;
}

#channel-list::-webkit-scrollbar { display: block; height: 6px; }
#channel-list::-webkit-scrollbar-thumb { background: #ff6600; border-radius: 10px; }

.card {
    min-width: 100px;
    max-width: 100px;
    padding: 5px;
    cursor: pointer;
    text-align: center;
    position: relative;
    transition: transform 0.2s;
}

.card img {
    width: 80%;
    height: 60px;
    object-fit: contain;
    background: #111;
    border-radius: 8px;
    border: 2px solid #222;
}

.card.canal-ativo img {
    border: 3px solid #ff6600 !important;
    box-shadow: 0 0 15px rgba(255, 102, 0, 0.6);
}

.btn-favorito {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.8);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 15;
    font-size: 18px;
}

.btn-favorito.ativo { color: #ffcc00; }

.vjs-big-play-button, .vjs-loading-spinner, .vjs-control-bar { display: none !important; }

/* MODAL DE PIN */
#pin-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

#pin-modal.visible { display: flex; }

.pin-box {
    background: #1a1a1a;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid #333;
}

.pin-box input {
    width: 150px;
    padding: 10px;
    background: #000;
    border: 1px solid #555;
    color: #fff;
    border-radius: 5px;
    text-align: center;
    font-size: 20px;
}

#keyboard {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 200px;
    margin-top: 20px;
}

#keyboard button {
    background: #333;
    color: white;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
}

/* NOME DO CANAL ATUAL */
#current-channel-name {
    position: fixed;
    top: 20px; left: 20px;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: bold;
    z-index: 100;
    display: none;
}
#current-channel-name.visible { display: block; }

/* ÍCONE DE BLOQUEIO */
.channel-item .lock-icon {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3em;
    color: rgba(255, 255, 255, 0.7);
    display: none;
}
.channel-item.canal-adulto .lock-icon { display: block; }

/* BOTÕES DE INTERFACE ADICIONAIS */
#unlock-button, #back-button {
    position: fixed;
    background: #ff6600;
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    z-index: 90;
    display: none;
}
#unlock-button.visible, #back-button.visible { display: block; }

#back-button {
    top: 20px;
    right: 20px;
}

#unlock-button {
    bottom: 20px;
    right: 20px;
}

/* ESTILO PARA INDICADOR DE CANAL ATUAL NA LISTA */
.channel-item.active-channel {
    transform: scale(1.05);
    border: 2px solid #ff6600;
}