:root {
  --lb-bg: #040711;
  --lb-bg-2: #070b18;
  --lb-panel: #121a36;
  --lb-panel-deep: #0d1328;
  --lb-row: #0d1223;
  --lb-row-alt: #111728;
  --lb-line: rgba(90, 113, 176, 0.28);
  --lb-muted: #929bb4;
  --lb-gold: #f1b72e;
  --lb-blue: #3d67e8;
  --lb-green: #39e18a;
  --lb-red: #ff536d;
  --lb-silver: #e1e5ef;
  --lb-bronze: #e18a53;
  --lb-display: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body.leaderboard-page {
  min-width: 320px;
  background:
    radial-gradient(circle at 62% 18%, rgba(35, 59, 137, 0.18), transparent 28%),
    radial-gradient(circle at 31% 66%, rgba(25, 43, 105, 0.1), transparent 28%),
    linear-gradient(180deg, var(--lb-bg), var(--lb-bg-2) 48%, #03060e);
  color: #f4f6fc;
}

.leaderboard-page::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.01) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.01) 1px, transparent 1px);
  background-size: 72px 72px;
  pointer-events: none;
}

.lb-topbar {
  display: flex;
  width: min(1100px, calc(100% - 48px));
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
  border-bottom: 1px solid rgba(92, 111, 169, 0.16);
}

.lb-brand img {
  display: block;
  width: 126px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(82, 224, 74, 0.14));
}

.lb-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #9ca5bb;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  transition: color 150ms ease;
}

.lb-back:hover {
  color: var(--lb-gold);
}

.lb-shell {
  width: min(1100px, calc(100% - 48px));
  margin: 0 auto;
  padding: 62px 0 116px;
}

.lb-intro {
  width: min(840px, 100%);
  margin: 0 auto;
  text-align: center;
}

.lb-title {
  margin: 0;
  color: #f4f5fa;
  font-family: var(--lb-display);
  font-size: clamp(50px, 5.1vw, 64px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.01em;
  text-shadow: 0 0 20px rgba(78, 107, 255, 0.26);
}

.lb-title span {
  color: var(--lb-gold);
}

.lb-sub {
  max-width: 650px;
  margin: 12px auto 0;
  color: var(--lb-muted);
  font-size: 16px;
  line-height: 1.5;
}

.lb-sub strong {
  color: #e9ebf2;
}

.countdown {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 38px 0 28px;
}

.cd-box {
  display: flex;
  width: 66px;
  min-height: 72px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(72, 92, 151, 0.14);
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(20, 28, 59, 0.98), rgba(10, 15, 33, 0.98));
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.cd-num {
  color: #f5f7fc;
  font-size: 29px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
}

.cd-lab {
  margin-top: 7px;
  color: #858ea8;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.lb-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: min(610px, 100%);
  margin: 0 auto 25px;
}

.lb-tab {
  min-height: 66px;
  padding: 10px 18px;
  border: 1px solid rgba(158, 130, 61, 0.56);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(20, 27, 55, 0.98), rgba(11, 16, 34, 0.98));
  color: #858da5;
  text-align: center;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, color 160ms ease, transform 160ms ease;
}

.lb-tab:hover {
  color: #fff;
  transform: translateY(-1px);
}

.lb-tab strong,
.lb-tab span {
  display: block;
}

.lb-tab strong {
  color: inherit;
  font-family: var(--lb-display);
  font-size: 17px;
  letter-spacing: 0.02em;
}

.lb-tab span {
  margin-top: 2px;
  color: #5280ff;
  font-size: 13px;
  font-weight: 900;
}

.lb-tab.is-active {
  border-color: #4f7dff;
  box-shadow: 0 0 16px rgba(59, 103, 232, 0.27), inset 0 0 0 1px rgba(98, 137, 255, 0.26);
  color: #f7f8fc;
}

.board {
  width: min(840px, 100%);
  margin: 0 auto;
  padding: 35px 26px 25px;
  border: 1px solid rgba(80, 103, 169, 0.27);
  border-radius: 16px;
  background:
    radial-gradient(circle at 51% 12%, rgba(57, 79, 145, 0.13), transparent 24%),
    linear-gradient(180deg, rgba(21, 30, 62, 0.98), rgba(9, 14, 31, 0.99));
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.3), inset 0 1px rgba(255, 255, 255, 0.02);
}

.pool {
  text-align: center;
}

.pool__value {
  color: var(--lb-gold);
  font-family: var(--lb-display);
  font-size: clamp(45px, 5vw, 56px);
  line-height: 1;
  letter-spacing: 0.035em;
  text-shadow: 0 0 22px rgba(241, 183, 46, 0.28);
}

.pool__label {
  margin-top: 10px;
  color: #8992aa;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.22em;
}

.pool__note {
  margin: 12px 0 24px;
  color: var(--lb-muted);
  font-size: 15px;
}

.lb-search {
  display: block;
  width: min(520px, 100%);
  min-height: 44px;
  margin: 0 auto;
  padding: 0 14px;
  border: 1px solid rgba(116, 129, 166, 0.14);
  border-radius: 9px;
  outline: none;
  background: #050609;
  color: #fff;
  font-size: 14px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.55);
}

.lb-search::placeholder {
  color: #74777d;
}

.lb-search:focus {
  border-color: #4f7dff;
  box-shadow: 0 0 0 3px rgba(79, 125, 255, 0.12), inset 0 2px 8px rgba(0, 0, 0, 0.5);
}

.search-result {
  min-height: 17px;
  margin: 7px 0 0;
  color: #8e98b2;
  font-size: 11px;
  text-align: center;
}

.podium {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: end;
  gap: 22px;
  margin: 37px 0 28px;
  padding: 0 0 0;
}

.pod {
  position: relative;
  min-height: 158px;
  padding: 29px 15px 15px;
  border: 1px solid rgba(201, 207, 222, 0.48);
  border-radius: 9px 9px 4px 4px;
  background: linear-gradient(180deg, rgba(100, 110, 135, 0.43), rgba(18, 24, 43, 0.96));
  color: #fff;
  text-align: center;
  transition: opacity 170ms ease, transform 170ms ease, box-shadow 170ms ease;
}

.pod__name {
  position: absolute;
  right: 0;
  bottom: calc(100% + 31px);
  left: 0;
  overflow: hidden;
  color: #f5f6fa;
  font-size: 12px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pod__badge {
  position: absolute;
  top: -28px;
  left: 50%;
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 11px;
  background: var(--lb-silver);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.28);
  color: #172034;
  font-size: 22px;
  transform: translateX(-50%);
}

.pod__k {
  color: #9099b1;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.18em;
}

.pod__wager {
  margin: 5px 0 10px;
  color: #f6f7fb;
  font-size: 21px;
  font-weight: 900;
}

.pod__div {
  height: 1px;
  margin: 0 6px 11px;
  background: rgba(183, 191, 211, 0.18);
}

.pod__prize {
  margin-top: 5px;
  color: var(--lb-silver);
  font-size: 18px;
  font-weight: 900;
}

.pod--1 {
  min-height: 184px;
  border-color: rgba(234, 179, 42, 0.7);
  background: linear-gradient(180deg, rgba(104, 78, 25, 0.5), rgba(18, 22, 38, 0.98));
  box-shadow: 0 0 24px rgba(241, 183, 46, 0.11);
}

.pod--1 .pod__badge {
  background: linear-gradient(145deg, #ffe174, #e8aa28);
  color: #27200b;
}

.pod--1 .pod__prize {
  color: #ffc43a;
}

.pod--3 {
  border-color: rgba(195, 104, 60, 0.58);
  background: linear-gradient(180deg, rgba(109, 58, 45, 0.4), rgba(24, 20, 33, 0.98));
}

.pod--3 .pod__badge {
  background: linear-gradient(145deg, #eba269, #bf6339);
  color: #28150c;
}

.pod--3 .pod__prize {
  color: var(--lb-bronze);
}

.lb-table {
  overflow: hidden;
  margin-bottom: 22px;
  border: 1px solid rgba(73, 94, 153, 0.3);
  border-radius: 12px;
  background: #080d1b;
}

.lb-thead,
.lb-row {
  display: grid;
  grid-template-columns: 86px minmax(140px, 1.2fr) minmax(110px, 1fr) minmax(100px, 0.8fr);
  align-items: center;
}

.lb-thead {
  min-height: 40px;
  padding: 0 17px;
  border-bottom: 1px solid rgba(75, 96, 156, 0.33);
  color: #9098af;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.lb-row {
  min-height: 61px;
  padding: 0 17px;
  background: var(--lb-row);
  transition: opacity 170ms ease, background 170ms ease, box-shadow 170ms ease;
}

.lb-row:nth-child(even) {
  background: var(--lb-row-alt);
}

.lb-row + .lb-row {
  border-top: 1px solid rgba(63, 78, 123, 0.22);
}

.lb-thead > :nth-child(3),
.lb-thead > :nth-child(4),
.lb-row > :nth-child(3),
.lb-row > :nth-child(4) {
  text-align: right;
}

.lb-rank {
  display: grid;
  width: 36px;
  height: 38px;
  place-items: center;
  background: linear-gradient(145deg, #4f7df1, #1f3f9d);
  clip-path: polygon(50% 0%, 92% 23%, 92% 75%, 50% 100%, 8% 75%, 8% 23%);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.lb-player,
.lb-wager,
.lb-reward {
  font-size: 15px;
  font-weight: 850;
}

.lb-reward {
  color: #ffbf27;
}

.pod.is-dim,
.lb-row.is-dim {
  opacity: 0.22;
}

.pod.is-hit,
.lb-row.is-hit {
  box-shadow: inset 0 0 0 1px var(--lb-gold), 0 0 16px rgba(241, 183, 46, 0.13);
}

.enter-btn {
  display: block;
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(86, 126, 255, 0.43);
  border-radius: 10px;
  background: linear-gradient(90deg, #3761de, #1d358a);
  box-shadow: 0 0 23px rgba(54, 95, 222, 0.38), inset 0 1px rgba(255, 255, 255, 0.13);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.045em;
  cursor: pointer;
  transition: filter 150ms ease, transform 150ms ease;
}

.enter-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.rules {
  width: 100%;
  margin: 28px auto 0;
  padding: 28px 23px 31px;
  border: 1px solid rgba(76, 99, 164, 0.32);
  border-radius: 15px;
  background: linear-gradient(180deg, rgba(23, 32, 65, 0.98), rgba(10, 15, 33, 0.99));
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.22), inset 0 1px rgba(255, 255, 255, 0.02);
}

.rules h2,
.rules h3 {
  margin: 0 0 20px;
  color: #f0f2f8;
  font-family: var(--lb-display);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.rule {
  display: grid;
  grid-template-columns: 98px 1fr;
  min-height: 80px;
  align-items: center;
  margin-bottom: 12px;
  padding: 13px 19px;
  border: 1px solid rgba(80, 103, 168, 0.32);
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(27, 36, 69, 0.98), rgba(22, 29, 55, 0.98));
}

.rule__pct {
  font-family: var(--lb-display);
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
}

.rule__pct--full {
  color: var(--lb-green);
  text-shadow: 0 0 14px rgba(57, 225, 138, 0.14);
}

.rule__pct--zero {
  color: var(--lb-red);
}

.rule__t {
  color: #e7e9f1;
  font-size: 14px;
  font-weight: 850;
}

.rule__d {
  margin-top: 6px;
  color: #929bb4;
  font-size: 12px;
}

.rules__notes {
  margin-top: 20px;
  padding-top: 17px;
  border-top: 1px solid rgba(75, 95, 151, 0.25);
}

.rules__notes p {
  margin: 0;
  color: #848da5;
  font-size: 12px;
  line-height: 1.55;
}

.rules__notes p + p {
  margin-top: 7px;
  color: #6f788e;
}

.lb-footer {
  display: flex;
  min-height: 225px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 38px 22px;
  border-top: 1px solid rgba(71, 91, 146, 0.24);
  background: #02050c;
  color: #8490a8;
  text-align: center;
}

.lb-footer img {
  display: block;
  width: 118px;
  height: 48px;
  object-fit: contain;
  margin-bottom: 4px;
}

.lb-footer p {
  margin: 0;
  color: #d9dde7;
  font-size: 14px;
  font-weight: 750;
}

.lb-footer strong {
  color: var(--lb-gold);
}

.lb-footer small {
  color: #768096;
  font-size: 11px;
}

.lb-toast {
  position: fixed;
  z-index: 100;
  right: 20px;
  bottom: 20px;
  padding: 11px 16px;
  border: 1px solid rgba(241, 183, 46, 0.55);
  border-radius: 8px;
  background: rgba(8, 12, 25, 0.97);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: 180ms ease;
}

.lb-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 760px) {
  .lb-topbar,
  .lb-shell {
    width: min(100% - 28px, 1100px);
  }

  .lb-shell {
    padding-top: 44px;
    padding-bottom: 76px;
  }

  .lb-title {
    font-size: 49px;
  }

  .lb-sub {
    font-size: 14px;
  }

  .countdown {
    gap: 7px;
    margin-top: 30px;
  }

  .cd-box {
    width: 59px;
    min-height: 66px;
  }

  .cd-num {
    font-size: 25px;
  }

  .lb-tabs {
    gap: 8px;
  }

  .lb-tab {
    min-height: 61px;
    padding: 8px;
  }

  .lb-tab strong {
    font-size: 14px;
  }

  .board {
    padding: 29px 14px 17px;
  }

  .pool__note {
    font-size: 13px;
  }

  .podium {
    grid-template-columns: 1fr;
    gap: 43px;
    width: min(330px, 100%);
    margin: 45px auto 28px;
  }

  .pod,
  .pod--1 {
    min-height: 150px;
  }

  .pod--1 { order: 1; }
  .pod--2 { order: 2; }
  .pod--3 { order: 3; }

  .pod__name {
    bottom: calc(100% + 29px);
  }

  .lb-table {
    overflow-x: auto;
  }

  .lb-thead,
  .lb-row {
    min-width: 570px;
  }

  .rules {
    padding: 23px 14px;
  }

  .rules h2,
  .rules h3 {
    font-size: 25px;
  }

  .rule {
    grid-template-columns: 78px 1fr;
    min-height: 76px;
    padding: 12px;
  }

  .rule__pct {
    font-size: 28px;
  }
}

@media (max-width: 430px) {
  .lb-brand img {
    width: 105px;
  }

  .lb-back {
    font-size: 9px;
  }

  .lb-title {
    font-size: 43px;
  }

  .countdown {
    gap: 5px;
  }

  .cd-box {
    width: 54px;
  }

  .lb-tab strong {
    font-size: 12px;
  }

  .pool__value {
    font-size: 43px;
  }

  .rule {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
