/* ============================================================================
   $TMC ARCADE — leaderboard
   Speelhal-gevoel binnen de donkere neon-stijl van de site: een sticker-kast met een
   marquee bovenaan, een podium voor de top 3 en daaronder de lijst tot 25.
   Gebruikt de tokens uit theme.css.
   ========================================================================== */

.tmc-lb {
  --lb-gold:   #ffd86b;
  --lb-silver: #dcd6ea;
  --lb-bronze: #f0b98a;
  position: relative;
  max-width: 760px;
  margin: 26px auto;
  background: var(--card);
  border: 4px solid #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 0 0 14px;
  overflow: hidden;
  font-family: var(--font-body);
  color: var(--ink);
}

/* ---------------------------------------------------------------- marquee */
.tmc-lb-top {
  position: relative;
  padding: 18px 18px 14px;
  text-align: center;
  background:
    radial-gradient(120% 130% at 50% -30%, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0) 62%),
    linear-gradient(180deg, #33104f 0%, #2a0a44 55%, #1d073a 100%);
  border-bottom: 3px dashed rgba(255,255,255,0.18);
}
.tmc-lb-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(22px, 3.4vw, 34px);
  line-height: 1.1;
  letter-spacing: 0.5px;
  background: linear-gradient(92deg, #fcdf05, #ff8c12, #ff2f9e, #a855f7, #35d6f7, #76ec3a);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: tmcLbShift 9s linear infinite;
}
@keyframes tmcLbShift { to { background-position: 220% 0; } }

.tmc-lb-sub {
  margin-top: 6px;
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}
.tmc-lb-chip {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.6px;
  padding: 4px 12px;
  border-radius: var(--radius-pill, 999px);
  background: rgba(255,255,255,0.10);
  border: 2px solid rgba(255,255,255,0.22);
  color: var(--ink-soft);
  white-space: nowrap;
}
.tmc-lb-chip.is-count { background: var(--pink-strong); border-color: #fff; color: #fff; }
.tmc-lb-chip.is-token { background: var(--lemon); border-color: #fff; color: var(--ink-on-accent); }

/* ----------------------------------------------------------------- podium */
.tmc-lb-podium {
  display: grid;
  grid-template-columns: 1fr 1.18fr 1fr;
  align-items: end;
  gap: 10px;
  padding: 18px 14px 6px;
}
.tmc-pod {
  position: relative;
  border-radius: 20px;
  border: 3px solid #fff;
  box-shadow: var(--shadow-tight);
  padding: 12px 8px 12px;
  text-align: center;
  min-width: 0;
}
.tmc-pod-1 { background: linear-gradient(180deg, #fff3b0, var(--lb-gold));   padding-top: 24px; padding-bottom: 20px; }
.tmc-pod-2 { background: linear-gradient(180deg, #f4f1fb, var(--lb-silver)); }
.tmc-pod-3 { background: linear-gradient(180deg, #ffe2c8, var(--lb-bronze)); }
/* De podiumkaarten zijn de enige lichte vlakken die blijven: goud, zilver en
   brons moeten glanzen. Daarom staat de tekst erop juist donker. */
.tmc-pod-name, .tmc-pod-score { color: var(--ink-on-accent) !important; }
.tmc-pod-wallet { color: rgba(42,10,68,0.72) !important; }
.tmc-pod-1 { animation: tmcPodFloat 3.4s ease-in-out infinite alternate; }
@keyframes tmcPodFloat { to { transform: translateY(-5px); } }

/* lintje linksboven op een podiumkaart */
.tmc-pod-lint {
  position: absolute;
  top: -3px; left: 50%;
  transform: translateX(-50%);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 3px 10px 2px;
  border-radius: 0 0 10px 10px;
  background: var(--card);
  color: var(--ink-soft);
  box-shadow: 0 2px 4px rgba(0,0,0,.35);
  white-space: nowrap;
}
.tmc-pod-lint.is-you { background: var(--pink-strong); color: #fff; }

.tmc-pod-medal { font-size: 26px; line-height: 1; filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); }
.tmc-pod-1 .tmc-pod-medal { font-size: 34px; }
.tmc-pod-name {
  margin-top: 6px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(14px, 1.7vw, 18px);
  color: var(--ink);
  overflow-wrap: anywhere;
  line-height: 1.2;
}
.tmc-pod-score {
  margin-top: 4px;
  font-weight: 800;
  font-size: clamp(17px, 2.3vw, 24px);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.tmc-pod-1 .tmc-pod-score { color: #6b4d00 !important; }
.tmc-pod-wallet {
  direction: ltr;
  unicode-bidi: isolate;
  margin-top: 2px;
  font-size: 11.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: rgba(75,63,88,.62);
  overflow-wrap: anywhere;
}

/* ------------------------------------------------------------------ lijst */
.tmc-lb-list { padding: 8px 12px 0; }

.tmc-lb-head,
.tmc-row {
  display: grid;
  grid-template-columns: 46px 1fr 116px 92px 78px;
  align-items: center;
  gap: 8px;
}
.tmc-lb-head {
  padding: 6px 10px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.tmc-lb-head .num, .tmc-row .num { text-align: right; }

.tmc-row {
  padding: 8px 10px;
  border-radius: 14px;
  border: 2px solid transparent;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.tmc-row:nth-child(even) { background: rgba(255,255,255,0.05); }
.tmc-row:hover {
  transform: translateX(2px);
  border-color: var(--pink);
  background: rgba(255,255,255,0.09);
}

.tmc-rank {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  font-weight: 800;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  background: rgba(255,255,255,0.12);
  color: var(--ink);
  border: 2px solid rgba(255,255,255,0.35);
  box-shadow: 0 1px 0 rgba(0,0,0,.3);
}
.tmc-row.t1 .tmc-rank { background: var(--lb-gold);   color: #6b4d00; border-color: #fff; }
.tmc-row.t2 .tmc-rank { background: var(--lb-silver); color: #3b3550; border-color: #fff; }
.tmc-row.t3 .tmc-rank { background: var(--lb-bronze); color: #5e340f; border-color: #fff; }

.tmc-name {
  font-weight: 800;
  font-size: clamp(14px, 1.5vw, 16px);
  display: flex; align-items: center; gap: 6px;
  min-width: 0;
}
.tmc-name span.txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tmc-tag {
  flex: none;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .7px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1.5px solid #fff;
}
/* Zolang alleen huisrecords de lijst vullen staat dit label overal; houd het
   daarom fluisterzacht — het is een voetnoot, geen mededeling. */
.tmc-tag.house {
  background: transparent;
  border-color: rgba(255,255,255,0.24);
  color: var(--ink-faint);
  font-size: 9.5px;
  letter-spacing: .9px;
  padding: 1px 6px;
}
.tmc-tag.you   { background: var(--pink-strong); color: #fff; }

.tmc-wallet {
  /* een adres leest altijd van links naar rechts, ook op de Arabische versie */
  direction: ltr;
  unicode-bidi: isolate;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--ink-faint);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tmc-score {
  font-weight: 800;
  font-size: clamp(15px, 1.7vw, 18px);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.tmc-date { font-size: 12px; color: var(--ink-faint); text-align: right; }

/* huisrecords staan er iets bescheidener bij dan echte scores */
.tmc-row.is-seed .tmc-name,
.tmc-row.is-seed .tmc-score { color: var(--ink-soft); }
.tmc-row.is-seed .tmc-rank  { opacity: .82; }

/* jouw eigen regel springt eruit */
.tmc-row.is-you {
  background: rgba(228,64,159,0.20);
  border-color: var(--pink-strong);
  box-shadow: 0 0 0 3px rgba(228,64,159,.22);
}
.tmc-row.is-you .tmc-name { color: var(--pink-ink); }

/* --------------------------------------------------------- eigen positie */
.tmc-lb-you {
  margin: 12px 12px 0;
  padding: 11px 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(228,64,159,0.22), rgba(228,64,159,0.10));
  border: 3px solid var(--pink);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  flex-wrap: wrap;
  font-weight: 700;
}
.tmc-lb-you b { color: var(--pink-ink); font-variant-numeric: tabular-nums; }

/* --------------------------------------------------- voet, leeg en laden */
.tmc-lb-foot {
  margin-top: 12px;
  padding: 0 16px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-faint);
  line-height: 1.6;
}
.tmc-lb-empty, .tmc-lb-error {
  padding: 26px 20px;
  text-align: center;
  font-weight: 700;
  color: var(--ink-soft);
}
.tmc-lb-error b { display: block; color: var(--coral-ink); margin-bottom: 6px; }
.tmc-lb-retry {
  margin-top: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 3px solid #fff;
  background: var(--pink-strong);
  color: #fff;
  cursor: pointer;
  box-shadow: var(--shadow-tight);
}

.tmc-skel {
  height: 42px;
  margin: 6px 10px;
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(255,255,255,0.06) 25%, rgba(255,255,255,0.14) 50%, rgba(255,255,255,0.06) 75%);
  background-size: 240% 100%;
  animation: tmcSkel 1.15s linear infinite;
}
@keyframes tmcSkel { to { background-position: -240% 0; } }

/* ------------------------------------------------------------- responsive */
@media (max-width: 620px) {
  .tmc-lb-head, .tmc-row { grid-template-columns: 38px 1fr 84px; }
  .tmc-wallet, .tmc-date, .tmc-lb-head .wallet, .tmc-lb-head .date { display: none; }
  .tmc-rank { width: 30px; height: 30px; font-size: 13px; }
  .tmc-lb-podium { gap: 6px; padding: 14px 8px 4px; }
  .tmc-pod { padding: 10px 4px; border-radius: 16px; }
  .tmc-pod-wallet { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tmc-lb-title, .tmc-pod-1, .tmc-skel { animation: none; }
}
