
  /* Asegurarse de que el cuerpo y html ocupen el 100% de la pantalla */
html, body {
  min-height: 100%;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}



.loading-content {
  text-align: center;
  background: rgba(0, 0, 0, 0.7); /* Fondo semi-transparente para hacer resaltar el contenido */
  padding: 30px;
  border-radius: 15px;
}

.title-container {
  display: flex;
  height: 100%;
  flex-direction: column;
  align-items: center;
}

.canvas-container {
  display: flex;
  flex-direction: column;
}

#score {
  color: #4CAF50; /* Puntaje actual en verde */
  font-weight: bold;
}

#bestScore {
  color: #FF5722; /* Mejor puntaje en naranja */
  font-weight: bold;
  margin-top: 5px;
}
body {
  background: linear-gradient(135deg, #1c1c1c, #333);
  color: #f0f0f0;
  font-family: 'Press Start 2P', cursive;
}

#pacmanCanvas {
  display: block;
  margin: 30px auto;
  background: transparent;
  box-shadow: 0px 0px 50px 10px rgba(99, 173, 234, 0.944);
  border: 4px solid #ea0b0b;
}

#scoreContainer {
  margin-top: 20px; /* Añade un espacio más grande entre el canvas y el contenedor del puntaje */
  text-align: center;
  font-family: 'Arial', sans-serif; /* Fuente atractiva */
  font-size: 24px;
  color: #ffffff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

/* Opcional: animar las estrellas del fondo */
@keyframes twinkling {
  0% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(-10px); opacity: 1; }
  100% { transform: translateY(0); opacity: 0.5; }
}

.stars {
  position: fixed;
  width: 100%;
  height: 100%;
  background: transparent;
  pointer-events: none;
  z-index: -1;
  top: 0;
  left: 0;
  }

.star {
  width: 2px;
  height: 2px;
  background: #ffffff;
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 50%;
  opacity: 0.8;
  animation: twinkling 3s infinite ease-in-out;
}

.game-title {  
  text-align: center;
  font-family: 'Press Start 2P', cursive;
  color: #FFD700; /* Color dorado */
  font-size: 40px;
  font-weight: bold;
  text-shadow: 5px 5px 8px rgba(233, 14, 14, 0.7);
  margin-top: 30px;
}

#livesContainer {
  margin-top: 10px;
  text-align: center;
}

.life-heart {
  font-size: 24px;
  color: #ff0000;
}

.game-over-container {
 
  margin-top: 10px; /* Añadir un margen superior para evitar que se superponga con el título */
  display: flex;
  flex-direction: column;
  text-align: center;
  text-align: center;
  background: #0f3460;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.5);
  max-width: 500px;
  width: 100%;
}

.game-over-title {
  font-size: 3em;
  color: #e94560;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.ranking-title {
  margin-top: 20px;
  font-size: 2em;
  color: #f9d342;
}

.ranking-list {
  list-style: none;
  padding: 0;
  margin-top: 20px;
}

.ranking-list li {
  background: #16213e;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 8px;
  font-size: 1.5em;
  color: #f1f1f1;
  display: flex;
  justify-content: space-between;
  transition: background 0.3s;
}

.ranking-list li:hover {
  background: #1f4068;
}

.position {
  font-weight: bold;
  color: #e94560;
}

.name {
  color: #00adb5;
}

.score {
  color: #f9d342;
}

.retry-button {
  margin-top: 30px;
  padding: 15px 30px;
  background: #e94560;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.2em;
  cursor: pointer;
  transition: background 0.3s;
}

.retry-button:hover {
  background: #d33f50;
}

/* Responsive */
@media (max-width: 600px) {
  .game-over-title {
    font-size: 2.5em;
  }
  .ranking-title {
    font-size: 1.8em;
  }
  .ranking-list li {
    font-size: 1.2em;
  }
  .retry-button {
    font-size: 1em;
    padding: 12px 25px;
  }
}

.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.loading-content {
  text-align: center;
  background: rgba(0, 0, 0, 0.7);
  padding: 30px;
  border-radius: 15px;
}

.name-input {
  font-family: 'Press Start 2P', cursive;
  padding: 10px;
  margin-bottom: 20px;
  width: 80%;
}

.start-button {
  margin: 10px;
  padding: 10px 20px;
  font-family: 'Press Start 2P', cursive;
  background-color: #4CAF50;
  color: #ffffff;
  border: none;
  cursor: pointer;
}

.sound-button {
  margin: 10px;
  padding: 10px 20px;
  font-family: 'Press Start 2P', cursive;
  background-color: #4CAF50;
  color: #ffffff;
  border: none;
  cursor: pointer;
}

.controls-button {
  margin: 10px;
  padding: 10px 20px;
  font-family: 'Press Start 2P', cursive;
  background-color: #4CAF50;
  color: #ffffff;
  border: none;
  cursor: pointer;
}

.lives-container {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}
.modal {
  display: none; /* Por defecto oculto */
  position: fixed;
  z-index: 1; /* Encima de otros elementos */
  left: 0;
  top: 0;
  width: 100%; /* Toma toda la pantalla */
  height: 100%; /* Toma toda la pantalla */
  background-color: rgba(0, 0, 0, 0.7); /* Color negro con transparencia */
}
.modal-content {
  position: relative;
  margin: 15% auto; /* Centrar verticalmente */
  padding: 20px;
  width: 50%; /* Puedes ajustar el ancho según necesites */
  max-width: 600px; /* Ancho máximo de la imagen */
  background-color: #fff; /* Fondo blanco */
  text-align: center;
  border-radius: 8px;
}

.close-button {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}
