* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(to bottom, #87CEEB, #E0F6FF);
    font-family: Arial, sans-serif;
}

.game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    max-width: 400px;
    max-height: 600px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    touch-action: none; /* Prevenir gestos táctiles del navegador */
}

#gameCanvas {
    width: 100%;
    height: 100%;
    background-color: #fff;
}

.score-container {
    position: absolute;
    background-color: transparent;
    top: 20px;
    left: 20px;
    color: #e3e3e3;
    font-size: 20px;
    font-weight: bold;
    z-index: 10;
}

.game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    z-index: 30; /* Aumentado para estar por encima de los controles táctiles */
    pointer-events: auto; /* Asegurar que recibe eventos */
}

.game-over h2 {
    color: #333;
    margin-bottom: 10px;
}

.game-over p {
    color: #666;
    margin-bottom: 20px;
}

#restartButton {
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

#restartButton:hover {
    background-color: #45a049;
}

.hidden {
    display: none;
}

/* Estilos para controles táctiles */
.touch-controls {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    /* Desactivar controles táctiles cuando el juego termina */
    &.game-over {
        display: none;
    }
}

.touch-area {
    position: absolute;
    top: 0;
    height: 100%;
    pointer-events: auto;
    transition: background-color 0.2s ease;
}

.touch-area.left {
    left: 0;
    width: 50%;
}

.touch-area.right {
    right: 0;
    width: 50%;
}

.touch-area.active {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Ocultar controles táctiles en desktop */
@media (hover: hover) and (pointer: fine) {
    .touch-controls {
        display: none;
    }
} 