/* ===============================
   LEADERBOARDS
   Index: server cards
   Per-server: grid of live panels
================================ */

/* ---------- Index: section and cards ---------- */
.leaderboards-section {
  padding: 60px 8%;
  background: rgba(255, 255, 255, 0.02);
}

.leaderboards-container {
  max-width: 1000px;
  margin: 0 auto;
}

.leaderboards-section .section-title {
  font-size: 1.8rem;
  margin-bottom: 8px;
  text-align: center;
}

.leaderboards-section .section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 36px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.leaderboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  align-items: stretch;
}

.leaderboard-card {
  display: block;
  padding: 28px 24px;
  border-radius: 18px;
  background: rgba(18, 20, 40, 0.85);
  border: 1px solid rgba(123, 92, 255, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.leaderboard-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(123, 92, 255, 0.25);
  border-color: rgba(123, 92, 255, 0.5);
}

.leaderboard-card.coming-soon {
  opacity: 0.75;
  cursor: default;
  position: relative;
}

.leaderboard-card.coming-soon:hover {
  transform: none;
  box-shadow: none;
  border-color: rgba(123, 92, 255, 0.25);
}

.leaderboard-card .coming-soon-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  background: rgba(123, 92, 255, 0.2);
  padding: 4px 10px;
  border-radius: 8px;
  margin-bottom: 10px;
}

.leaderboard-card-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 12px;
}

.leaderboard-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  background: linear-gradient(90deg, #7b5cff, #5f8cff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.leaderboard-types {
  list-style: none;
  margin: 0 0 16px 0;
  padding: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.leaderboard-types li::before {
  content: "• ";
  color: rgba(123, 92, 255, 0.8);
}

.leaderboard-card-cta {
  font-size: 0.9rem;
  font-weight: 600;
  color: #7b5cff;
}

.leaderboard-card:hover .leaderboard-card-cta {
  text-decoration: underline;
}

.leaderboard-card.coming-soon .leaderboard-card-cta {
  display: none;
}

/* ---------- Per-server page: hero ---------- */
.hero-leaderboard-page .hero-content {
  padding-bottom: 1.5rem;
}

.leaderboard-back-wrap {
  margin-bottom: 12px;
}

.leaderboard-back {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
}

.leaderboard-back:hover {
  color: #7b5cff;
}

/* ---------- Per-server: grid of live panels ---------- */
.leaderboard-panels-section {
  padding: 40px 8% 80px;
}

.leaderboard-panels-container {
  max-width: 1200px;
  margin: 0 auto;
}

.leaderboard-panels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  align-items: start;
}

.leaderboard-panel {
  background: rgba(18, 20, 40, 0.9);
  border: 1px solid rgba(123, 92, 255, 0.3);
  border-radius: 16px;
  overflow: hidden;
}

.leaderboard-panel-title {
  font-size: 1.1rem;
  font-weight: 700;
  padding: 16px 20px;
  margin: 0;
  background: rgba(123, 92, 255, 0.15);
  border-bottom: 1px solid rgba(123, 92, 255, 0.25);
  background: linear-gradient(90deg, #7b5cff, #5f8cff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.leaderboard-panel-body {
  padding: 0;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.leaderboard-table th,
.leaderboard-table td {
  padding: 10px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(123, 92, 255, 0.15);
}

.leaderboard-table th {
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.2);
}

.leaderboard-table th:first-child,
.leaderboard-table td:first-child {
  width: 48px;
  text-align: center;
  color: var(--text-secondary);
}

.leaderboard-table tbody tr:hover {
  background: rgba(123, 92, 255, 0.08);
}

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

.leaderboard-loading {
  color: var(--text-secondary);
  font-style: italic;
  text-align: center;
  padding: 24px;
}

.leaderboard-empty {
  color: var(--text-secondary);
  text-align: center;
  padding: 24px;
}
