/* style.css - VERSÃO FINAL COM OTIMIZAÇÃO SUPERIOR E RESPONSIVIDADE TABLET/CELULAR */

/* Reset básico e configuração do corpo da página */
body, html {
    margin: 0;
    padding: 0;
    height: 100%; 
    font-family: 'Montserrat', Arial, sans-serif; /* Fonte Profissional */
    color: #fff; 
}

/* 1. Estilização da IMAGEM DE FUNDO (Fallback) */
body {
    background-image: url("files/minha_imagem_fundo.png"); 
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    position: relative;
    z-index: 1; 
}

/* 2. Estilização do VÍDEO DE FUNDO (Full Screen) */
#video-fundo {
    position: fixed;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    z-index: -2; 
}

/* 3. O Overlay (ESCURECENDO O FUNDO) */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8); 
    z-index: -1; 
}

/* 4. Estilização do Container Principal (Desktop/Tablet) */
#conteudo-principal {
    text-align: center;
    position: relative;
    z-index: 10;
    
    min-height: 100vh; 
    padding-top: 50px; 
    padding-bottom: 20px;
    padding-left: 20px;
    padding-right: 20px;
    
    display: flex;
    flex-direction: column; 
    align-items: center; 
    gap: 30px; 
}

/* Estilização do Título H1 */
#conteudo-principal h1 {
    font-size: 2.8em;
    font-weight: 700;
    margin-bottom: 10px;
}

/* Estilização da Data */
#data-evento {
    font-size: 1.5em;
    font-weight: 400;
    margin-top: -10px; 
    margin-bottom: 20px;
}

/* 5. Estilização do Contêiner do Vídeo (Card - Desktop/Tablet) */
#video-centralizado {
    padding: 20px; /* Aumentei um pouco o padding para um melhor visual com o tamanho menor */
    background-color: rgba(255, 255, 255, 0.1); 
    border-radius: 15px; 
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.9); 
    
    /* TAMANHO DESKTOP/TABLET: 300px */
    max-width: 300px; 
    width: 90vw; 
}

/* 6. Estilização do elemento <video> em si */
#video-principal {
    display: block; 
    width: 100%; 
    height: auto; 
    border-radius: 8px;
}

/* 7. ESTILIZAÇÃO DO BOTÃO "PARTICIPAR" */
#btn-participar {
    display: inline-block;
    padding: 15px 30px;
    background-color: #28a745; 
    color: white;
    text-decoration: none;
    font-size: 1.3em; 
    font-weight: bold;
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    animation: pulse 1.5s infinite alternate;
}

#btn-participar:hover {
    background-color: #218838; 
    transform: scale(1.05); 
}

/* 8. ANIMAÇÃO DE PISCAR SUAVE */
@keyframes pulse {
    0% { opacity: 0.9; }
    100% { opacity: 1; box-shadow: 0 0 20px rgba(40, 167, 69, 0.8); }
}


/* =========================================================== */
/* 9. MEDIA QUERY PARA CELULARES (Telas menores que 768px) */
/* =========================================================== */
@media (max-width: 768px) {
    
    /* Ajustes no Header */
    #cabecalho-controle {
        padding: 15px 10px;
    }
    #cabecalho-controle h1 {
        font-size: 1.4em;
    }
    #total-pessoas {
        font-size: 1.8em;
    }
    
    /* Ajusta o gap dos cards */
    #estatisticas-container {
        gap: 15px;
        margin-bottom: 15px;
    }

    .stat-card {
        min-width: 120px;
        padding: 10px 15px;
    }
    .stat-card .valor {
        font-size: 1.8em;
    }
    
    /* TRANSFORMAÇÃO DA TABELA EM CARDS VERTICAIS */
    #tabela-registros, #tabela-registros thead, #tabela-registros tbody, #tabela-registros tr, #tabela-registros td {
        display: block;
        width: 100%;
        border: none; 
    }
    
    #tabela-registros thead {
        display: none; /* Oculta o cabeçalho da tabela */
    }
    
    #tabela-registros tr {
        margin-bottom: 15px;
        background-color: rgba(0, 0, 0, 0.7); 
        border-radius: 10px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
        padding: 15px;
    }
    
    #tabela-registros td {
        text-align: right; 
        padding: 5px 0;
        border-bottom: 1px dashed rgba(255, 255, 255, 0.2); 
    }
    
    /* Cria o rótulo (label) para cada célula */
    #tabela-registros td::before {
        content: attr(data-label);
        float: left;
        font-weight: 700;
        color: #aaa;
        text-transform: uppercase;
    }
    
    #tabela-registros tr td:last-child {
        border-bottom: none;
        padding-top: 10px;
    }

    .btn-excluir {
        margin-top: 10px;
        display: block; 
        text-align: center;
    }
    
    /* NOVO AJUSTE: Reduzindo o tamanho do card do vídeo no celular */
    #video-centralizado {
        padding: 15px; 
        background-color: rgba(255, 255, 255, 0.1); 
        border-radius: 15px; 
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.9); 
        
        /* REDUZIDO PARA UM MÁXIMO DE 250PX EM TELAS PEQUENAS */
        max-width: 250px; 
        width: 80vw; /* Aumenta um pouco a margem lateral (vai de 90vw para 80vw) */
    }
    
}

/* --- MEDIA QUERY PARA CELULARES (Telas menores que 768px) --- */
@media (max-width: 768px) {
    
    /* Ajustes no Header - Diminuindo fontes */
    #cabecalho-controle {
        padding: 15px 10px;
    }
    #cabecalho-controle h1 {
        font-size: 1.3em; /* Reduzido de 1.4em para 1.3em */
    }
    #total-pessoas {
        font-size: 1.8em;
    }
    
    /* Ajusta o gap dos cards */
    #estatisticas-container {
        gap: 10px; /* Reduzido para aproximar os cards */
        margin-bottom: 15px;
    }

    .stat-card {
        min-width: 100px; /* Reduzido um pouco a largura mínima */
        padding: 10px 10px;
    }
    .stat-card .valor {
        font-size: 1.6em; /* Reduzido de 1.8em para 1.6em */
    }
    .stat-card h3 {
        font-size: 0.9em; /* Fonte menor para o título do card */
    }
    
    /* Ajustes na Tabela (que virou card) */
    #tabela-registros tr {
        padding: 10px; /* Menos padding interno no card do registro */
    }
    
    #tabela-registros td {
        padding: 4px 0; /* Menos padding vertical */
        font-size: 0.9em; /* TEXTO GERAL DA TABELA REDUZIDO */
    }
    
    /* Rótulos de coluna (data-label) */
    #tabela-registros td::before {
        font-size: 0.8em; /* Fonte menor para os rótulos de coluna */
    }
    
    .btn-excluir {
        margin-top: 8px;
        padding: 4px 8px; /* Botão menor */
        font-size: 0.75em;
    }
}