:root {
  --bg: #050f11;
  --surface: #0a1a1d;
  --raised: #102428;
  --line: rgba(190, 240, 228, .11);
  --line-strong: rgba(190, 240, 228, .24);
  --ink: #eff7f4;
  --muted: #92a9a7;
  --faint: #5f7a79;
  --accent: #97fce4;
  --moon: #f4ecd9;
  --bad: #ff9c8a;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Geist", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--sans); overflow-x: hidden; -webkit-font-smoothing: antialiased; display: flex; flex-direction: column; min-height: 100dvh; }
main { flex: 1; display: flex; min-width: 0; min-height: 0; }
h1, h2, h3, p { margin: 0; font-weight: 400; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent); color: var(--bg); }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 16px;
  padding: 14px 40px; background: rgba(5, 15, 17, .72); backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; justify-self: start; color: inherit; font: 400 27px/1 var(--serif); letter-spacing: -.005em; text-decoration: none; }
.mark { flex: none; color: var(--accent); }
.nav-right { position: relative; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.hype { display: inline-block; width: 18px; height: 18px; border-radius: 50%; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 16px;
  background: var(--ink); border: 1px solid var(--ink); border-radius: 999px; color: var(--bg);
  font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: background .2s, border-color .2s, transform .2s var(--ease);
}
.btn:hover { background: var(--accent); border-color: var(--accent); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .7; }
.btn.connected { background: var(--raised); border-color: var(--line-strong); color: var(--ink); font: 400 13px var(--mono); }
.btn.connected:hover { border-color: var(--accent); background: var(--raised); }
.btn.connected::before { content: ""; width: 7px; height: 7px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 8px var(--accent); }
.btn.connected::after { content: ""; width: 6px; height: 6px; margin: -3px 1px 0 2px; border: solid var(--muted); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }

.wallet-menu {
  position: absolute; top: calc(100% + 10px); right: 0; width: 260px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55); animation: rise .18s var(--ease);
}
.menu-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu-head small { display: block; color: var(--muted); font-size: 12px; }
.menu-head b { display: block; font: 400 15px var(--mono); }
.menu-head b + small { margin-top: 10px; }
.menu-head .on { color: var(--accent); }
.wallet-menu button { display: block; width: 100%; padding: 9px 12px; background: none; border: 0; border-radius: 8px; font-size: 14px; text-align: left; }
.wallet-menu button:hover { background: var(--raised); }
@keyframes rise { from { opacity: 0; transform: translateY(-4px); } }

/* Hero */
.hero { position: relative; z-index: 0; flex: 1; display: flex; min-width: 0; overflow: hidden; }
.sky {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(5px 5px at 82% 170px, #fff, transparent),
    radial-gradient(240px 110px at 82% 170px, rgba(255, 244, 214, .5), transparent 70%),
    radial-gradient(130% 240px at 70% 200px, rgba(151, 252, 228, .32), transparent 72%),
    radial-gradient(90% 420px at 20% 620px, rgba(79, 179, 217, .2), transparent 75%),
    linear-gradient(#030d10, #06191c 620px);
}

.hero-grid { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px 16px; }
.tagline { font: 400 clamp(30px, 3.4vw, 44px)/1.1 var(--serif); letter-spacing: -.01em; text-align: center; text-shadow: 0 2px 24px rgba(0, 0, 0, .6); }
.tagline em { color: var(--accent); }

/* Send card */
.card {
  position: relative; width: 100%; max-width: 440px; padding: 22px;
  background: linear-gradient(rgba(16, 36, 40, .86), rgba(10, 26, 29, .92)); backdrop-filter: blur(20px);
  border: 1px solid var(--line-strong); border-radius: 22px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .07) inset, 0 40px 90px rgba(0, 0, 0, .5);
}
.send h2 { margin-bottom: 10px; font: 400 26px/1.1 var(--serif); }
.fine a { color: var(--accent); }
.coin { position: relative; display: block; flex: none; width: 22px; height: 22px; }
.coin .hype { display: block; width: 22px; height: 22px; }
.coin .chain { position: absolute; right: -4px; bottom: -3px; width: 12px; height: 12px; padding: 1px; background: #050f11; border-radius: 50%; }
.label { display: flex; justify-content: space-between; gap: 12px; margin: 14px 2px 7px; color: var(--muted); font-size: 13px; }
.label small { color: var(--faint); font-size: 12px; }
.amount-box { display: flex; align-items: center; gap: 8px; padding: 14px; background: rgba(3, 11, 13, .6); border: 1px solid var(--line); border-radius: 14px; transition: border-color .2s; }
.amount-box:focus-within, .text:focus { border-color: var(--accent); }
#amount { flex: 1; min-width: 0; padding: 0; background: none; border: 0; outline: 0; color: var(--ink); font: 400 30px/1.2 var(--mono); letter-spacing: -.03em; }
#amount::placeholder, .text::placeholder { color: var(--faint); }
.max { padding: 4px 8px; background: none; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--muted); font: 500 11px var(--mono); transition: color .2s, border-color .2s; }
.max:hover { border-color: var(--accent); color: var(--accent); }
.token { display: flex; align-items: center; gap: 7px; flex: none; padding: 5px 11px 5px 7px; background: var(--raised); border-radius: 999px; font-size: 14px; font-weight: 500; }
.private-row { display: flex; justify-content: space-between; margin: 10px 2px 0; color: var(--muted); font-size: 13px; }
.private-row b { color: var(--accent); font: 500 13px var(--mono); }
.text { width: 100%; padding: 14px; background: rgba(3, 11, 13, .6); border: 1px solid var(--line); border-radius: 14px; outline: 0; color: var(--ink); font: 400 14px var(--mono); transition: border-color .2s; }
.rows { margin: 16px 2px 0; font-size: 13px; }
.rows div { display: flex; justify-content: space-between; gap: 16px; padding: 3px 0; }
.rows dt { color: var(--muted); }
.rows dd { margin: 0; font: 400 12px var(--mono); text-align: right; }
.cta { width: 100%; margin-top: 16px; padding: 15px; border: 1px solid transparent; border-radius: 14px; font-weight: 500; transition: filter .2s, transform .2s var(--ease); }
.cta.primary { background: var(--accent); color: #04181a; }
.cta.primary:not(:disabled):hover { filter: brightness(1.08); }
.cta.primary:not(:disabled):active { transform: scale(.985); }
.cta.primary:disabled { background: var(--raised); border-color: var(--line); color: var(--muted); }
.fine { margin-top: 10px; color: var(--muted); font-size: 12px; text-align: center; overflow-wrap: anywhere; }
.fine:empty { display: none; }
.fine.bad { color: var(--bad); }
.notice { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; text-align: center; }
.notice strong { color: var(--moon); font-weight: 500; }
.notice span { display: block; color: var(--faint); font: 400 12px var(--mono); }

.foot { flex: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 22px; padding: 14px 24px; border-top: 1px solid var(--line); color: var(--faint); font-size: 13px; }
.foot a { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); text-decoration: none; transition: color .2s; }
.foot a:hover { color: var(--accent); }
.foot img { display: block; }
.foot { position: relative; }
.volume { position: absolute; top: 50%; right: 24px; transform: translateY(-50%); color: var(--muted); }
.volume b { margin-left: 6px; color: var(--accent); font: 400 13px var(--mono); }

/* Wallet picker */
dialog { width: min(380px, calc(100% - 32px)); padding: 24px; background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 22px; box-shadow: 0 40px 90px rgba(0, 0, 0, .6); }
dialog::backdrop { background: rgba(2, 8, 9, .72); backdrop-filter: blur(6px); }
dialog h2 { margin-bottom: 6px; font: 400 30px/1.1 var(--serif); }
dialog p { color: var(--muted); font-size: 14px; }
#wallet-list { display: grid; gap: 6px; margin: 16px 0 0; padding: 0; list-style: none; }
#wallet-list button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; background: var(--raised); border: 1px solid transparent; border-radius: 12px; text-align: left; transition: border-color .2s; }
#wallet-list button:hover { border-color: var(--accent); }
#wallet-list img { width: 28px; height: 28px; border-radius: 7px; }
.close { width: 100%; margin-top: 12px; padding: 10px; background: none; border: 0; color: var(--muted); font-size: 14px; }
.close:hover { color: var(--ink); }

@media (max-width: 760px) {
  .sky { background: radial-gradient(130% 200px at 70% 40px, rgba(151, 252, 228, .28), transparent 72%), linear-gradient(#030d10, #06191c 620px); }
  .token { font-size: 13px; }
  .nav { padding: 12px 16px; }
  .card { padding: 18px; }
  .foot { padding: 12px 16px; font-size: 12px; }
  .volume { position: static; flex-basis: 100%; transform: none; text-align: center; }
}
@media (max-height: 780px) {
  .tagline { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .wallet-menu { animation: none; }
}
