@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700&display=swap");

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Open Sans", sans-serif;
}

body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(90deg, #4b6cb7 0%, #182848 100%);
  color: #fff;
}

.pong-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

#pong {
  border: 2px solid #fff;
  background: radial-gradient(
    circle,
    rgba(36, 36, 36, 1) 0%,
    rgba(17, 17, 17, 1) 100%
  );
  /* Adjust size for smaller screens */
  width: 80vw;
  height: 80vh;
  max-width: 400px; /* Limit maximum width */
  max-height: 400px; /* Limit maximum height */
}

.ball,
.paddle {
  background-color: #fff;
  position: absolute;
  width: 5%; /* Adjust size as a percentage of game board */
  height: 10vh; /* Adjust height relative to viewport height */
}

.paddle-left {
  left: 5%; /* Position paddle on the left side */
  top: 50%; /* Center vertically */
  transform: translateY(-50%);
}

.paddle-right {
  right: 5%; /* Position paddle on the right side */
  top: 50%; /* Center vertically */
  transform: translateY(-50%);
}

.scoreboard {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  font-size: 20px;
}

.controls {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.controls button {
  background: #293447;
  color: #fff;
  border: 1px solid #fff;
  padding: 10px 20px;
  margin: 0 10px;
  cursor: pointer;
  font-size: 16px;
  border-radius: 5px;
  transition: background 0.3s;
}

.controls button:hover {
  background: #4b6cb7;
}

.power-up {
  background: #ffcc00;
  border-radius: 50%;
  position: absolute;
  width: 20px;
  height: 20px;
}

/* Media query for small screens */
@media screen and (max-width: 600px) {
  .ball,
  .paddle {
    width: 6%; /* Adjust size for smaller screens */
    height: 8vh; /* Adjust height relative to viewport height */
  }

  .controls {
    flex-direction: column;
    align-items: center;
  }

  .controls button {
    margin: 5px;
    font-size: 14px;
    padding: 8px 15px;
  }

  .power-up {
    width: 15px;
    height: 15px;
  }

  .scoreboard {
    font-size: 16px;
  }
}
