@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

:root {
  --bg: #0e0e0e;
  --bg2: #161616;
  --fg: #e8e8f0;
  --dim: #666;
  --border: #2a2a2a;
  --accent: #e8e8f0;
}

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

html { scroll-behavior: smooth; overflow-x: hidden; max-width: 100vw; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  line-height: 1.8;
  overflow-x: hidden;
  max-width: 100vw;
}

a { color: var(--fg); text-decoration: none; }

/* ── NAV ─────────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 40px;
  background: rgba(14,14,14,0.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(4px);
}

.nav-logo { font-size: 14px; letter-spacing: 4px; }

.nav-links { display: flex; align-items: center; gap: 24px; }

.nav-links a {
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--dim);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--fg); }

.btn-mint {
  border: 1px solid var(--fg);
  padding: 8px 16px;
  color: var(--fg) !important;
  transition: background 0.2s, color 0.2s !important;
}
.btn-mint:hover { background: var(--fg); color: var(--bg) !important; }

/* ── HERO ─────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: 100px 20px 60px;
  position: relative;
  overflow: hidden;
}

.scanlines {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.15) 2px,
    rgba(0,0,0,0.15) 4px
  );
}

.hero-content { position: relative; z-index: 1; max-width: 800px; }

#heroCanvas {
  image-rendering: pixelated;
  width: 160px; height: 160px;
  margin-bottom: 32px;
  border: 1px solid var(--border);
}

h1 {
  font-size: clamp(28px, 6vw, 56px);
  letter-spacing: 8px;
  margin-bottom: 20px;
  position: relative;
}

.glitch { animation: glitch 4s infinite; }

@keyframes glitch {
  0%, 90%, 100% { text-shadow: none; }
  91% { text-shadow: 3px 0 #fff, -3px 0 #555; }
  93% { text-shadow: -3px 0 #fff, 3px 0 #555; }
  95% { text-shadow: 3px 0 #fff, -3px 0 #555; }
  97% { text-shadow: none; }
}

.hero-sub {
  font-size: 10px; letter-spacing: 3px;
  color: var(--fg); margin-bottom: 8px;
}
.hero-sub2 {
  font-size: 8px; letter-spacing: 2px;
  color: var(--dim); margin-bottom: 40px;
}

.hero-btns { display: flex; gap: 16px; justify-content: center; margin-bottom: 48px; flex-wrap: wrap; }

.btn-primary {
  background: var(--fg); color: var(--bg);
  padding: 14px 28px; font-family: inherit; font-size: 9px;
  letter-spacing: 2px; cursor: pointer; border: none;
  display: inline-block;
  transition: opacity 0.2s;
}
.btn-primary:hover { opacity: 0.85; }

.btn-secondary {
  border: 1px solid var(--dim); color: var(--dim);
  padding: 14px 28px; font-size: 9px; letter-spacing: 2px;
  display: inline-block; transition: border-color 0.2s, color 0.2s;
}
.btn-secondary:hover { border-color: var(--fg); color: var(--fg); }

.hero-stats {
  display: flex; align-items: center; justify-content: center;
  gap: 24px; flex-wrap: wrap;
}
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-num { font-size: 16px; color: var(--fg); }
.stat-label { font-size: 7px; color: var(--dim); letter-spacing: 2px; }
.stat-divider { color: var(--border); font-size: 20px; }

/* ── SECTIONS ─────────────────────────────────────────── */
.container { max-width: 960px; margin: 0 auto; padding: 0 24px; width: 100%; overflow-x: hidden; }

.section-title {
  font-size: 12px; letter-spacing: 3px;
  color: var(--dim); margin-bottom: 40px;
}

/* ── ABOUT ────────────────────────────────────────────── */
.about { padding: 80px 24px; border-top: 1px solid var(--border); }

.about-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2px;
}

.about-card {
  background: var(--bg2); padding: 32px 24px;
  border: 1px solid var(--border);
  transition: border-color 0.2s;
}
.about-card:hover { border-color: var(--dim); }

.card-icon { font-size: 24px; margin-bottom: 16px; }

.about-card h3 {
  font-size: 9px; letter-spacing: 2px;
  margin-bottom: 12px; color: var(--fg);
}
.about-card p { font-size: 8px; color: var(--dim); line-height: 2; }

/* ── SPECIES TICKER ───────────────────────────────────── */
.species-section {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  background: var(--bg2);
  max-width: 100vw;
}
#speciesTicker { display: block; image-rendering: pixelated; max-width: none; }

/* ── GAME ─────────────────────────────────────────────── */
.game-section {
  padding: 80px 24px;
  border-top: 1px solid var(--border);
}

.game-desc {
  font-size: 8px; color: var(--dim);
  margin-bottom: 24px; letter-spacing: 1px;
}

.game-wrapper {
  border: 1px solid var(--border);
  display: inline-block;
  position: relative;
  width: 100%;
  max-width: 800px;
}

.game-ui-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  font-size: 9px; letter-spacing: 2px;
}

.ui-lives .life { color: var(--fg); margin-left: 4px; font-size: 12px; }
.ui-lives .life.dead { color: var(--border); }

#gameCanvas {
  display: block; width: 100%;
  image-rendering: pixelated;
  cursor: crosshair;
  background: #0e0e0e;
}

.game-ui-bottom {
  display: flex; justify-content: center; gap: 24px;
  padding: 10px 16px;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  font-size: 7px; color: var(--dim); letter-spacing: 1px;
}

/* ── TRAITS ───────────────────────────────────────────── */
.traits-section {
  padding: 80px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg2);
}

.traits-grid { display: flex; flex-direction: column; gap: 2px; }

.trait-row {
  display: flex; align-items: flex-start; gap: 24px;
  padding: 16px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
}
.trait-label {
  font-size: 8px; color: var(--fg);
  min-width: 100px; letter-spacing: 2px;
  flex-shrink: 0;
}
.trait-vals { font-size: 8px; color: var(--dim); line-height: 2; }

/* ── FAQ ──────────────────────────────────────────────── */
.faq-section { padding: 80px 24px; border-top: 1px solid var(--border); }

.faq-list { display: flex; flex-direction: column; gap: 2px; }

.faq-item {
  border: 1px solid var(--border);
  overflow: hidden;
}

.faq-q {
  padding: 16px 20px;
  font-size: 9px; letter-spacing: 1px;
  cursor: pointer;
  background: var(--bg2);
  transition: background 0.2s;
  user-select: none;
  display: flex; align-items: center; gap: 12px;
}
.faq-q::before { content: '+'; color: var(--dim); }
.faq-item.open .faq-q::before { content: '−'; }
.faq-q:hover { background: #1e1e1e; }

.faq-a {
  font-size: 8px; color: var(--dim); line-height: 2.2;
  padding: 0 20px; max-height: 0; overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.faq-item.open .faq-a { max-height: 200px; padding: 16px 20px; }

/* ── CONTRACT ─────────────────────────────────────────── */
.contract-section {
  padding: 80px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg2);
}

.contract-grid { display: flex; flex-direction: column; gap: 2px; }

.contract-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  gap: 16px; flex-wrap: wrap;
}
.contract-label { font-size: 8px; color: var(--dim); min-width: 100px; letter-spacing: 2px; }
.contract-addr {
  font-size: 7px; color: var(--fg);
  word-break: break-all;
  transition: color 0.2s;
}
.contract-addr:hover { color: var(--dim); }
.contract-val { font-size: 8px; color: var(--fg); }

/* ── FOOTER ───────────────────────────────────────────── */
footer {
  padding: 48px 24px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-logo { font-size: 18px; letter-spacing: 6px; margin-bottom: 24px; }

.footer-links {
  display: flex; justify-content: center; gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  padding: 0 8px;
}
.footer-links a { font-size: 8px; color: var(--dim); letter-spacing: 1px; transition: color 0.2s; }
.footer-links a:hover { color: var(--fg); }

.footer-copy { font-size: 7px; color: var(--border); letter-spacing: 1px; word-break: break-word; padding: 0 8px; }

/* ── PIXEL TEXT ───────────────────────────────────────── */
.pixel-text { font-family: 'Press Start 2P', monospace; }

/* ── RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 600px) {
  nav { padding: 12px 16px; }
  .nav-links a:not(.btn-mint) { display: none; }
  .hero-stats { gap: 12px; }
  .stat-divider { display: none; }
  .game-ui-bottom { flex-direction: column; gap: 6px; align-items: center; }
  .contract-row { flex-direction: column; }

  /* Hero text */
  h1 { font-size: clamp(20px, 8vw, 36px); letter-spacing: 3px; }
  .hero-sub { font-size: 8px; letter-spacing: 1px; }
  .hero-sub2 { font-size: 7px; letter-spacing: 1px; }
  .hero-btns { flex-direction: column; align-items: stretch; gap: 10px; }
  .btn-primary, .btn-secondary { text-align: center; box-sizing: border-box; }

  /* Contract addresses */
  .contract-addr { font-size: 7px; word-break: break-all; overflow-wrap: break-word; }

  /* Burn section */
  .burn-section { padding: 48px 16px; }
  .burn-formulas { grid-template-columns: 1fr; }
  .formula { font-size: 8px; word-break: break-word; }

  /* NFT game */
  .nft-game-section { padding: 48px 16px; }
  .nft-game-btns { flex-direction: column; }

  /* Traits */
  .traits-section { padding: 48px 16px; }
  .trait-row { flex-direction: column; gap: 8px; }

  /* FAQ */
  .faq-section { padding: 48px 16px; }
  .faq-q { font-size: 8px; letter-spacing: 0; }

  /* Contract */
  .contract-section { padding: 48px 16px; }

  /* Section titles */
  .section-title { font-size: 9px; letter-spacing: 1px; }
}

/* ── BURN TO EVOLVE ───────────────────────────────────── */
.burn-section {
  padding: 80px 24px;
  border-top: 1px solid var(--border);
}

.burn-intro {
  font-size: 8px; color: var(--dim); line-height: 2.2;
  margin-bottom: 40px; max-width: 700px;
}

.burn-steps {
  display: flex; align-items: flex-start; gap: 0;
  margin-bottom: 48px; flex-wrap: wrap;
}

.burn-step {
  flex: 1; min-width: 0;
  background: var(--bg2); border: 1px solid var(--border);
  padding: 20px 16px;
  overflow: hidden;
  word-break: break-word;
  overflow-wrap: break-word;
}
.burn-step:hover { border-color: var(--dim); }

.step-num {
  font-size: 20px; color: var(--border);
  margin-bottom: 10px; letter-spacing: 2px;
}

.burn-step h3 {
  font-size: 7px; color: var(--fg);
  letter-spacing: 2px; margin-bottom: 10px;
}

.burn-step p {
  font-size: 7px; color: var(--dim); line-height: 2.2; margin-bottom: 12px;
  word-break: break-word;
}

.burn-step code {
  font-family: inherit; font-size: 7px;
  color: var(--fg); background: #1a1a1a;
  padding: 2px 4px; display: block; margin: 4px 0;
  word-break: break-all;
  white-space: normal;
}

.step-note {
  font-size: 7px; color: #444; line-height: 2;
  border-left: 2px solid var(--border); padding-left: 8px;
  word-break: break-word;
}

.burn-arrow {
  font-size: 18px; color: var(--border);
  padding: 36px 6px 0; flex-shrink: 0;
  align-self: flex-start;
}

@media (max-width: 700px) {
  .burn-arrow { display: none; }
  .burn-steps { flex-direction: column; }
  .burn-step { width: 100%; }
}

.burn-formulas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2px;
}

.formula-card {
  background: var(--bg); border: 1px solid var(--border);
  padding: 20px;
}

.formula-label {
  font-size: 7px; color: var(--dim); letter-spacing: 2px;
  margin-bottom: 10px;
}

.formula {
  font-size: 9px; color: var(--fg);
  letter-spacing: 1px; margin-bottom: 8px; line-height: 1.8;
}

.formula-note {
  font-size: 7px; color: #444; line-height: 2;
}

/* ── NFT IN GAME ──────────────────────────────────────── */
.nft-game-section {
  padding: 80px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg2);
}

.nft-game-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
  align-items: start;
}

@media (max-width: 720px) {
  .nft-game-grid { grid-template-columns: 1fr; }
}

.nft-game-lead {
  font-size: 8px; color: var(--dim); line-height: 2.4;
  margin-bottom: 28px; max-width: 600px;
}

.nft-game-list {
  list-style: none; display: flex; flex-direction: column; gap: 12px;
  margin-bottom: 32px;
}
.nft-game-list li { font-size: 8px; color: var(--dim); line-height: 2; }
.ng-bullet { color: var(--fg); margin-right: 8px; }

.nft-game-btns { display: flex; gap: 12px; flex-wrap: wrap; }

.nft-game-bonus {
  background: var(--bg); border: 1px solid var(--border);
  padding: 24px;
}

.bonus-title {
  font-size: 7px; color: var(--dim); letter-spacing: 3px;
  margin-bottom: 16px;
}

.bonus-list { display: flex; flex-direction: column; gap: 2px; margin-bottom: 20px; }

.bonus-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 10px; background: var(--bg2); border: 1px solid var(--border);
}
.bonus-sp { font-size: 7px; color: var(--dim); }
.bonus-pts { font-size: 8px; color: var(--fg); }

.bonus-link {
  font-size: 7px; color: var(--dim); letter-spacing: 2px;
  border-bottom: 1px solid var(--border); padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
  display: inline-block;
}
.bonus-link:hover { color: var(--fg); border-color: var(--fg); }

/* ── NAV PLAY BLINK ───────────────────────────────────── */
@keyframes navPlayBlink {
  0%, 100% { color: var(--fg); opacity: 1; }
  50% { color: var(--fg); opacity: 0.3; }
}
.nav-play-blink {
  color: var(--fg) !important;
  animation: navPlayBlink 1.2s ease-in-out infinite;
}

/* ── PLAY BUTTON HERO BLINK ───────────────────────────── */
@keyframes playBtnPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232,232,240,0); border-color: var(--dim); color: var(--dim); }
  50% { box-shadow: 0 0 12px 2px rgba(232,232,240,0.18); border-color: var(--fg); color: var(--fg); }
}
.btn-play-pulse {
  animation: playBtnPulse 1.6s ease-in-out infinite;
}
