* { box-sizing: border-box; }

:root {
  --ink-purple: #4B2E93;
  --ink-purple-bright: #7C3AED;
  --ink-neon: #B266FF;
  --ink-pink: #FF6EC7;
  --term-green: #39FF88;
  --bg-deep: #08050f;
  --bg-panel: #130a24;
  --border: #2c1c48;
  --border-bright: #4a2f80;
  --text: #e7defc;
  --text-dim: #8f7fb3;
  --font: 'Space Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  /* A blocky CRT-readout font, not a code-editor font — for the big
     glowing display elements (wordmark, section headers, terminal
     chrome, readout numbers) where "phosphor tube," not "IDE," is the
     point. Space Mono stays for anything meant to be read at length
     (body copy, tables) since VT323 gets harder to read in long runs. */
  --font-display: 'VT323', monospace;
}

html, body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-deep);
}

body {
  font-family: var(--font);
  color: var(--text);
  position: relative;
  overflow-x: hidden;
  font-size: 14px;
  line-height: 1.5;
}

/* ---- atmosphere layers: gradient glow, scanlines, grain ---- */

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 15% -10%, rgba(124, 58, 237, 0.38), transparent 45%),
    radial-gradient(circle at 90% 8%, rgba(178, 102, 255, 0.22), transparent 40%),
    radial-gradient(circle at 50% 110%, rgba(75, 46, 147, 0.28), transparent 50%),
    linear-gradient(180deg, #0c0716 0%, #050308 100%);
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0px,
    rgba(0, 0, 0, 0.14) 1px,
    rgba(0, 0, 0, 0) 3px
  );
  mix-blend-mode: overlay;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 49;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.crt-frame {
  position: relative;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

/* ---- window chrome: the little dot clusters used on the header + panels ---- */

.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; box-shadow: 0 0 6px currentColor; }
.dot--a { background: var(--ink-pink); color: var(--ink-pink); }
.dot--b { background: var(--ink-neon); color: var(--ink-neon); }
.dot--c { background: var(--term-green); color: var(--term-green); }

/* ---- header ---- */

.winbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
  font-family: var(--font-display);
  font-size: 0.95rem;
}
.winbar__path { margin-left: 4px; }
.winbar__signal { margin-left: auto; letter-spacing: 0.04em; }
.winbar__signal em { color: var(--ink-pink); font-style: normal; }

.hero { text-align: center; padding: 44px 10px 20px; }

.wordmark {
  font-family: var(--font-display);
  font-size: 3.8rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  background: linear-gradient(90deg, var(--ink-neon), var(--ink-purple-bright) 60%, var(--ink-pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 40px rgba(178, 102, 255, 0.35);
}
.cursor {
  color: var(--term-green);
  -webkit-text-fill-color: var(--term-green);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

.tagline {
  color: var(--text-dim);
  max-width: 600px;
  margin: 14px auto 0;
  font-size: 0.82rem;
}

/* ---- banner ---- */

.banner {
  max-width: 100%;
  margin: 0 0 20px;
  background: rgba(58, 26, 26, 0.6);
  border: 1px solid #6b2a2a;
  color: #ffb4b4;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 0.78rem;
  backdrop-filter: blur(6px);
}
.banner__glyph {
  display: inline-flex;
  width: 16px; height: 16px;
  align-items: center; justify-content: center;
  border: 1px solid #ffb4b4;
  border-radius: 3px;
  margin-right: 6px;
  font-weight: 700;
}
.banner code { background: rgba(0, 0, 0, 0.35); padding: 1px 5px; border-radius: 4px; }

main {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* ---- panels: styled like little terminal windows ---- */

.panel {
  background: rgba(19, 10, 36, 0.72);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(178, 102, 255, 0.04), 0 20px 60px -30px rgba(124, 58, 237, 0.5);
  overflow: hidden;
}

.panel__titlebar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  background: rgba(178, 102, 255, 0.06);
  border-bottom: 1px solid var(--border);
}
.panel__titletext {
  margin-left: 8px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

.panel__body { padding: 20px; }

.panel__row {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.panel__row--wrap { justify-content: space-between; }

.panel h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--text);
  text-transform: lowercase;
  letter-spacing: 0.02em;
}
.panel h2::before { content: '~/ '; color: var(--text-dim); }

.stat-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}
.stat-value {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 400;
  color: var(--ink-neon);
  text-shadow: 0 0 16px rgba(178, 102, 255, 0.35);
}

.mint-controls {
  display: flex;
  gap: 8px;
  margin-left: auto;
  align-items: center;
}

input[type="number"], input[type="text"] {
  background: #0a0616;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-family: var(--font);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input[type="number"] { width: 70px; }
input[type="text"] { min-width: 260px; }
input:focus {
  outline: none;
  border-color: var(--ink-neon);
  box-shadow: 0 0 0 3px rgba(178, 102, 255, 0.15);
}

.btn {
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 9px 16px;
  font-weight: 600;
  font-size: 0.78rem;
  font-family: var(--font);
  text-transform: lowercase;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.15s, filter 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: linear-gradient(90deg, var(--ink-purple-bright), var(--ink-neon));
  color: #0a0616;
  box-shadow: 0 0 18px rgba(178, 102, 255, 0.35);
}
.btn--primary:hover { filter: brightness(1.12); box-shadow: 0 0 26px rgba(178, 102, 255, 0.55); }
.btn--ghost {
  background: rgba(178, 102, 255, 0.08);
  color: var(--ink-neon);
  border: 1px solid var(--border-bright);
}
.btn--ghost:hover { background: rgba(178, 102, 255, 0.16); box-shadow: 0 0 14px rgba(178, 102, 255, 0.25); }
.btn--on { background: var(--ink-purple-bright); color: white; }
.btn--on:hover { box-shadow: 0 0 14px rgba(124, 58, 237, 0.5); }
.btn--claim { background: var(--ink-pink); color: #2a0a1c; }
.btn--claim:hover { box-shadow: 0 0 14px rgba(255, 110, 199, 0.5); }
.btn:disabled { opacity: 0.35; cursor: default; box-shadow: none; transform: none; }

.status {
  margin-top: 14px;
  font-size: 0.78rem;
  min-height: 1.1em;
}
.status:not(:empty)::before { content: '> '; opacity: 0.55; }
.status--ok { color: var(--term-green); }
.status--error { color: #ff8b8b; }
.status--loading { color: var(--ink-neon); }
.status--loading::after { content: '_'; animation: blink 1s steps(1) infinite; margin-left: 2px; }
.status--idle { color: var(--text-dim); }

.view-controls { display: flex; gap: 8px; }

.grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
}

.muted { color: var(--text-dim); font-size: 0.82rem; }
.muted.small { font-size: 0.66rem; margin-bottom: 8px; }

.card {
  background: #0a0616;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.card:hover {
  border-color: var(--border-bright);
  box-shadow: 0 0 24px rgba(178, 102, 255, 0.18);
  transform: translateY(-2px);
}
.card img { width: 100%; display: block; background: #000; }
.card__body { padding: 10px 12px; }
.card__title { font-size: 0.8rem; font-weight: 700; margin-bottom: 6px; }
.card__row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }

.badge {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid transparent;
}
.badge--on { background: rgba(57, 255, 136, 0.1); color: var(--term-green); border-color: rgba(57, 255, 136, 0.3); }
.badge--off { background: rgba(255, 255, 255, 0.05); color: var(--text-dim); border-color: var(--border); }
.pending { font-size: 0.68rem; color: var(--ink-neon); }

.card__actions .btn { width: 100%; padding: 7px; font-size: 0.74rem; }

.switch-on-row { display: flex; gap: 6px; }
.burn-input {
  flex: 1;
  min-width: 0;
  background: #0a0616;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-family: var(--font);
}
.switch-on-row .btn { width: auto; white-space: nowrap; }

footer {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.7rem;
  padding: 26px 10px 10px;
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.7;
}
.footer__prompt { color: var(--term-green); }
footer a { color: var(--ink-neon); margin-left: 6px; }

/* ---- hero stats + big CTA ---- */

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin: 22px 0 20px;
  flex-wrap: wrap;
}
.hero-stat { display: flex; flex-direction: column; align-items: center; }
.hero-stat__num {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 400;
  color: var(--ink-neon);
  text-shadow: 0 0 16px rgba(178, 102, 255, 0.4);
}
.hero-stat__label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}
.btn--big { padding: 12px 26px; font-size: 0.85rem; display: inline-block; text-decoration: none; }
.hero-actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

.section-note { color: var(--text-dim); font-size: 0.76rem; line-height: 1.6; margin: 8px 0 18px; }
.section-note a { color: var(--ink-neon); }
.section-gap { margin-top: 30px; }

/* ---- whitepaper tables ---- */

.wp-table { width: 100%; border-collapse: collapse; margin: 10px 0 20px; font-size: 0.78rem; }
.wp-table th, .wp-table td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.wp-table th { color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.68rem; font-weight: 600; }
.wp-table td { color: var(--text); }
.wp-note { color: var(--text-dim); font-size: 0.72rem; font-style: italic; margin-bottom: 20px; }
.wp-back { display: inline-block; margin: 0 0 18px; color: var(--ink-neon); text-decoration: none; font-size: 0.8rem; }
.wp-back:hover { text-decoration: underline; }

/* ---- roadmap ---- */

.roadmap-frame {
  margin-top: 14px;
  aspect-ratio: 1600 / 900;
  background: #050308;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.roadmap-frame__svg { width: 100%; height: 100%; display: block; border: 0; }

/* ---- live preview gallery ---- */

.preview-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.preview-card {
  background: #0a0616;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.preview-card:hover {
  border-color: var(--border-bright);
  box-shadow: 0 0 24px rgba(178, 102, 255, 0.2);
  transform: translateY(-2px);
}
.preview-card__frame { aspect-ratio: 480 / 576; background: #050308; }
.preview-card__svg { width: 100%; height: 100%; display: block; border: 0; }
.preview-card__meta {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px 4px;
}
.preview-card__type { font-size: 0.7rem; font-weight: 700; }
.preview-card__row {
  display: flex; justify-content: space-between;
  padding: 2px 10px; font-size: 0.66rem; color: var(--text-dim);
}
.preview-card__row span:last-child { color: var(--text); }

.badge--normal { background: rgba(255, 255, 255, 0.05); color: var(--text-dim); border-color: var(--border); }
.badge--rare { background: rgba(178, 102, 255, 0.12); color: var(--ink-neon); border-color: var(--border-bright); }
.badge--super { background: rgba(255, 110, 199, 0.14); color: var(--ink-pink); border-color: rgba(255, 110, 199, 0.4); }

/* ---- rarity breakdown ---- */

.tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin: 14px 0 8px;
}
.tier-card {
  background: #0a0616;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 12px;
  text-align: center;
}
.tier-card__count { font-family: var(--font-display); font-size: 2.1rem; font-weight: 400; }
.tier-card__name { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 4px; color: var(--text-dim); }
.tier-card__note { font-size: 0.64rem; color: var(--text-dim); margin-top: 8px; line-height: 1.4; }
.tier-card--1of1 { border-color: #D4AF37; box-shadow: 0 0 20px rgba(212, 175, 55, 0.15); }
.tier-card--1of1 .tier-card__count { color: #FFE9A8; }
.tier-card--super { border-color: rgba(255, 110, 199, 0.4); }
.tier-card--super .tier-card__count { color: var(--ink-pink); }
.tier-card--rare .tier-card__count { color: var(--ink-neon); }
.tier-card--normal .tier-card__count { color: var(--text); }

.bar-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.bar-row__label { width: 100px; font-size: 0.72rem; flex-shrink: 0; }
.bar-row__track { flex: 1; height: 8px; background: #0a0616; border-radius: 4px; overflow: hidden; }
.bar-row__fill { height: 100%; background: linear-gradient(90deg, var(--ink-purple-bright), var(--ink-neon)); }
.bar-row__fill--rare { background: linear-gradient(90deg, var(--ink-pink), #ff2d55); }
.bar-row__pct { width: 40px; text-align: right; font-size: 0.7rem; color: var(--text-dim); flex-shrink: 0; }

.swatch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}
.swatch { text-align: center; width: 78px; }
.swatch__color {
  width: 56px; height: 56px;
  border-radius: 6px;
  margin: 0 auto 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.swatch__name { font-size: 0.6rem; line-height: 1.3; }
.swatch__weight { font-size: 0.6rem; color: var(--text-dim); }

/* ---- 1/1 teaser ---- */

.ones-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.ones-card {
  background: repeating-linear-gradient(45deg, #0a0616, #0a0616 8px, #0e0a1a 8px, #0e0a1a 16px);
  border: 1px dashed var(--border-bright);
  border-radius: 8px;
  padding: 18px 10px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--ink-neon);
  text-shadow: 0 0 10px rgba(178, 102, 255, 0.3);
}

/* ---- lightbox ---- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.lightbox[hidden] { display: none; }
.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 3, 10, 0.86);
  backdrop-filter: blur(2px);
}
.lightbox__panel {
  position: relative;
  z-index: 1;
  width: min(90vw, 420px);
  background: var(--bg-panel);
  border: 1px solid var(--border-bright);
  border-radius: 10px;
  box-shadow: 0 0 60px rgba(178, 102, 255, 0.25);
  overflow: hidden;
  animation: lightbox-in 0.15s ease-out;
}
@keyframes lightbox-in {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
.lightbox__close {
  position: absolute;
  top: 8px; right: 8px;
  z-index: 2;
  width: 32px; height: 32px;
  border-radius: 6px;
  border: 1px solid var(--border-bright);
  background: rgba(8, 5, 15, 0.7);
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox__close:hover { background: rgba(124, 58, 237, 0.3); }
.lightbox__frame { aspect-ratio: 480 / 576; background: #050308; }
.lightbox__svg { width: 100%; height: 100%; display: block; border: 0; }
.lightbox__meta { padding: 12px 14px 14px; }
.lightbox__row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.lightbox__type { font-family: var(--font-display); font-size: 1.2rem; }
.lightbox__row--table {
  margin-top: 8px;
  display: flex;
  gap: 18px;
}
.lightbox__row--table > div {
  flex: 1;
  display: flex; justify-content: space-between;
  font-size: 0.7rem; color: var(--text-dim);
}
.lightbox__row--table > div span:last-child { color: var(--text); }

@media (max-width: 640px) {
  .wordmark { font-size: 1.8rem; }
  .winbar__signal { display: none; }
  input[type="text"] { min-width: 0; }
  .hero-stats { gap: 18px; }
  .bar-row__label { width: 80px; font-size: 0.66rem; }
  .lightbox__panel { width: min(94vw, 340px); }
}
