:root {
  --swamp-0: #07060a;
  --swamp-1: #0c0a0f;
  --swamp-2: #141016;
  --swamp-3: #1c1720;
  --ink: #efe6d2;
  --ink-dim: #a39b87;
  --ink-muted: #6f6655;
  --gold: #f0b90b;
  --gold-soft: #f8cc3d;
  --ember: #ff6b35;
  --line: rgba(240, 185, 11, 0.18);
  --panel: rgba(12, 10, 15, 0.72);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--swamp-0);
  min-height: 100vh;
  line-height: 1.55;
  overflow-x: hidden;
}

/* ---- page background ---- */
.page-bg {
  position: fixed; inset: 0; z-index: -3;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 40% at 72% 10%, rgba(240, 185, 11, 0.10), transparent 70%),
    radial-gradient(ellipse 80% 60% at 15% 85%, rgba(65, 30, 0, 0.35), transparent 70%),
    radial-gradient(ellipse 100% 80% at 50% 50%, #120d17 0%, #07050a 100%);
}
.bg-noise {
  position: fixed; inset: 0; z-index: -1;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.94  0 0 0 0 0.9  0 0 0 0 0.82  0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}

/* ---- topbar ---- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(20px, 4vw, 56px);
  position: sticky; top: 0; z-index: 10;
  background: linear-gradient(180deg, rgba(7, 5, 10, 0.55) 0%, rgba(7, 5, 10, 0.28) 70%, rgba(7, 5, 10, 0) 100%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgba(240, 185, 11, 0.08);
}
.topbar::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(240, 185, 11, 0.28), transparent);
  pointer-events: none;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 46px; height: 46px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(240, 185, 11, 0.4), 0 0 22px rgba(110, 220, 255, 0.25);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-title {
  font-family: "Cinzel", serif; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; font-size: 16px; color: var(--gold);
}
.chips { display: flex; gap: 8px; }
.chip {
  color: var(--ink-dim);
  text-decoration: none;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  transition: color 160ms, border-color 160ms, background 160ms;
}
.chip:hover { color: var(--gold); border-color: var(--gold); background: rgba(240, 185, 11, 0.06); }
.chip.cta {
  color: var(--swamp-0);
  background: var(--gold);
  border-color: var(--gold);
  font-weight: 700;
  padding: 8px 16px;
  box-shadow: 0 6px 20px -8px rgba(240, 185, 11, 0.6);
}
.chip.cta:hover {
  background: var(--gold-soft);
  border-color: var(--gold-soft);
  color: var(--swamp-0);
  transform: translateY(-1px);
}
.chip.cta span { margin-left: 4px; }

/* ---- hero ---- */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 0;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--line);
}
.hero-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}
.hero-tint {
  position: absolute; inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(7, 5, 10, 0.55) 0%, rgba(7, 5, 10, 0.7) 55%, rgba(7, 5, 10, 0.95) 100%),
    radial-gradient(ellipse 60% 50% at 78% 20%, rgba(240, 185, 11, 0.18), transparent 70%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  padding: clamp(72px, 11vw, 140px) clamp(20px, 4vw, 56px) clamp(56px, 8vw, 90px);
  max-width: 1220px;
  margin: 0 auto;
}
.hero-eyebrow {
  color: var(--ink-muted);
  letter-spacing: 0.24em; text-transform: uppercase; font-size: 12px;
  margin: 0 0 22px 0;
}
.hero-eyebrow #block-stamp { color: var(--gold); }
.hero-title {
  font-family: "Cinzel", serif;
  font-weight: 900;
  font-size: clamp(58px, 11vw, 168px);
  line-height: 0.92;
  letter-spacing: -0.01em;
  margin: 0;
  background: linear-gradient(180deg, #fff4c7 0%, var(--gold) 55%, #805800 110%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 80px rgba(240, 185, 11, 0.15);
}
.hero-sub {
  margin: 26px 0 36px;
  color: var(--ink-dim);
  font-size: clamp(15px, 1.3vw, 18px);
  max-width: 560px;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
  margin-top: 44px;
}
.stat-card {
  position: relative;
  padding: 24px 26px 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  backdrop-filter: blur(14px);
  overflow: hidden;
}
.stat-card::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(240, 185, 11, 0.08), transparent 60%);
  pointer-events: none;
}
.stat-card.mayc::before {
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), transparent 60%);
}
.stat-tag {
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-muted);
  font-weight: 600;
}
.stat-hero {
  font-family: "Cinzel", serif; font-weight: 900;
  font-size: clamp(40px, 5.4vw, 64px);
  line-height: 1;
  margin-top: 6px;
  background: linear-gradient(180deg, #fff4c7 0%, var(--gold) 70%, #8b6100 120%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-card.mayc .stat-hero {
  background: linear-gradient(180deg, #ffd6ba 0%, var(--ember) 70%, #6a1c00 120%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-hero-unit {
  font-size: 0.55em; letter-spacing: 0.08em; margin-left: 8px;
  color: var(--ink-dim); font-weight: 600;
  -webkit-text-fill-color: var(--ink-dim);
}
.stat-metrics {
  display: flex; gap: 22px; margin-top: 20px;
  border-top: 1px solid var(--line); padding-top: 16px;
  flex-wrap: wrap;
}
.stat-metric { display: flex; flex-direction: column; }
.stat-metric .v {
  font-family: "JetBrains Mono", monospace;
  font-size: 18px;
  color: var(--gold-soft);
  font-weight: 600;
}
.stat-card.mayc .stat-metric .v { color: #ffb58f; }
.stat-metric .k {
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-muted);
  margin-top: 2px;
}

/* ---- panels ---- */
.panel {
  padding: 56px clamp(20px, 4vw, 56px);
  max-width: 1220px; margin: 0 auto;
}
.panel-head h2 {
  font-family: "Cinzel", serif; font-weight: 700;
  font-size: clamp(26px, 3vw, 40px);
  letter-spacing: 0.02em;
  margin: 0 0 8px;
  color: var(--ink);
}
.panel-head p { color: var(--ink-dim); margin: 0 0 28px; max-width: 600px; }

/* ---- search ---- */
.search-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  backdrop-filter: blur(14px);
  padding: 22px;
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.8);
}
.tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.tab {
  appearance: none; border: 1px solid var(--line); background: transparent;
  color: var(--ink-dim);
  padding: 8px 16px; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  border-radius: 999px; cursor: pointer; font-family: inherit;
  transition: all 160ms;
}
.tab:hover { color: var(--gold); border-color: var(--gold); }
.tab.active { color: var(--swamp-0); background: var(--gold); border-color: var(--gold); font-weight: 600; }

#search-form { display: flex; gap: 10px; }
#search-input {
  flex: 1; min-width: 0;
  background: rgba(7, 5, 10, 0.6);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  padding: 14px 16px;
  font-family: "JetBrains Mono", monospace;
  font-size: 15px;
  outline: none;
  transition: border-color 160ms, box-shadow 160ms;
}
#search-input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(240, 185, 11, 0.15); }
#search-input::placeholder { color: var(--ink-muted); }
#search-form button {
  appearance: none; border: 0; cursor: pointer;
  background: var(--gold); color: var(--swamp-0);
  padding: 0 24px; border-radius: 12px;
  font-family: "Cinzel", serif; font-weight: 700; font-size: 14px;
  letter-spacing: 0.14em; text-transform: uppercase;
  transition: background 160ms, transform 120ms;
}
#search-form button:hover { background: var(--gold-soft); }
#search-form button:active { transform: translateY(1px); }

.result { margin-top: 22px; min-height: 20px; }
.result .empty {
  color: var(--ink-muted);
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  font-size: 14px;
}
.result .miss {
  border: 1px solid rgba(255, 107, 53, 0.35);
  background: rgba(255, 107, 53, 0.06);
  color: #ffb58f;
}
.result .card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(7, 5, 10, 0.55);
  padding: 20px;
}
.result .row {
  display: grid; grid-template-columns: 160px 1fr; gap: 12px;
  padding: 10px 0; border-bottom: 1px dashed rgba(240, 185, 11, 0.08);
}
.result .row:last-child { border-bottom: 0; }
.result .k {
  color: var(--ink-muted); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  padding-top: 2px;
}
.result .v { color: var(--ink); font-family: "JetBrains Mono", monospace; font-size: 14px; word-break: break-all; }
.result .v .pill {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-family: "Inter", sans-serif;
  letter-spacing: 0.12em; text-transform: uppercase; margin-right: 6px;
}
.result .pill.bayc { background: rgba(240, 185, 11, 0.14); color: var(--gold); border: 1px solid var(--line); }
.result .pill.mayc { background: rgba(255, 107, 53, 0.14); color: #ffb58f; border: 1px solid rgba(255, 107, 53, 0.3); }
.result .pill.parked { background: rgba(163, 155, 135, 0.12); color: var(--ink-dim); border: 1px solid rgba(163, 155, 135, 0.3); }
.result .pill.sent { background: rgba(66, 200, 120, 0.1); color: #8fe5b5; border: 1px solid rgba(66, 200, 120, 0.35); }
.result .pill.pending { background: rgba(240, 185, 11, 0.08); color: var(--gold-soft); border: 1px solid rgba(240, 185, 11, 0.35); }
.result .muted { color: var(--ink-dim); font-family: "Inter", sans-serif; font-size: 13px; line-height: 1.6; }
.result .tx-meta { color: var(--ink-muted); font-size: 12px; margin-top: 6px; }
.result .tx-meta a { color: var(--gold); border-bottom: 1px dashed transparent; text-decoration: none; }
.result .tx-meta a:hover { border-bottom-color: var(--gold); }
.result .tokens {
  font-family: "Cinzel", serif; font-weight: 700;
  font-size: 22px; color: var(--gold-soft);
}
.result a { color: var(--gold); text-decoration: none; border-bottom: 1px dashed transparent; }
.result a:hover { border-bottom-color: var(--gold); }

.id-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.id-chips .id {
  font-family: "JetBrains Mono", monospace; font-size: 11px;
  padding: 3px 8px; border-radius: 6px;
  border: 1px solid var(--line); color: var(--ink-dim);
}
.id-chips .id:hover { color: var(--gold); border-color: var(--gold); }

/* ---- tables ---- */
.table-wrap {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  overflow: hidden;
  backdrop-filter: blur(10px);
}
table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-muted); padding: 16px 20px; font-weight: 600;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 5, 10, 0.4);
}
thead th.num { text-align: right; }
tbody td { padding: 14px 20px; font-size: 14px; border-bottom: 1px solid rgba(240, 185, 11, 0.06); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background 120ms; }
tbody tr:hover { background: rgba(240, 185, 11, 0.03); }
tbody td.num { text-align: right; font-family: "JetBrains Mono", monospace; }
tbody td.rank { font-family: "Cinzel", serif; font-weight: 700; color: var(--gold); width: 60px; }
tbody td.wallet { font-family: "JetBrains Mono", monospace; }
tbody td.wallet a { color: var(--ink); text-decoration: none; border-bottom: 1px dashed transparent; }
tbody td.wallet a:hover { color: var(--gold); border-bottom-color: var(--gold); }
tbody td.tokens { color: var(--gold-soft); font-weight: 600; }
tbody td.cat {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-dim);
}

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip-row .tag {
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  padding: 8px 14px; border-radius: 999px; color: var(--ink-dim);
  border: 1px solid var(--line); background: rgba(7, 5, 10, 0.35);
}
.chip-row .tag strong { color: var(--gold); font-weight: 600; }

/* ---- footer ---- */
.foot {
  padding: 46px clamp(20px, 4vw, 56px) 64px;
  text-align: center;
  color: var(--ink-muted);
  font-family: "Cinzel", serif; letter-spacing: 0.5em;
  font-size: 12px;
  border-top: 1px solid var(--line);
  margin-top: 40px;
}

/* ---- responsive ---- */
@media (max-width: 680px) {
  .topbar { padding: 16px 18px; }
  .chips { display: none; }
  .hero { padding: 36px 18px 36px; }
  .panel { padding: 40px 18px; }
  #search-form { flex-direction: column; }
  #search-form button { padding: 14px 16px; }
  .result .row { grid-template-columns: 1fr; gap: 2px; }
  thead th, tbody td { padding: 12px 14px; }
  .hero-title { letter-spacing: -0.02em; }
}
