body {
  margin: 0;
  font-family: Arial, sans-serif;

  background: url("img/fondo-pong.png") no-repeat center center;
  background-size: cover;
  background-attachment: fixed;

  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.game {
  width: 700px;
  height: 400px;
  background: #111;
  position: relative;
  overflow: hidden;
  border: 2px solid white;
}

/* marcador */
.score {
  position: absolute;
  top: 10px;
  width: 100%;
  text-align: center;
  font-size: 30px;
}

/* paletas */
.paddle {
  width: 10px;
  height: 80px;
  background: white;
  position: absolute;
}

#paddle-left {
  left: 10px;
  top: 160px;
}

#paddle-right {
  right: 10px;
  top: 160px;
}

/* pelota */
#ball {
  width: 12px;
  height: 12px;
  background: white;
  border-radius: 50%;
  position: absolute;
  top: 200px;
  left: 350px;
}

.overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  z-index: 10;
}

.overlay h1 {
  font-size: 40px;
  margin-bottom: 20px;
}

.overlay button {
  padding: 12px 30px;
  font-size: 18px;
  cursor: pointer;
  border: none;
  background: white;
  color: black;
  border-radius: 8px;
}

.overlay button:hover {
  transform: scale(1.1);
  background: #ddd;
}

#pauseBtn {
  position: absolute;
  top: 10px;
  right: 10px;

  padding: 5px 10px;
  font-size: 16px;

  cursor: pointer;
  border: none;
  border-radius: 5px;

  background: white;
  color: black;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  background: rgba(0, 0, 0, 0.6); /* ajustá 0.4–0.7 */
  z-index: -1;
}

/* CONTENEDOR GENERAL */
.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

/* HUD */
.hud {
  width: 700px;
  max-width: 90%;

  display: flex;
  justify-content: center; /* 👈 centra todo */
  align-items: center;

  position: relative; /* 👈 necesario para el botón */
}

/* MARCADOR */
.score-box {
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 10px 20px;

  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(10px);

  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);

  font-size: 26px;
  font-weight: bold;

  box-shadow: 0 0 15px rgba(0,0,0,0.5);
}

.score-box span {
  color: white;
}

.divider {
  opacity: 0.5;
}

/* BOTÓN PAUSA */
#pauseBtn {
  padding: 10px 16px;
  font-size: 18px;

  border: none;
  border-radius: 10px;

  background: linear-gradient(135deg, #ffffff, #dcdcdc);
  color: black;

  cursor: pointer;

  box-shadow: 0 5px 15px rgba(0,0,0,0.4);

  transition: all 0.2s ease;
}

#pauseBtn:hover {
  transform: scale(1.1);
}

#pauseBtn:active {
  transform: scale(0.95);
}

#pauseBtn {
  position: absolute;
  right: 0;
}

.score-box {
  margin: 0 auto;
}

#pauseBtn {
  right: 10px;
}