/* ==========================================================================
   Ashes of Fallen World - Leaderboard & Live World Pulse Stylesheet
   Dark Fantasy RPG Aesthetic - 100% Responsive, Mobile-Optimized
   ========================================================================== */

/* Header / Hero Section */
.leaderboard-header-section {
  padding: 130px 0 30px;
  background: radial-gradient(circle at 50% 10%, rgba(229, 169, 59, 0.12) 0%, rgba(13, 15, 20, 0.95) 75%),
              linear-gradient(180deg, #07080a 0%, #0d0f14 100%);
  text-align: center;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
}

.leaderboard-header-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 250px;
  background: radial-gradient(ellipse, rgba(201, 59, 59, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.leaderboard-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 999px;
  margin-top: 15px;
}

.leaderboard-status-badge .live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulseLive 2s infinite ease-in-out;
}

@keyframes pulseLive {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* World Pulse Stats Grid */
.world-pulse-section {
  padding: 30px 0 20px;
}

.pulse-title-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 10px;
}

.pulse-title-wrap h3 {
  font-family: var(--font-title);
  font-size: 1.15rem;
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  gap: 8px;
}

.pulse-last-updated {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.world-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 30px;
}

.world-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 18px;
  min-height: 96px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.world-stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-gold);
  box-shadow: var(--shadow-glow);
}

.world-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent-gold), transparent);
}

.world-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(229, 169, 59, 0.1);
  border: 1px solid rgba(229, 169, 59, 0.25);
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.world-stat-icon.crimson {
  background: rgba(201, 59, 59, 0.12);
  border-color: rgba(201, 59, 59, 0.3);
  color: var(--accent-crimson-bright);
}

.world-stat-icon.blue {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.3);
  color: var(--accent-blue);
}

.world-stat-icon.emerald {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--accent-emerald);
}

.world-stat-icon.purple {
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(168, 85, 247, 0.3);
  color: var(--accent-purple);
}

.world-stat-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  flex: 1;
}

.world-stat-value {
  font-family: var(--font-title);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pulse-currency-stacked {
  display: flex;
  flex-direction: column;
  gap: 3px;
  justify-content: center;
}

.pulse-curr-row {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
}

.pulse-curr-row small {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
}

.world-stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 3px;
}

/* League Navigation Tabs (3 Top Leagues) */
.leaderboard-league-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.lb-league-btn {
  background: rgba(18, 22, 32, 0.85);
  border: 1px solid rgba(229, 169, 59, 0.2);
  color: var(--text-muted);
  padding: 12px 22px;
  border-radius: 999px;
  font-family: var(--font-title);
  font-size: 0.96rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  backdrop-filter: blur(8px);
}

.lb-league-btn:hover {
  color: #fff;
  border-color: rgba(229, 169, 59, 0.6);
  transform: translateY(-2px);
  background: rgba(30, 36, 52, 0.9);
}

.lb-league-btn.active {
  background: linear-gradient(135deg, rgba(229, 169, 59, 0.3) 0%, rgba(201, 59, 59, 0.35) 100%);
  border-color: var(--accent-gold);
  color: #fff;
  box-shadow: 0 0 20px rgba(229, 169, 59, 0.35);
}

.league-badge-live {
  font-size: 0.68rem;
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 2px 8px;
  border-radius: 999px;
}

.league-badge-hall {
  font-size: 0.68rem;
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(229, 169, 59, 0.18);
  color: var(--accent-gold);
  border: 1px solid rgba(229, 169, 59, 0.4);
  padding: 2px 8px;
  border-radius: 999px;
}

.league-badge-peak {
  font-size: 0.68rem;
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.4);
  padding: 2px 8px;
  border-radius: 999px;
}

/* League Info Banner */
.league-info-banner {
  background: linear-gradient(90deg, rgba(229, 169, 59, 0.08) 0%, rgba(20, 24, 34, 0.9) 100%);
  border: 1px solid rgba(229, 169, 59, 0.25);
  border-left: 4px solid var(--accent-gold);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.league-info-banner.alltime {
  border-left-color: #3b82f6;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.08) 0%, rgba(20, 24, 34, 0.9) 100%);
}

.league-info-banner.peaks {
  border-left-color: #a855f7;
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.08) 0%, rgba(20, 24, 34, 0.9) 100%);
}

.banner-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 260px;
}

.banner-icon {
  font-size: 1.4rem;
  color: var(--accent-gold);
  flex-shrink: 0;
}

.league-info-banner.alltime .banner-icon {
  color: #60a5fa;
}

.league-info-banner.peaks .banner-icon {
  color: #c084fc;
}

.banner-text h4 {
  font-family: var(--font-title);
  font-size: 0.95rem;
  color: #fff;
  margin: 0 0 4px;
  font-weight: 700;
}

.banner-text p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

.banner-countdown {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .banner-countdown {
    align-items: flex-start;
    width: 100%;
  }
}

.countdown-label {
  font-size: 0.74rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.countdown-timer {
  font-family: var(--font-title);
  font-size: 1.05rem;
  font-weight: 700;
  color: #34d399;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 4px 12px;
  border-radius: 6px;
  letter-spacing: 1px;
}

/* Category Navigation Tabs */
.leaderboard-tabs-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.lb-tab-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-title);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.lb-tab-btn:hover {
  color: var(--text-main);
  border-color: rgba(229, 169, 59, 0.4);
  background: var(--bg-card-hover);
}

.lb-tab-btn.active {
  background: linear-gradient(135deg, rgba(229, 169, 59, 0.25) 0%, rgba(201, 59, 59, 0.2) 100%);
  border-color: var(--accent-gold);
  color: #fff;
  box-shadow: 0 0 15px rgba(229, 169, 59, 0.25);
}

/* Top 3 Podium (Kürsü) */
.podium-container {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: 16px;
  align-items: flex-end;
  margin: 10px 0 35px;
}

.podium-card {
  background: linear-gradient(180deg, var(--bg-card-hover) 0%, var(--bg-card) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px 16px;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.podium-card:hover {
  transform: translateY(-4px);
}

.podium-rank-1 {
  border-color: rgba(229, 169, 59, 0.7);
  box-shadow: 0 10px 35px -5px rgba(229, 169, 59, 0.35);
  padding-top: 30px;
  padding-bottom: 26px;
  order: 2;
  background: linear-gradient(180deg, rgba(45, 36, 20, 0.95) 0%, rgba(20, 24, 33, 0.98) 100%);
}

.podium-rank-2 {
  border-color: rgba(148, 163, 184, 0.5);
  box-shadow: 0 8px 25px -5px rgba(148, 163, 184, 0.2);
  order: 1;
}

.podium-rank-3 {
  border-color: rgba(205, 127, 50, 0.5);
  box-shadow: 0 8px 25px -5px rgba(205, 127, 50, 0.2);
  order: 3;
}

.podium-badge {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 12px;
  position: relative;
}

.podium-rank-1 .podium-badge {
  width: 64px;
  height: 64px;
  font-size: 2rem;
  background: radial-gradient(circle, #ffd700 0%, #b45309 100%);
  color: #000;
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.6);
  border: 2px solid #fff;
}

.podium-rank-2 .podium-badge {
  background: radial-gradient(circle, #e2e8f0 0%, #64748b 100%);
  color: #0f172a;
  box-shadow: 0 0 18px rgba(226, 232, 240, 0.4);
  border: 2px solid #fff;
}

.podium-rank-3 .podium-badge {
  background: radial-gradient(circle, #fdba74 0%, #9a3412 100%);
  color: #fff;
  box-shadow: 0 0 18px rgba(253, 186, 116, 0.4);
  border: 2px solid #fff;
}

.podium-hero-name {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
  word-break: break-word;
}

.podium-rank-1 .podium-hero-name {
  font-size: 1.3rem;
  color: var(--accent-gold-light);
  text-shadow: 0 0 12px rgba(229, 169, 59, 0.4);
}

.podium-hero-tag {
  font-size: 0.8rem;
  color: #38bdf8;
  font-weight: 600;
  letter-spacing: 0.5px;
  background: rgba(56, 189, 248, 0.12);
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.podium-level-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(229, 169, 59, 0.15);
  border: 1px solid var(--border-gold);
  color: var(--accent-gold);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}

.podium-metric-highlight {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.podium-wealth {
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.4;
}

/* Leaderboard Table Container */
.leaderboard-table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
}

.table-responsive-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.lb-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 780px;
}

.lb-table th {
  background: rgba(13, 15, 20, 0.95);
  color: var(--text-muted);
  font-family: var(--font-title);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.lb-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.88rem;
  color: var(--text-main);
  vertical-align: middle;
  white-space: nowrap;
}

.lb-table tr:hover td {
  background: rgba(255, 255, 255, 0.025);
}

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

/* Table Row Highlights */
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.rank-1 .rank-badge {
  background: linear-gradient(135deg, #ffd700 0%, #d97706 100%);
  color: #000;
  font-weight: 800;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

.rank-2 .rank-badge {
  background: linear-gradient(135deg, #e2e8f0 0%, #94a3b8 100%);
  color: #000;
  font-weight: 800;
}

.rank-3 .rank-badge {
  background: linear-gradient(135deg, #fdba74 0%, #c2410c 100%);
  color: #fff;
  font-weight: 800;
}

.rank-top10 .rank-badge {
  background: rgba(229, 169, 59, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(229, 169, 59, 0.3);
}

.hero-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-cell-name {
  font-weight: 600;
  color: var(--text-main);
}

.hero-cell-tag {
  font-size: 0.75rem;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: monospace;
}

.level-badge {
  display: inline-block;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
}

.currency-formatted {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
}

/* Pagination Bar */
.lb-pagination-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 50px;
  flex-wrap: wrap;
  gap: 12px;
}

.lb-page-info {
  font-size: 0.86rem;
  color: var(--text-muted);
}

.lb-page-info strong {
  color: var(--text-main);
}

.lb-pagination-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lb-page-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.lb-page-btn:hover:not(:disabled) {
  background: var(--bg-card-hover);
  border-color: var(--border-gold);
  color: var(--accent-gold);
}

.lb-page-btn.active {
  background: linear-gradient(135deg, var(--accent-gold) 0%, #b45309 100%);
  border-color: var(--accent-gold);
  color: #000;
  font-weight: 800;
  box-shadow: 0 0 12px rgba(229, 169, 59, 0.4);
}

.lb-page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Loading & Empty State */
.lb-loading-state, .lb-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.lb-loading-spinner {
  width: 42px;
  height: 42px;
  border: 3px solid rgba(229, 169, 59, 0.2);
  border-top-color: var(--accent-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Responsive Breakpoints */
@media (max-width: 860px) {
  .podium-container {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .podium-rank-1 {
    order: 1;
  }
  .podium-rank-2 {
    order: 2;
  }
  .podium-rank-3 {
    order: 3;
  }

  .lb-pagination-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

@media (max-width: 600px) {
  .leaderboard-header-section {
    padding: 110px 0 25px;
  }

  .world-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .lb-tab-btn {
    font-size: 0.78rem;
    padding: 8px 12px;
  }
}
