body {
    background: #222;
    color: #fff;
    text-align: center;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

h1 {
    margin-top: 30px;
    margin-bottom: 10px;
    font-size: 2em;
}

#pong {
    background: #111;
    display: block;
    margin: 0 auto;
    border: 2px solid #fff;
    box-shadow: 0 0 16px #fff4;
}

#game-settings {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 0;
  margin-bottom: 8px;
}
#game-settings label {
  font-size: 1.1rem;
  color: #fff;
}
#game-minutes {
  width: 60px;
  font-size: 1.1rem;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #ccc;
}
#start-game-btn {
  font-size: 1.1rem;
  padding: 4px 12px;
  border-radius: 4px;
  border: none;
  background: #0ff;
  color: #222;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s;
}
#start-game-btn:hover {
  background: #0cc;
}

canvas {
  display: block;
  margin: 0 auto 18px auto;
  box-shadow: 0 0 16px #fff4;
}

#scoreboard,
#game-timer,
#winner-announcement {
  display: flex;
  justify-content: center;
  align-items: center;
}

#scoreboard {
  font-size: 2rem;
  font-family: 'Arial Rounded MT Bold', Arial, sans-serif;
  margin: 10px 0 0 0;
  gap: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  min-height: 2.5em;
}
#scoreboard span {
  margin: 0 4px;
}
#winner-announcement {
  text-align: center;
  font-size: 1.1rem;
  font-weight: bold;
  color: #ff0;
  margin-left: 18px;
  min-width: 180px;
  white-space: pre-line;
}
#player1-score, #player2-score {
  font-weight: bold;
  font-size: 2.2rem;
}
#player1-face, #player2-face {
  font-size: 2.2rem;
}

#game-timer {
  font-size: 1.3rem;
  font-family: 'Arial Rounded MT Bold', Arial, sans-serif;
  color: #fff;
  margin: 0;
  padding: 0 8px;
  display: inline-block;
}
#timer-value {
  font-weight: bold;
  margin-left: 6px;
}

#header-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
#header-row h1 {
  margin: 0;
  font-size: 2.1rem;
}

@media (max-width: 900px) {
  canvas {
    width: 100vw !important;
    max-width: 100vw;
    height: auto !important;
  }
  #scoreboard, #game-timer, #winner-announcement {
    font-size: 1.1rem;
  }
}
@media (max-width: 700px) {
  #header-row {
    flex-direction: column;
    gap: 8px;
  }
  #header-row h1 {
    font-size: 1.2rem;
  }
  #game-timer {
    font-size: 1rem;
  }
}
