/* ══════════════════════════════════════════════
   EXILIUM — PODIUM & LEADERBOARD
   Top 3 cards, tabla de ranking, progress bars.
   ══════════════════════════════════════════════ */

/* ── PODIUM ── */
.podium { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-bottom: 20px; }

.podium-card {
  background: var(--card);
  border: 1px solid rgba(200,146,42,0.2) !important;
  border-radius: 2px !important;
  padding: 24px 16px;
  text-align: center;
  position: relative !important;
  overflow: hidden !important;
  cursor: pointer;
  transition: all 0.45s var(--ease-out-expo) !important;
}
.podium-card::before {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(200,146,42,0.08) 0%, transparent 70%) !important;
  pointer-events: none !important;
  transition: opacity 0.4s !important;
}
.podium-card::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s var(--ease-premium);
  pointer-events: none;
  z-index: 0;
}
.podium-card:hover {
  transform: translateY(-5px) !important;
  border-color: rgba(200,146,42,0.45) !important;
  box-shadow:
    0 16px 48px rgba(0,0,0,0.5),
    0 0 40px rgba(200,146,42,0.12),
    inset 0 0 20px rgba(200,146,42,0.04) !important;
}
.podium-card:hover::after { opacity: 1; }
.podium-card:hover::before { opacity: 1.5 !important; }

/* Top 3 specifics */
.podium-card.p1::before { background: linear-gradient(90deg, transparent, #ffd700, transparent); }
.podium-card.p1::after  { background: radial-gradient(ellipse 80% 60% at 50% 20%, rgba(255,215,0,0.08) 0%, transparent 60%); }
.podium-card.p2::before { background: linear-gradient(90deg, transparent, #c0c0c0, transparent); }
.podium-card.p2::after  { background: radial-gradient(ellipse 80% 60% at 50% 20%, rgba(192,192,192,0.06) 0%, transparent 60%); }
.podium-card.p3::before { background: linear-gradient(90deg, transparent, #cd7f32, transparent); }
.podium-card.p3::after  { background: radial-gradient(ellipse 80% 60% at 50% 20%, rgba(205,127,50,0.06) 0%, transparent 60%); }
.podium-card.p1 { border-color: rgba(255,215,0,0.25); background: linear-gradient(180deg, rgba(255,215,0,0.04) 0%, var(--card) 100%); }
.podium-card.p1:hover { border-color: rgba(255,215,0,0.4); box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 0 40px rgba(255,215,0,0.1); }
.podium-card.p2:hover { border-color: rgba(192,192,192,0.35); }
.podium-card.p3:hover { border-color: rgba(205,127,50,0.35); }

/* First place special glow */
.podium-card:first-child,
.podium-card.rank-1 {
  border-color: rgba(200,146,42,0.4) !important;
  box-shadow:
    0 0 0 1px rgba(232,184,75,0.1),
    0 12px 60px rgba(0,0,0,0.5),
    0 0 50px rgba(200,146,42,0.1),
    inset 0 0 30px rgba(200,146,42,0.05) !important;
}
.podium-card:first-child::after,
.podium-card.rank-1::after {
  content: '' !important;
  position: absolute !important;
  top: 0 !important; left: 0 !important; right: 0 !important;
  height: 2px !important;
  background: linear-gradient(90deg, transparent, var(--gold-bright), var(--gold-pale), var(--gold-bright), transparent) !important;
  animation: heroTopLine 2.5s ease-in-out infinite alternate !important;
}

.podium-medal {
  font-size: 32px;
  margin-bottom: 8px;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
  transition: transform 0.45s var(--ease-bounce);
  display: inline-block;
}
.podium-card:hover .podium-medal { transform: scale(1.18) rotate(-5deg) translateY(-3px); }

.podium-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  border: 2px solid var(--gold-border);
  object-fit: cover; margin: 0 auto 10px; display: block;
  background: var(--surface);
  transition: all 0.45s var(--ease-premium);
}
.podium-avatar-fallback {
  width: 64px; height: 64px; border-radius: 50%;
  border: 2px solid var(--gold-border);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; margin: 0 auto 10px;
  transition: all 0.45s var(--ease-premium);
}
.podium-card:hover .podium-avatar,
.podium-card:hover .podium-avatar-fallback {
  border-color: var(--gold);
  box-shadow: 0 0 24px rgba(200,146,42,0.2);
  transform: scale(1.04);
}
.podium-card.p1 .podium-avatar,
.podium-card.p1 .podium-avatar-fallback {
  border-color: rgba(255,215,0,0.5);
  box-shadow: 0 0 20px rgba(255,215,0,0.15);
}

.podium-name {
  font-family: 'Cinzel', serif;
  font-size: 15px; font-weight: 700; color: var(--text);
  transition: all 0.3s var(--ease-premium);
}
.podium-card:hover .podium-name { color: var(--gold-pale); letter-spacing: 0.5px; }
.podium-realm { font-size: 11px; color: var(--text-muted); margin-top: 2px; transition: color 0.3s; }
.podium-card:hover .podium-realm { color: var(--text-dim); }
.podium-xp {
  font-family: 'Cinzel', serif; font-size: 18px; font-weight: 900; margin-top: 10px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-bright) 50%, var(--gold-pale) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  animation: goldShimmer 5s linear infinite;
  filter: drop-shadow(0 0 10px rgba(232,184,75,0.25));
}
.podium-rank {
  font-size: 10px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  font-family: 'Cinzel', serif; margin-top: 6px; padding: 3px 12px; border-radius: 2px; display: inline-block;
  transition: all 0.35s var(--ease-premium);
}
.podium-card:hover .podium-rank { transform: scale(1.06); box-shadow: 0 2px 10px rgba(0,0,0,0.2); }


/* ═══════════════════════════════════════════
   LEADERBOARD
   ═══════════════════════════════════════════ */

.leaderboard {
  background: var(--card);
  border: 1px solid rgba(200,146,42,0.18) !important;
  border-radius: 2px !important;
  overflow: hidden !important;
  margin-bottom: 20px;
  position: relative;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(200,146,42,0.04) !important;
}
.leaderboard::before {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background: url('img/arena-bg.png') center/cover no-repeat !important;
  opacity: 0.03 !important;
  pointer-events: none !important;
  z-index: 0 !important;
  width: 100% !important; height: 100% !important;
  top: 0 !important; left: 0 !important;
  transform: none !important;
  border-radius: 0 !important;
}

.lb-header {
  display: grid;
  grid-template-columns: 56px 1fr 130px 75px 75px 75px 75px 75px 110px 44px 44px;
  padding: 14px 20px;
  background: linear-gradient(180deg,
    rgba(28,28,48,0.98) 0%,
    rgba(22,22,37,0.98) 100%) !important;
  border-bottom: 1px solid rgba(200,146,42,0.25) !important;
  font-family: 'Cinzel', serif;
  font-size: 9px !important;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 2.5px !important;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}
.lb-header > div { text-align: center; }

.lb-row {
  display: grid;
  grid-template-columns: 56px 1fr 130px 75px 75px 75px 75px 75px 110px 44px 44px;
  padding: 16px 20px;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.025) !important;
  transition: all 0.3s var(--ease-premium) !important;
  position: relative !important;
  z-index: 1;
}
.lb-row::before {
  content: '' !important;
  position: absolute !important;
  left: 0 !important; top: 0 !important; bottom: 0 !important;
  width: 2px !important;
  background: linear-gradient(180deg, transparent, var(--gold), transparent) !important;
  opacity: 0 !important;
  transition: opacity 0.3s !important;
}
.lb-row:hover::before { opacity: 0.5 !important; }
.lb-row:hover {
  background: linear-gradient(90deg,
    rgba(200,146,42,0.06) 0%,
    rgba(200,146,42,0.03) 40%,
    transparent 100%) !important;
  padding-left: 4px !important;
}

/* Top 3 rank colors */
.lb-row:nth-child(1) .lb-rank { color: #e8b84b !important; font-weight: 900 !important; text-shadow: 0 0 12px rgba(232,184,75,0.4) !important; }
.lb-row:nth-child(2) .lb-rank { color: #c0c0c0 !important; font-weight: 900 !important; text-shadow: 0 0 10px rgba(192,192,192,0.3) !important; }
.lb-row:nth-child(3) .lb-rank { color: #cd7f32 !important; font-weight: 900 !important; text-shadow: 0 0 10px rgba(205,127,50,0.3) !important; }

.lb-num {
  text-align: center;
  font-family: 'Cinzel', serif;
  font-size: 14px; font-weight: 700;
  color: var(--text-muted);
}

.lb-player {
  display: flex; align-items: center; gap: 12px;
}
.lb-avatar, .lb-avatar-fallback {
  width: 36px; height: 36px; border-radius: 50% !important;
  border: 2px solid rgba(200,146,42,0.2) !important;
  flex-shrink: 0;
  transition: all 0.4s var(--ease-out-expo) !important;
  box-shadow: 0 0 0 0 rgba(200,146,42,0) !important;
}
.lb-avatar { object-fit: cover; background: var(--surface); }
.lb-avatar-fallback {
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.lb-row:hover .lb-avatar,
.lb-row:hover .lb-avatar-fallback {
  border-color: rgba(200,146,42,0.5) !important;
  box-shadow: 0 0 0 3px rgba(200,146,42,0.12), 0 0 16px rgba(200,146,42,0.2) !important;
  transform: scale(1.08) !important;
}

.lb-name {
  font-family: 'Cinzel', serif !important;
  font-size: 13px; font-weight: 600 !important;
  color: var(--text) !important;
  letter-spacing: 0.5px !important;
  transition: color 0.3s !important;
}
.lb-row:hover .lb-name { color: var(--gold-pale) !important; }
.lb-realm { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

/* ── Progress ── */
.lb-progress { display: flex; flex-direction: column; gap: 4px; }
.lb-xp-bar { height: 4px; background: rgba(255,255,255,0.05); border-radius: 2px; overflow: hidden; position: relative; }
.lb-xp-fill {
  height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold), var(--gold-bright));
  transition: width 0.8s var(--ease-premium);
  position: relative; overflow: hidden;
}
.lb-xp-fill::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  animation: shimmer 2.5s infinite;
}
.lb-xp-fill::before {
  content: '';
  position: absolute; right: 0; top: 0; bottom: 0;
  width: 6px;
  background: rgba(245,223,160,0.6);
  border-radius: 50%;
  filter: blur(3px);
  animation: progressGlow 1.5s ease-in-out infinite alternate;
}
.lb-xp-text { font-size: 10px; color: var(--text-muted); text-align: center; }

/* ── Progress bar animated shimmer (for bar-fill override) ── */
.lb-bar-fill, .lb-progress-fill {
  background: linear-gradient(90deg,
    var(--gold-dim) 0%, var(--gold) 50%, var(--gold-bright) 100%) !important;
  background-size: 200% auto !important;
  animation: progressShimmer 3s linear infinite !important;
  box-shadow: 0 0 8px rgba(200,146,42,0.4), 0 0 2px rgba(232,184,75,0.6) !important;
  border-radius: 2px !important;
  position: relative !important;
}
.lb-bar-fill::after, .lb-progress-fill::after {
  content: '' !important;
  position: absolute !important; right: 0 !important; top: 0 !important; bottom: 0 !important;
  width: 4px !important;
  background: rgba(245,223,160,0.9) !important;
  box-shadow: 0 0 6px rgba(245,223,160,0.8) !important;
  border-radius: 0 2px 2px 0 !important;
}

/* ── Ratings ── */
.lb-rating {
  text-align: center; font-size: 14px; font-weight: 600;
  font-family: 'Cinzel', serif;
  transition: all 0.35s var(--ease-premium);
}
.lb-rating.active { color: var(--green); text-shadow: 0 0 8px rgba(46,204,113,0.3); }
.lb-row:hover .lb-rating.active { text-shadow: 0 0 14px rgba(46,204,113,0.5); }
.lb-rating.inactive { color: var(--text-ghost); font-style: italic; font-size: 11px; }

/* ── Rank badge ── */
.lb-rank-badge {
  font-family: 'Cinzel', serif !important;
  font-size: 9px !important; font-weight: 700 !important;
  text-align: center; padding: 4px 10px !important; border-radius: 1px !important;
  letter-spacing: 1.5px !important; text-transform: uppercase !important;
  backdrop-filter: blur(4px) !important;
  transition: all 0.35s var(--ease-premium);
}
.lb-row:hover .lb-rank-badge { transform: scale(1.05); }

/* ── Actions ── */
.lb-actions { text-align: center; }
.lb-sync-time { font-size: 8px; color: var(--text-ghost); margin-top: 2px; text-align: center; }
.lb-empty { padding: 60px 20px; text-align: center; color: var(--text-muted); font-size: 16px; font-style: italic; }
