/* ===============================
   LEADERBOARD (NUOVA GRAFICA)
   =============================== */
.leaderboard,
.leaderboard_supporter {
  width: 100%;
  margin: 0;
  background: radial-gradient(circle at top, rgba(13, 32, 78, 0.38), rgba(5, 9, 20, 0.96) 60%);
  border-radius: 22px;
  padding: 20px 16px 16px;
  font-family: 'Segoe UI', sans-serif;
  overflow: hidden;
}

.leaderboard {
  box-shadow:
    0 0 26px rgba(255, 140, 0, 0.12),
    inset 0 0 16px rgba(255, 255, 255, 0.02);
}

.leaderboard_supporter {
  position: relative;
  min-height: 150px;
  opacity: 0;
  border: 1px solid rgba(255, 193, 77, 0.32);
  box-shadow:
    0 0 28px rgba(255, 193, 77, 0.14),
    inset 0 0 18px rgba(255, 193, 77, 0.04);
  animation: supporterAura 3s infinite ease-in-out;
}

.leaderboard_supporter.loaded {
  opacity: 1;
}

.leaderboard h3,
.leaderboard_supporter h3 {
  margin: 0;
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.leaderboard h3 {
  color: #ffb347;
  text-shadow: 0 0 12px rgba(255, 160, 40, 0.35);
}

.leaderboard_supporter h3 {
  color: #ffd700;
  text-shadow: 0 0 14px rgba(255, 215, 0, 0.7);
}

.leaderboard-pretitle,
.leaderboard-subtitle {
  margin: 0 0 12px;
  text-align: center;
  font-size: 12px;
  line-height: 1.5;
}

.leaderboard-pretitle {
  color: #ff8a1e;
  text-shadow: 0 0 10px rgba(255, 138, 30, 0.22);
}

.leaderboard-subtitle {
  color: #ffb04a;
  text-shadow: 0 0 8px rgba(255, 176, 74, 0.18);
}

.leaderboard-list,
.leaderboard ol,
.leaderboard_supporter ol {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
}

.leaderboard-row,
.leaderboard li,
.leaderboard_supporter li {
  position: relative;
  display: block;
  border-radius: 16px;
  margin-bottom: 10px;
  padding: 0;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(8, 15, 35, 0.96), rgba(9, 16, 31, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.leaderboard-row:hover,
.leaderboard li:hover,
.leaderboard_supporter li:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 180, 60, 0.18);
  box-shadow: 0 0 18px rgba(255, 180, 60, 0.10);
}

.leaderboard-row-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 10px 14px;
}

.leaderboard-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 74px;
}

.leaderboard-medal {
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}

.leaderboard-place {
  font-size: 13px;
  font-weight: 900;
  color: #ffffff;
  line-height: 1;
  white-space: nowrap;
}

.leaderboard-center {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  white-space: nowrap;
}

.leaderboard-character {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  flex: 0 0 28px;
  font-size: 15px;
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0.03)
  );
  box-shadow:
    inset 0 0 8px rgba(255, 255, 255, 0.02),
    0 0 10px rgba(0, 0, 0, 0.12);
}

.leaderboard-character.is-top {
  transform: scale(1.03);
}

.leaderboard-character--naruto {
  border-color: rgba(255, 213, 74, 0.22);
  box-shadow:
    inset 0 0 8px rgba(255, 255, 255, 0.02),
    0 0 10px rgba(255, 213, 74, 0.12);
}

.leaderboard-character--sakura {
  border-color: rgba(255, 140, 200, 0.24);
  box-shadow:
    inset 0 0 8px rgba(255, 255, 255, 0.02),
    0 0 10px rgba(255, 140, 200, 0.12);
}

.leaderboard-character--sasuke {
  border-color: rgba(139, 92, 246, 0.24);
  box-shadow:
    inset 0 0 8px rgba(255, 255, 255, 0.02),
    0 0 10px rgba(139, 92, 246, 0.12);
}

.leaderboard-character--kakashi {
  border-color: rgba(125, 211, 252, 0.24);
  box-shadow:
    inset 0 0 8px rgba(255, 255, 255, 0.02),
    0 0 10px rgba(125, 211, 252, 0.12);
}

.leaderboard-character--naruto.is-top {
  box-shadow:
    inset 0 0 8px rgba(255, 255, 255, 0.02),
    0 0 14px rgba(255, 213, 74, 0.18);
}

.leaderboard-character--sakura.is-top {
  box-shadow:
    inset 0 0 8px rgba(255, 255, 255, 0.02),
    0 0 14px rgba(255, 140, 200, 0.18);
}

.leaderboard-character--sasuke.is-top {
  box-shadow:
    inset 0 0 8px rgba(255, 255, 255, 0.02),
    0 0 14px rgba(139, 92, 246, 0.18);
}

.leaderboard-character--kakashi.is-top {
  box-shadow:
    inset 0 0 8px rgba(255, 255, 255, 0.02),
    0 0 14px rgba(125, 211, 252, 0.18);
}

.leaderboard-name {
  font-size: 14px;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.leaderboard-rank-meta {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
  flex-shrink: 0;
}

.supporter-title {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 800;
  color: rgba(0, 0, 0, 0.72);
  white-space: nowrap;
  flex-shrink: 0;
}

.supporter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: rgba(0, 0, 0, 0.82);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
}

.supporter-crown {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  line-height: 1;
  flex-shrink: 0;
}

.leaderboard-right {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 84px;
  white-space: nowrap;
}

.leaderboard-score {
  font-size: 14px;
  font-weight: 900;
  color: #0c0c0c;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

/* ===============================
   SUPPORTER RIGHT SIDE STACK
   =============================== */
.supporter-right-stack {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
}

.supporter-plan-pill,
.supporter-timer-pill,
.supporter-pending-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  white-space: nowrap;
}

/* Piano */
.supporter-plan-pill {
  min-height: 24px;
  padding: 0 10px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1px solid transparent;
  box-shadow: none;
  opacity: 0.95;
}

.supporter-plan-pill.flash {
  color: rgba(255, 145, 40, 0.92);
  background: rgba(255, 145, 40, 0.10);
  border-color: rgba(255, 145, 40, 0.18);
}

.supporter-plan-pill.long {
  color: #ffe08a;
  background: linear-gradient(180deg, rgba(255, 215, 90, 0.16), rgba(255, 180, 40, 0.10));
  border-color: rgba(255, 215, 90, 0.22);
  box-shadow: 0 0 10px rgba(255, 210, 80, 0.10);
}

.supporter-plan-pill.unknown {
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.10);
}

/* Timer */
.supporter-timer-pill {
  min-height: 30px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  background: rgba(0, 0, 0, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    0 0 10px rgba(255, 174, 55, 0.08);
}

.supporter-timer-pill.flash {
  background: rgba(0, 0, 0, 0.14);
}

.supporter-timer-pill.long {
  background: linear-gradient(180deg, rgba(53, 39, 8, 0.90), rgba(28, 20, 3, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    0 0 12px rgba(255, 215, 90, 0.10);
}

.supporter-timer {
  color: #261400;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.supporter-timer-pill.long .supporter-timer {
  color: #ffe8a6;
}

/* Pending */
.supporter-pending-pill {
  min-height: 28px;
  padding: 0 12px;
  font-size: 11px;
  font-weight: 800;
  color: #c5f0ff;
  background: linear-gradient(180deg, rgba(23, 44, 88, 0.96), rgba(12, 28, 58, 0.96));
  border: 1px solid rgba(92, 196, 255, 0.24);
  box-shadow: 0 0 10px rgba(92, 196, 255, 0.08);
}

.supporter-expiring {
  box-shadow: 0 0 18px rgba(255, 120, 60, 0.24);
}

.leaderboard-row.gold,
.leaderboard li.gold,
.leaderboard_supporter li.gold {
  background: linear-gradient(90deg, #ffd84d 0%, #ffcc3a 28%, #ffb12a 100%);
  box-shadow:
    0 0 18px rgba(255, 196, 0, 0.34),
    0 0 34px rgba(255, 176, 30, 0.18);
  animation: goldGlow 2.2s infinite ease-in-out;
}

.leaderboard-row.silver,
.leaderboard li.silver,
.leaderboard_supporter li.silver {
  background: linear-gradient(90deg, #f1f1f1 0%, #d7d7d7 55%, #c8c8c8 100%);
  box-shadow:
    0 0 14px rgba(225, 225, 225, 0.20),
    inset 0 1px 0 rgba(255,255,255,0.42);
}

.leaderboard-row.bronze,
.leaderboard li.bronze,
.leaderboard_supporter li.bronze {
  background: linear-gradient(90deg, #e8a65a 0%, #db9443 55%, #c97b2b 100%);
  box-shadow:
    0 0 14px rgba(220, 140, 60, 0.18),
    inset 0 1px 0 rgba(255,255,255,0.18);
}

.leaderboard-row.gold .leaderboard-place,
.leaderboard-row.gold .leaderboard-name,
.leaderboard-row.silver .leaderboard-place,
.leaderboard-row.silver .leaderboard-name,
.leaderboard-row.bronze .leaderboard-place,
.leaderboard-row.bronze .leaderboard-name,
.leaderboard li.gold .leaderboard-place,
.leaderboard li.gold .leaderboard-name,
.leaderboard li.silver .leaderboard-place,
.leaderboard li.silver .leaderboard-name,
.leaderboard li.bronze .leaderboard-place,
.leaderboard li.bronze .leaderboard-name,
.leaderboard_supporter li.gold .leaderboard-place,
.leaderboard_supporter li.gold .leaderboard-name,
.leaderboard_supporter li.silver .leaderboard-place,
.leaderboard_supporter li.silver .leaderboard-name,
.leaderboard_supporter li.bronze .leaderboard-place,
.leaderboard_supporter li.bronze .leaderboard-name {
  color: #0d0d0d;
}

.leaderboard-row.gold .leaderboard-score,
.leaderboard-row.silver .leaderboard-score,
.leaderboard-row.bronze .leaderboard-score,
.leaderboard li.gold .leaderboard-score,
.leaderboard li.silver .leaderboard-score,
.leaderboard li.bronze .leaderboard-score {
  color: #0d0d0d;
}

.leaderboard-row:not(.gold):not(.silver):not(.bronze) .leaderboard-score {
  color: #ffffff;
}

.leaderboard-row.gold .leaderboard-rank-meta,
.leaderboard-row.silver .leaderboard-rank-meta,
.leaderboard-row.bronze .leaderboard-rank-meta,
.leaderboard li.gold .leaderboard-rank-meta,
.leaderboard li.silver .leaderboard-rank-meta,
.leaderboard li.bronze .leaderboard-rank-meta {
  color: rgba(0, 0, 0, 0.72);
}

.leaderboard_supporter li.gold .supporter-title,
.leaderboard_supporter li.silver .supporter-title,
.leaderboard_supporter li.bronze .supporter-title,
.leaderboard_supporter li.gold .supporter-badge,
.leaderboard_supporter li.silver .supporter-badge,
.leaderboard_supporter li.bronze .supporter-badge {
  color: rgba(0, 0, 0, 0.75);
}

.leaderboard_supporter li.gold .supporter-plan-pill.flash,
.leaderboard_supporter li.silver .supporter-plan-pill.flash,
.leaderboard_supporter li.bronze .supporter-plan-pill.flash {
  color: rgba(120, 58, 0, 0.82);
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(0, 0, 0, 0.08);
}

.leaderboard_supporter li.gold .supporter-plan-pill.long,
.leaderboard_supporter li.silver .supporter-plan-pill.long,
.leaderboard_supporter li.bronze .supporter-plan-pill.long {
  color: rgba(85, 55, 0, 0.92);
  background: rgba(255, 245, 180, 0.30);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: none;
}

.leaderboard_supporter li.gold .supporter-timer-pill,
.leaderboard_supporter li.silver .supporter-timer-pill,
.leaderboard_supporter li.bronze .supporter-timer-pill {
  background: rgba(0, 0, 0, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.20),
    0 0 8px rgba(0,0,0,0.04);
}

.leaderboard_supporter li.gold .supporter-timer,
.leaderboard_supporter li.silver .supporter-timer,
.leaderboard_supporter li.bronze .supporter-timer {
  color: rgba(0, 0, 0, 0.82);
}

.leaderboard-row.gold .leaderboard-character,
.leaderboard-row.silver .leaderboard-character,
.leaderboard-row.bronze .leaderboard-character,
.leaderboard li.gold .leaderboard-character,
.leaderboard li.silver .leaderboard-character,
.leaderboard li.bronze .leaderboard-character,
.leaderboard_supporter li.gold .leaderboard-character,
.leaderboard_supporter li.silver .leaderboard-character,
.leaderboard_supporter li.bronze .leaderboard-character {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.28),
    rgba(255, 255, 255, 0.10)
  );
  border-color: rgba(0, 0, 0, 0.10);
}

.supporter-tiktok {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.1;
  white-space: nowrap;
  flex-shrink: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

@keyframes goldGlow {
  0% { box-shadow: 0 0 12px rgba(255, 190, 20, 0.42); }
  50% { box-shadow: 0 0 28px rgba(255, 190, 20, 0.70); }
  100% { box-shadow: 0 0 12px rgba(255, 190, 20, 0.42); }
}

@keyframes supporterAura {
  0%   { box-shadow: 0 0 22px rgba(255, 193, 77, .18); }
  50%  { box-shadow: 0 0 40px rgba(255, 193, 77, .30); }
  100% { box-shadow: 0 0 22px rgba(255, 193, 77, .18); }
}

@media (max-width: 600px) {
  .leaderboard-row-inner {
    gap: 8px;
    min-height: 42px;
    padding: 9px 10px;
  }

  .leaderboard-left {
    min-width: 52px;
    gap: 5px;
  }

  .leaderboard-medal {
    font-size: 13px;
  }

  .leaderboard-place {
    font-size: 11px;
  }

  .leaderboard-center {
    gap: 6px;
  }

  .leaderboard-character {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
    border-radius: 9px;
    font-size: 13px;
  }

  .leaderboard-name {
    font-size: 11px;
  }

  .leaderboard-rank-meta,
  .supporter-title,
  .supporter-tiktok {
    font-size: 9px;
  }

  .leaderboard-score {
    font-size: 11px;
  }

  .supporter-right-stack {
    gap: 5px;
  }

  .supporter-plan-pill {
    min-height: 20px;
    padding: 0 7px;
    font-size: 8px;
  }

  .supporter-timer-pill,
  .supporter-pending-pill {
    min-height: 22px;
    padding: 0 7px;
    font-size: 9px;
  }

  .supporter-timer {
    font-size: 9px;
  }
}

@media (max-width: 430px) {
  .leaderboard-row-inner {
    gap: 6px;
    min-height: 40px;
    padding: 8px 8px;
  }

  .leaderboard-left {
    min-width: 46px;
    gap: 4px;
  }

  .leaderboard-medal {
    font-size: 12px;
  }

  .leaderboard-place {
    font-size: 10px;
  }

  .leaderboard-center {
    gap: 4px;
  }

  .leaderboard-name {
    font-size: 10px;
  }

  .leaderboard-rank-meta,
  .supporter-title,
  .supporter-tiktok {
    font-size: 8px;
  }

  .supporter-badge {
    min-height: 15px;
    padding: 0 4px;
    font-size: 7px;
  }

  .supporter-crown {
    font-size: 8px;
  }

  .leaderboard-score {
    font-size: 10px;
  }

  .supporter-right-stack {
    gap: 4px;
  }

  .supporter-plan-pill {
    min-height: 18px;
    padding: 0 6px;
    font-size: 7px;
  }

  .supporter-timer-pill,
  .supporter-pending-pill {
    min-height: 20px;
    padding: 0 6px;
    font-size: 8px;
  }

  .supporter-timer {
    font-size: 8px;
  }
}