/*
  [server extension] 充值排行 (rank.html / rank.js; the owner, 2026-10-19: 高级, 游戏元素): over site.css. The hero over the client's champion
  hall with the day picker; the podium (2 · 1 · 3) under the client's ranking flags and laurels; the rest of the board as a list beside
  the tiers (their places, threshold, coins and rewards as the game's item slots), always shown.
*/

.hero--rank {
  --hero-art: url('/cashier/art/hero-rank.webp');

  min-height: 340px;
}

/* ---- the day picker ---- */

.daynav {
  display: flex;
  flex: none;
  gap: 6px;
  align-items: center;
  padding: 6px;
  background: rgb(7 8 11 / 72%);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.daynav__step {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--gold-hi);
  cursor: pointer;
  background: rgb(216 178 106 / 8%);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition:
    background 0.2s ease,
    opacity 0.2s ease;
}

.daynav__step:hover:not(:disabled) {
  background: rgb(216 178 106 / 18%);
}

.daynav__step:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.daynav svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.daynav__day {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 0 12px;
  color: var(--gold);
}

.daynav__day input {
  min-height: 42px;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.06em;
  background: transparent;
  border: 0;
  outline: none;
  color-scheme: dark;
}

/* ---- the podium: 2 · 1 · 3 ---- */

.podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: end;
  padding: 0;
  margin: 0 0 22px;
  list-style: none;
}

.seat {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  padding: 28px 16px 22px;
  overflow: hidden;
  text-align: center;
  isolation: isolate;
  background:
    radial-gradient(80% 60% at 50% 0%, var(--seat-glow), transparent 70%),
    linear-gradient(180deg, rgb(22 26 35 / 94%), rgb(10 12 17 / 96%));
  border: 1px solid var(--seat-edge);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.seat__banner {
  position: relative;
  display: grid;
  place-items: start center;
  width: 96px;
  height: 150px;
  margin: -28px 0 6px;
}

.seat--1 .seat__banner {
  width: 112px;
  height: 176px;
}

.seat__flag {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: top;
  filter: drop-shadow(0 10px 18px rgb(0 0 0 / 55%));
}

.seat--1 {
  --seat-glow: rgb(216 178 106 / 34%);
  --seat-edge: var(--gold);

  order: 2;
  min-height: 312px;
  box-shadow: var(--shadow), 0 0 0 3px rgb(216 178 106 / 14%), 0 20px 60px -20px rgb(216 178 106 / 55%);
}

.seat--2 {
  --seat-glow: rgb(170 190 215 / 22%);
  --seat-edge: rgb(170 190 215 / 45%);

  order: 1;
  min-height: 262px;
}

.seat--3 {
  --seat-glow: rgb(205 130 80 / 22%);
  --seat-edge: rgb(205 130 80 / 45%);

  order: 3;
  min-height: 248px;
}

.seat__laurel {
  position: relative;
  width: 78px;
  height: 78px;
  margin-top: 26px;
  filter: drop-shadow(0 8px 18px rgb(0 0 0 / 60%));
  animation: float 5s ease-in-out infinite;
}

.seat--1 .seat__laurel {
  width: 92px;
  height: 92px;
  margin-top: 32px;
}

@keyframes float {
  50% { transform: translateY(-5px); }
}

.seat__name {
  max-width: 100%;
  overflow: hidden;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seat--1 .seat__name {
  font-size: 26px;
  color: var(--gold-hi);
}

.seat__sub {
  font-size: 12.5px;
  color: var(--muted);
}

.seat__amount {
  margin-top: 8px;
  padding: 4px 16px;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 900;
  color: var(--gold-hi);
  background: rgb(216 178 106 / 10%);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

.seat.is-empty .seat__name {
  color: var(--faint);
}

.seat.is-empty .seat__banner {
  filter: grayscale(0.9) brightness(0.65);
}

/* ---- the rest of the board and the tiers ---- */

.standings {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 20px;
  align-items: start;
}

.standings__board,
.standings__tiers {
  padding: 22px 24px 24px;
}

.standings__tiers {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-title {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.section-title::before {
  width: 4px;
  height: 18px;
  content: '';
  background: linear-gradient(180deg, var(--red), var(--red-deep));
  border-radius: 2px;
}

.board {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 62px;
  padding: 8px 16px 8px 8px;
  background: linear-gradient(90deg, rgb(26 31 42 / 75%), rgb(12 15 21 / 85%));
  border: 1px solid var(--ink-4);
  border-radius: 12px;
  transition:
    border-color 0.2s ease,
    transform 0.2s var(--ease);
}

.row:hover {
  border-color: var(--line-strong);
  transform: translateX(3px);
}

.row__place {
  display: grid;
  place-items: center;
  height: 44px;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 900;
  color: var(--muted);
  background: rgb(4 5 8 / 60%);
  border: 1px solid var(--ink-4);
  border-radius: 10px;
}

.row__who {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.row__name {
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row__sub {
  font-size: 12.5px;
  color: var(--muted);
}

.row__amount {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 900;
  color: var(--gold-hi);
}

.row.is-empty .row__name,
.row.is-empty .row__amount {
  color: var(--faint);
}

.board__none {
  padding: 28px 0;
  color: var(--muted);
  text-align: center;
}

.tiers {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tier {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgb(26 31 42 / 80%), rgb(12 15 21 / 90%));
  border: 1px solid var(--ink-4);
  border-radius: 12px;
}

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

.tier__laurel {
  width: 38px;
  height: 38px;
}

.tier__places {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 800;
}

.tier__min {
  margin-left: auto;
  font-size: 12.5px;
  color: var(--muted);
}

.tier__min b {
  color: var(--gold-hi);
}

.tier__gifts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.tier__coins {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 4px 10px 4px 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-hi);
  background: rgb(216 178 106 / 10%);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

.tier__coins img {
  width: 22px;
  height: 22px;
}

@media (width <= 1023px) {
  .standings {
    grid-template-columns: minmax(0, 1fr);
  }

  .standings__tiers {
    position: static;
  }
}

@media (width <= 760px) {
  .hero--rank {
    min-height: 0;
  }

  .daynav {
    align-self: stretch;
    justify-content: space-between;
  }

  .podium {
    gap: 8px;
    margin-bottom: 14px;
  }

  .seat {
    gap: 4px;
    padding: 16px 6px 14px;
    border-radius: 14px;
  }

  .seat--1 {
    min-height: 220px;
  }

  .seat--2 {
    min-height: 196px;
  }

  .seat--3 {
    min-height: 186px;
  }

  .seat__banner {
    width: 64px;
    height: 100px;
    margin-top: -16px;
  }

  .seat--1 .seat__banner {
    width: 74px;
    height: 116px;
  }

  .seat__laurel,
  .seat--1 .seat__laurel {
    width: 52px;
    height: 52px;
    margin-top: 16px;
  }

  .seat__name,
  .seat--1 .seat__name {
    font-size: 15px;
  }

  .seat__sub {
    font-size: 11px;
  }

  .seat__amount {
    padding: 2px 10px;
    font-size: 14px;
  }

  .standings__board,
  .standings__tiers {
    padding: 18px 14px;
  }

  .row {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 10px;
    padding-right: 12px;
  }

  .row__place {
    height: 38px;
    font-size: 17px;
  }
}
