/* ==================== صفحه لیدربرد ==================== */

.leaderboard-page {
  padding: 20px 0;
}

/* هدر */
.leaderboard-header {
  text-align: center;
  margin-bottom: 30px;
}

.leaderboard-header .section-title {
  font-size: 28px;
  margin-bottom: 8px;
}

.leaderboard-subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
}

/* کارت‌های آمار */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  background: white;
  border-radius: 20px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.stat-card .stat-icon {
  font-size: 35px;
  margin-bottom: 8px;
}

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 800;
  color: #4361ee;
}

.stat-card .stat-label {
  font-size: 12px;
  color: #666;
  margin-top: 5px;
}

/* سکوی قهرمانان */
.podium-section {
  margin-bottom: 40px;
}

.podium {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
}

.podium-card {
  background: white;
  border-radius: 20px;
  padding: 20px 25px;
  text-align: center;
  min-width: 130px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.podium-card.first {
  background: linear-gradient(135deg, #ffd700, #ffb347);
  transform: scale(1.05);
}

.podium-card.second {
  background: linear-gradient(135deg, #c0c0c0, #a8a8a8);
}

.podium-card.third {
  background: linear-gradient(135deg, #cd7f32, #b87333);
}

.podium-rank {
  font-size: 28px;
  font-weight: 800;
  color: white;
}

.podium-name {
  font-size: 16px;
  font-weight: 700;
  color: white;
  margin: 10px 0 5px;
}

.podium-points {
  font-size: 18px;
  font-weight: 700;
  color: white;
}

/* جدول رتبه‌بندی */
.table-container {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.rank-table {
  width: 100%;
  border-collapse: collapse;
}

.rank-table th {
  background: linear-gradient(135deg, #4361ee, #7209b7);
  color: white;
  padding: 15px 12px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
}

.rank-table td {
  padding: 12px 10px;
  text-align: center;
  border-bottom: 1px solid #eee;
}

.rank-table tr:last-child td {
  border-bottom: none;
}

.rank-table tr:hover {
  background: #f8f9fa;
}

.current-user {
  background: rgba(67, 97, 238, 0.1);
  border-right: 3px solid #4361ee;
}

.rank-number {
  font-weight: 700;
  font-size: 18px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

.user-avatar-sm {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #4361ee, #7209b7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 12px;
}

.user-name {
  font-weight: 600;
}

.badge-you {
  background: #06ffa5;
  color: #1a1a2e;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 9px;
  font-weight: 600;
  margin-right: 6px;
}

.points {
  font-weight: 700;
  color: #4361ee;
}

/* صفحه‌بندی */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin: 30px 0;
}

.pagination button {
  background: white;
  border: none;
  padding: 10px 25px;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
}

.pagination button:hover:not(:disabled) {
  background: linear-gradient(135deg, #4361ee, #7209b7);
  color: white;
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination span {
  background: white;
  padding: 8px 20px;
  border-radius: 50px;
}

/* رتبه کاربر جاری در پایین */
.my-rank {
  background: white;
  border-radius: 20px;
  padding: 20px;
  text-align: center;
  margin-top: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.my-rank .rank-big {
  font-size: 28px;
  font-weight: 800;
  color: #4361ee;
  margin: 0 5px;
}

.my-rank .rank-progress {
  background: #e0e0e0;
  height: 6px;
  border-radius: 10px;
  max-width: 250px;
  margin: 12px auto 0;
  overflow: hidden;
}

.my-rank .rank-progress .fill {
  background: linear-gradient(90deg, #4361ee, #7209b7);
  height: 100%;
  width: 0%;
}

/* ریسپانسیو */
@media (max-width: 768px) {
  .stats-grid {
    gap: 10px;
  }

  .stat-card {
    padding: 12px;
  }

  .stat-card .stat-value {
    font-size: 22px;
  }

  .podium-card {
    min-width: 100px;
    padding: 15px;
  }

  .podium-name {
    font-size: 12px;
  }

  .rank-table th,
  .rank-table td {
    padding: 8px 5px;
    font-size: 12px;
  }

  .user-avatar-sm {
    width: 28px;
    height: 28px;
    font-size: 10px;
  }
}

@media (max-width: 550px) {
  .rank-table th:nth-child(4),
  .rank-table td:nth-child(4) {
    display: none;
  }

  .podium-card {
    min-width: 80px;
    padding: 10px;
  }

  .podium-rank {
    font-size: 20px;
  }

  .podium-points {
    font-size: 14px;
  }
}
