:root {
  --bg: #080b12;
  --panel: #121824;
  --panel-strong: #182131;
  --panel-soft: #0d121d;
  --text: #f7f9ff;
  --muted: #9faac0;
  --gold: #f5bd36;
  --gold-soft: #f5bd3618;
  --blue: #2e7cff;
  --line: #293247;
  --line-bright: #465575;
  --good: #65e89a;
  --danger: #ff7b7b;
  --shadow: 0 30px 90px #0007;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 75% 0, #1d3158 0, transparent 32rem),
    radial-gradient(circle at 5% 28%, #172645 0, transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid #8db4ff;
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 10px 14px;
  transform: translateY(-150%);
  background: var(--gold);
  border-radius: 8px;
  color: #171005;
  font-weight: 900;
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  padding: 14px max(4vw, 22px);
  background: #080b12ed;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 1000;
  letter-spacing: .14em;
  text-decoration: none;
}

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
}

.desktop-nav a,
.buy-link {
  color: var(--text);
  font-size: .9rem;
  font-weight: 800;
  text-decoration: none;
}

.desktop-nav a:hover,
.buy-link:hover {
  color: var(--gold);
}

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

#connect-wallet,
.flip-button,
.choice,
.mission-action,
.secondary-button {
  cursor: pointer;
}

#connect-wallet {
  max-width: 260px;
  overflow: hidden;
  padding: 11px 15px;
  background: var(--gold);
  border: 0;
  border-radius: 10px;
  color: #171005;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#connect-wallet:disabled,
.flip-button:disabled,
.mission-action:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

main,
footer {
  max-width: 1180px;
  margin: auto;
}

.hero {
  min-height: 70vh;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  gap: 58px;
  padding: 86px 28px 76px;
}

.hero-copy {
  min-width: 0;
}

.hero img {
  width: 100%;
  max-width: 440px;
  justify-self: end;
  image-rendering: pixelated;
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: .78rem;
  font-weight: 950;
  letter-spacing: .2em;
}

.hero h1 {
  margin: .08em 0 .18em;
  font-size: clamp(4.5rem, 13vw, 9rem);
  line-height: .78;
  letter-spacing: -.075em;
}

.lead {
  max-width: 680px;
  color: var(--muted);
  font-size: 1.22rem;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 26px 0 18px;
}

.hero-badges span,
.wallet-status {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: .86rem;
}

.hero-badges span::before {
  width: 7px;
  height: 7px;
  margin-right: 8px;
  background: var(--good);
  border-radius: 50%;
  content: "";
}

.wallet-status {
  margin: 0;
  background: #090d16b8;
}

.wallet-status.error,
.holder-status.error {
  color: var(--danger);
}

.wallet-section,
.flip-section,
.missions-section,
.holders-section,
.official-links {
  padding: 96px 28px;
  border-top: 1px solid var(--line);
}

.section-heading {
  max-width: 760px;
}

.split-heading {
  max-width: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}

.section-heading h2,
.official-links h2 {
  margin: .12em 0 .32em;
  font-size: clamp(2.6rem, 6vw, 5.1rem);
  line-height: .94;
  letter-spacing: -.055em;
}

.section-heading p:last-child {
  color: var(--muted);
}

.secondary-button {
  padding: 11px 15px;
  background: #202a3c;
  border: 1px solid var(--line-bright);
  border-radius: 10px;
  color: var(--text);
  font-weight: 850;
}

.secondary-button:hover:not(:disabled) {
  border-color: var(--gold);
}

.dashboard {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-top: 38px;
}

.stat-card,
.holder-summary-card {
  min-width: 0;
  padding: 22px;
  background: linear-gradient(145deg, var(--panel-strong), var(--panel));
  border: 1px solid var(--line);
  border-radius: 18px;
}

.stat-card.accent-card {
  background: linear-gradient(145deg, #3b2b0d, var(--panel));
  border-color: #6f5520;
}

.stat-card span,
.holder-summary-card span {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: .82rem;
}

.stat-card strong,
.holder-summary-card strong {
  display: block;
  overflow: hidden;
  font-size: 1.15rem;
  text-overflow: ellipsis;
}

.dashboard-updated {
  margin: 15px 2px 0;
  color: var(--muted);
  font-size: .84rem;
}

.game-card {
  max-width: 650px;
  margin: 45px auto 0;
  padding: 44px 28px;
  text-align: center;
  background: linear-gradient(150deg, #19243a, #101622);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.coin {
  width: 180px;
  height: 180px;
  margin: 0 auto 30px;
  padding: 9px;
  transform-style: preserve-3d;
  background: linear-gradient(145deg, #ffdc72, #9c6500);
  border-radius: 50%;
  box-shadow: 0 13px 0 #754a00, 0 25px 50px #0008;
}

.coin.flipping {
  animation: flip .85s cubic-bezier(.18, .8, .25, 1);
}

.coin-face {
  height: 100%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 28%, #fff0a3, #f5bd36 50%, #b77a06);
  border: 5px solid #ffe188;
  border-radius: 50%;
  color: #362200;
  font-size: 6rem;
  font-weight: 1000;
  text-shadow: 0 3px #fff3a8;
}

@keyframes flip {
  0% { transform: rotateY(0) translateY(0); }
  45% { transform: rotateY(900deg) translateY(-48px) scale(1.08); }
  100% { transform: rotateY(1800deg) translateY(0); }
}

.choice-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
}

.choice {
  min-width: 130px;
  padding: 12px 20px;
  background: #202a3c;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  font-weight: 900;
}

.choice.active {
  background: var(--blue);
  border-color: #69a0ff;
}

.flip-button {
  width: min(100%, 390px);
  padding: 16px 22px;
  background: var(--gold);
  border: 0;
  border-radius: 13px;
  color: #171005;
  font-weight: 1000;
  letter-spacing: .045em;
}

.result {
  min-height: 31px;
  font-size: 1.16rem;
  font-weight: 850;
}

.result.win {
  color: var(--good);
}

.game-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 25px;
}

.game-stats div {
  padding: 14px;
  background: #0c111c;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.game-stats span {
  display: block;
  color: var(--muted);
  font-size: .78rem;
}

.game-stats strong {
  font-size: 1.35rem;
}

.mission-summary {
  margin: 42px 0 20px;
  padding: 24px;
  background: linear-gradient(145deg, var(--panel-strong), var(--panel));
  border: 1px solid var(--line);
  border-radius: 20px;
}

.mission-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.mission-summary-row span,
.mission-summary p,
.mission-notice {
  color: var(--muted);
}

.mission-summary-row strong {
  color: var(--gold);
  letter-spacing: .05em;
}

.mission-meter {
  height: 12px;
  margin-top: 17px;
  overflow: hidden;
  background: #080c15;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.mission-meter span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--gold));
  border-radius: inherit;
  transition: width .3s ease;
}

.mission-summary p,
.mission-notice {
  margin-bottom: 0;
}

.mission-list {
  display: grid;
  gap: 14px;
}

.mission-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 20px;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}

.mission-card.completed {
  background: linear-gradient(145deg, #162c25, var(--panel));
  border-color: #3c815d;
}

.mission-card:not(.locked):hover {
  transform: translateY(-2px);
  border-color: #4b5d80;
}

.mission-card.locked {
  opacity: .7;
}

.mission-number {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: #0c111c;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--gold);
  font-weight: 1000;
}

.mission-card h3 {
  margin: 0 0 4px;
  font-size: 1.15rem;
}

.mission-card p {
  margin: 0;
  color: var(--muted);
}

.mission-status {
  min-width: 82px;
  color: var(--muted);
  font-size: .76rem;
  letter-spacing: .1em;
  text-align: center;
}

.mission-card.completed .mission-status {
  color: var(--good);
}

.mission-action {
  min-width: 142px;
  padding: 11px 14px;
  background: #202a3c;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-size: .82rem;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}

.mission-action:hover {
  border-color: var(--gold);
}

.holder-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 40px 0 18px;
}

.connected-holder-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin: 18px 0;
  padding: 24px;
  background: linear-gradient(135deg, #243c6b, #171d2a);
  border: 1px solid #4d6fa9;
  border-radius: 20px;
}

.connected-holder-card h3 {
  margin: 0 0 5px;
  font-size: 1.35rem;
}

.connected-holder-card p:not(.eyebrow) {
  margin: 0;
  color: #c7d2e8;
}

.connected-holder-card a {
  flex: 0 0 auto;
  padding: 11px 14px;
  background: #0d1423;
  border: 1px solid #6387c5;
  border-radius: 10px;
  color: var(--text);
  font-weight: 850;
  text-decoration: none;
}

.holder-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
}

.holder-search {
  flex: 1;
}

.holder-search input {
  width: 100%;
  min-height: 46px;
  padding: 11px 15px;
  background: #0c111c;
  border: 1px solid var(--line-bright);
  border-radius: 11px;
  color: var(--text);
}

.holder-search input::placeholder {
  color: #77849d;
}

.holder-status,
.holder-disclaimer {
  color: var(--muted);
  font-size: .88rem;
}

.holder-table-wrap {
  position: relative;
  min-height: 220px;
  margin-top: 18px;
  overflow-x: auto;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.holder-table {
  width: 100%;
  border-collapse: collapse;
}

.holder-table th,
.holder-table td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.holder-table th {
  color: var(--muted);
  font-size: .76rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.holder-table tbody tr:last-child td {
  border-bottom: 0;
}

.holder-table tbody tr:hover {
  background: #182131aa;
}

.holder-table tbody tr.is-you {
  background: #2e7cff18;
  box-shadow: inset 4px 0 var(--blue);
}

.holder-table .numeric {
  text-align: right;
}

.holder-rank-cell {
  color: var(--gold);
  font-weight: 950;
}

.holder-address-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 850;
  text-decoration: none;
}

.holder-address-link:hover {
  color: var(--gold);
}

.holder-dot {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #2e7cff, #f5bd36);
  border-radius: 9px;
  color: #07101f;
  font-size: .68rem;
  font-weight: 1000;
}

.holder-label {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: .76rem;
}

.holder-level-pill {
  display: inline-block;
  padding: 5px 9px;
  background: #1a2333;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #dce5f7;
  font-size: .76rem;
  font-weight: 800;
}

.holder-empty {
  min-height: 220px;
  display: grid;
  place-content: center;
  gap: 5px;
  padding: 30px;
  text-align: center;
}

.holder-empty span {
  color: var(--muted);
}

.holder-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 16px;
  color: var(--muted);
  font-size: .86rem;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 35px;
}

.link-grid a {
  display: flex;
  min-height: 125px;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--text);
  text-decoration: none;
}

.link-grid a:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}

.link-grid span {
  color: var(--muted);
  font-size: .82rem;
}

.link-grid strong {
  font-size: 1.05rem;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 35px 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

footer a {
  color: var(--text);
}

@media (max-width: 1040px) {
  .dashboard {
    grid-template-columns: repeat(3, 1fr);
  }

  .desktop-nav {
    display: none;
  }

  .topbar {
    grid-template-columns: auto 1fr;
  }

  .topbar-actions {
    justify-self: end;
  }
}

@media (max-width: 850px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero img {
    max-width: 330px;
    justify-self: start;
  }

  .dashboard,
  .holder-summary-grid,
  .link-grid {
    grid-template-columns: 1fr 1fr;
  }

  .mission-card {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .mission-action {
    grid-column: 2 / -1;
    justify-self: start;
  }

  .connected-holder-card {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .topbar {
    gap: 10px;
    padding-inline: 14px;
  }

  .buy-link {
    display: none;
  }

  #connect-wallet {
    max-width: 215px;
    padding-inline: 12px;
    font-size: .82rem;
  }

  .hero,
  .wallet-section,
  .flip-section,
  .missions-section,
  .holders-section,
  .official-links {
    padding-inline: 18px;
  }

  .hero {
    min-height: auto;
    padding-top: 58px;
  }

  .dashboard,
  .holder-summary-grid,
  .link-grid {
    grid-template-columns: 1fr;
  }

  .split-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .choice-row {
    flex-direction: column;
  }

  .choice {
    width: 100%;
  }

  .game-stats {
    grid-template-columns: 1fr;
  }

  .mission-summary-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .mission-card {
    grid-template-columns: auto 1fr;
  }

  .mission-status {
    grid-column: 1;
    min-width: 0;
    text-align: left;
  }

  .mission-action {
    width: 100%;
    grid-column: 1 / -1;
  }

  .holder-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .holder-table th:nth-child(3),
  .holder-table td:nth-child(3),
  .holder-table th:nth-child(5),
  .holder-table td:nth-child(5) {
    display: none;
  }

  .holder-table th,
  .holder-table td {
    padding: 13px 12px;
  }

  .holder-pagination,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
