:root {
  --bg:       #060510;
  --bg2:      #0d0b1e;
  --card:     #100e22;
  --border:   rgba(130,80,255,0.18);
  --purple:   #8250ff;
  --purple2:  #a07aff;
  --lime:     #14f195;
  --lime2:    #0ed47f;
  --blue:     #00c2ff;
  --text:     #ede8ff;
  --muted:    #6b6090;
  --danger:   #ff4d72;
  --radius:   14px;
  --rsm:      9px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Syne', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse 70% 50% at 15% 25%, rgba(130,80,255,.1) 0%, transparent 55%),
    radial-gradient(ellipse 55% 45% at 85% 75%, rgba(20,241,149,.06) 0%, transparent 55%);
}

.mono { font-family: 'Space Mono', monospace !important; }
.hidden { display: none !important; }

/* ── SCROLLBAR ─────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── HEADER ────────────────────────────────────── */
.header { position: sticky; top: 0; z-index: 100; }

.uni-stripe {
  background: linear-gradient(90deg, rgba(130,80,255,.25), rgba(20,241,149,.15));
  border-bottom: 1px solid var(--border);
  padding: 6px 24px;
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
  font-weight: 600;
  letter-spacing: .3px;
}

.header-bar {
  background: rgba(6,5,16,.88);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand-glyph {
  font-size: 26px;
  background: linear-gradient(135deg, var(--purple), var(--lime));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.brand-name { font-size: 18px; font-weight: 800; line-height: 1; }
.brand-sub  { font-size: 10px; color: var(--muted); margin-top: 2px; font-family: 'Space Mono', monospace; }

.header-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.net-pill {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 12px;
  border: 1px solid rgba(20,241,149,.25);
  border-radius: 100px;
  font-size: 11px; font-weight: 700;
  color: var(--lime);
  font-family: 'Space Mono', monospace;
}
.net-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--lime);
  animation: blink 2s infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.4} }

.wallet-chip {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  background: rgba(130,80,255,.1);
  border: 1px solid rgba(130,80,255,.3);
  border-radius: var(--rsm);
  font-size: 12px;
}
.chip-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); }
.chip-addr { font-family: 'Space Mono', monospace; color: var(--lime); }
.chip-copy, .chip-disc {
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 12px; padding: 1px 5px;
  border-radius: 4px; transition: color .15s;
}
.chip-copy:hover { color: var(--lime); }
.chip-disc:hover { color: var(--danger); }

.btn-connect {
  padding: 8px 18px;
  background: linear-gradient(135deg, var(--purple), #6020dd);
  border: none; border-radius: var(--rsm);
  color: #fff; font-size: 13px; font-weight: 700;
  cursor: pointer; font-family: 'Syne', sans-serif;
  transition: all .2s;
}
.btn-connect:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(130,80,255,.4); }

/* ── HERO ──────────────────────────────────────── */
.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 72px 28px 80px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 60px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-block;
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 11px; font-weight: 700;
  color: var(--purple2);
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-bottom: 22px;
  font-family: 'Space Mono', monospace;
}
.hero h1 {
  font-size: clamp(42px, 6vw, 76px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -1.5px;
  margin-bottom: 18px;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--purple), var(--blue), var(--lime));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p { font-size: 16px; color: var(--muted); line-height: 1.75; margin-bottom: 30px; max-width: 480px; }

.btn-hero {
  display: inline-block;
  padding: 14px 30px;
  background: linear-gradient(135deg, var(--purple), #6020dd);
  border: none; border-radius: var(--rsm);
  color: #fff; font-size: 16px; font-weight: 700;
  cursor: pointer; font-family: 'Syne', sans-serif;
  transition: all .2s; letter-spacing: .2px;
}
.btn-hero:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(130,80,255,.45); }

.no-phantom {
  margin-top: 14px; font-size: 13px; color: var(--danger);
  display: none;
}
.no-phantom a { color: var(--purple2); }

/* Architecture Diagram */
.hero-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.arch-box {
  width: 210px;
  padding: 12px 16px;
  border-radius: var(--rsm);
  font-size: 13px; font-weight: 700;
  text-align: center;
  border: 1px solid;
}
.arch-box small { display: block; font-size: 10px; font-weight: 400; margin-top: 3px; opacity: .75; font-family: 'Space Mono', monospace; }
.arch-box.view  { background: rgba(20,241,149,.08); border-color: rgba(20,241,149,.3); color: var(--lime); }
.arch-box.ctrl  { background: rgba(130,80,255,.1); border-color: rgba(130,80,255,.3); color: var(--purple2); }
.arch-box.model { background: rgba(0,194,255,.08); border-color: rgba(0,194,255,.25); color: var(--blue); }
.arch-box.chain { background: rgba(255,77,114,.07); border-color: rgba(255,77,114,.25); color: #ff8099; }
.arch-arrow { font-size: 18px; color: var(--muted); line-height: 1; }

/* ── DASHBOARD ─────────────────────────────────── */
.dashboard {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 28px 80px;
}

/* Balance card */
.bal-card {
  background: linear-gradient(135deg, #180c32 0%, #0c1c28 100%);
  border: 1px solid rgba(130,80,255,.3);
  border-radius: 20px;
  padding: 32px 36px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  overflow: hidden;
  flex-wrap: wrap;
}
.bal-card::before {
  content: '';
  position: absolute; top: -50px; right: -50px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(130,80,255,.2), transparent 70%);
  pointer-events: none;
}
.bal-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); margin-bottom: 8px; font-weight: 700; }
.bal-amount { font-family: 'Space Mono', monospace; font-size: clamp(32px, 5vw, 52px); font-weight: 700; line-height: 1; margin-bottom: 6px; }
.bal-usd   { font-size: 13px; color: var(--muted); font-family: 'Space Mono', monospace; margin-bottom: 8px; }
.bal-addr  { font-family: 'Space Mono', monospace; font-size: 11px; color: var(--purple2); }
.bal-actions { display: flex; gap: 10px; flex-wrap: wrap; position: relative; z-index: 1; }
.bal-deco { position: absolute; right: 36px; bottom: 16px; font-size: 80px; opacity: .04; pointer-events: none; color: var(--lime); }

/* Stats */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.stat-lbl  { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); font-weight: 700; margin-bottom: 6px; }
.stat-val  { font-size: 18px; font-weight: 700; }

/* Panels */
.panels { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.panel-full { grid-column: span 2; }

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.panel-head {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 20px 0;
}
.panel-head h3 { font-size: 14px; font-weight: 700; }
.panel-icon {
  width: 28px; height: 28px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.send-icon { background: rgba(130,80,255,.15); color: var(--purple2); }
.recv-icon { background: rgba(20,241,149,.12); color: var(--lime); }
.air-icon  { background: rgba(0,194,255,.12);  color: var(--blue); }
.val-icon  { background: rgba(20,241,149,.12); color: var(--lime); }
.tx-icon   { background: rgba(130,80,255,.12); color: var(--purple2); }

.api-tag {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
  margin-left: 6px;
}

.panel-body { padding: 18px 20px 20px; }
.panel-note { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 14px; }

/* Forms */
.fgroup { margin-bottom: 14px; }
.fgroup label { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); font-weight: 700; margin-bottom: 6px; }
.finput {
  width: 100%; padding: 10px 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: var(--rsm);
  color: var(--text); font-size: 13px;
  font-family: 'Syne', sans-serif;
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.finput:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(130,80,255,.12); }
.finput::placeholder { color: var(--muted); }
.finput[readonly] { cursor: default; color: var(--lime); }

.amt-wrap { position: relative; }
.amt-sym { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 14px; pointer-events: none; }
.amt-wrap .finput { padding-left: 30px; font-size: 18px; font-weight: 700; }

.addr-valid { font-size: 11px; margin-top: 4px; font-family: 'Space Mono', monospace; min-height: 16px; }

.quick-row { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.quick-lbl { font-size: 11px; color: var(--muted); }
.qbtn {
  padding: 4px 11px;
  background: rgba(255,255,255,.04); border: 1px solid var(--border);
  border-radius: 100px; color: var(--muted); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all .15s; font-family: 'Space Mono', monospace;
}
.qbtn:hover { border-color: var(--purple); color: var(--purple2); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px; border-radius: var(--rsm);
  font-size: 13px; font-weight: 700; cursor: pointer;
  font-family: 'Syne', sans-serif; border: none; transition: all .2s;
}
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-purple { background: linear-gradient(135deg, var(--purple), #6020dd); color: #fff; }
.btn-purple:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 5px 18px rgba(130,80,255,.4); }
.btn-lime   { background: linear-gradient(135deg, var(--lime), var(--lime2)); color: #050f0a; }
.btn-lime:hover:not(:disabled)   { transform: translateY(-1px); box-shadow: 0 5px 18px rgba(20,241,149,.3); }
.btn-ghost  { background: rgba(255,255,255,.05); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover:not(:disabled)  { background: rgba(255,255,255,.09); }
.full-w { width: 100%; }

/* Panel message */
.panel-msg {
  padding: 10px 13px;
  border-radius: var(--rsm);
  font-size: 12px;
  margin-bottom: 12px;
  line-height: 1.55;
  font-family: 'Space Mono', monospace;
  word-break: break-all;
}
.panel-msg.ok  { background: rgba(20,241,149,.08); border: 1px solid rgba(20,241,149,.25); color: var(--lime); }
.panel-msg.err { background: rgba(255,77,114,.08); border: 1px solid rgba(255,77,114,.25); color: var(--danger); }

/* Divider */
.divider { height: 1px; background: var(--border); margin: 14px 0; }
.ext-link { color: var(--purple2); font-size: 13px; }

/* TX List */
.tx-list { display: flex; flex-direction: column; gap: 8px; }
.tx-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: var(--rsm); transition: background .15s;
}
.tx-row:hover { background: rgba(255,255,255,.045); }
.tx-badge {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; flex-shrink: 0;
}
.tx-badge.sent     { background: rgba(255,77,114,.12); color: var(--danger); }
.tx-badge.received { background: rgba(20,241,149,.12); color: var(--lime); }
.tx-badge.airdrop  { background: rgba(130,80,255,.12); color: var(--purple2); }
.tx-badge.unknown  { background: rgba(255,255,255,.05); color: var(--muted); }

.tx-info { flex: 1; min-width: 0; }
.tx-type-lbl { font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.tx-meta     { display: flex; gap: 10px; flex-wrap: wrap; }
.tx-party    { font-size: 11px; color: var(--muted); font-family: 'Space Mono', monospace; }
.tx-sig-link { font-size: 11px; color: var(--purple2); font-family: 'Space Mono', monospace; cursor: pointer; text-decoration: underline; }
.tx-sig-link:hover { color: var(--purple); }

.tx-right { text-align: right; flex-shrink: 0; }
.tx-amt   { font-family: 'Space Mono', monospace; font-size: 13px; font-weight: 700; }
.tx-amt.sent     { color: var(--danger); }
.tx-amt.received { color: var(--lime); }
.tx-amt.airdrop  { color: var(--purple2); }
.tx-time  { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* Loading / Empty */
.empty-state { text-align: center; padding: 36px 16px; color: var(--muted); font-size: 13px; }
.es-icon { font-size: 36px; display: block; margin-bottom: 10px; opacity: .5; }
.loading-row { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 24px; color: var(--muted); font-size: 13px; }

/* MVC Note */
.arch-note {
  margin-top: 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.arch-note-title { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); font-weight: 700; margin-bottom: 14px; }
.arch-note-row { display: flex; align-items: stretch; gap: 0; }
.arch-note-item { flex: 1; padding: 0 16px; }
.arch-note-item:first-child { padding-left: 0; }
.arch-note-item:last-child  { padding-right: 0; }
.arch-note-sep  { display: flex; align-items: center; color: var(--purple2); font-size: 20px; }
.an-label { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--purple2); margin-bottom: 6px; }
.an-val   { font-size: 12px; color: var(--muted); line-height: 1.7; font-family: 'Space Mono', monospace; }
.an-val code { color: var(--lime); font-size: 11px; }

/* Spinner */
.spin {
  display: inline-block; width: 13px; height: 13px;
  border: 2px solid rgba(255,255,255,.2);
  border-top-color: #fff; border-radius: 50%;
  animation: spin .7s linear infinite; vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  padding: 12px 18px; border-radius: var(--rsm);
  font-size: 13px; font-weight: 600;
  transform: translateY(60px); opacity: 0;
  transition: all .3s cubic-bezier(.34,1.56,.64,1);
  max-width: 320px; pointer-events: none; line-height: 1.4;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.ok   { background: #081a10; border: 1px solid rgba(20,241,149,.4); color: var(--lime); }
.toast.err  { background: #1a0810; border: 1px solid rgba(255,77,114,.4); color: #ff8099; }
.toast.info { background: #0d0820; border: 1px solid rgba(130,80,255,.4); color: var(--purple2); }

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 20px 28px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  font-family: 'Space Mono', monospace;
}

/* Responsive */
@media (max-width: 900px) {
  .panels { grid-template-columns: 1fr; }
  .panel-full { grid-column: span 1; }
  .stats-row  { grid-template-columns: repeat(2, 1fr); }
  .arch-note-row { flex-direction: column; gap: 16px; }
  .arch-note-sep { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero-diagram { display: none; }
  .bal-card { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .stats-row { grid-template-columns: 1fr 1fr; }
  .header-bar { padding: 0 16px; }
  .dashboard, .hero { padding-left: 16px; padding-right: 16px; }
}
