.leaderboard-container {
  width: 320px;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  padding: var(--spacing-sm);
  min-height: 100%;
  height: auto;
  max-height: 100%;
  overflow-y: auto;
  flex-shrink: 0;
  box-shadow: inset -1px 0 0 var(--color-border);
}

.leaderboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-sm);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

.leaderboard-header {
  position: relative; /* wichtig für position: absolute im Dropdown */
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.leaderboard-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.3rem 1rem;
  border-radius: var(--radius);
  background-color: var(--color-bg);
  cursor: pointer;
  transition: background 0.2s ease;
  gap: 0.6rem;
}

.leaderboard-entry:hover {
  background-color: var(--color-accent-strong);
  color: white;
}

.rank {
  width: 2rem;
  text-align: right;
  font-weight: bold;
  color: var(--color-muted);
}

.flag-container {
  width: 24px;
  display: flex;
  justify-content: center;
}

.flag {
  width: 20px;
  height: 14px;
  border-radius: 2px;
  object-fit: cover;
}

.name {
  flex: 1;
  font-weight: 500;
  color: var(--color-text);
  font-size: 1rem;
}

.elo {
  width: 3.2rem;
  text-align: right;
  font-weight: bold;
  color: var(--color-accent);
}

.leaderboard-search {
  width: 100%;
  padding: 0.4rem 0.7rem;
  font-size: 0.95rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
  box-sizing: border-box;
}


.leaderboard-tabs {
  display: flex;
  width: 100%;
  margin-bottom: 0.8rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}


.leaderboard-tab {
  flex: 1;
  padding: 0.6rem 0;
  text-align: center;
  background-color: var(--color-surface);
  border: none;
  font-weight: bold;
  color: var(--text-color);
  cursor: pointer;
  transition: background-color 0.2s ease;
  font-size: 0.95rem;
  border-right: 1px solid var(--color-border);
  margin: 0;
}
.leaderboard-tab:last-child {
  border-right: none;
}


.leaderboard-tab:hover {
  background-color: var(--color-surface);
}

.leaderboard-tab.active-tab {
  background-color: var(--color-accent);
  color: white;
}

.country-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.6rem;
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  width: 220px;
  display: none;
  flex-direction: column;
}


.country-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.country-list button {
  background: none;
  border: none;
  padding: 0.4rem;
  color: var(--text-color);
  text-align: left;
  cursor: pointer;
}

.country-list button:hover {
  background-color: var(--color-accent);
  color: white;
}

.country-filter-input {
  box-sizing: border-box;
  width: 100%;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background-color: var(--color-surface);
  color: var(--color-text);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}


/* Collapse-Button Style */
.collapse-btn {
  position: absolute;
  top: 80px;
  left: 320px;
  z-index: 100;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  transition: background 0.2s ease;
}
.collapse-btn:hover {
  background: var(--color-accent);
  color: white;
}

.collapsed .leaderboard-container {
  display: none;
}

.collapsed #collapseToggle {
  left: 10px;
}
