:root {
  --bg: #050510;
  --bg-elevated: #0c0d1a;
  --mint: #52e089;
  --mint-dark: #3bc972;
  --mint-glow: rgba(82, 224, 137, 0.22);
  --white: #ffffff;
  --white-soft: #f4f5f8;
  --text: rgba(244, 245, 248, 0.88);
  --text-muted: rgba(244, 245, 248, 0.5);
  --radius-pill: 999px;
  --font: "DM Sans", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
}

.bg-glow--green {
  width: 360px;
  height: 360px;
  top: -100px;
  left: 50%;
  transform: translateX(-60%);
  background: var(--mint-glow);
  opacity: 0.32;
}

.bg-glow--white {
  width: 240px;
  height: 240px;
  bottom: 12%;
  right: -60px;
  background: rgba(255, 255, 255, 0.03);
}

.topnav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.1rem 1.25rem 0.65rem;
  max-width: 520px;
  margin: 0 auto;
}

.nav-btn {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.65rem;
  padding: 0.5rem 0.65rem;
  border: none;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--white-soft);
  background: linear-gradient(180deg, #1a1b28 0%, #12131f 55%, #0e0f18 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 -1px 0 rgba(0, 0, 0, 0.35) inset,
    0 5px 0 #080910,
    0 8px 16px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    filter 0.16s ease;
  isolation: isolate;
}

.nav-btn__shine {
  position: absolute;
  inset: 2px 10px auto 10px;
  height: 45%;
  border-radius: var(--radius-pill);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.14) 0%,
    rgba(255, 255, 255, 0) 100%
  );
  pointer-events: none;
}

.nav-btn__label {
  position: relative;
  z-index: 1;
}

.nav-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.nav-btn:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 1px 0 #080910,
    0 3px 10px rgba(0, 0, 0, 0.3);
}

.nav-btn--active {
  color: #041008;
  background: linear-gradient(180deg, #6ef09a 0%, var(--mint) 50%, var(--mint-dark) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 -1px 0 rgba(0, 0, 0, 0.1) inset,
    0 5px 0 #2aad5c,
    0 8px 18px rgba(82, 224, 137, 0.22);
}

.nav-btn--active .nav-btn__shine {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.42) 0%,
    rgba(255, 255, 255, 0) 100%
  );
}

.nav-btn--disabled,
.nav-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  filter: saturate(0.65);
}

.page {
  position: relative;
  z-index: 1;
  min-height: calc(100dvh - 3.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1.25rem 2.25rem;
  max-width: 520px;
  margin: 0 auto;
}

.page.page--leaderboard-mode {
  justify-content: flex-start;
  padding-top: 0.5rem;
  min-height: calc(100dvh - 4rem);
}

.view {
  width: 100%;
}

.view[hidden] {
  display: none !important;
}

.view--home {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.view--leaderboard {
  align-self: stretch;
}

.body--leaderboard .bg-glow--green {
  opacity: 0.28;
  transform: translateX(-60%) scale(0.85);
}

.body--leaderboard .bg-glow--white {
  opacity: 0.02;
}

.brand {
  text-align: center;
  margin-bottom: 2.25rem;
}

.brand__logo {
  display: block;
  margin: 0 auto 1rem;
  width: clamp(112px, 28vw, 132px);
  height: auto;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.35));
}

.brand__title {
  margin: 0 0 0.55rem;
  font-size: clamp(2rem, 7vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--white-soft);
}

.brand__tagline {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 20rem;
  margin-inline: auto;
}

.accent--green {
  color: var(--mint);
  font-weight: 600;
}

.accent--white {
  color: var(--white-soft);
  font-weight: 600;
}

.connect {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.bubble-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  padding: 1rem 1.35rem;
  border: none;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease;
  isolation: isolate;
}

.bubble-btn__shine {
  position: absolute;
  inset: 2px 8px auto 8px;
  height: 42%;
  border-radius: var(--radius-pill);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.35) 0%,
    rgba(255, 255, 255, 0) 100%
  );
  pointer-events: none;
  z-index: 0;
}

.bubble-btn__icon {
  position: relative;
  z-index: 1;
  border-radius: 8px;
  object-fit: contain;
  flex-shrink: 0;
}

.bubble-btn__label {
  position: relative;
  z-index: 1;
}

.bubble-btn--pump {
  color: #041008;
  background: linear-gradient(180deg, #6ef09a 0%, var(--mint) 45%, var(--mint-dark) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 -2px 0 rgba(0, 0, 0, 0.12) inset,
    0 8px 0 #2aad5c,
    0 12px 24px rgba(82, 224, 137, 0.25),
    0 4px 12px rgba(0, 0, 0, 0.35);
}

.bubble-btn--fomo {
  color: #0a0b12;
  background: linear-gradient(180deg, #ffffff 0%, var(--white-soft) 50%, #e2e4ea 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 -2px 0 rgba(0, 0, 0, 0.06) inset,
    0 8px 0 #c8cad2,
    0 12px 24px rgba(255, 255, 255, 0.08),
    0 4px 12px rgba(0, 0, 0, 0.35);
}

.bubble-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.03);
}

.bubble-btn--pump:hover {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 -2px 0 rgba(0, 0, 0, 0.1) inset,
    0 10px 0 #2aad5c,
    0 16px 32px rgba(82, 224, 137, 0.32),
    0 4px 12px rgba(0, 0, 0, 0.35);
}

.bubble-btn--fomo:hover {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 1) inset,
    0 -2px 0 rgba(0, 0, 0, 0.05) inset,
    0 10px 0 #c8cad2,
    0 16px 32px rgba(255, 255, 255, 0.12),
    0 4px 12px rgba(0, 0, 0, 0.35);
}

.bubble-btn:active {
  transform: translateY(4px);
  transition-duration: 0.08s;
}

.bubble-btn--pump:active {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.2) inset,
    0 2px 0 #2aad5c,
    0 4px 12px rgba(82, 224, 137, 0.2),
    0 2px 8px rgba(0, 0, 0, 0.3);
}

.bubble-btn--fomo:active {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.6) inset,
    0 2px 0 #c8cad2,
    0 4px 12px rgba(0, 0, 0, 0.25);
}

.bubble-btn--x {
  color: #f5f5f7;
  background: linear-gradient(180deg, #2f3038 0%, #1a1b22 50%, #121318 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.16) inset,
    0 -2px 0 rgba(0, 0, 0, 0.35) inset,
    0 8px 0 #07080c,
    0 12px 22px rgba(0, 0, 0, 0.45);
}

.bubble-btn--x:hover {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.2) inset,
    0 -2px 0 rgba(0, 0, 0, 0.3) inset,
    0 10px 0 #07080c,
    0 14px 26px rgba(0, 0, 0, 0.5);
}

.bubble-btn--x:active {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 2px 0 #07080c,
    0 4px 12px rgba(0, 0, 0, 0.35);
}

.bubble-btn__icon--x {
  border-radius: 0;
}

.leaderboard-header {
  text-align: center;
  margin-bottom: 1.25rem;
}

.leaderboard-header__title {
  margin: 0 0 0.35rem;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--white-soft);
}

.leaderboard-header__sub {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.time-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.time-filters__btn {
  position: relative;
  padding: 0.55rem 0.35rem;
  border: none;
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, #171823 0%, #10111a 100%);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.07) inset,
    0 3px 0 #07080e;
  transition:
    transform 0.14s ease,
    color 0.14s ease,
    box-shadow 0.14s ease;
}

.time-filters__btn:hover {
  color: var(--text);
  transform: translateY(-1px);
}

.time-filters__btn.is-active {
  color: #041008;
  background: linear-gradient(180deg, #6ef09a 0%, var(--mint) 55%, var(--mint-dark) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.3) inset,
    0 3px 0 #2aad5c;
}

.leaderboard-table-wrap {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  background: rgba(10, 11, 20, 0.72);
  overflow: auto;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 10px 28px rgba(0, 0, 0, 0.28);
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.leaderboard-table th,
.leaderboard-table td {
  padding: 0.75rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.leaderboard-table th {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
}

.leaderboard-table tbody tr:last-child td {
  border-bottom: none;
}

.place {
  width: 4.5rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: rgba(244, 245, 248, 0.35);
}

.place--gold {
  color: #b8a066;
}

.place--silver {
  color: #9aa3b2;
}

.place--bronze {
  color: #a3846b;
}

.col-trader {
  font-weight: 600;
  color: var(--white-soft);
}

.leaderboard-row--empty td {
  height: 2.65rem;
}

.col-trader--empty,
.col-pnl--empty,
.col-platform--empty {
  color: transparent;
}

@media (prefers-reduced-motion: reduce) {
  .bubble-btn,
  .nav-btn,
  .time-filters__btn {
    transition: none;
  }
}
