:root {
  --bg-main: #140b1c;
  --bg-panel: rgba(33, 18, 47, 0.88);
  --bg-panel-dark: rgba(13, 9, 20, 0.82);
  --purple: #a93cff;
  --purple-2: #d66cff;
  --purple-3: #6f2bb8;
  --text: #ffffff;
  --muted: #b8a9c8;
  --soft: rgba(255, 255, 255, 0.08);
  --line: rgba(190, 87, 255, 0.24);
  --gold: #ffbf47;
  --green: #35ff9a;
  --red: #ff4f7b;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.lb-body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg-main);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -5;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(161, 65, 255, 0.22), transparent 36%),
    radial-gradient(circle at bottom right, rgba(255, 72, 183, 0.14), transparent 34%),
    linear-gradient(180deg, #1d1029 0%, #110818 100%);
}

#particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.bg-glow {
  position: absolute;
  width: 720px;
  height: 720px;
  left: 50%;
  top: 110px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(147, 53, 255, 0.19), transparent 62%);
  filter: blur(18px);
}

.bg-grid {
  position: absolute;
  inset: 0;
  opacity: 0.13;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, transparent, black 20%, black 75%, transparent);
}

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

.header {
  padding: 24px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lb-streamer-avatar {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  object-fit: cover;
  border: 2px solid rgba(185, 87, 255, 0.45);
  box-shadow: 0 0 30px rgba(177, 71, 255, 0.25);
}

.logo-text {
  font-size: 24px;
  font-weight: 950;
  letter-spacing: 0.3px;
  line-height: 1;
}

.subline {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.4px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(28, 15, 40, 0.74);
  border: 1px solid rgba(188, 83, 255, 0.28);
  color: #e9dcf7;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.dot.live {
  background: var(--green);
  box-shadow: 0 0 14px var(--green);
}

.leaderboard-page {
  padding: 28px 0 80px;
}

.lb-hero {
  position: relative;
  padding: 38px 28px 36px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(43, 24, 61, 0.92), rgba(24, 13, 34, 0.88)),
    radial-gradient(circle at top, rgba(178, 74, 255, 0.18), transparent 42%);
  border: 1px solid rgba(199, 91, 255, 0.22);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.36),
    inset 0 0 0 1px rgba(255, 255, 255, 0.035);
  overflow: hidden;
}

.lb-hero::before {
  content: "";
  position: absolute;
  inset: -2px;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 0%, rgba(207, 83, 255, 0.2), transparent 28%),
    radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.08), transparent 22%);
}

.lb-hero-top,
.lb-title,
.lb-actions,
.lb-casino-switcher {
  position: relative;
  z-index: 1;
}

.lb-hero-top {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.lb-badge {
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(169, 60, 255, 0.16);
  border: 1px solid rgba(211, 108, 255, 0.34);
  color: #ead7ff;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.lb-casino-switcher {
  width: min(620px, 100%);
  margin: 20px auto 28px;
  padding: 10px;
  display: flex;
  gap: 10px;
  background: rgba(35, 19, 48, 0.9);
  border: 2px solid rgba(180, 80, 255, 0.26);
  border-radius: 18px;
  box-shadow:
    0 14px 35px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.lb-casino-tab {
  position: relative;
  flex: 1;
  height: 76px;
  border: 0;
  outline: 0;
  cursor: pointer;
  border-radius: 13px;
  background: transparent;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  opacity: 0.52;
  transition:
    opacity 0.22s ease,
    transform 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease;
}

.lb-casino-tab:hover {
  opacity: 0.82;
  transform: translateY(-1px);
}

.lb-casino-tab.active {
  background: rgba(14, 10, 20, 0.78);
  opacity: 1;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.045),
    0 12px 24px rgba(0, 0, 0, 0.24);
}

.lb-casino-tab.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 22%;
  width: 56%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--purple), var(--purple-2));
  box-shadow: 0 0 16px rgba(189, 76, 255, 0.8);
}

.lb-casino-logo {
  max-width: 145px;
  max-height: 44px;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.92;
  transition: 0.22s ease;
}

.lb-casino-tab.active .lb-casino-logo {
  filter: grayscale(0);
  opacity: 1;
}

.lb-current-badge {
  position: absolute;
  top: -11px;
  left: 18px;
  padding: 3px 10px;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--purple), var(--purple-2));
  color: #fff;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.7px;
  display: none;
  box-shadow: 0 8px 18px rgba(169, 60, 255, 0.35);
}

.lb-casino-tab.active .lb-current-badge {
  display: block;
}

.lb-tab-fallback {
  display: none;
  font-size: 18px;
  font-weight: 950;
  letter-spacing: 1.5px;
  color: #ffffff;
}

.lb-title {
  margin: 0;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  font-size: clamp(32px, 5vw, 62px);
  line-height: 1;
  font-weight: 1000;
  letter-spacing: -1px;
  text-transform: uppercase;
}

.lb-title-icon {
  color: var(--gold);
  text-shadow: 0 0 18px rgba(255, 191, 71, 0.62);
  font-size: 0.7em;
}

.lb-actions {
  margin: 28px auto 0;
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 14px;
  flex-wrap: wrap;
}

.lb-code-box {
  min-width: 210px;
  padding: 13px 16px;
  border-radius: 16px;
  background: rgba(12, 8, 18, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.lb-code-label {
  display: block;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 1.2px;
  color: var(--muted);
  margin-bottom: 7px;
}

.lb-code-value {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 24px;
  font-weight: 1000;
  color: #ffffff;
}

.lb-copy-btn {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid rgba(213, 116, 255, 0.28);
  background: rgba(169, 60, 255, 0.16);
  color: #ffffff;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    background 0.18s ease;
}

.lb-copy-btn:hover {
  transform: translateY(-1px);
  background: rgba(169, 60, 255, 0.28);
}

.lb-signup-btn {
  min-width: 190px;
  padding: 16px 22px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--purple), var(--purple-2));
  color: #ffffff;
  font-weight: 1000;
  letter-spacing: 0.8px;
  box-shadow:
    0 16px 34px rgba(169, 60, 255, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.lb-signup-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 20px 42px rgba(169, 60, 255, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.lb-countdown-wrap {
  margin: 24px auto 0;
  padding: 22px;
  border-radius: 24px;
  background: rgba(27, 15, 39, 0.78);
  border: 1px solid rgba(190, 87, 255, 0.21);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

.lb-countdown-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-bottom: 16px;
  color: #e4d3f3;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 1.3px;
}

.lb-countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: nowrap;
}

.lb-time-box {
  min-width: 116px;
  padding: 16px 12px;
  text-align: center;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015)),
    rgba(15, 9, 22, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.lb-time-value {
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1;
  font-weight: 1000;
}

.lb-time-unit {
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 1.2px;
}

.lb-time-sep {
  font-size: 34px;
  font-weight: 1000;
  color: rgba(218, 146, 255, 0.88);
  transform: translateY(-8px);
}

.lb-podium {
  margin-top: 34px;
  display: grid;
  grid-template-columns: 1fr 1.16fr 1fr;
  align-items: end;
  gap: 20px;
}

.lb-podium-card {
  position: relative;
  padding: 24px 18px 20px;
  border-radius: 24px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(54, 31, 75, 0.92), rgba(23, 13, 34, 0.92)),
    radial-gradient(circle at top, rgba(178, 74, 255, 0.16), transparent 42%);
  border: 1px solid rgba(199, 91, 255, 0.23);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.3),
    inset 0 0 0 1px rgba(255, 255, 255, 0.035);
  overflow: hidden;
}

.lb-podium-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.08), transparent 34%);
}

.lb-podium-card.featured {
  padding-top: 34px;
  transform: translateY(-18px);
  border-color: rgba(255, 191, 71, 0.38);
  box-shadow:
    0 26px 70px rgba(0, 0, 0, 0.38),
    0 0 36px rgba(255, 191, 71, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.lb-rank-tag {
  position: relative;
  z-index: 1;
  display: inline-flex;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(169, 60, 255, 0.17);
  border: 1px solid rgba(212, 111, 255, 0.3);
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: 1px;
  color: #ead8ff;
}

.featured .lb-rank-tag {
  background: rgba(255, 191, 71, 0.15);
  border-color: rgba(255, 191, 71, 0.34);
  color: #ffe1a4;
}

.lb-avatar {
  position: relative;
  z-index: 1;
  width: 86px;
  height: 86px;
  margin: 18px auto 12px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, var(--purple), var(--purple-2));
  box-shadow: 0 0 28px rgba(169, 60, 255, 0.33);
}

.featured .lb-avatar {
  width: 102px;
  height: 102px;
  background: linear-gradient(135deg, var(--gold), var(--purple-2));
  box-shadow: 0 0 34px rgba(255, 191, 71, 0.25);
}

.lb-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  object-fit: cover;
  background: #120819;
}

.lb-player {
  position: relative;
  z-index: 1;
  margin-top: 6px;
  font-size: 22px;
  font-weight: 1000;
}

.lb-wager-label {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 1.2px;
}

.lb-wager {
  position: relative;
  z-index: 1;
  margin-top: 6px;
  font-size: 28px;
  font-weight: 1000;
}

.featured .lb-wager {
  font-size: 34px;
}

.lb-prize-box {
  position: relative;
  z-index: 1;
  margin: 18px auto 0;
  width: min(190px, 100%);
  padding: 13px 14px;
  border-radius: 16px;
  background: rgba(12, 8, 18, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.lb-prize-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 1.2px;
}

.lb-prize-value {
  margin-top: 5px;
  font-size: 22px;
  font-weight: 1000;
  color: #ffffff;
}

.lb-table-wrap {
  margin-top: 18px;
  padding: 24px;
  border-radius: 26px;
  background: rgba(25, 14, 37, 0.82);
  border: 1px solid rgba(190, 87, 255, 0.22);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.28);
}

.lb-section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.lb-section-title h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 1000;
  letter-spacing: 0.4px;
}

.lb-section-title h2 span {
  color: var(--purple-2);
}

.lb-line {
  width: 46px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--purple), var(--purple-2));
  box-shadow: 0 0 14px rgba(169, 60, 255, 0.6);
}

.lb-table-head,
.lb-row {
  display: grid;
  grid-template-columns: 110px 1fr 180px 150px;
  gap: 12px;
  align-items: center;
}

.lb-table-head {
  padding: 0 18px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 1.1px;
}

.lb-table {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lb-row {
  min-height: 76px;
  padding: 12px 18px;
  border-radius: 18px;
  background: rgba(13, 8, 20, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.065);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.lb-row:hover {
  transform: translateY(-2px);
  background: rgba(22, 12, 33, 0.86);
  border-color: rgba(200, 98, 255, 0.24);
}

.lb-row.winner {
  border-color: rgba(255, 191, 71, 0.18);
  background:
    linear-gradient(90deg, rgba(255, 191, 71, 0.08), transparent 52%),
    rgba(13, 8, 20, 0.66);
}

.lb-col.rank {
  font-size: 18px;
  font-weight: 1000;
  color: #ead8ff;
}

.lb-col.player {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.lb-col.player img {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid rgba(201, 100, 255, 0.22);
}

.mask-name {
  font-size: 17px;
  font-weight: 950;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-col.wager {
  font-size: 17px;
  font-weight: 950;
}

.lb-prize-pill {
  display: inline-flex;
  justify-content: center;
  min-width: 78px;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(169, 60, 255, 0.18);
  border: 1px solid rgba(211, 108, 255, 0.25);
  font-size: 14px;
  font-weight: 1000;
  color: #ffffff;
}

.lb-prize-pill.zero {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.08);
  color: #9f92ad;
}

@media (max-width: 920px) {
  .lb-podium {
    grid-template-columns: 1fr;
  }

  .lb-podium-card.featured {
    transform: none;
  }

  .lb-podium-card.rank-1 {
    order: 1;
  }

  .lb-podium-card.rank-2 {
    order: 2;
  }

  .lb-podium-card.rank-3 {
    order: 3;
  }

  .lb-table-head,
  .lb-row {
    grid-template-columns: 80px 1fr 130px 105px;
  }
}

@media (max-width: 680px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .header-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .status-pill {
    width: 100%;
    justify-content: center;
  }

  .lb-hero {
    padding: 30px 16px;
  }

  .lb-title {
    flex-direction: column;
    gap: 6px;
  }

  .lb-actions {
    flex-direction: column;
  }

  .lb-code-box,
  .lb-signup-btn {
    width: 100%;
  }

  .lb-casino-switcher {
    padding: 8px;
    gap: 8px;
  }

  .lb-casino-tab {
    height: 66px;
  }

  .lb-casino-logo {
    max-width: 112px;
    max-height: 34px;
  }

  .lb-current-badge {
    left: 12px;
    font-size: 9px;
  }

  .lb-countdown-wrap {
    padding: 16px;
  }

  .lb-countdown {
    gap: 7px;
  }

  .lb-time-box {
    min-width: 0;
    flex: 1;
    padding: 13px 6px;
    border-radius: 14px;
  }

  .lb-time-unit {
    font-size: 9px;
  }

  .lb-time-sep {
    font-size: 22px;
  }

  .lb-table-wrap {
    padding: 18px 12px;
  }

  .lb-table-head {
    display: none;
  }

  .lb-row {
    grid-template-columns: 62px 1fr;
    gap: 10px;
  }

  .lb-col.wager,
  .lb-col.prize {
    grid-column: 2;
  }

  .lb-col.wager::before {
    content: "WAGERED: ";
    color: var(--muted);
    font-size: 11px;
    font-weight: 950;
    letter-spacing: 0.8px;
  }

  .lb-col.prize::before {
    content: "PRIZE: ";
    color: var(--muted);
    font-size: 11px;
    font-weight: 950;
    letter-spacing: 0.8px;
    margin-right: 8px;
  }
}