body,
html {
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: #00000057 !important;

  color: white !important;
  font-family: Arial, sans-serif;
  position: relative;
  margin: 0;
  height: 100vh;
  /* Your background image */
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  /* Optional, makes the background fixed when scrolling */

}

/* Background with image and overlay */
#background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('see_you_to_no_more.jpg');
  /* Your background image */
  background-color: #000000 !important;
  background-size: 20%;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  z-index: 1;
  /* Keeps the background behind other elements */
}

#background::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: black;
  /* no rgba here, JS will control opacity */
  opacity: var(--overlay-opacity, 0.7);
  z-index: 2;
  pointer-events: none;
  /* so it doesn't block clicks */
}

#background.no-after::after {
  opacity: 0 !important;
}

/* Canvas */
canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  /* Keeps canvas above the overlay */
}

/* Menu */
#menu {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 4;
}

/* HUD */
#hud {
  position: fixed;
  width: 100%;
  z-index: 5;
}

.progress-container {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

#scoreboard {
  position: fixed;
  top: 10px;
  left: 10px;
}

.energy-container {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 15px;
  background: gray;
  border-radius: 8px;
  overflow: hidden;
}

.energy-bar {
  height: 100%;
  background: cyan;
  width: 100%;
}

#particleCanvas {
  display: block;
}

.progress {
  height: 20px;
  width: 400px;
}

#progressBar {
  width: 0%;
}

#hud {
  display: none;
}

#endMessage {
  display: none;
  text-align: center;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  background: rgba(0, 0, 0, 0.7);
  padding: 20px;
  border-radius: 10px;
  z-index: 6;
}

#restartBtn {
  margin-top: 10px;
  display: none;
}

#playerNameInput {
  max-width: 200px;
  margin: 0 auto;
}

#discordLoginBtn {
  display: none;
}

#leaderboard {
  flex: 1;
  text-align: left;
}

.endScreen {
  display: flex;
  gap: 40px;
  justify-content: center;
  align-items: flex-start;
  padding: 20px;
}

#results {
  flex: 1;
  color: red;
}

#leaderboardList li.gold {
  color: gold;
  font-weight: bold;
}

#leaderboardList li.silver {
  color: silver;
  font-weight: bold;
}

#leaderboardList li.bronze {
  color: #cd7f32;
  font-weight: bold;
}

#leaderboardList li.me {
  background: rgba(255, 255, 255, 0.1);
  padding: 3px;
  border-radius: 5px;
}

#leaderboardList2 li.gold {
  color: gold;
  font-weight: bold;
}

#leaderboardList2 li.silver {
  color: silver;
  font-weight: bold;
}

#leaderboardList2 li.bronze {
  color: #cd7f32;
  font-weight: bold;
}

#leaderboardList2 li.me {
  background: rgba(255, 255, 255, 0.1);
  padding: 3px;
  border-radius: 5px;
}

.source {
  right: 20px;
  bottom: 20px;
  z-index: 7;
}