/* Leaderboard specific styles */

/* Tabs */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  padding: 4px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  width: fit-content;
}

.tab {
  padding: 10px 20px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}

.tab:hover {
  background: var(--surface-2);
  color: var(--text-primary);
}

.tab.active {
  background: var(--forest-600);
  color: white;
}

/* Podium */
.podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 16px;
  margin-bottom: 48px;
}

.podium-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  text-align: center;
  position: relative;
  transition: all 0.2s;
}

.podium-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.podium-card.rank-1 {
  width: 240px;
  border-color: #F59E0B;
  background: linear-gradient(to bottom, rgba(245, 158, 11, 0.1), var(--surface-1));
}

.podium-card.rank-2 {
  width: 220px;
  border-color: #94A3B8;
  background: linear-gradient(to bottom, rgba(148, 163, 184, 0.1), var(--surface-1));
}

.podium-card.rank-3 {
  width: 220px;
  border-color: #CD7F32;
  background: linear-gradient(to bottom, rgba(205, 127, 50, 0.1), var(--surface-1));
}

.rank-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  border: 3px solid var(--surface-bg);
}

.rank-1-badge {
  background: #F59E0B;
  color: white;
  width: 40px;
  height: 40px;
}

.rank-1-badge svg {
  width: 20px;
  height: 20px;
}

.rank-2-badge {
  background: #94A3B8;
  color: white;
}

.rank-3-badge {
  background: #CD7F32;
  color: white;
}

.podium-avatar {
  width: 80px;
  height: 80px;
  margin: 8px auto 16px;
  border-radius: 50%;
  border: 3px solid var(--border);
  overflow: hidden;
}

.podium-avatar.champion {
  width: 100px;
  height: 100px;
  border-color: #F59E0B;
  border-width: 4px;
}

.podium-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.podium-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.podium-stat {
  font-size: 20px;
  font-weight: 700;
  color: var(--forest-600);
}

/* Leaderboard Table */
.leaderboard {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 60px 1fr 140px 100px 100px;
  align-items: center;
  padding: 16px 20px;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  transition: all 0.15s;
}

.leaderboard-row:last-child {
  border-bottom: none;
}

.leaderboard-row.header {
  background: var(--surface-2);
  font-weight: 600;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 12px 20px;
}

.leaderboard-row:not(.header):hover {
  background: var(--surface-2);
}

.leaderboard-row.you {
  background: var(--forest-100);
  border-top: 2px solid var(--forest-600);
  border-bottom: 2px solid var(--forest-600);
}

.col-rank {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
}

.leaderboard-row.header .col-rank {
  font-size: 13px;
  font-weight: 600;
}

.col-player {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
}

.player-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
}

.col-stat {
  font-weight: 600;
  color: var(--forest-600);
}

.col-dinos,
.col-gems {
  text-align: center;
  color: var(--text-secondary);
}

.leaderboard-row.header .col-stat,
.leaderboard-row.header .col-dinos,
.leaderboard-row.header .col-gems {
  color: var(--text-secondary);
  font-weight: 600;
}

/* Load More */
.load-more {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

/* Responsive */
@media (max-width: 768px) {
  .tabs {
    width: 100%;
    flex-direction: column;
  }

  .tab {
    width: 100%;
  }

  .podium {
    flex-direction: column;
    align-items: center;
  }

  .podium-card.rank-1,
  .podium-card.rank-2,
  .podium-card.rank-3 {
    width: 100%;
    max-width: 280px;
  }

  .leaderboard-row {
    grid-template-columns: 50px 1fr 80px;
    gap: 12px;
    font-size: 14px;
  }

  .col-dinos,
  .col-gems {
    display: none;
  }
}
