@font-face {
  font-family: 'Urbane';
  src: url('Urbane-Heavy.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
}

body {
  margin: 0;
  overflow: hidden;
  background-color: #111;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  font-family: Arial, sans-serif;
  color: white;

  --color-green: #09ca67;
  --color-red: #ea4335;
  --color-orange: #ff9b2e;
  --color-purple: #9747ff;
  --color-grey: #c0c0c0;
  --color-bg: #314141;
}
canvas {
  border: 1px solid #333;
  background-color: #222; /* Will be set by JS */
}
#ui-container {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 10;
}
#leaderboard {
  position: absolute;
  top: 20px;
  left: 20px;
  min-width: 200px;
  max-height: calc(100vh - 20px); /* Adjust max-height to fit viewport better */
  overflow-y: auto;
}
#leaderboard h3 {
  margin-top: 0;
  text-align: center;
}
#leaderboard ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
#leaderboard li {
  margin-bottom: 4px;
}

#leaderboard .playerItem {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: start;
  --avatar-border-color: var(--color-grey);
  --status-color: var(--color-grey);
}

#leaderboard .playerItem.currentPlayer {
  --status-color: var(--color-green) !important;
}
#leaderboard .playerItem.active {
  --avatar-border-color: var(--color-green);
  --status-color: white;
}
#leaderboard .playerItem.dead {
  --avatar-border-color: var(--color-red);
  --status-color: white;
}
#leaderboard .playerItem.waiting {
  --avatar-border-color: var(--color-orange);
  --status-color: var(--color-orange);
}
#leaderboard .playerItem.declined {
  --avatar-border-color: var(--color-red);
  --status-color: var(--color-red);
}

#leaderboard .avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  border: 2px solid var(--avatar-border-color);
  margin-right: 10px;
  background-color: var(--color-bg);
}

#leaderboard .playerInfo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

#leaderboard .playerName {
  font-family: Poppins, sans-serif;
  color: white;

  font-size: 12px;
  font-weight: 500;
}

#leaderboard .playerStatus {
  font-family: Poppins, sans-serif;
  color: var(--status-color);
  font-size: 10px;
  margin-top: 2px;
  font-weight: 400;
}

#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #222;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  font-size: 1.5em;
  text-align: center;
}
#spectate-info {
  position: fixed;
  bottom: 0px;
  left: 0px;
  color: rgba(48, 221, 212, 1);
  background-color: rgba(48, 221, 212, 0.15);
  display: none;
  z-index: 1001;
  height: 7vh;
  width: 100%;
  font-size: 3vh;
  padding-top: 3.5vh;
  font-family: Urbane;
  font-weight: 700;
  text-align: center;
}
#debug {
  position: absolute;
  bottom: 10px;
  left: 10px;
  font-size: 12px;
  color: #aaa;
}
