:root {
  --bg: #030307;
  --bg2: #070812;
  --panel: rgba(12, 13, 21, .88);
  --panel2: rgba(18, 19, 30, .92);
  --line: rgba(176, 186, 215, .13);
  --line2: rgba(111, 143, 255, .36);
  --txt: #f1f3f8;
  --muted: #787f91;
  --white: #ffffff;
  --blue: #7da2ff;
  --violet: #a783ff;
  --steel: #b9c1d4;
  --red: #ff647f;
  --amber: #ffcc66;
  --shadow: rgba(0, 0, 0, .58);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  color: var(--txt);
  background: var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(760px circle at var(--mx, 50%) var(--my, 25%), rgba(125,162,255,.065), rgba(167,131,255,.028) 42%, transparent 74%);
  mix-blend-mode: screen;
  opacity: .72;
}
.bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(900px 520px at 8% -12%, rgba(125,162,255,.13), transparent 60%),
    radial-gradient(820px 540px at 105% 6%, rgba(167,131,255,.13), transparent 58%),
    linear-gradient(180deg, #030307, #060712 45%, #04040a);
}
.bg::before {
  content: ""; position: absolute; inset: -22%;
  background:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px),
    radial-gradient(circle at var(--mx, 50%) var(--my, 25%), rgba(125,162,255,.038), transparent 24%);
  background-size: 42px 42px, 42px 42px, auto;
  transform: perspective(760px) rotateX(58deg) translateY(-18%) translateX(calc((var(--mx, 50%) - 50%) * .005));
  transform-origin: center top;
  opacity: .62;
}
.bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, transparent, rgba(255,255,255,.05), transparent),
    repeating-linear-gradient(180deg, rgba(255,255,255,.035) 0 1px, transparent 1px 7px);
  opacity: .20;
}
.topbar, .container, .foot { position: relative; z-index: 1; }

.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 14px 20px;
  background: rgba(3, 3, 7, .72);
  border-bottom: 1px solid rgba(255,255,255,.09);
  backdrop-filter: blur(20px) saturate(130%);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.logo {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 25%, #fff, #bfc9ff 22%, #20243a 56%, #070812 100%);
  color: #070812; font-weight: 950; font-size: 18px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.16), 0 0 34px rgba(125,162,255,.28);
}
.brand-name { font-weight: 820; letter-spacing: -.025em; }
.brand-sub { font-size: 11px; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; }
.net { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 14px var(--blue); }
.dot.off { background: var(--red); box-shadow: 0 0 14px var(--red); }

.container { width: 100%; max-width: 800px; margin: 0 auto; padding: 24px 14px 58px; flex: 1 0 auto; }
.explorer-container { max-width: 1060px; }
.card, .wallet-head {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 24px 70px var(--shadow), inset 0 1px 0 rgba(255,255,255,.07);
}
.card::before, .wallet-head::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(760px circle at 18% 0%, rgba(125,162,255,.09), transparent 42%),
    linear-gradient(135deg, rgba(255,255,255,.052), transparent 30%, transparent 72%, rgba(167,131,255,.045));
}
.card > *, .wallet-head > * { position: relative; z-index: 1; }
.card { padding: 18px; }
.card + .card, #results .card + .card { margin-top: 14px; }

h2 { margin: 0 0 7px; font-size: clamp(24px, 4vw, 38px); line-height: 1; letter-spacing: -.06em; }
h1 { margin: 0; font-size: clamp(42px, 8vw, 82px); line-height: .88; letter-spacing: -.075em; max-width: 820px; }
h3 { margin: 0 0 12px; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: #dce4ff; }
p { line-height: 1.48; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.err { color: var(--red); font-size: 13px; margin-top: 8px; }
.ok { color: var(--blue); font-size: 13px; margin-top: 8px; }

.auth-card { max-width: 480px; margin: 42px auto 0; text-align: center; }
.auth-card .row { justify-content: center; flex-wrap: wrap; }
.row { display: flex; align-items: center; gap: 9px; }
.row.gap { gap: 10px; }
.row.center { justify-content: center; margin-top: 13px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.search-row { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 9px; align-items: start; margin-top: 13px; }
.search-input { margin: 0; }
.kv { margin: 10px 0; }
.hash { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; color: #e4e9f8; }

.landing-clean { max-width: 1100px; padding-top: 34px; }
.landing-hero-card {
  display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: stretch;
  min-height: 430px; padding: clamp(24px, 5vw, 54px);
  border: 1px solid var(--line); border-radius: 34px; overflow: hidden;
  background:
    radial-gradient(760px 420px at 8% 0%, rgba(125,162,255,.18), transparent 62%),
    radial-gradient(520px 360px at 100% 20%, rgba(167,131,255,.13), transparent 62%),
    linear-gradient(180deg, rgba(18,19,30,.94), rgba(9,10,18,.91));
  box-shadow: 0 26px 80px var(--shadow), inset 0 1px 0 rgba(255,255,255,.07);
}
.hero-copy { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.landing-kicker { color: var(--blue); font-size: 12px; font-weight: 850; letter-spacing: .20em; text-transform: uppercase; margin-bottom: 16px; }
.landing-lead { max-width: 660px; margin: 19px 0 0; color: #b9c1d4; font-size: clamp(17px, 2.1vw, 21px); line-height: 1.43; }
.hero-cta { width: fit-content; margin-top: 28px; }
.hero-safe-box {
  align-self: center; min-height: 220px; padding: 22px;
  display: flex; flex-direction: column; justify-content: flex-start;
  border: 1px solid rgba(255,255,255,.12); border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,.075), rgba(0,0,0,.20));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.hero-safe-box span, .feature-card span { color: var(--blue); font-size: 11px; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; }
.hero-safe-box strong { display: block; margin-top: 12px; color: #f2f5ff; font-size: 24px; line-height: 1.02; letter-spacing: -.05em; }
.hero-safe-box p { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.38; }
.feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.feature-card {
  height: 166px; padding: 18px; overflow: hidden;
  border: 1px solid var(--line); border-radius: 26px;
  background: linear-gradient(180deg, rgba(18,19,30,.90), rgba(12,13,21,.84));
  box-shadow: 0 18px 54px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.06);
}
.feature-card strong { display: block; min-height: 40px; margin-top: 10px; color: #eef2ff; font-size: 16px; line-height: 1.08; letter-spacing: -.035em; }
.feature-card p { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.35; }
.usage-strip {
  margin-top: 14px; padding: 17px 18px;
  border: 1px solid var(--line); border-radius: 26px;
  background: rgba(12,13,21,.82);
  box-shadow: 0 18px 54px rgba(0,0,0,.30), inset 0 1px 0 rgba(255,255,255,.06);
}
.usage-steps { display: flex; gap: 8px; flex-wrap: wrap; }
.usage-steps span { padding: 8px 11px; border: 1px solid rgba(255,255,255,.10); border-radius: 999px; background: rgba(255,255,255,.035); color: #b9c1d4; font-size: 12px; }

.btn {
  appearance: none; cursor: pointer;
  border: 1px solid rgba(255,255,255,.12); border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,.085), rgba(255,255,255,.035));
  color: var(--txt); padding: 10px 14px; font-size: 13px; font-weight: 720;
  transition: transform .12s ease, border-color .16s, background .16s, box-shadow .16s;
}
.btn:hover { transform: translateY(-1px); border-color: rgba(125,162,255,.52); box-shadow: 0 0 0 4px rgba(125,162,255,.08), 0 12px 28px rgba(0,0,0,.22); }
.btn:active { transform: translateY(0); }
.btn.primary { border-color: rgba(255,255,255,.16); color: #fff; background: linear-gradient(135deg, #303a72, #6f8fff 48%, #a783ff); }
.btn.ghost { background: rgba(255,255,255,.02); }
.btn.link { background: none; border: 0; color: var(--blue); padding: 0 0 0 7px; font-size: 12px; }
.text-link { color: var(--blue); text-decoration: none; font-weight: 720; }
.text-link:hover { color: #dce4ff; text-decoration: underline; text-underline-offset: 3px; }
.copy-text { appearance: none; background: none; border: 0; color: inherit; cursor: pointer; padding: 0; text-align: left; font: inherit; }
.copy-text:hover { color: var(--blue); }
.danger-link { color: var(--red); }
.danger-link:hover { color: #ff9daf; }

.input {
  width: 100%; margin: 6px 0 12px; padding: 12px 14px;
  background: rgba(0,0,0,.38); border: 1px solid rgba(255,255,255,.12); border-radius: 18px;
  color: var(--txt); font-size: 13px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.input:focus { outline: 0; border-color: rgba(125,162,255,.66); box-shadow: 0 0 0 4px rgba(125,162,255,.10); }
label { display: block; }

.wallet-head { display: flex; align-items: center; justify-content: space-between; gap: 13px; padding: 15px 16px; border-radius: 28px; }
.addr-block { min-width: 0; }
.addr-block .muted.small { font-size: 14px; letter-spacing: .12em; text-transform: uppercase; }
.addr { display: block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: clamp(18px, 2.25vw, 24px); font-weight: 780; letter-spacing: -.075em; line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 6px 0 9px; color: #f2f5ff; }
.balance-card { margin-top: 14px; }
.balance-line { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin: 3px 0 12px; }
.balance { min-width: 0; font-size: clamp(30px, 6vw, 52px); font-weight: 820; letter-spacing: -.055em; line-height: .98; color: var(--white); word-break: break-word; }
.balance-symbol { flex: 0 0 auto; padding-bottom: 4px; color: var(--steel); font-size: clamp(24px, 4.8vw, 42px); font-weight: 820; letter-spacing: -.045em; line-height: .98; }
.summary { display: flex; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
.summary span { padding: 6px 9px; border: 1px solid rgba(255,255,255,.10); border-radius: 999px; background: rgba(255,255,255,.035); }
.review-box, .warn-box { margin-top: 12px; padding: 13px; border: 1px solid rgba(255,204,102,.26); border-radius: 18px; background: rgba(255,204,102,.065); }
.review-row { display: grid; grid-template-columns: 95px minmax(0, 1fr); gap: 10px; align-items: start; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.review-row:last-of-type { border-bottom: 0; }
.review-row span { color: var(--muted); font-size: 12px; }
.review-row strong { min-width: 0; color: #f2f5ff; font-size: 13px; }
.warn-text { color: #ffd98a; font-size: 12px; margin: 10px 0 12px; }
.warn-box { color: #ffd98a; font-size: 12px; line-height: 1.38; }
.inline-check { display: flex; gap: 9px; align-items: flex-start; margin: 10px 0 13px; color: #b9c1d4; font-size: 12px; line-height: 1.35; }
.inline-check input { margin-top: 2px; }

.telemetry { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; margin-top: 12px; }
.metric { min-width: 0; padding: 10px 11px; border: 1px solid rgba(255,255,255,.10); border-radius: 20px; background: rgba(0,0,0,.22); }
.metric-label { display: block; color: var(--muted); font-size: 10px; letter-spacing: .13em; text-transform: uppercase; }
.metric strong { display: block; margin-top: 4px; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.activity-chart { height: 98px; display: flex; align-items: end; gap: 5px; padding: 14px 9px 9px; border: 1px solid rgba(255,255,255,.09); border-radius: 22px; background: rgba(0,0,0,.22); }
.bar { flex: 1; min-width: 5px; height: var(--h); border-radius: 999px; background: linear-gradient(180deg, #dfe6ff, rgba(125,162,255,.28)); opacity: .82; transition: transform .12s, opacity .12s; position: relative; }
.bar.out { background: linear-gradient(180deg, var(--red), rgba(255,100,127,.24)); }
.bar.self { background: linear-gradient(180deg, var(--amber), rgba(255,204,102,.24)); }
.bar:hover { transform: scaleY(1.1); opacity: 1; }
.bar::after {
  content: attr(data-label);
  position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translateX(-50%) translateY(4px);
  padding: 6px 8px; border-radius: 999px;
  background: rgba(6,7,13,.94); border: 1px solid rgba(255,255,255,.13); color: #f3f6ff;
  box-shadow: 0 12px 30px rgba(0,0,0,.40); font-size: 11px; font-weight: 760; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .12s, transform .12s;
}
.bar:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }
.bar.in::after { color: #dfe6ff; border-color: rgba(125,162,255,.34); }
.bar.out::after { color: #ffdce3; border-color: rgba(255,100,127,.34); }
.bar.self::after { color: #fff0c8; border-color: rgba(255,204,102,.34); }

.tabs { display: flex; gap: 7px; margin: 16px 0 0; border-bottom: 1px solid var(--line); }
.tab { background: transparent; border: 0; color: var(--muted); cursor: pointer; padding: 10px 11px; font-size: 13px; font-weight: 720; border-bottom: 2px solid transparent; }
.tab:hover { color: #dce4ff; }
.tab.active { color: var(--txt); border-bottom-color: var(--blue); }
.views { margin-top: 14px; }
.view { display: none; }
.view.active { display: block; }
.view.active > .card + .card { margin-top: 14px; }

.tx-list { display: flex; flex-direction: column; gap: 9px; }
.tx { display: flex; align-items: center; gap: 11px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.09); border-radius: 20px; padding: 11px 12px; }
.tx:hover { border-color: rgba(125,162,255,.36); background: rgba(255,255,255,.055); }
.tx-arrow { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 850; }
.tx-arrow.in { background: rgba(125,162,255,.14); color: var(--blue); }
.tx-arrow.out { background: rgba(255,100,127,.13); color: var(--red); }
.tx-arrow.self { background: rgba(255,204,102,.13); color: var(--amber); }
.tx-main { flex: 1; min-width: 0; }
.tx-addr { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; color: #e4e9f8; }
.tx-links { flex-wrap: wrap; gap: 7px; margin-top: 3px; }
.tx-amt { text-align: right; min-width: 122px; }
.tx-amount { font-weight: 800; font-size: 14px; }

.toasts { position: fixed; right: 14px; bottom: 14px; z-index: 50; display: flex; flex-direction: column; gap: 9px; }
.toast { background: rgba(12,13,21,.96); border: 1px solid var(--line); color: var(--txt); padding: 11px 14px; border-radius: 18px; font-size: 13px; max-width: 330px; opacity: 0; transform: translateY(8px); transition: all .22s; box-shadow: 0 14px 38px rgba(0,0,0,.42); }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.ok { border-color: rgba(125,162,255,.50); }
.toast.err { border-color: rgba(255,100,127,.50); }
.foot { margin-top: auto; text-align: center; color: var(--muted); font-size: 12px; padding: 18px; }

@media (max-width: 640px) {
  .topbar { align-items: flex-start; padding: 12px 13px; }
  .topbar > .row { align-items: flex-end; flex-direction: column; gap: 6px; }
  .container { padding: 16px 10px 52px; }
  .card { padding: 14px; border-radius: 22px; }
  .wallet-head { align-items: flex-start; flex-direction: column; border-radius: 22px; }
  .addr { white-space: normal; word-break: break-all; overflow: visible; text-overflow: clip; font-size: 18px; }
  .search-row { grid-template-columns: 1fr; }
  .landing-hero-card { min-height: 0; grid-template-columns: 1fr; border-radius: 26px; }
  .hero-safe-box { min-height: 0; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-card { height: auto; min-height: 142px; }
  .telemetry { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .balance-line { align-items: start; }
  .balance-symbol { padding-top: 3px; padding-bottom: 0; }
  .tabs { overflow-x: auto; scrollbar-width: none; }
  .tab { white-space: nowrap; }
  .tx { align-items: flex-start; flex-wrap: wrap; }
  .tx-main { flex-basis: calc(100% - 43px); }
  .tx-amt { text-align: left; margin-left: 43px; min-width: 0; }
}
