#game-over {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  background: var(--color-overlay-bg);
}

#game-over p {
  margin: 0 0 var(--space-sm);
  font-size: 2.5rem;
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 3px;
}

#game-over-summary {
  color: var(--color-text-dim);
  font-size: 0.95rem;
  text-align: center;
  max-width: 480px;
}

#game-over-players {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 360px;
  max-height: 40vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

#game-over-players li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-panel-bg);
  border: 1px solid var(--color-secondary-dark);
  border-radius: var(--radius-sm);
}

/* Marks the current player's own row — matches the "you are red" convention
   used everywhere else (own player tinted red on canvas, "Survived" stat
   line, etc.) so it reads as the same kind of signal. */
#game-over-players li.me {
  border-color: var(--color-primary);
  background: rgba(217, 38, 38, 0.18);
}

#game-over-players .player-left {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  overflow: hidden;
}

#game-over-players .player-rank {
  flex: none;
  width: 24px;
  color: var(--color-secondary);
  font-weight: var(--font-weight-bold);
  font-size: 0.85rem;
}

#game-over-players .player-name {
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#game-over-players .player-stats {
  flex: none;
  color: var(--color-secondary);
  font-size: 0.85rem;
}

#game-over button {
  padding: var(--space-sm) var(--space-xl);
  border: none;
  border-radius: var(--radius-sm);
  font-weight: var(--font-weight-bold);
  font-size: 1rem;
}

#leave-room-gameover {
  background: var(--color-secondary);
  color: var(--color-button-text);
}
#leave-room-gameover:hover {
  background: var(--color-secondary-dark);
  color: #fff;
}
