.toplist-wrapper {
  width: 90%;
  max-width: 700px;
  margin: 2em auto;
  font-family: "Comfortaa", sans-serif;
}

.toplist-title {
  text-align: center;
  margin: 20px 0;
  color: var(--text);
  font-size: 1.8rem;
}

.toplist-your-rating {
  text-align: center;
  color: var(--text);
  font-size: 1.1em;
  margin-bottom: 20px;
  padding: 12px 20px;
  background: var(--cloud-bg2);
  border-radius: 10px;
  display: inline-block;
  margin-left: 50%;
  transform: translateX(-50%);
}

.toplist-your-rating strong {
  color: #06a77d;
  font-size: 1.3em;
}

.toplist-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.toplist-tab {
  padding: 10px 20px;
  border: none;
  background: var(--cloud-bg2);
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95em;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.toplist-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.toplist-tab.active {
  background: linear-gradient(135deg, #06a77d 0%, #04d9a1 100%);
  color: white;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(6, 167, 125, 0.4);
}

.toplist-description {
  text-align: center;
  color: var(--text);
  opacity: 0.7;
  font-size: 0.9em;
  margin-bottom: 25px;
}

.toplist-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--cloud-bg2);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.toplist-table thead {
  background: rgba(0, 0, 0, 0.2);
}

.toplist-table th {
  color: var(--text);
  font-weight: bold;
  padding: 15px 12px;
  text-align: left;
  font-size: 0.9em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.toplist-table td {
  color: var(--text);
  padding: 14px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.toplist-table tbody tr:last-child td {
  border-bottom: none;
}

.toplist-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

.toplist-row.top-1 {
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.15) 0%, transparent 100%);
}

.toplist-row.top-2 {
  background: linear-gradient(90deg, rgba(192, 192, 192, 0.1) 0%, transparent 100%);
}

.toplist-row.top-3 {
  background: linear-gradient(90deg, rgba(205, 127, 50, 0.1) 0%, transparent 100%);
}

.toplist-rank {
  width: 50px;
  text-align: center !important;
  font-weight: bold;
}

.toplist-player {
  font-weight: 500;
}

.toplist-rating {
  width: 80px;
  text-align: center !important;
  font-weight: bold;
  color: #06a77d;
}

.toplist-change {
  width: 80px;
  text-align: center !important;
  font-weight: bold;
}

.toplist-change.positive {
  color: #4caf50;
}

.toplist-change.negative {
  color: #f44336;
}

.toplist-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text);
  background: var(--cloud-bg2);
  border-radius: 12px;
}

.toplist-empty i {
  font-size: 3rem;
  opacity: 0.3;
  margin-bottom: 20px;
  display: block;
}

.toplist-empty p {
  margin: 10px 0;
  font-size: 1.1em;
}

.toplist-empty-hint {
  opacity: 0.6;
  font-size: 0.9em !important;
}

/* Mobile Responsive */
@media (max-width: 600px) {
  .toplist-wrapper {
    width: 95%;
    margin: 1em auto;
  }

  .toplist-title {
    font-size: 1.4rem;
  }

  .toplist-tabs {
    gap: 6px;
  }

  .toplist-tab {
    padding: 8px 14px;
    font-size: 0.85em;
  }

  .toplist-table th,
  .toplist-table td {
    padding: 10px 8px;
    font-size: 0.85em;
  }

  .toplist-rank {
    width: 40px;
  }

  .toplist-rating,
  .toplist-change {
    width: 60px;
  }

  .toplist-your-rating {
    font-size: 0.95em;
    padding: 10px 16px;
  }
}
