/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden; /* Fullscreen */
    height: 100vh;
    width: 100vw;
	background:#ffffff;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Responsividade */
@media (max-width: 1024px) {
  .ranking-card, .resultado-jogador {
    padding: 15px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 10px;
  }

  .resultados-grid {
    grid-template-columns: 1fr;
  }

  .jogo-info {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .titulo-principal h1 {
    font-size: 1.6rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .titulo-principal h1 {
    font-size: 1.2rem;
  }

  button {
    font-size: 0.9rem;
    padding: 10px;
  }
}

/* Variáveis CSS para Temas */
:root {
    /* Tema Dark (Preto e Branco) - Definido como padrão */
    --game-bg-dark: linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #2d2d2d 100%);
    --game-text-dark: #ffffff;
    --game-accent-dark: #cccccc;

    /* Tema Light (Preto e Branco) - COMENTADO: Removido para manter apenas o tema dark */
    /*
    --game-bg-light: linear-gradient(135deg, #ffffff 0%, #f8f9fa 50%, #e9ecef 100%);
    --game-text-light: #000000;
    --game-accent-light: #333333;
    */
}

/* Aplicação do Tema - Agora sempre dark */
.game-background {
    background: var(--game-bg-dark); /* AJUSTE: Tema dark definido como padrão */
    color: var(--game-text-dark); /* AJUSTE: Cor do texto do tema dark definida como padrão */
    transition: all 0.3s ease-in-out;
    height: 100vh;
    width: 100vw;
    position: relative;
}

/* COMENTADO: Regra para tema dark removida, pois o dark é o padrão agora */
/*
[data-theme="dark"] .game-background {
    background: var(--game-bg-dark);
    color: var(--game-text-dark);
}
*/

/* Botão de Tema */
/* Botão de Tema - COMENTADO: Removido para manter apenas o tema dark */
/*
.theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 24px;
}
*/

/* Botão Admin */
.admin-toggle {
    position: fixed;
    top: 5rem;
    right: 1rem;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 24px;
}

/* COMENTADO: Estilos do botão de tema removidos */
/*
.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .theme-toggle {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .theme-toggle:hover {
    background: rgba(0, 0, 0, 0.5);
}
*/

/* Tema claro → logo preta (sem filtro) - COMENTADO: Apenas tema dark */
/*
.logo {
  filter: none;
  transition: filter 0.3s ease;
}
*/

/* Tema escuro → logo branca - AJUSTE: Aplicado diretamente ao .logo */
.logo {
  filter: brightness(0) invert(1); /* AJUSTE: Logo branca para tema dark */
  transition: filter 0.3s ease;
}

/* Telas */
.tela {
    display: none;
    height: 100vh;
    width: 100vw;
    position: absolute;
    top: 0;
    left: 0;
}

.tela.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.container {
    max-width: 800px;
    width: 100%;
    padding: 2rem;
    text-align: center;
}

/* Cards */
.card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 2rem;
    margin: 1rem 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .card {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Botões */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 120px;
}

.btn-primary {
    background:#f0ad05;
    color: black;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: inherit;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

.btn-ghost {
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.btn-large {
    padding: 26px 92px;
    font-size: 30px;
    min-height: 56px;
}

/* Inputs */
.input-group {
    position: relative;
    margin: 1rem 0;
}

.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 40px;
    z-index: 1;
}

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="password"],
input[type="number"] {
    width: 60%;
    padding: 12px 12px 12px 15px;
    border: 8px solid rgba(255, 255, 255, 0.3);
    border-radius: 0px;
    background: rgba(255, 255, 255);
    color: black;
    font-size: 35px;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255);
}

/* Tela Inicial */
.titulo-principal {
    margin-bottom: 2rem;
}

.icones-titulo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.icone-trophy {
    font-size: 3rem;
    animation: bounce 2s infinite;
}

.titulo-principal h1 {
    font-size: 3rem;
    font-weight: bold;
    margin: 0;
}

.subtitulo {
    font-size: 2.4rem;
    opacity: 0.8;
}

.animacao-premios {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
}

.premio-animado {
    font-size: 2rem;
    animation: bounce 2s infinite;
}

.formulario-card h2 {
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.botao-admin {
    margin-top: 1.5rem;
}

.instrucoes {
    margin-top: 2rem;
    opacity: 0.7;
}

/* Tela de Contagem */
.contagem-container {
    text-align: center;
}

.contagem-container h1 {
    font-size: 3rem;
    margin-bottom: 2rem;
}

.contador {
    font-size: 8rem;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    margin: 2rem 0;
    animation: pulse 1s infinite;
}

.loading-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 2rem;
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg, #ffd700, #ffed4e);
    width: 0%;
    transition: width 0.1s ease;
}

/* Tela do Jogo */
.jogo-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 1rem;
    z-index: 100;
}

.jogo-info {
    display: flex;
    position: absolute;
    left: 20px; /* Distância da borda esquerda */
    top: 5%; /* Centraliza verticalmente */
    transform: translateY(-50%);
    flex-direction: column; /* Um embaixo do outro */
    gap: 1rem;
    max-width: none;
    margin: 0;
}

.info-item {
    display: flex;
    align-items: left;
    gap: 0.5rem;
}



//*
.info-label {
    font-weight: 700;
}*//


.info-label {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ffffff;
}


.info-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #000000;
}

.area-jogo {
    position: relative;
    width: 80vw;
    height: 100vh;
    overflow: hidden;
    cursor: crosshair;
}

.item-jogo {
    position: absolute;
    /* AJUSTE: Tamanho dos itens aumentado em 100% para TVs de 43 polegadas (proporção 9x16 retrato) */
    width: 150px;  
    height: 150px; 
    cursor: pointer;
    transition: transform 0.1s ease;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.item-jogo:hover {
    transform: scale(1.1);
}

.item-jogo img {
    width: 200%;
    height: 200%;
    object-fit: contain;
    border-radius: 8px;
}

/* Tela de Resultados */
.titulo-resultados {
    margin-bottom: 2rem;
}

.titulo-resultados h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}
/*
.resultados-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}*/

.resultado-jogador {
    text-align: center;
}

.pontuacao-final {
    font-size: 4rem;
    font-weight: bold;
    color: #ffd700;
    margin: 1rem 0;
}

.texto-pontos {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.premio-ganho {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.premio-icon {
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

.premio-nome {
    font-size: 1.5rem;
    font-weight: bold;
    color: #4ade80;
    margin-top: 0.5rem;
}

.posicao-ranking {
    margin: 1rem 0;
    font-size: 1.1rem;
}

.posicao-ranking span {
    font-weight: bold;
    color: #ffd700;
}

.botoes-resultado {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.ranking-card h2 {
    margin-bottom: 1.5rem;
    text-align: center;
}

.ranking-lista {
    max-height: 400px;
    overflow-y: auto;
}

.ranking-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin: 0.5rem 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
}

.ranking-item.destaque {
    border: 2px solid #ffd700;
    background: rgba(255, 215, 0, 0.1);
}

.ranking-posicao {
    font-size: 1.5rem;
    font-weight: bold;
    margin-right: 1rem;
}

.ranking-info {
    flex: 1;
    text-align: left;
}

.ranking-nome {
    font-weight: bold;
    font-size: 1.1rem;
}

.ranking-data {
    font-size: 0.9rem;
    opacity: 0.7;
}

.ranking-pontos {
    text-align: right;
}

.ranking-pontos-valor {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ffd700;
}

/* Login Admin */
.login-card {
    max-width: 400px;
    margin: 0 auto;
}

.login-card h2 {
    margin-bottom: 1.5rem;
    text-align: center;
}

.botoes-login {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

/* Painel Admin */
#painel-admin {
    display: none;
    height: 100vh;
    overflow-y: auto;
}

#painel-admin.active {
    display: block;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-header h1 {
    font-size: 1.8rem;
}

.admin-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.tab-btn.active {
    background: rgba(255, 255, 255, 0.2);
    border-bottom: 3px solid #667eea;
}

.admin-content {
    padding: 2rem;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.card h3 {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.config-group {
    margin: 1rem 0;
}

.config-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.premios-lista {
    max-height: 500px;
    overflow-y: auto;
}

.premio-item {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    transition: all 0.3s ease;
}

.premio-item.ativo {
    border-color: rgba(34, 197, 94, 0.5);
    background: rgba(34, 197, 94, 0.1);
}

.premio-item.inativo {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.1);
    opacity: 0.7;
}

.premio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.premio-status {
    font-weight: 600;
}

.premio-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.premio-preview img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.premio-preview-label {
    font-size: 0.8rem;
    opacity: 0.7;
}

.premio-upload {
    margin-top: 1rem;
}

.premio-upload input[type="file"] {
    width: 100%;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: inherit;
    font-size: 14px;
}

.premio-upload-help {
    font-size: 0.8rem;
    opacity: 0.6;
    margin-top: 0.5rem;
}

/* Ranking Completo */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.ranking-completo {
    max-height: 600px;
    overflow-y: auto;
}

/* Estatísticas */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Mensagens de Status */
.erro-msg,
.status-msg {
    padding: 0.8rem;
    border-radius: 6px;
    margin: 1rem 0;
    text-align: center;
    font-weight: 600;
}

.erro-msg {
    background: rgba(0, 0, 0, 0);
    color: #fca5a5;
    border: 0px solid rgba(239, 68, 68, 0.3);
}

.status-msg {
    background: rgba(34, 197, 94, 0.2);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.help-text {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-top: 0.5rem;
}

/* Animações */
@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        transform: translate3d(0, -30px, 0);
    }
    70% {
        transform: translate3d(0, -15px, 0);
    }
    90% {
        transform: translate3d(0, -4px, 0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Efeitos de Clique */
.click-effect {
    position: absolute;
    pointer-events: none;
    font-size: 24px;
    font-weight: bold;
    color: #ffd700;
    animation: clickEffect 1s ease-out forwards;
}

@keyframes clickEffect {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    100% {
        opacity: 0;
        transform: scale(1.5) translateY(-50px);
    }
}

/* Responsividade */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .resultados-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .botoes-resultado {
        flex-direction: column;
    }
    
    .admin-tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1 1 50%;
    }
    
    .item-jogo {
        width: 80px;
        height: 80px;
    }
    
    .titulo-principal h1 {
        font-size: 2rem;
    }
    
    .contador {
        font-size: 6rem;
    }
}

/* Ajustes para tema dark */
[data-theme="dark"] .text-white {
    color: #ffffff !important;
}

[data-theme="dark"] .bg-white\/10 {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .border-white\/20 {
    border-color: rgba(255, 255, 255, 0.2) !important;
}

/* Ajustes para tema light */
:root .text-white {
    color: #000000 !important;
}

:root .bg-white\/10 {
    background-color: rgba(0, 0, 0, 0.1) !important;
}

:root .border-white\/20 {
    border-color: rgba(0, 0, 0, 0.2) !important;
}


/* ===== IMAGENS DECORATIVAS DO JOGO ===== */
.imagem-decorativa {
    position: absolute;
    left: 0;
    right: 0;
    width: 100%;
    background-size: contain; /* Mudado para 'contain' para mostrar imagem completa */
    background-repeat: no-repeat;
    background-position: center;
    z-index: 2; /* Aumentado para ficar acima do fundo */
    pointer-events: none;
    display: none;
    transition: height 0.3s ease;
}

.imagem-decorativa.superior {
    top: 0;
    background-position: center top;
}

.imagem-decorativa.inferior {
    bottom: 0;
    background-position: center bottom;
}

/* Ajustes para área do jogo com imagens decorativas */
#area-jogo {
    position: relative;
    z-index: 3; /* Aumentado para ficar acima das imagens decorativas */
    width: 100%;
    overflow: hidden;
    transition: padding 0.3s ease, height 0.3s ease;
}

/* Tela do jogo responsiva */
#tela-jogo {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: 0; /* Garantir que o fundo fique atrás */
}

/* Responsividade automática - as alturas são controladas pelo JavaScript */
/* Breakpoints para referência, mas alturas são calculadas dinamicamente */

/* Mobile pequeno (até 480px) */
@media (max-width: 480px) {
    .imagem-decorativa {
        background-size: contain; /* Corrigido para contain */
    }
    
    #area-jogo {
        min-height: 70vh; /* Garantir área mínima para o jogo */
    }
}

/* Mobile/Tablet (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .imagem-decorativa {
        background-size: contain; /* Corrigido para contain */
    }
    
    #area-jogo {
        min-height: 65vh;
    }
}

/* Tablet grande (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .imagem-decorativa {
        background-size: contain; /* Corrigido para contain */
    }
    
    #area-jogo {
        min-height: 60vh;
    }
}

/* Desktop (acima de 1024px) */
@media (min-width: 1025px) {
    .imagem-decorativa {
        background-size: contain; /* Corrigido para contain */
    }
    
    #area-jogo {
        min-height: 55vh;
    }
}

/* Orientação landscape em mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .imagem-decorativa.superior,
    .imagem-decorativa.inferior {
        background-size: contain; /* Corrigido para contain */
    }
    
    #area-jogo {
        min-height: 50vh;
    }
}

/* Estilos para configurações de imagem no admin */
.config-group small {
    display: block;
    color: #666;
    font-size: 0.8rem;
    margin-top: 3px;
}

.config-group input[type="file"] {
    padding: 5px;
    border: 1px dashed #ccc;
    border-radius: 4px;
    background: #f9f9f9;
}

.config-group input[type="file"]:hover {
    border-color: #007bff;
    background: #f0f8ff;
}

