
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

/* Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: #111;
/* background: url(/games/pong/pongBackground.jpg); */

  font-family: 'Montserrat', sans-serif;
  color: #f0f0f0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Container */
.glass-container {
  background: rgba(30, 30, 30, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  padding: 20px;
  max-width: 860px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Score Display */
.score {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: #ffffff;
  text-shadow: 0 0 5px rgba(0, 255, 195, 0.3);
}

/* Canvas */
canvas {
  width: 100%;
  max-width: 800px;
  height: auto;
  background-color: #000;
  border-radius: 15px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  margin: 0 0 20px 0;
  border-bottom: 2px solid rgba(255, 255, 255, 0.05);
}

/* Controls Section (New Layout) */
.controls-section {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 10px;
  align-items: center;
  flex-direction: row;
}

/* Each control group (Level, Points, Start/Restart) */
.control-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.control-group span {
  font-weight: 500;
  font-size: 1rem;
  color: #ccc;
}

/* Buttons */
button {
  background: #1f1f1f;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
}

button:hover {
  background-color: #333;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 255, 195, 0.15);
}

button:active {
  transform: scale(0.96);
}

/* Game Over Display */
#game-over {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.5rem;
  text-align: center;
  background-color: rgba(0, 0, 0, 0.85);
  padding: 20px 40px;
  border-radius: 20px;
  box-shadow: 0 0 20px rgba(0, 255, 195, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 100;
  color: #00ffc3;
}

#game-over.show {
  opacity: 1;
  pointer-events: all;
  animation: pulse 2s infinite ease-in-out;
}

#game-over span {
  font-size: 0.5em;
  display: block;
  margin-top: 10px;
  color: #ccc;
}

/* Animations */
@keyframes pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.05); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .score {
    font-size: 1.5rem;
  }

  canvas {
    max-height: 300px;
  }

  button {
    padding: 8px 14px;
    font-size: 0.9rem;
  }

  #game-over {
    font-size: 2rem;
    padding: 15px 25px;
  }

  #game-over span {
    font-size: 0.6em;
  }

  .controls-section {
    flex-direction: column;
    gap: 16px;
    margin-top: 15px;
  }
}
