body, html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden; /* Evita el scroll en el juego */
  font-size: 1.5vh; /* Escala base relativa a la altura de pantalla */
}

.fondo {
  background-image: url('MENU.png');
  background-size: cover;
  background-position: center;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.cuadro {
  background-color: white;
  border: 0.6vh solid #00aaff;
  padding: 4vh 4vw;
  border-radius: 2.5vh;
  width: 30vw;
  min-width: 280px;
  text-align: center;
  font-family: 'Arial', sans-serif;
  box-shadow: 0 0 2vh rgba(0, 0, 0, 0.5);
}

h1 {
  margin-bottom: 3vh;
  font-size: 4vh;
  color: #333;
}

button {
  padding: 2.5vh 4vw;
  font-size: 3vh;
  background-color: #00aaff;
  color: white;
  border: none;
  border-radius: 1.2vh;
  cursor: pointer;
  margin-bottom: 3vh;
  transition: background-color 0.3s;
}

button:hover {
  background-color: #0077aa;
}

p {
  color: #333;
  font-size: 2.5vh;
  margin: 1vh 0;
}

#inicio {
  position: absolute;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10;
}

canvas {
  display: block;
  width: 100vw;
  height: 100vh;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  z-index: 20;
}

.cuadro2 {
  background: rgba(0, 0, 0, 0.7);
  padding: 3vh 4vw;
  border-radius: 1.5vh;
  border: 0.3vh solid #ffffff;
  color: #ffffff;
  text-align: center;
  pointer-events: auto;
  backdrop-filter: blur(5px);
}

/* Estilos para los controles táctiles */
#controles-tactiles {
  position: fixed;
  bottom: 5vh;
  left: 5vw;
  z-index: 5;
  opacity: 0.6;
}

.fila-control {
  display: flex;
  justify-content: center;
}

.control {
  width: 12vw; /* Ancho relativo */
  height: 12vw; /* Alto relativo */
  max-width: 70px;  /* Tamaño máximo para pantallas grandes */
  max-height: 70px; /* Tamaño máximo para pantallas grandes */
  margin: 0.5vw;
  border-radius: 50%; /* Botones redondos */
  background-color: #333;
  color: white;
  font-size: 6vw; /* Tamaño de fuente relativo */
  border: 2px solid white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  -webkit-user-select: none; /* Prevenir selección de texto en botones */
  user-select: none;
}