/* ============================================
   XPLOSION — Таблица лидеров 🏆
   ============================================ */

.lb-hero {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.lb-hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.lb-title {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: linear-gradient(90deg, var(--gold-2), var(--gold), var(--gold-2));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shine 3s linear infinite;
  margin-bottom: 8px;
}

@keyframes shine {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.lb-period {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-top: 10px;
}

.lb-period button {
  background: none;
  border: none;
  color: var(--text-2);
  padding: 7px 14px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  transition: all .15s;
}

.lb-period button.on {
  background: linear-gradient(180deg, var(--gold), var(--gold-2));
  color: #1a1a1a;
  box-shadow: var(--gold-glow);
}

/* Топ-3 в карточках */
.lb-podium {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
  align-items: end;
}

.lb-card {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 14px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform .2s;
}

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

.lb-card.gold {
  border-color: rgba(255, 215, 0, .6);
  box-shadow: 0 0 24px rgba(255, 215, 0, .25);
  padding-top: 28px;
  padding-bottom: 28px;
}

.lb-card.silver { border-color: rgba(192, 192, 200, .5); }
.lb-card.bronze { border-color: rgba(205, 127, 50, .5); }

.lb-card .lb-medal {
  font-size: 42px;
  margin-bottom: 8px;
  display: block;
  line-height: 1;
}

.lb-card.gold .lb-medal { font-size: 56px; animation: medalFloat 2.5s ease-in-out infinite; }

@keyframes medalFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

.lb-card .lb-ava {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 20px;
  margin: 0 auto 10px;
  box-shadow: var(--gold-glow);
}

.lb-card.silver .lb-ava { background: linear-gradient(135deg, #c0c0c8, #8a8a95); }
.lb-card.bronze .lb-ava { background: linear-gradient(135deg, #cd7f32, #a05a20); }

.lb-card .lb-name {
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 4px;
}

.lb-card .lb-group {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  margin-bottom: 12px;
}

.lb-card .lb-score {
  font-size: 26px;
  font-weight: 900;
  color: var(--gold-text);
  line-height: 1;
}

.lb-card .lb-score small {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  display: block;
  margin-top: 4px;
}

/* Строки с 4-го места */
.lb-list {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.lb-row {
  display: grid;
  grid-template-columns: 50px 50px 1fr 90px 90px 90px;
  gap: 12px;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}

.lb-row:last-child { border-bottom: none; }
.lb-row:hover { background: rgba(128, 128, 128, .04); }

.lb-row.me {
  background: rgba(255, 215, 0, .06);
  box-shadow: inset 3px 0 0 var(--gold);
}

.lb-row .lb-rank {
  font-size: 16px;
  font-weight: 900;
  color: var(--muted);
  text-align: center;
}

.lb-row .lb-mini-ava {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 13px;
}

.lb-row .lb-mini-name {
  font-weight: 700;
  font-size: 13px;
}

.lb-row .lb-mini-group {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 700;
}

.lb-row .lb-num {
  text-align: right;
  font-weight: 800;
  color: var(--gold-text);
  font-size: 14px;
}

.lb-row .lb-num small {
  display: block;
  font-size: 9px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
}

.lb-row.head {
  background: var(--input-bg);
  font-size: 10px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 800;
  padding: 10px 18px;
}

.lb-row.head > div { text-align: center; }
.lb-row.head > div:first-child { text-align: left; }

/* Плашка «моя позиция» */
.lb-my-position {
  background: linear-gradient(90deg, rgba(255, 215, 0, .12), rgba(255, 215, 0, .04));
  border: 1px solid rgba(255, 215, 0, .4);
  border-radius: 14px;
  padding: 16px 20px;
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.lb-my-position .mp-ic {
  font-size: 32px;
}

.lb-my-position .mp-body { flex: 1; }

.lb-my-position .mp-title {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.lb-my-position .mp-value {
  font-size: 18px;
  font-weight: 900;
  color: var(--gold-text);
}

.lb-my-position .mp-place {
  font-size: 32px;
  font-weight: 900;
  color: var(--gold-text);
  line-height: 1;
}

/* Баннер топ-3 при входе */
.lb-banner {
  background: linear-gradient(135deg, rgba(255, 215, 0, .18), rgba(255, 215, 0, .05));
  border: 1px solid var(--gold);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 16px;
  text-align: center;
  animation: bannerGlow 2s ease-in-out infinite;
}

@keyframes bannerGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(255, 215, 0, .2); }
  50%      { box-shadow: 0 0 40px rgba(255, 215, 0, .5); }
}

.lb-banner .bn-emoji { font-size: 48px; display: block; margin-bottom: 8px; }
.lb-banner .bn-title {
  font-size: 20px;
  font-weight: 900;
  color: var(--gold-text);
  margin-bottom: 6px;
}
.lb-banner .bn-sub { font-size: 13px; color: var(--text-2); }

/* Мобильная */
@media (max-width: 780px) {
  .lb-podium {
    grid-template-columns: 1fr;
  }
  .lb-card.gold { order: -1; }
  .lb-row {
    grid-template-columns: 40px 40px 1fr 70px;
    gap: 8px;
    padding: 12px;
  }
  .lb-row .lb-num:nth-child(n+4) {
    display: none;
  }
  .lb-row.head { display: none; }
}