:root {
  --bg: #1a1408;
  --bg-2: #221a0c;
  --ink: #f7efd7;
  --muted: #bfae7d;
  --gold: #f5c518;
  --gold-deep: #b8860b;
  --amber: #d97706;
  --card: rgba(255, 219, 122, 0.07);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --border: 1px solid rgba(245, 197, 24, 0.18);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  background:
    radial-gradient(1200px 600px at 70% -10%, rgba(245, 197, 24, 0.14), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(217, 119, 6, 0.18), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  color: var(--ink);
  font-family: "DM Sans", system-ui, sans-serif;
  line-height: 1.45;
  overflow: hidden;
}

.page {
  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: "Bungee", cursive;
  font-size: clamp(1.6rem, 3.8vw, 2.4rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  margin: 0;
  background: linear-gradient(135deg, var(--gold), var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
  text-shadow: 0 0 30px rgba(245, 197, 24, 0.15);
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem 0.85rem;
  flex-wrap: wrap;
  font-size: clamp(0.85rem, 2.4vw, 1rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.top-nav a {
  color: var(--ink);
  text-decoration: none;
  padding: 0.4rem 0.65rem;
  border-radius: 0.4rem;
  transition: color 0.15s, background 0.15s;
}

.top-nav a:hover {
  color: var(--gold);
  background: rgba(245, 197, 24, 0.08);
}

.top-nav a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.top-nav-sep {
  color: var(--muted);
  opacity: 0.4;
  user-select: none;
}

/* ────────── hero ────────── */

.hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  min-height: 0;
}

.hero-coin {
  width: clamp(160px, 22vh, 280px);
  height: auto;
  margin: 0;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.55))
          drop-shadow(0 0 18px rgba(245, 197, 24, 0.25));
}

.tagline {
  font-size: clamp(0.9rem, 1.7vw, 1.05rem);
  color: var(--muted);
  margin: 0;
  max-width: 36rem;
}

.tagline em {
  color: var(--gold);
  font-style: normal;
  font-weight: 700;
}

/* ────────── CA pill ────────── */

.ca-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.25rem;
  padding: 0.5rem 0.95rem;
  background: rgba(245, 197, 24, 0.08);
  color: var(--ink);
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  border: 1px dashed rgba(245, 197, 24, 0.35);
  border-radius: 999px;
  cursor: pointer;
  max-width: 100%;
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
}

.ca-pill::before {
  content: "";
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background: currentColor;
  opacity: 0.6;
  -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(--gold);
  background: rgba(245, 197, 24, 0.14);
}

.ca-pill:hover::before {
  opacity: 1;
  color: var(--gold);
}

.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(--gold);
  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: 0.85rem;
  border: var(--border);
  box-shadow: var(--shadow);
  padding: 1rem 1.15rem;
  min-height: 0;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(4px);
}

.card-title {
  font-family: "Bungee", cursive;
  font-size: 0.95rem;
  margin: 0 0 0.65rem;
  text-transform: lowercase;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.stats {
  justify-content: flex-start;
  align-items: stretch;
  text-align: center;
  gap: 0;
  padding: 0;
}

.stats-section {
  width: 100%;
  padding: 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.stats-section + .stats-section {
  border-top: 1px dashed rgba(245, 197, 24, 0.18);
}

.stats-section-title {
  font-family: "Bungee", cursive;
  font-size: 0.95rem;
  margin: 0 0 0.35rem;
  text-transform: lowercase;
  color: var(--ink);
  letter-spacing: 0.02em;
  opacity: 0.8;
}

.stats-big {
  font-family: "Bungee", cursive;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 400;
  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, #fff5c2, var(--gold), var(--gold-deep));
}

.stats-big--spent {
  background-image: linear-gradient(135deg, var(--amber), var(--gold));
}

.stats-sub {
  font-size: 0.85rem;
  color: var(--muted);
  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(--gold);
  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.3rem 0.7rem;
  background: rgba(245, 197, 24, 0.08);
  border: var(--border);
  border-radius: 999px;
}

.timer-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.timer-value {
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

/* ────────── table ────────── */

.top-table-wrap {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  border-radius: 0.5rem;
  background: rgba(0, 0, 0, 0.22);
}

.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(30, 22, 8, 0.95);
  backdrop-filter: blur(4px);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 700;
  text-align: left;
  padding: 0.55rem 0.6rem;
  border-bottom: 1px solid rgba(245, 197, 24, 0.22);
}

.top-table tbody td {
  padding: 0.55rem 0.6rem;
  border-bottom: 1px solid rgba(245, 197, 24, 0.08);
  vertical-align: middle;
}

.top-table tbody tr:last-child td {
  border-bottom: none;
}

.top-table tbody tr:hover td {
  background: rgba(245, 197, 24, 0.06);
}

.top-table .rank {
  width: 2.2rem;
  color: var(--gold);
  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(245, 197, 24, 0.3);
}

.top-table .addr a:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.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(--gold);
}

.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(--muted);
  opacity: 0.75;
  line-height: 1.4;
  max-width: 40rem;
  margin: 0 auto;
}

/* ────────── 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;
  }
}
