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

body {
  background-color: #e7ecef;
  display: flex;
  justify-content: center;
  padding: 20px;
}

.game-container {
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  padding: 20px;
  max-width: 1050px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.game-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 15px;
  border-bottom: 1px solid #ddd;
  margin-bottom: 20px;
}

h1 {
  color: #1c7b34;
  font-size: 28px;
}

.scores-container {
  display: flex;
  gap: 10px;
}

.score-container {
  background-color: #1c7b34;
  color: white;
  padding: 10px 15px;
  border-radius: 25px;
  font-weight: bold;
  font-size: 18px;
}

.best-score {
  background-color: #4c956c;
}

canvas {
  background-color: #bdd5ea;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  cursor: none; /* Hide cursor when over canvas */
}

.controls-info {
  margin-top: 20px;
  color: #555;
  text-align: center;
}

.game-over {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(255, 255, 255, 0.95);
  padding: 30px 40px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(255, 255, 255, 0.95);
  padding: 30px 40px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  font-size: 24px;
  color: #1c7b34;
}

.game-over h2 {
  color: #1c7b34;
  margin-bottom: 15px;
  font-size: 32px;
}

.game-over p {
  margin-bottom: 20px;
  color: #444;
}

#finalScore,
#finalBestScore {
  font-weight: bold;
  font-size: 20px;
  color: #1c7b34;
}

.new-best-score {
  color: #4c956c !important;
  font-weight: bold;
  font-size: 22px !important;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

#restartButton {
  background-color: #1c7b34;
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s;
}

#restartButton:hover {
  background-color: #e85a2a;
}

.hidden {
  display: none;
}
