/* Leaderboard Hero */
.leaderboard-hero {
  padding: 140px 0 60px;
  text-align: center;
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(29, 184, 87, 0.15);
  border: 1px solid rgba(29, 184, 87, 0.3);
  border-radius: 50px;
  padding: 0.5rem 1.2rem;
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.6s ease;
}

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

.leaderboard-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, #2dd475 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeInUp 0.8s ease;
}

.leaderboard-subtitle {
  font-size: 1.2rem;
  color: #ffffff;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 1s ease;
}

/* Controls Section */
.leaderboard-controls-section {
  padding: 0 0 40px;
  position: relative;
  z-index: 2;
}

.leaderboard-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background: rgba(18, 30, 22, 0.6);
  border: 1px solid rgba(29, 184, 87, 0.2);
  border-radius: 16px;
  gap: 2rem;
  flex-wrap: wrap;
}

.controls-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.controls-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin: 0;
}

.total-servers {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.controls-right {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.ranking-filter {
  padding: 0.75rem 1.2rem;
  background: rgba(18, 30, 22, 0.6);
  border: 1px solid rgba(29, 184, 87, 0.3);
  border-radius: 10px;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
  min-width: 160px;
}

.ranking-filter:hover {
  background: rgba(18, 30, 22, 0.6);
  border-color: #1db857;
  box-shadow: 0 0 15px rgba(29, 184, 87, 0.25);
  transform: translateY(-2px);
}

.ranking-filter:focus {
  background: rgba(18, 30, 22, 0.6);
  border-color: #1db857;
  box-shadow: 0 0 0 3px rgba(29, 184, 87, 0.15);
}

.ranking-filter option {
  background: #1a1a1a;
  color: #ffffff;
  padding: 0.5rem;
}

/* Leaderboard Section */
.leaderboard-section {
  padding: 20px 0 80px;
  position: relative;
  z-index: 2;
}

/* Podium */
.podium-container {
  margin-bottom: 3rem;
  min-height: 400px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 1.5rem;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(18, 30, 22, 0.4) 0%, rgba(15, 25, 18, 0.6) 100%);
  border: 1px solid rgba(29, 184, 87, 0.15);
  border-radius: 20px;
  position: relative;
  overflow: hidden;
}

.podium-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #1db857, transparent);
  opacity: 0.5;
}

.loading-state {
  text-align: center;
  padding: 4rem 2rem;
  width: 100%;
}

.loading-spinner-large {
  width: 60px;
  height: 60px;
  border: 5px solid rgba(29, 184, 87, 0.2);
  border-top-color: #1db857;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

.loading-state p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.podium-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  transition: all 0.4s ease;
  animation: fadeInUp 0.8s ease;
}

.podium-item:nth-child(1) {
  order: 2;
  animation-delay: 0.2s;
}

.podium-item:nth-child(2) {
  order: 1;
  animation-delay: 0.1s;
}

.podium-item:nth-child(3) {
  order: 3;
  animation-delay: 0.3s;
}

.podium-rank {
  position: relative;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 2rem;
  font-weight: 800;
  animation: pulse 2s ease-in-out infinite;
}

.podium-item:nth-child(1) .podium-rank {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  color: #000;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
  width: 80px;
  height: 80px;
}

.podium-item:nth-child(2) .podium-rank {
  background: linear-gradient(135deg, #C0C0C0 0%, #808080 100%);
  color: #000;
  box-shadow: 0 0 25px rgba(192, 192, 192, 0.4);
}

.podium-item:nth-child(3) .podium-rank {
  background: linear-gradient(135deg, #CD7F32 0%, #8B4513 100%);
  color: #fff;
  box-shadow: 0 0 20px rgba(205, 127, 50, 0.4);
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.podium-card {
  background: linear-gradient(135deg, rgba(18, 30, 22, 0.9) 0%, rgba(15, 25, 18, 1) 100%);
  border: 2px solid rgba(29, 184, 87, 0.3);
  border-radius: 16px;
  padding: 1.5rem;
  width: 280px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.podium-item:nth-child(1) .podium-card {
  border-color: rgba(255, 215, 0, 0.5);
  transform: translateY(-20px);
}

.podium-item:nth-child(2) .podium-card {
  border-color: rgba(192, 192, 192, 0.4);
}

.podium-item:nth-child(3) .podium-card {
  border-color: rgba(205, 127, 50, 0.4);
}

.podium-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(29, 184, 87, 0.3);
  border-color: var(--primary-color);
}

.podium-item:nth-child(1) .podium-card:hover {
  transform: translateY(-28px);
  box-shadow: 0 20px 50px rgba(255, 215, 0, 0.4);
}

.podium-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid rgba(29, 184, 87, 0.3);
  margin: 0 auto 1rem;
  object-fit: cover;
  transition: all 0.3s ease;
}

.podium-item:nth-child(1) .podium-avatar {
  width: 120px;
  height: 120px;
  border-color: rgba(255, 215, 0, 0.6);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.podium-card:hover .podium-avatar {
  transform: scale(1.1);
  border-color: var(--primary-color);
}

.podium-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.podium-stats {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(29, 184, 87, 0.2);
}

.podium-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.podium-stat-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-color);
}

.podium-stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Leaderboard List */
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: linear-gradient(135deg, rgba(18, 30, 22, 0.6) 0%, rgba(15, 25, 18, 0.8) 100%);
  border: 1px solid rgba(29, 184, 87, 0.2);
  border-radius: 16px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
  animation: fadeInUp 0.6s ease;
  animation-fill-mode: both;
}

.leaderboard-item:nth-child(1) { animation-delay: 0.1s; }
.leaderboard-item:nth-child(2) { animation-delay: 0.15s; }
.leaderboard-item:nth-child(3) { animation-delay: 0.2s; }
.leaderboard-item:nth-child(4) { animation-delay: 0.25s; }
.leaderboard-item:nth-child(5) { animation-delay: 0.3s; }

.leaderboard-item:hover {
  background: linear-gradient(135deg, rgba(18, 30, 22, 0.8) 0%, rgba(15, 25, 18, 1) 100%);
  border-color: var(--primary-color);
  transform: translateX(8px);
  box-shadow: 0 8px 30px rgba(29, 184, 87, 0.2);
}

.leaderboard-rank {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary-color);
  min-width: 60px;
  text-align: center;
  background: rgba(29, 184, 87, 0.1);
  border: 2px solid rgba(29, 184, 87, 0.3);
  border-radius: 12px;
  padding: 0.5rem;
  transition: all 0.3s ease;
}

.leaderboard-item:hover .leaderboard-rank {
  background: rgba(29, 184, 87, 0.2);
  border-color: var(--primary-color);
  transform: scale(1.1);
}

.leaderboard-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 2px solid rgba(29, 184, 87, 0.3);
  object-fit: cover;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.leaderboard-item:hover .leaderboard-avatar {
  border-color: var(--primary-color);
  box-shadow: 0 0 15px rgba(29, 184, 87, 0.4);
}

.leaderboard-info {
  flex: 1;
  min-width: 0;
}

.leaderboard-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leaderboard-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-plus {
  background: rgba(241, 196, 15, 0.2);
  color: #f1c40f;
  border: 1px solid rgba(241, 196, 15, 0.4);
}

.badge-verified {
  background: rgba(29, 184, 87, 0.2);
  color: var(--primary-color);
  border: 1px solid rgba(29, 184, 87, 0.4);
}

.leaderboard-stats {
  display: flex;
  gap: 2rem;
  align-items: center;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  min-width: 80px;
}

.stat-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.stat-value svg {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Pagination */
.leaderboard-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 3rem;
  padding: 1.5rem;
  background: rgba(18, 30, 22, 0.5);
  border: 1px solid rgba(29, 184, 87, 0.15);
  border-radius: 12px;
}

.pagination-btn {
  padding: 0.75rem 1.5rem;
  background: rgba(29, 184, 87, 0.15);
  color: var(--primary-color);
  border: 1px solid rgba(29, 184, 87, 0.3);
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pagination-btn:hover:not(:disabled) {
  background: rgba(29, 184, 87, 0.25);
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(29, 184, 87, 0.2);
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination-numbers {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.page-number {
  min-width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(29, 184, 87, 0.2);
  border-radius: 6px;
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.page-number:hover {
  background: rgba(29, 184, 87, 0.15);
  border-color: rgba(29, 184, 87, 0.4);
}

.page-number.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #000000;
}

.page-ellipsis {
  color: var(--text-secondary);
  padding: 0 0.5rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .podium-container {
    flex-direction: column;
    align-items: center;
  }

  .podium-item {
    order: unset !important;
  }

  .podium-card {
    width: 100%;
    max-width: 350px;
  }
}

@media (max-width: 768px) {
  .leaderboard-title {
    font-size: 2.5rem;
  }

  .leaderboard-subtitle {
    font-size: 1rem;
  }

  .leaderboard-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .controls-left {
    justify-content: space-between;
    width: 100%;
  }

  .controls-right {
    width: 100%;
  }

  .ranking-filter {
    flex: 1;
    min-width: unset;
  }

  .leaderboard-item {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .leaderboard-rank {
    min-width: 50px;
    font-size: 1.5rem;
  }

  .leaderboard-avatar {
    width: 60px;
    height: 60px;
  }

  .leaderboard-stats {
    width: 100%;
    justify-content: space-around;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(29, 184, 87, 0.2);
  }

  .stat-item {
    min-width: auto;
  }

  .podium-card {
    padding: 1rem;
  }

  .podium-avatar {
    width: 80px;
    height: 80px;
  }

  .podium-item:nth-child(1) .podium-avatar {
    width: 100px;
    height: 100px;
  }

  .podium-name {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .leaderboard-title {
    font-size: 2rem;
  }

  .leaderboard-hero {
    padding: 120px 0 40px;
  }

  .controls-title {
    font-size: 1.2rem;
  }

  .leaderboard-rank {
    min-width: 40px;
    font-size: 1.2rem;
    padding: 0.3rem;
  }

  .leaderboard-name {
    font-size: 1.1rem;
  }

  .stat-value {
    font-size: 1.1rem;
  }

  .pagination-btn {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }

  .page-number {
    min-width: 36px;
    height: 36px;
  }
}

/* Custom Dropdown */
.select {
  width: fit-content;
  cursor: pointer;
  position: relative;
  transition: 300ms;
  color: white;
  overflow: visible;
  z-index: 1000;
}

.selected {
  background-color: rgba(42, 42, 42, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px 32px;
  margin-bottom: 3px;
  border-radius: 12px;
  position: relative;
  z-index: 100000;
  font-size: 1rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 200px;
  transition: all 0.3s ease;
}

.selected:hover {
  background: rgba(42, 42, 42, 0.8);
  border-color: rgba(29, 184, 87, 0.3);
}

.arrow {
  position: relative;
  right: 0px;
  height: 10px;
  transform: rotate(-90deg);
  width: 25px;
  fill: white;
  z-index: 100000;
  transition: 300ms;
}

.options {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  padding: 8px;
  background-color: rgba(42, 42, 42, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: absolute;
  top: 100%;
  left: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms, transform 300ms;
  transform: translateY(-10px);
  min-width: 200px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.select.active .options {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.select.active .selected .arrow {
  transform: rotate(0deg);
}

.option {
  border-radius: 8px;
  padding: 12px 16px;
  transition: 300ms;
  background-color: transparent;
  width: 100%;
  font-size: 1rem;
  cursor: pointer;
}
.option:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

.options input[type="radio"] {
  display: none;
}

.options label {
  display: inline-block;
  cursor: pointer;
}
.options label::before {
  content: attr(data-txt);
}

.options input[type="radio"]:checked + label {
  display: none;
}

/* Ranking Filter */
.select:has(.options input[type="radio"]#rank-members:checked) .selected::before {
  content: attr(data-default);
}
.select:has(.options input[type="radio"]#rank-reviews:checked) .selected::before {
  content: attr(data-one);
}
.select:has(.options input[type="radio"]#rank-rating:checked) .selected::before {
  content: attr(data-two);
}
.select:has(.options input[type="radio"]#rank-bumps:checked) .selected::before {
  content: attr(data-three);
}

/* Time Filter */
.select:has(.options input[type="radio"]#time-all:checked) .selected::before {
  content: attr(data-default);
}
.select:has(.options input[type="radio"]#time-month:checked) .selected::before {
  content: attr(data-one);
}
.select:has(.options input[type="radio"]#time-week:checked) .selected::before {
  content: attr(data-two);
}
