body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #000;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#webcam {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1); /* Espelhar a imagem para parecer um espelho */
    opacity: 0.3; /* Deixar a câmera sutil para o neon brilhar */
}

#game-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
}

#ui {
    position: absolute;
    top: 20px;
    left: 0;
    width: 100%;
    z-index: 20;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#status-bar {
    display: flex;
    justify-content: space-around;
    width: 100%;
    max-width: 800px;
}

#score, #lives {
    color: #0ff;
    font-size: 2rem;
    text-shadow: 0 0 10px #0ff;
}

#lives {
    color: #f0f;
    text-shadow: 0 0 10px #f0f;
}

#message {
    color: #fff;
    font-size: 1.2rem;
    margin-top: 10px;
    opacity: 0.7;
}

/* Overlays de Menu e Game Over */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    color: white;
    text-align: center;
    pointer-events: auto; /* Garante que receba cliques */
}

.overlay h1 {
    font-size: 2.5rem;
    color: #0ff;
    text-shadow: 0 0 20px #0ff;
    margin-top: 10px;
    margin-bottom: 20px;
}

.overlay p {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

/* Botões Virtuais */
.virtual-btn {
    padding: 10px 20px;
    border: 4px solid #f0f;
    border-radius: 50px;
    font-size: 1.4rem;
    font-weight: bold;
    color: #f0f;
    text-shadow: 0 0 10px #f0f;
    box-shadow: 0 0 15px #f0f;
    transition: all 0.3s ease;
    cursor: pointer;
    background: transparent;
    pointer-events: auto;
    user-select: none; /* Evita selecionar texto ao tocar */
    -webkit-tap-highlight-color: transparent; /* Remove o brilho de toque padrão do Android/iOS */
}

/* Estilos para Ranking */
#ranking-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

#player-name {
    background: transparent;
    border: 2px solid #0ff;
    border-radius: 10px;
    padding: 10px;
    color: #fff;
    font-size: 1.2rem;
    text-align: center;
    outline: none;
    box-shadow: 0 0 10px #0ff;
}

#ranking-container {
    width: 300px;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid #0ff;
    border-radius: 15px;
    padding: 10px;
}

#ranking-container h3 {
    margin: 5px 0;
    color: #0ff;
    text-shadow: 0 0 10px #0ff;
}

#ranking-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#ranking-list li {
    font-size: 1.1rem;
    padding: 5px;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

/* Seleção de Níveis, Idiomas e Configurações */
#level-selection, #language-selection, #settings-selection {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.level-btn, .lang-btn, .settings-btn {
    font-size: 1.2rem !important;
    padding: 10px 20px !important;
    border-color: #f0f;
    color: #f0f;
    opacity: 0.5;
}

.level-btn.selected, .lang-btn.selected, .settings-btn.selected {
    opacity: 1;
    background: rgba(240, 0, 240, 0.2);
    box-shadow: 0 0 20px #f0f;
}

.level-btn.hover, .lang-btn.hover, .settings-btn.hover {
    opacity: 1;
    background: #f0f;
    color: white;
}

#language-selection {
    margin-bottom: 30px;
}

#settings-selection {
    margin-bottom: 0px;
}

#credits {
    font-size: 0.9rem;
    color: #fff;
    opacity: 0.8;
    margin-bottom: 10px;
    margin-top: 10px;
}

#credits a {
    color: #ff0;
    text-decoration: none;
    font-weight: bold;
    text-shadow: 0 0 5px #ff0;
}

#credits a:hover {
    text-shadow: 0 0 10px #ff0;
}

.settings-btn {
    font-size: 0.9rem !important;
    padding: 5px 15px !important;
    border-color: #ff0 !important;
    color: #ff0 !important;
    text-shadow: 0 0 10px #ff0 !important;
    opacity: 0.5 !important;
}

.settings-btn.selected {
    opacity: 1 !important;
    background: rgba(255, 255, 0, 0.2) !important;
    box-shadow: 0 0 20px #ff0 !important;
}

.settings-btn.hover {
    background: #ff0 !important;
    color: black !important;
}

.lang-btn {
    border-color: #0ff !important;
    color: #0ff !important;
    text-shadow: 0 0 10px #0ff !important;
}
.lang-btn.selected {
    background: rgba(0, 255, 255, 0.2) !important;
    box-shadow: 0 0 20px #0ff !important;
}

.lang-btn.hover {
    background: #0ff !important;
    color: black !important;
}
