.players-page {
  background:
    radial-gradient(circle at 18% 2%, rgba(41, 212, 167, .16), transparent 28rem),
    radial-gradient(circle at 82% 9%, rgba(224, 178, 77, .12), transparent 24rem),
    linear-gradient(180deg, #071011 0%, var(--bg) 44%, #070b0d 100%);
}

.leaderboard-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid rgba(41, 212, 167, .32);
  border-radius: 8px;
  background: rgba(41, 212, 167, .08);
  color: #cfe5df;
}

.leaderboard-notice strong {
  color: #29d4a7;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.leaderboard-notice span {
  color: #c3d5d0;
  font-size: 14px;
  line-height: 1.45;
}

.leaderboard-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.leaderboard-hero {
  position: relative;
  width: 100%;
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 24px;
  align-items: end;
  overflow: hidden;
  padding: 190px max(16px, calc((100vw - 1180px) / 2)) 42px;
  border-bottom: 1px solid var(--line);
}

.leaderboard-hero::before,
.leaderboard-hero::after {
  content: "";
  position: absolute;
  inset: 0;
}

.leaderboard-hero::before {
  background: url("eliteark-hero-bg.png?v=2") center center / cover fixed no-repeat;
  filter: saturate(1.04) contrast(1.05);
}

.leaderboard-hero::after {
  background:
    linear-gradient(180deg, rgba(9, 13, 15, .10) 0%, rgba(9, 13, 15, .35) 56%, rgba(9, 13, 15, .72) 100%),
    linear-gradient(90deg, rgba(9, 13, 15, .72) 0%, rgba(9, 13, 15, .18) 54%, rgba(9, 13, 15, .74) 100%);
}

.leaderboard-hero-copy,
.score-model {
  position: relative;
  z-index: 1;
}

.leaderboard-hero h1 {
  max-width: 900px;
  margin-bottom: 18px;
  font-size: clamp(54px, 9vw, 110px);
}

.leaderboard-hero p {
  max-width: 760px;
  color: #c7d8d3;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.55;
}

.score-model {
  border: 1px solid rgba(224, 178, 77, .34);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(224, 178, 77, .18), rgba(18, 26, 29, .92) 46%, rgba(89, 167, 255, .14)),
    var(--panel);
  padding: 22px;
  box-shadow: var(--shadow);
}

.score-model span,
.board-summary span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.score-model strong {
  display: block;
  color: #fff;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.12;
}

.score-model p {
  margin: 14px 0 0;
  color: #afc2bd;
  font-size: 14px;
}

.leaderboard-shell {
  padding-bottom: 58px;
}

.leaderboard-toolbar {
  display: flex;
  gap: 14px;
  align-items: stretch;
  justify-content: space-between;
  margin-bottom: 14px;
}

.cluster-tabs {
  min-width: 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cluster-tab {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .06);
  color: #d8e6e2;
  padding: 0 14px;
  font-weight: 900;
}

.cluster-tab.active {
  border-color: rgba(41, 212, 167, .72);
  background: rgba(41, 212, 167, .18);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(41, 212, 167, .08);
}

.leaderboard-search {
  min-width: min(320px, 100%);
  display: grid;
  gap: 7px;
}

.leaderboard-search label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.leaderboard-search input {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 10, 11, .76);
  color: var(--ink);
  padding: 0 13px;
  outline: none;
}

.leaderboard-search input:focus {
  border-color: rgba(41, 212, 167, .7);
  box-shadow: 0 0 0 3px rgba(41, 212, 167, .1);
}

.board-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.board-summary > div {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 26, 29, .82);
  padding: 16px;
}

.board-summary > .refresh-summary-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(41, 212, 167, .42);
  background:
    linear-gradient(135deg, rgba(41, 212, 167, .16), rgba(18, 26, 29, .9) 58%, rgba(224, 178, 77, .12));
}

.refresh-summary-card::before {
  content: "";
  position: absolute;
  width: 92px;
  height: 92px;
  right: -28px;
  bottom: -36px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(41, 212, 167, .34), rgba(224, 178, 77, .14) 42%, transparent 70%);
  filter: blur(2px);
  opacity: .75;
  animation: refresh-breathe 4s ease-in-out infinite;
}

.refresh-summary-card::after {
  content: "";
  position: absolute;
  inset: 1px;
  pointer-events: none;
  border-radius: 8px;
  background: linear-gradient(135deg, transparent 0 52%, rgba(255, 255, 255, .06), transparent 68%);
  opacity: .65;
}

.board-summary strong {
  display: block;
  color: #fff;
  font-size: clamp(20px, 3vw, 34px);
  line-height: 1;
}

.refresh-countdown {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 132px;
}

.refresh-ring {
  width: 28px;
  height: 28px;
  display: inline-block;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(18, 26, 29, .96) 48%, transparent 51%),
    conic-gradient(var(--accent) var(--refresh-progress, 360deg), rgba(255, 255, 255, .12) 0deg);
  box-shadow: 0 0 18px rgba(41, 212, 167, .22);
}

.refresh-time {
  min-width: 78px;
  font-variant-numeric: tabular-nums;
}

.refresh-countdown.is-syncing .refresh-ring {
  background:
    radial-gradient(circle at center, rgba(18, 26, 29, .96) 48%, transparent 51%),
    conic-gradient(rgba(224, 178, 77, .9), rgba(41, 212, 167, .85), rgba(224, 178, 77, .9));
  animation: refresh-spin 1.4s linear infinite;
}

@keyframes refresh-spin {
  to { transform: rotate(360deg); }
}

@keyframes refresh-breathe {
  0%, 100% { transform: scale(.92); opacity: .45; }
  50% { transform: scale(1.12); opacity: .82; }
}

.board-frame {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 18, 20, .92);
  box-shadow: var(--shadow);
}

.board-head,
.board-row {
  display: grid;
  grid-template-columns: 64px minmax(230px, 1fr) minmax(100px, .45fr) minmax(80px, .35fr) minmax(80px, .35fr) minmax(90px, .38fr);
  gap: 12px;
  align-items: center;
}

.board-head {
  min-height: 54px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .05);
  padding: 0 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.board-head button {
  width: fit-content;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  font: inherit;
  text-transform: uppercase;
}

.board-head button.active {
  color: var(--accent);
}

.board-row {
  min-height: 82px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  padding: 13px 16px;
}

.board-row:last-child {
  border-bottom: 0;
}

.board-row:nth-child(1) {
  background: linear-gradient(90deg, rgba(224, 178, 77, .18), transparent);
}

.board-row:nth-child(2),
.board-row:nth-child(3) {
  background: linear-gradient(90deg, rgba(41, 212, 167, .1), transparent);
}


.tribes-page .board-head,
.tribes-page .board-row {
  grid-template-columns: 64px minmax(230px, 1fr) minmax(110px, .42fr) minmax(95px, .34fr) minmax(95px, .34fr) minmax(150px, .5fr);
}

.tribes-page .board-head > :last-child,
.tribes-page .board-row > :last-child {
  justify-self: center;
  text-align: center;
}

.tribes-page .board-head > :last-child {
  width: 150px;
  white-space: normal;
  line-height: 1.15;
}

.rank-badge {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  background: rgba(255, 255, 255, .06);
  color: #fff;
  font-weight: 950;
}

.survivor-cell {
  min-width: 0;
}

.survivor-cell strong {
  display: block;
  overflow: hidden;
  color: #fff;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.survivor-cell span {
  display: block;
  overflow: hidden;
  margin-top: 5px;
  color: #aebfba;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric strong,
.score-cell strong {
  display: block;
  color: #fff;
  font-size: 20px;
}

.metric span,
.score-cell span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.score-cell strong {
  color: var(--accent);
}

.board-loading,
.board-empty {
  padding: 34px 18px;
  color: #c6d5d1;
  text-align: center;
}

.search-loading {
  position: relative;
  min-height: 130px;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 160px;
  gap: 18px;
  align-items: center;
  overflow: hidden;
  padding: 26px 30px;
  color: #ecfffb;
  background: linear-gradient(90deg, rgba(31, 255, 205, .1), transparent 34%, rgba(151, 220, 255, .09)), rgba(8, 14, 16, .94);
}

.search-loading::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 0%, rgba(31, 255, 205, .16) 45%, rgba(255, 255, 255, .2) 50%, rgba(31, 255, 205, .16) 55%, transparent 100%);
  transform: translateX(-120%);
  animation: search-sweep 1.7s ease-in-out infinite;
}

.search-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(0deg, transparent 0 9px, rgba(255, 255, 255, .035) 10px);
  opacity: .65;
  pointer-events: none;
}

.scan-orbit {
  position: relative;
  z-index: 1;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(31, 255, 205, .36);
  border-radius: 50%;
  box-shadow: 0 0 26px rgba(31, 255, 205, .18);
  animation: scan-pulse 1.2s ease-in-out infinite;
}

.scan-orbit span {
  position: absolute;
  inset: 8px;
  border: 2px solid transparent;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: scan-spin .9s linear infinite;
}

.scan-orbit span:nth-child(2) {
  inset: 17px;
  border-top-color: #9ddfff;
  animation-duration: 1.4s;
  animation-direction: reverse;
}

.scan-orbit span:nth-child(3) {
  inset: 25px;
  background: var(--accent);
  border: 0;
  box-shadow: 0 0 16px var(--accent);
}

.scan-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.scan-copy strong {
  display: block;
  color: #fff;
  font-size: 18px;
}

.scan-copy span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.scan-bars {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 7px;
  height: 54px;
}

.scan-bars i {
  width: 12px;
  height: 18px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, var(--accent), rgba(157, 223, 255, .35));
  animation: scan-bars .8s ease-in-out infinite;
}

.scan-bars i:nth-child(2) { animation-delay: .08s; }
.scan-bars i:nth-child(3) { animation-delay: .16s; }
.scan-bars i:nth-child(4) { animation-delay: .24s; }
.scan-bars i:nth-child(5) { animation-delay: .32s; }

@keyframes search-sweep {
  0% { transform: translateX(-120%); }
  52%, 100% { transform: translateX(120%); }
}

@keyframes scan-spin {
  to { transform: rotate(360deg); }
}

@keyframes scan-pulse {
  0%, 100% { transform: scale(1); opacity: .78; }
  50% { transform: scale(1.06); opacity: 1; }
}

@keyframes scan-bars {
  0%, 100% { height: 16px; opacity: .45; }
  50% { height: 52px; opacity: 1; }
}



.board-row.top-podium {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-bottom-color: rgba(41, 212, 167, .2);
}

.board-row.top-podium::before,
.board-row.top-podium::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.board-row.top-podium::before {
  opacity: .9;
  background: linear-gradient(90deg, rgba(41, 212, 167, .22), transparent 42%);
}

.board-row.top-podium::after {
  width: 32%;
  transform: translateX(-120%) skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .16), transparent);
  animation: podium-sweep 4.8s ease-in-out infinite;
}

.board-row.top-podium.rank-1 {
  min-height: 90px;
  box-shadow: inset 4px 0 0 rgba(255, 190, 78, .95), 0 0 34px rgba(255, 190, 78, .14);
}

.board-row.top-podium.rank-1::before {
  background: linear-gradient(90deg, rgba(255, 190, 78, .26), rgba(41, 212, 167, .11) 46%, transparent 82%);
}

.board-row.top-podium.rank-1::after {
  animation-duration: 3.6s;
}

.board-row.top-podium.rank-2::before {
  background: linear-gradient(90deg, rgba(157, 223, 255, .2), rgba(41, 212, 167, .09) 48%, transparent 82%);
}

.board-row.top-podium.rank-3::before {
  background: linear-gradient(90deg, rgba(41, 212, 167, .18), transparent 52%);
}

.board-row.top-podium .rank-badge {
  position: relative;
  box-shadow: 0 0 22px rgba(41, 212, 167, .16);
  animation: badge-pulse 2.8s ease-in-out infinite;
}

.board-row.top-podium.rank-1 .rank-badge {
  border-color: rgba(255, 190, 78, .65);
  background: linear-gradient(135deg, rgba(255, 190, 78, .24), rgba(255, 255, 255, .06));
  box-shadow: 0 0 30px rgba(255, 190, 78, .24);
}

.board-row.top-podium.rank-2 .rank-badge {
  border-color: rgba(157, 223, 255, .5);
  background: linear-gradient(135deg, rgba(157, 223, 255, .16), rgba(255, 255, 255, .06));
}

.board-row.top-podium.rank-3 .rank-badge {
  border-color: rgba(41, 212, 167, .5);
}

@keyframes podium-sweep {
  0%, 42% { transform: translateX(-130%) skewX(-18deg); opacity: 0; }
  52% { opacity: 1; }
  78%, 100% { transform: translateX(360%) skewX(-18deg); opacity: 0; }
}

@keyframes podium-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1px); }
}

@keyframes badge-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

.tribes-page .tribe-podium {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.tribes-page .tribe-podium::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .9;
  pointer-events: none;
}

.tribes-page .tribe-podium::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 22%;
  z-index: -1;
  pointer-events: none;
  transform: skewX(-16deg) translateX(-160%);
}

.tribes-page .tribe-podium.rank-1 {
  min-height: 96px;
  border-bottom-color: rgba(255, 212, 92, .25);
  box-shadow: inset 0 1px 0 rgba(255, 231, 143, .18), 0 0 30px rgba(255, 198, 61, .12);
}

.tribes-page .tribe-podium.rank-1::before {
  background: radial-gradient(circle at 8% 45%, rgba(255, 212, 92, .3), transparent 26%), linear-gradient(90deg, rgba(128, 95, 25, .42), rgba(31, 255, 205, .08) 46%, transparent 82%);
}

.tribes-page .tribe-podium.rank-1::after {
  background: linear-gradient(90deg, transparent, rgba(255, 244, 179, .28), transparent);
  animation: podium-shine 2.8s ease-in-out infinite;
}

.tribes-page .tribe-podium.rank-2::before {
  background: linear-gradient(90deg, rgba(155, 194, 207, .2), rgba(31, 255, 205, .08) 44%, transparent 82%);
}

.tribes-page .tribe-podium.rank-3::before {
  background: linear-gradient(90deg, rgba(194, 142, 83, .2), rgba(31, 255, 205, .07) 44%, transparent 82%);
}

.tribes-page .tribe-podium.rank-1 .rank-badge {
  border-color: rgba(255, 229, 128, .58);
  background: linear-gradient(145deg, rgba(255, 209, 88, .28), rgba(255, 255, 255, .08));
  box-shadow: 0 0 22px rgba(255, 211, 92, .32);
}

.tribes-page .tribe-podium.rank-2 .rank-badge {
  border-color: rgba(178, 222, 235, .42);
  background: linear-gradient(145deg, rgba(178, 222, 235, .18), rgba(255, 255, 255, .06));
}

.tribes-page .tribe-podium.rank-3 .rank-badge {
  border-color: rgba(221, 165, 96, .42);
  background: linear-gradient(145deg, rgba(221, 165, 96, .18), rgba(255, 255, 255, .06));
}

@keyframes podium-shine {
  0%, 38% { transform: skewX(-16deg) translateX(-160%); opacity: 0; }
  48% { opacity: 1; }
  72%, 100% { transform: skewX(-16deg) translateX(560%); opacity: 0; }
}

@media (max-width: 860px) {
  .tribes-page .board-row {
    grid-template-columns: 48px minmax(0, 1fr) minmax(84px, auto);
  }

  .search-loading {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .scan-bars {
    display: none;
  }

  .leaderboard-hero,
  .leaderboard-toolbar {
    grid-template-columns: 1fr;
    display: grid;
  }

  .board-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .board-head {
    display: none;
  }

  .board-row {
    grid-template-columns: 48px minmax(0, 1fr) minmax(84px, auto);
    gap: 10px;
  }

  .board-row .metric {
    display: none;
  }
}

@media (max-width: 560px) {
  .leaderboard-hero h1 {
    font-size: 52px;
  }

  .board-summary {
    grid-template-columns: 1fr;
  }

  .cluster-tab {
    flex: 1 1 120px;
  }
}
