#leaderboardContainer {
  width: 95vw;
  max-width: 600px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  max-height: 80vh; /* Keep it from overflowing screen */
}

.leaderboardHeader {
  display: flex;
  justify-content: space-between;
  width: 100%;
  align-items: center;
}

.tableWrapper {
  width: 100%;
  overflow-y: auto;
  margin: 10px 0;
  border: 1px solid var(--modalBorderColor);
  border-radius: 4px;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th {
  background-color: var(--buttonBackgroundColor);
  color: var(--buttonColor);
  padding: 10px;
  position: sticky;
  top: 0;
}

td {
  padding: 8px 10px;
  border-bottom: 1px solid #eee;
  font-size: 0.9rem;
}

/* Mobile optimizations */
@media (max-width: 480px) {
  td, th {
    padding: 6px 4px;
    font-size: 0.8rem;
  }
}

.leaderboard-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 10px;
}

.user-highlight {
  margin-top: 15px;
  padding: 10px;
  background-color: rgba(0, 64, 175, 0.1);
  border-radius: 6px;
  width: 100%;
  font-weight: bold;
  box-sizing: border-box;
}

#leaderboardHeader {
  margin: auto;
}