/* Reset general */
body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-family: 'Arial', sans-serif;
  background-color: #f0f0f0;
}

/* Menú de inicio */
.fondo {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: url('FONDO.png') no-repeat center center;
  background-size: cover;
  padding: 2vh 2vw;
}

/* Cuadro de inicio */
.cuadro {
  background-color: rgba(255, 255, 255, 0.9);
  padding: 2rem;
  border-radius: 1rem;
  text-align: center;
  box-shadow: 0 0 1rem #aaa;
  max-width: 90vw;
  width: 400px;
}

/* Pantalla de derrota */
.cuadro2 {
  background-color: rgba(255, 255, 255, 0.9);
  padding: 2rem;
  border-radius: 1rem;
  text-align: center;
  box-shadow: 0 0 1rem #aaa;
  max-width: 90vw;
  width: 400px;
}

/* Overlay para derrota */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(0,0,0,0.5);
  padding: 2vh 2vw;
  box-sizing: border-box;
}

/* Contenedor del juego */
#contenedorJuego {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  position: relative;
  background: url('FONDO.png') no-repeat center center;
  background-size: cover;
  
}

/* Canvas responsivo */
#canvas {
  background-color: #e6f7ff;
  border: 0.2rem solid #ccc;
  border-radius: 0.5rem;
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  background: url('FONDOGAME.png') no-repeat center center;
  background-size: cover;
}



/* Botón de reparar */
#btnReparar {
  position: absolute;
  bottom: 10vh;
  left: 50%;
  transform: translateX(-50%);
  padding: 2rem 4rem;
  font-size: 1.1rem;
  font-weight: bold;
  background: linear-gradient(135deg, rgba(0, 188, 212, 0.8), rgba(33, 150, 243, 0.9));
  color: white;
  border: none;
  border-radius: 0.75rem;
  cursor: pointer;
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#btnReparar:hover {
  transform: translateX(-50%) scale(1.05);
  box-shadow: 0 0.4rem 0.8rem rgba(0, 0, 0, 0.3);
  background: linear-gradient(135deg, #03a9f4, #0288d1);
}

#btnReparar:active {
  transform: translateX(-50%) scale(0.98);
  box-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.2);
  background: linear-gradient(135deg, #0288d1, #01579b);
}

/* Cuadro de puntuación */
.cuadroPuntos {
  position: absolute;
  top: 2vh;
  left: 2vw;
  background-color: rgba(255, 255, 255, 0.85);
  padding: 0.8rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  box-shadow: 0 0 0.3rem #999;
  z-index: 10;
}

/* Botón de jugar */
#btnJugar {
  display: block;
  margin: 2vh auto;
  padding: 1rem 2rem;
  font-size: 1.25rem;
  font-weight: bold;
  background: linear-gradient(135deg, #1e88e5, #00acc1);
  color: white;
  border: none;
  border-radius: 0.875rem;
  cursor: pointer;
  box-shadow: 0 0.3125rem 0.625rem rgba(0, 0, 0, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.3s ease;
}

#btnJugar:hover {
  transform: scale(1.08);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.35);
  background: linear-gradient(135deg, #29b6f6, #00bcd4);
}

#btnJugar:active {
  transform: scale(0.96);
  box-shadow: 0 0.1875rem 0.5rem rgba(0, 0, 0, 0.2);
  background: linear-gradient(135deg, #0288d1, #0097a7);
}

/* Botones generales */
button {
  display: block;
  margin: 2vh auto;
  padding: 1rem 2rem;
  font-size: 1.25rem;
  font-weight: bold;
  background: linear-gradient(135deg, #1e88e5, #00acc1);
  color: white;
  border: none;
  border-radius: 0.875rem;
  cursor: pointer;
  box-shadow: 0 0.3125rem 0.625rem rgba(0, 0, 0, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.3s ease;
}

/* Media query para pantallas pequeñas */
@media (max-width: 600px) {
  #btnReparar,
  #btnJugar,
  button {
    font-size: 1rem;
    padding: 0.8rem 1.5rem;
  }

  .cuadroPuntos {
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
  }
}