/* AgentDrill — pixel-art mining theme. System fonts only, no external fetches. */
* { box-sizing: border-box; }
:root {
  --bg: #0d0f0a;
  --bg-2: #14170e;
  --panel: #1a1e12;
  --panel-2: #222714;
  --line: #3a4126;
  --text: #e8e6d9;
  --muted: #a8ad8f;
  --gold: #f5b942;
  --gold-dark: #c78f1d;
  --cyan: #39d5e8;
  --purple: #b678f5;
  --green: #7ddb52;
  --red: #e05d4d;
}
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
}
h1, h2, h3, .logo-text, .stat-value, .tier-yield, .terminal-title {
  font-family: "Courier New", Courier, monospace;
  letter-spacing: 0.02em;
}
h1 { font-size: 3rem; margin: 0.2em 0; color: var(--gold); text-shadow: 3px 3px 0 #000; }
h2 { font-size: 1.8rem; color: var(--gold); border-bottom: 3px solid var(--line); padding-bottom: 0.3em; }
h3 { color: var(--text); }
a { color: var(--cyan); }
img { image-rendering: pixelated; }

/* Top bar + hamburger */
.hamburger {
  display: none;
  position: fixed; top: 12px; left: 12px; z-index: 60;
  width: 46px; height: 42px;
  background: var(--panel); border: 3px solid var(--line); border-radius: 0;
  cursor: pointer;
}
.hamburger span { display: block; height: 3px; background: var(--gold); margin: 5px 8px; }
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(13, 15, 10, 0.95);
  border-bottom: 3px solid var(--line);
  padding: 12px 20px;
}
.topbar-title { font-family: "Courier New", Courier, monospace; font-weight: bold; color: var(--gold); font-size: 1.2rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Sidebar */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: 250px; z-index: 50;
  background: var(--bg-2);
  border-right: 3px solid var(--line);
  display: flex; flex-direction: column;
  padding: 20px 14px;
  overflow-y: auto;
}
.logo { display: flex; gap: 12px; align-items: center; margin-bottom: 20px; }
.logo-mark {
  width: 52px; height: 52px; flex: none;
  background: var(--gold); color: #1a1200;
  display: flex; align-items: center; justify-content: center;
  font-family: "Courier New", Courier, monospace; font-weight: bold; font-size: 1.3rem;
  box-shadow: 4px 4px 0 #000;
}
.logo-text { font-size: 1.3rem; font-weight: bold; color: var(--gold); }
.logo-sub { font-size: 0.8rem; color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-link {
  color: var(--text); text-decoration: none;
  padding: 9px 12px;
  border-left: 4px solid transparent;
  font-family: "Courier New", Courier, monospace; font-size: 0.95rem;
}
.nav-link:hover { background: var(--panel); color: var(--gold); }
.nav-link.active { background: var(--panel); border-left-color: var(--gold); color: var(--gold); }
.sidebar-foot { margin-top: auto; padding-top: 16px; border-top: 2px solid var(--line); font-size: 0.85rem; color: var(--muted); }
.badge {
  display: inline-block; padding: 3px 8px;
  font-family: "Courier New", Courier, monospace; font-size: 0.75rem; font-weight: bold;
}
.badge-testnet { background: var(--gold); color: #1a1200; box-shadow: 3px 3px 0 #000; }
.badge-mainnet { background: var(--green); color: #0d0f0a; box-shadow: 3px 3px 0 #000; }
.contract-addr { font-family: "Courier New", Courier, monospace; font-size: 0.85rem; word-break: break-all; }
.contract-link { color: var(--gold); }
.backdrop {
  display: none; position: fixed; inset: 0; z-index: 45;
  background: rgba(0, 0, 0, 0.6);
}
.backdrop.show { display: block; }

/* Main layout */
.main { margin-left: 250px; padding: 0 28px 40px; }
.section { padding: 36px 0 8px; }
.section-intro { color: var(--muted); max-width: 720px; }
.status-banner {
  margin-top: 20px; padding: 12px 16px;
  background: #2a2110; border: 3px solid var(--gold); color: var(--text);
}
.status-banner strong { color: var(--gold); }

/* Hero */
.hero { padding-top: 28px; }
.eyebrow { color: var(--cyan); font-family: "Courier New", Courier, monospace; font-size: 0.9rem; }
.hero-tagline { font-size: 1.25rem; max-width: 720px; }
.hero-text { color: var(--muted); max-width: 720px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 18px 0 26px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: var(--panel); border: 3px solid var(--line); padding: 14px; box-shadow: 4px 4px 0 #000; min-width: 0; }
.stat-value { display: block; font-size: clamp(0.7rem, 3.8vw, 1.25rem); font-weight: bold; color: var(--gold); white-space: nowrap; }
.stat-label { font-size: 0.85rem; color: var(--muted); }

/* Buttons */
.btn {
  font-family: "Courier New", Courier, monospace; font-weight: bold;
  border: 3px solid #000; box-shadow: 3px 3px 0 #000;
  padding: 10px 18px; cursor: pointer; font-size: 1rem;
  text-decoration: none; display: inline-block; text-align: center; max-width: 100%;
}
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #000; }
.btn-gold { background: var(--gold); color: #1a1200; }
.btn-outline { background: transparent; color: var(--gold); border-color: var(--gold); box-shadow: 3px 3px 0 #000; }
.btn-large { padding: 13px 24px; font-size: 1.05rem; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; }

/* Cards + panels */
.tier-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.tier-card { background: var(--panel); border: 3px solid var(--line); padding: 14px; box-shadow: 4px 4px 0 #000; }
.tier-card img { width: 100%; height: auto; display: block; background: #000; border: 2px solid var(--line); }
.tier-card h3 { margin: 12px 0 4px; }
.tier-tag { color: var(--cyan); font-family: "Courier New", Courier, monospace; font-size: 0.85rem; margin: 0; }
.tier-yield { font-size: 1.5rem; font-weight: bold; color: var(--gold); margin: 6px 0; }
.tier-yield span { font-size: 0.85rem; color: var(--muted); font-weight: normal; }
.tier-meta { color: var(--muted); font-size: 0.9rem; margin: 0; }
.panel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.panel { background: var(--panel); border: 3px solid var(--line); padding: 18px; box-shadow: 4px 4px 0 #000; }
.check-list { padding-left: 20px; }
.check-list li { margin-bottom: 6px; }
.fine-print { color: var(--muted); font-size: 0.85rem; }
.coming-soon { font-family: "Courier New", Courier, monospace; color: var(--gold); font-weight: bold; }
.price-line { font-size: 1.05rem; }

/* Stepper + fields */
.stepper { display: flex; align-items: center; gap: 10px; margin: 14px 0; }
.step-btn {
  width: 42px; height: 42px; font-size: 1.4rem; font-weight: bold;
  background: var(--panel-2); color: var(--gold); border: 3px solid var(--line); cursor: pointer;
}
.step-value { font-family: "Courier New", Courier, monospace; font-size: 1.4rem; font-weight: bold; min-width: 2ch; text-align: center; }
input[type="number"] {
  background: #0b0d08; color: var(--text);
  border: 3px solid var(--line); padding: 9px 12px;
  font-family: "Courier New", Courier, monospace; font-size: 1rem; width: 140px;
}
.field-label { display: block; margin: 10px 0 6px; font-weight: bold; }
.term-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* Terminal */
.terminal { background: #0b0d08; border: 3px solid var(--line); box-shadow: 4px 4px 0 #000; }
.terminal-head { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 2px solid var(--line); }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot-red { background: var(--red); } .dot-yellow { background: var(--gold); } .dot-green { background: var(--green); }
.terminal-title { margin-left: 10px; font-size: 0.85rem; color: var(--muted); }
.terminal-body { padding: 16px; }
.term-line { font-family: "Courier New", Courier, monospace; }
.prompt { color: var(--green); font-weight: bold; }
.term-label { display: block; margin: 12px 0 6px; }
.term-output {
  background: #060703; border: 2px solid var(--line); padding: 14px;
  font-family: "Courier New", Courier, monospace; font-size: 0.95rem;
  white-space: pre-wrap; word-break: break-word; color: var(--green);
}

/* Ladder + tables */
.ladder { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 18px 0; }
.ladder-step {
  background: var(--panel); border: 3px solid var(--line); padding: 8px 14px;
  font-family: "Courier New", Courier, monospace; font-weight: bold;
}
.ladder-ceiling { border-color: var(--purple); color: var(--purple); }
.ladder-arrow { color: var(--gold); font-family: "Courier New", Courier, monospace; font-weight: bold; }
.data-table { width: 100%; border-collapse: collapse; margin: 16px 0; background: var(--panel); }
.data-table th, .data-table td { border: 2px solid var(--line); padding: 10px 12px; text-align: left; }
.data-table th { background: var(--panel-2); color: var(--gold); font-family: "Courier New", Courier, monospace; }
.gain { color: var(--green); font-weight: bold; }

/* Claim */
.claim-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.claim-row label { display: block; font-weight: bold; margin-bottom: 4px; }

/* Tokenomics */
.token-bars { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; }
.token-bar-row { display: grid; grid-template-columns: 190px 1fr 140px; gap: 12px; align-items: center; }
.token-bar { background: #0b0d08; border: 2px solid var(--line); height: 26px; }
.token-bar-fill { height: 100%; }
.fill-mining { background: var(--gold); }
.fill-curve { background: var(--cyan); }
.fill-dev { background: var(--purple); min-width: 12px; }
.token-bar-value { font-family: "Courier New", Courier, monospace; font-size: 0.9rem; }
.timeline { padding-left: 20px; }
.timeline li { margin-bottom: 8px; }

/* Progress */
.progress-wrap { margin: 16px 0; }
.progress-track { background: #0b0d08; border: 2px solid var(--line); height: 26px; }
.progress-fill { background: var(--cyan); height: 100%; }

/* Roadmap */
.roadmap-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.phase { background: var(--panel); border: 3px solid var(--line); padding: 16px; box-shadow: 4px 4px 0 #000; }
.phase-current { border-color: var(--gold); }
.phase-badge {
  display: inline-block; padding: 2px 8px; font-size: 0.75rem; font-weight: bold;
  font-family: "Courier New", Courier, monospace; background: var(--panel-2); color: var(--gold);
}

/* FAQ */
.faq-item { background: var(--panel); border: 3px solid var(--line); padding: 12px 16px; margin-bottom: 12px; }
.faq-item summary { cursor: pointer; font-weight: bold; font-family: "Courier New", Courier, monospace; }
.faq-item p { color: var(--muted); }

/* Footer + modal */
.footer { border-top: 3px solid var(--line); margin-top: 40px; padding-top: 16px; color: var(--muted); }
.modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0, 0, 0, 0.75);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal[hidden] { display: none; }
.modal-box {
  background: var(--panel); border: 3px solid var(--gold);
  box-shadow: 6px 6px 0 #000; padding: 24px; max-width: 480px; width: 100%;
}
.modal-box h3 { color: var(--gold); margin-top: 0; }

/* Mobile */
@media (max-width: 900px) {
  .hamburger { display: block; }
  .sidebar { transform: translateX(-105%); transition: transform 0.2s ease; }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; padding: 0 16px 40px; }
  .topbar { padding-left: 70px; gap: 10px; }
  .topbar .btn { padding: 8px 12px; font-size: 0.9rem; flex: none; }
  h1 { font-size: 2.2rem; }
  .token-bar-row { grid-template-columns: 1fr; }
  .token-bar-value { text-align: left; }
}

/* Wallet-connect UI (added with the wallet version; existing rules untouched) */
.wallet-status { font-size: 0.85rem; color: var(--muted); font-family: "Courier New", Courier, monospace; }
.live-line { color: var(--muted); font-family: "Courier New", Courier, monospace; font-size: 0.9rem; margin-top: 14px; }
.status-line { color: var(--muted); font-size: 0.95rem; }
.status-line:empty { display: none; }
.tx-link { color: var(--gold); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn:disabled:active { transform: none; box-shadow: 3px 3px 0 #000; }
.nft-list { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; }
.nft-row {
  display: flex; gap: 14px; align-items: center;
  background: var(--bg-2); border: 3px solid var(--line); padding: 12px;
}
.nft-row.selected { border-color: var(--gold); }
.nft-row img { width: 72px; height: 72px; flex: none; background: #000; border: 2px solid var(--line); }
.nft-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.nft-info span { color: var(--muted); font-size: 0.9rem; }
.nft-info .nft-pending { color: var(--gold); font-family: "Courier New", Courier, monospace; }
.nft-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; flex: none; }
.forge-check { font-family: "Courier New", Courier, monospace; font-size: 0.9rem; cursor: pointer; }
.forge-box { border-top: 2px solid var(--line); margin-top: 18px; padding-top: 14px; }
.warn { color: var(--gold); font-weight: bold; }
.lookup-box { border-top: 2px solid var(--line); margin-top: 18px; padding-top: 14px; }
@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; }
  .wallet-status { flex-basis: 100%; }
  .nft-row { flex-wrap: wrap; }
  .nft-actions { flex-direction: row; align-items: center; }
}

/* Agent prompt block */
.agent-prompt { white-space: pre-wrap; word-break: break-word; background: #0b0d08; border: 2px solid var(--line); padding: 14px; font-family: "Courier New", Courier, monospace; font-size: 0.9rem; color: var(--text); max-height: 480px; overflow-y: auto; margin: 0 0 12px; }

/* Typeable mint quantity */
#mint-qty { width: 84px; padding: 9px 6px; text-align: center; }
