:root {
  --ink: #1a2333;
  --ink-soft: #4a5878;
  --muted: #7a89a8;
  --pemp: #2bbf6c;
  --pemp-deep: #1a8a4c;
  --gold: #d9a441;
  --card: rgba(255, 255, 255, 0.82);
  --card-stroke: rgba(43, 191, 108, 0.18);
  --shadow: 0 12px 40px rgba(40, 80, 140, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/*
 * Cloud sky background — painted, fluffy clouds on blue from clouds.png.
 * `background-attachment: fixed` keeps the sky still when long pages
 * scroll on mobile so it always feels like you're looking *through*
 * the cards at the sky behind them.
 */
body {
  background:
    url("clouds.png") center top / cover no-repeat fixed,
    #b8d6f0;
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  overflow: hidden;
}

/* ────────── page shell ────────── */

.page {
  position: relative;
  z-index: 1;
  height: 100dvh;
  width: 100%;
  max-width: 78rem;
  margin: 0 auto;
  padding: 0.9rem 1.25rem 0.85rem;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 0.85rem;
}

/* ────────── topbar ────────── */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
  line-height: 1;
  text-transform: none;
  text-shadow: 0 2px 12px rgba(255, 255, 255, 0.55);
}

.brand-dot {
  color: var(--pemp);
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem 0.85rem;
  flex-wrap: wrap;
  font-family: "Cinzel", serif;
  font-size: clamp(0.78rem, 2vw, 0.92rem);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.top-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.4rem 0.65rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.55);
  transition: color 0.15s, background 0.15s;
}

.top-nav a:hover {
  color: var(--pemp-deep);
  background: rgba(255, 255, 255, 0.85);
}

.top-nav a:focus-visible {
  outline: 2px solid var(--pemp);
  outline-offset: 2px;
}

.top-nav-sep {
  color: var(--ink-soft);
  opacity: 0.6;
  user-select: none;
}

/* ────────── hero ────────── */

.hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  min-height: 0;
}

.hero-pill-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0 0.6rem;
}

/* Pill sits perfectly still — no glow, no animation. */
.hero-pill {
  width: clamp(160px, 24vh, 280px);
  height: auto;
  margin: 0;
  display: block;
}

.prophecy {
  font-family: "Cinzel", serif;
  font-size: clamp(1.1rem, 2.6vw, 1.6rem);
  font-weight: 600;
  color: var(--ink);
  margin: 0;
  max-width: 32rem;
  letter-spacing: 0.02em;
  line-height: 1.3;
  text-shadow: 0 2px 10px rgba(255, 255, 255, 0.6);
}

.prophecy em {
  color: var(--pemp-deep);
  font-style: italic;
  font-weight: 800;
}

.flavor {
  font-size: clamp(0.85rem, 1.5vw, 0.95rem);
  color: var(--ink);
  margin: -0.2rem 0 0;
  max-width: 32rem;
  font-weight: 500;
  line-height: 1.45;
  background: rgba(255, 255, 255, 0.55);
  padding: 0.5rem 0.9rem;
  border-radius: 0.6rem;
  backdrop-filter: blur(4px);
}

.flavor em {
  color: var(--pemp-deep);
  font-style: normal;
  font-weight: 700;
}

/* ────────── CA pill ────────── */

.ca-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.3rem;
  padding: 0.55rem 1rem;
  background: var(--card);
  color: var(--ink);
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  border: 1px dashed rgba(43, 191, 108, 0.5);
  border-radius: 999px;
  cursor: pointer;
  max-width: 100%;
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
  backdrop-filter: blur(6px);
}

.ca-pill::before {
  content: "";
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background: currentColor;
  opacity: 0.55;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><rect x='9' y='9' width='13' height='13' rx='2'/><path d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/></svg>") center / contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><rect x='9' y='9' width='13' height='13' rx='2'/><path d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/></svg>") center / contain no-repeat;
  transition: opacity 0.15s;
}

.ca-pill:hover {
  border-color: var(--pemp);
  background: rgba(255, 255, 255, 0.95);
}

.ca-pill:hover::before {
  opacity: 1;
  color: var(--pemp-deep);
}

.ca-pill:active {
  transform: translateY(1px);
}

.ca-pill-addr {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-toast {
  font-size: 0.72rem;
  color: var(--pemp-deep);
  font-weight: 600;
  min-height: 1rem;
  margin-top: 0.1rem;
}

/* ────────── data section ────────── */

.data {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 0.85rem;
  min-height: 0;
}

.card {
  background: var(--card);
  border-radius: 1rem;
  border: 1px solid var(--card-stroke);
  box-shadow: var(--shadow);
  padding: 1rem 1.15rem;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(8px);
}

.card-title {
  font-family: "Cinzel", serif;
  font-size: 0.95rem;
  margin: 0 0 0.65rem;
  text-transform: uppercase;
  color: var(--ink);
  letter-spacing: 0.12em;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.card-title-sub {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
  font-style: italic;
  text-transform: none;
  opacity: 0.85;
}

.stats {
  justify-content: flex-start;
  align-items: stretch;
  text-align: center;
  gap: 0;
  padding: 0;
}

.stats-section {
  width: 100%;
  padding: 0.9rem 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  flex: 0 0 auto;
}

.stats-section.stats-status {
  padding: 0.65rem 1rem 0.85rem;
}

.stats-section + .stats-section {
  border-top: 1px dashed rgba(43, 191, 108, 0.22);
}

.stats-section-title {
  font-family: "Cinzel", serif;
  font-size: 0.85rem;
  margin: 0 0 0.35rem;
  text-transform: uppercase;
  color: var(--ink-soft);
  letter-spacing: 0.18em;
}

.stats-big {
  font-family: "Cinzel", serif;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  font-weight: 800;
  margin: 0;
  font-variant-numeric: tabular-nums;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.05;
}

.stats-big--airdrop {
  background-image: linear-gradient(135deg, var(--pemp), var(--pemp-deep));
}

.stats-big--spent {
  background-image: linear-gradient(135deg, var(--gold), #b88521);
}

.stats-sub {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 0.4rem 0 0;
}

.stats-sub-meta {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0.15rem 0 0;
  letter-spacing: 0.01em;
}

.stats-sub-meta a {
  color: var(--pemp-deep);
  text-decoration: none;
  font-weight: 600;
}

.stats-sub-meta a:hover {
  text-decoration: underline;
}

.stats-status {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.stats-timer {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  background: rgba(43, 191, 108, 0.10);
  border: 1px solid var(--card-stroke);
  border-radius: 999px;
}

.timer-label {
  font-family: "Cinzel", serif;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
}

.timer-value {
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--pemp-deep);
  font-variant-numeric: tabular-nums;
}

/* ────────── table ────────── */

.top-table-wrap {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  border-radius: 0.6rem;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(43, 191, 108, 0.12);
}

.top-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.top-table thead th {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
  font-family: "Cinzel", serif;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
  font-weight: 600;
  text-align: left;
  padding: 0.6rem 0.6rem;
  border-bottom: 1px solid rgba(43, 191, 108, 0.22);
}

.top-table tbody td {
  padding: 0.55rem 0.6rem;
  border-bottom: 1px solid rgba(43, 191, 108, 0.08);
  vertical-align: middle;
  color: var(--ink);
}

.top-table tbody tr:last-child td {
  border-bottom: none;
}

.top-table tbody tr:hover td {
  background: rgba(43, 191, 108, 0.06);
}

.top-table .rank {
  width: 2.2rem;
  color: var(--pemp-deep);
  font-weight: 700;
}

.top-table .addr {
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
}

.top-table .addr a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px dashed rgba(43, 191, 108, 0.4);
}

.top-table .addr a:hover {
  color: var(--pemp-deep);
  border-bottom-color: var(--pemp-deep);
}

.top-table .amt,
.top-table th.amt,
.top-table .cnt,
.top-table th.cnt {
  text-align: right;
}

.top-table .amt {
  font-weight: 600;
  color: var(--pemp-deep);
}

.top-table .cnt {
  width: 4rem;
  color: var(--muted);
}

.top-table tr.empty td {
  text-align: center;
  color: var(--muted);
  font-style: italic;
  padding: 1.5rem 0.5rem;
}

/* ────────── footer ────────── */

footer {
  text-align: center;
  font-size: 0.65rem;
  color: var(--ink-soft);
  opacity: 0.95;
  line-height: 1.5;
  max-width: 42rem;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.55);
  padding: 0.4rem 0.9rem;
  border-radius: 0.5rem;
  backdrop-filter: blur(4px);
}

footer strong {
  color: var(--ink);
  font-weight: 700;
}

/* ────────── responsive ────────── */

@media (max-width: 720px) {
  body {
    overflow: auto;
  }

  .page {
    height: auto;
    min-height: 100dvh;
    grid-template-rows: auto auto auto auto;
  }

  .topbar {
    justify-content: center;
    gap: 0.5rem 1rem;
  }

  .data {
    grid-template-columns: 1fr;
  }

  .top-table-wrap {
    max-height: 60vh;
  }

  .hero-pill-wrap {
    padding: 0.4rem 0.75rem 0.6rem;
  }
}
