/* MuchuCraft launcher — matches muchu.app: near-black editorial,
   one amethyst accent, solid surfaces, no gradients anywhere. */

@font-face {
  font-family: 'Space Grotesk';
  src: url('fonts/space-grotesk-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('fonts/space-grotesk-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --bg: #0b0b0d;
  --card: #111114;
  --well: #17171b;
  --ink: #efece6;
  --ink-dim: #a7a39b;
  --accent: #b7a4ea;
  --accent-ink: #17121f;
  --rule: #232329;
  --good: #9fd8a4;
  --bad: #e08e8e;
  --warn: #e5c98f;
  --radius: 8px;
  --mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --display: 'Space Grotesk', system-ui, sans-serif;
  font-size: 16px;
}

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

html, body { padding: 0; min-height: 100%; }

body {
  min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.5;
  padding: 2rem 1rem;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* the old decorative glow blobs — gone entirely */
.bg-glow { display: none; }

.hidden { display: none !important; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px;
}

/* ---------- card ---------- */
.card {
  width: 100%; max-width: 26rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 2.2rem 1.8rem;
  position: relative;
}

.logo {
  width: 64px; height: 64px; margin: 0 auto 0.9rem;
  display: block; border-radius: 12px;
  image-rendering: pixelated;
}

.title {
  text-align: center; font-size: 1.7rem; font-weight: 700;
  letter-spacing: -0.02em; color: var(--ink);
}
.title-accent { color: var(--accent); }

.tagline {
  text-align: center; color: var(--ink-dim);
  font-size: 0.9rem; margin: 0.3rem 0 1.6rem;
}

.section-title {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-dim); margin-bottom: 0.6rem;
}

.field-label { font-weight: 700; font-size: 0.92rem; margin: 1.1rem 0 0.45rem; display: block; }

input[type='text'], input[type='url'], input:not([type]) {
  width: 100%;
  background: var(--well);
  border: 1px solid var(--rule);
  border-radius: 5px;
  color: var(--ink);
  font: inherit;
  padding: 0.7rem 0.85rem;
}
input:focus { border-color: var(--accent); outline: none; }
input::placeholder { color: var(--ink-dim); opacity: 0.7; }

/* ---------- buttons: solid, calm, zero gradients ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  width: 100%;
  border: 0; border-radius: 5px; cursor: pointer;
  font: inherit; font-weight: 700; font-size: 1rem;
  padding: 0.8rem 1.2rem; margin-top: 0.9rem;
  transition: filter 150ms ease, transform 150ms ease;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn:disabled { opacity: 0.55; cursor: default; transform: none; filter: none; }

.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-secondary {
  background: transparent; color: var(--ink);
  border: 1px solid var(--rule);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); filter: none; }
.btn-ghost { background: transparent; color: var(--ink-dim); font-weight: 500; }
.btn-ghost:hover { color: var(--accent); filter: none; }

/* ---------- status & messaging ---------- */
.status { font-family: var(--mono); font-size: 0.82rem; margin-top: 0.45rem; min-height: 1.2em; }
.status.ok, .status-ok, .status.available { color: var(--good); }
.status.bad, .status-bad, .status.taken { color: var(--bad); }

.banner {
  background: var(--well); border: 1px solid var(--rule); border-left: 3px solid var(--accent);
  border-radius: 5px; padding: 0.7rem 0.9rem; font-size: 0.88rem; margin-bottom: 1rem;
}
.error {
  background: var(--well); border: 1px solid var(--rule); border-left: 3px solid var(--bad);
  border-radius: 5px; padding: 0.7rem 0.9rem; font-size: 0.88rem;
  color: var(--bad); margin-top: 0.9rem;
}

.muted { color: var(--ink-dim); }
.small { font-size: 0.82rem; }

.spinner {
  width: 1em; height: 1em; border-radius: 50%;
  border: 2px solid var(--rule); border-top-color: var(--accent);
  animation: spin 0.8s linear infinite; display: inline-block;
}
.spinner-inline { vertical-align: -0.15em; margin-right: 0.4rem; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2s; } }

/* ---------- wallet chip ---------- */
.connected-chip {
  display: flex; align-items: center; gap: 0.6rem;
  background: var(--well); border: 1px solid var(--rule); border-radius: 999px;
  padding: 0.45rem 0.9rem; margin-bottom: 0.4rem; font-size: 0.88rem;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); flex: none; }
.chip-wallet { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip-address { font-family: var(--mono); color: var(--ink-dim); font-size: 0.78rem; }
.chip-change { margin-left: auto; font-size: 0.82rem; background: none; border: 0; color: var(--accent); cursor: pointer; font-family: inherit; }

/* ---------- continue-as ---------- */
.continue-label { text-align: center; color: var(--ink-dim); font-size: 0.9rem; }
.continue-name {
  text-align: center; font-size: 1.45rem; font-weight: 700;
  color: var(--accent); margin: 0.15rem 0 0.4rem;
}

/* ---------- message details ---------- */
.message-details { margin-top: 0.9rem; }
.message-details summary {
  cursor: pointer; font-family: var(--mono); font-size: 0.78rem; color: var(--ink-dim);
}
.message-details pre {
  background: var(--well); border: 1px solid var(--rule); border-radius: 5px;
  padding: 0.7rem; font-size: 0.72rem; white-space: pre-wrap; word-break: break-word;
  margin-top: 0.5rem; color: var(--ink-dim); font-family: var(--mono);
}

.no-wallet { text-align: center; color: var(--ink-dim); font-size: 0.9rem; padding: 0.6rem 0; }

/* ---------- views ---------- */
.view { margin-top: 0.4rem; }

/* ---------- skin box ---------- */
.skin-box {
  background: var(--well); border: 1px solid var(--rule); border-radius: 6px;
  padding: 1rem; margin-top: 1.2rem;
}
.skin-presets { display: flex; gap: 0.5rem; margin-top: 0.7rem; flex-wrap: wrap; }
.skin-preset {
  background: var(--card); border: 1px solid var(--rule); border-radius: 999px;
  color: var(--ink); font: inherit; font-size: 0.82rem; font-weight: 700;
  padding: 0.35rem 0.9rem; cursor: pointer;
}
.skin-preset:hover, .skin-preset.selected { border-color: var(--accent); color: var(--accent); }
.skin-preset-purple { border-color: var(--accent); color: var(--accent); }
.skin-note { margin-top: 0.6rem; }
.btn-skin-save { width: auto; padding: 0.55rem 1.3rem; font-size: 0.9rem; margin-top: 0.7rem; }

/* ---------- wallet card (balance / withdraw / deposit) ---------- */
#wallet-card, .wallet-card {
  background: var(--well); border: 1px solid var(--rule); border-radius: 6px;
  padding: 1.1rem; margin-top: 1.2rem;
}
#wallet-card h3, .wallet-card h3, .wallet-title { font-size: 1rem; font-weight: 700; }
.badge, .cluster-badge {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent);
  border: 1px solid var(--accent); border-radius: 3px; padding: 0.12rem 0.45rem;
}
.balance, .wallet-balance { font-size: 1.5rem; font-weight: 700; color: var(--ink); }
.mono, .address { font-family: var(--mono); }
.btn-withdraw { margin-top: 0.7rem; }
.withdrawal-list { font-family: var(--mono); font-size: 0.78rem; color: var(--ink-dim); }

/* ---------- footer ---------- */
.footer {
  margin-top: 1.6rem; padding-top: 1rem; border-top: 1px solid var(--rule);
  text-align: center; font-family: var(--mono); font-size: 0.75rem; color: var(--ink-dim);
}
.footer-dot { display: none; } /* old decorative dots — gone */
