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

body {
  font-family: cursive;
  background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
  color: #333;
  /* Color de texto oscuro para contraste */
}

h1 {
  text-align: center;
  font-size: 5rem;
  line-height: 1;
  margin-top: 45px;
  color: #4a148c;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.score {
  color: #fff;
  background: #f50057;
  padding: 1rem;
  line-height: 1;
  border-radius: 1rem;
  display: inline-block;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.controls {
  margin: 5px;
  text-align: center;
}

.start-btn {
  padding: 10px 25px;
  outline: none;
  font-size: 24px;
  background: #ff9800;
  color: #fff;
  border: 0px;
  box-shadow: 1px 2px 4px #c2185bb0;
  cursor: pointer;
  border-radius: 30px;
  /* Botón más redondeado */
  transition: background 0.3s;
}

.start-btn:hover {
  background: #e65100;
  /* Naranja oscuro al pasar el ratón */
  box-shadow: 1px 2px 4px #c2a00eb0;
}

/* --- INICIO DE ESTILOS DE BOTONES DE DIFICULTAD --- */

.levels {
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.levels>div {
  margin: 20px 10px;
  /* Ajuste de margen */
}

/* Ocultar el radio button real */
.levels input[type="radio"] {
  display: none;
}

/* Estilo base para las etiquetas (que ahora son botones) */
.levels label {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.7);
  /* Fondo semi-transparente */
  color: #555;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Quitar los colores antiguos de los divs (ya no son necesarios) */
.levels>div:nth-child(1) {
  color: inherit;
}

.levels>div:nth-child(2) {
  color: inherit;
}

.levels>div:nth-child(3) {
  color: inherit;
}

/* Estilo para el botón SELECCIONADO (fácil) */
.levels input[type="radio"]#easy:checked+label {
  background: #00c853;
  /* Verde */
  color: white;
  border-color: #008a3b;
  transform: scale(1.05);
  /* Efecto de selección */
}

/* Estilo para el botón SELECCIONADO (medio) */
.levels input[type="radio"]#medium:checked+label {
  background: #ffab00;
  /* Naranja */
  color: white;
  border-color: #d88d00;
  transform: scale(1.05);
}

/* Estilo para el botón SELECCIONADO (difícil) */
.levels input[type="radio"]#hard:checked+label {
  background: #d50000;
  /* Rojo */
  color: white;
  border-color: #a00000;
  transform: scale(1.05);
}

/* --- FIN DE ESTILOS DE BOTONES DE DIFICULTAD --- */

/* Style for the game board */
.game {
  width: 600px;
  height: 400px;
  display: flex;
  flex-wrap: wrap;
  margin: 20px auto;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 15px;
  padding: 10px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.hole {
  flex: 1 0 33.33%;
  overflow: hidden;
  position: relative;
}

.hole:after {
  background: url("img/hole.png") bottom center no-repeat;
  background-size: contain;
  content: "";
  width: 100%;
  height: 70px;
  position: absolute;
  z-index: 2;
  bottom: -30px;
}

.mole {
  position: absolute;
  top: 100%;
  width: 100%;
  height: 100%;
  background: url("img/Diglett.png") bottom center no-repeat;
  background-size: 70%;
  transition: all 0.4s;
  cursor: pointer;
}

.hole.up .mole {
  top: 0;
  filter: drop-shadow(0 0 10px #ffeb3b) drop-shadow(0 0 15px #ffeb3b);
}

/* adjust for small screen size */
@media (max-width: 768px) {
  h1 {
    padding: 20px;
    font-size: 2rem;
  }

  .score {
    margin: 20px;
  }

  .hole::after {
    bottom: -22px;
    margin: 6px;
  }

  .start-btn {
    padding: 8px 20px;
  }

  /* Ajuste para los nuevos botones en móvil */
  .levels>div {
    margin: 10px 5px;
  }

  .levels label {
    padding: 6px 15px;
    font-size: 18px;
  }

  .game {
    width: 90%;
    height: 300px;
    padding: 5px;
  }

  .mole {
    padding: 40px;
  }
}
