* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg0: #070b14;
  --bg1: #0e1626;
  --card: rgba(19, 29, 48, 0.82);
  --line: rgba(148, 180, 255, 0.14);
  --tx: #e6edf7;
  --tx2: #93a5c3;
  --acc: #38bdf8;
  --acc2: #6366f1;
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
}
html, body { height: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  background: linear-gradient(160deg, var(--bg0), var(--bg1) 55%, #0b1424);
  color: var(--tx);
  min-height: 100vh;
}
.bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(600px 300px at 12% -5%, rgba(99,102,241,.20), transparent 60%),
    radial-gradient(700px 380px at 95% 8%, rgba(56,189,248,.14), transparent 60%);
}
.wrap { position: relative; z-index: 1; max-width: 620px; margin: 0 auto; padding: 28px 18px 60px; }
.top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; gap: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; }
.logo {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  font-size: 22px; font-weight: 800; color: #0b1220;
  background: linear-gradient(135deg, var(--acc), var(--acc2));
  box-shadow: 0 6px 22px rgba(56,189,248,.28);
}
h1 { font-size: 20px; letter-spacing: .3px; }
.sub { font-size: 12px; color: var(--tx2); margin-top: 2px; }
.nav a { color: var(--tx2); text-decoration: none; font-size: 13px; padding: 6px 10px; border-radius: 9px; }
.nav a:hover { color: var(--tx); background: rgba(255,255,255,.06); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  backdrop-filter: blur(10px);
  box-shadow: 0 16px 44px rgba(0,0,0,.35);
  margin-bottom: 16px;
}
.card h2 { font-size: 17px; margin-bottom: 6px; }
.desc { color: var(--tx2); font-size: 13px; line-height: 1.65; }
.flow { display: flex; gap: 6px; margin: 14px 0 4px; flex-wrap: wrap; }
.step {
  font-size: 12px; color: var(--tx2); border: 1px solid var(--line);
  padding: 5px 9px; border-radius: 999px; background: rgba(255,255,255,.03);
}
.step b { color: var(--acc); }

.presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 16px 0 10px; }
.preset {
  padding: 12px 4px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(255,255,255,.03); color: var(--tx); font-size: 15px; cursor: pointer;
  transition: .15s;
}
.preset small { display: block; color: var(--tx2); font-size: 10px; margin-top: 2px; }
.preset.sel, .preset:hover { border-color: var(--acc); background: rgba(56,189,248,.12); color: #fff; }

.customRow { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.customRow .yuan { color: var(--tx2); font-size: 14px; }
input[type="number"] {
  flex: 1; min-width: 0; padding: 11px 12px; border-radius: 12px;
  border: 1px solid var(--line); background: rgba(255,255,255,.05);
  color: var(--tx); font-size: 15px; outline: none;
}
input[type="number"]:focus { border-color: var(--acc); }
.hint { font-size: 11.5px; color: var(--tx2); margin-bottom: 14px; }

.btn {
  width: 100%; border: 0; cursor: pointer; font-size: 15px; font-weight: 600;
  color: #06121f; padding: 13px; border-radius: 13px;
  background: linear-gradient(135deg, var(--acc), var(--acc2));
  box-shadow: 0 8px 24px rgba(56,189,248,.25);
}
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--tx); box-shadow: none; }
.btn.ok { background: linear-gradient(135deg, #10b981, #34d399); color: #052e1f; }

.loading { text-align: center; color: var(--tx2); padding: 26px 0; }
.spinner {
  width: 34px; height: 34px; border-radius: 50%; margin: 0 auto 12px;
  border: 3px solid rgba(255,255,255,.12); border-top-color: var(--acc);
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.qrBox { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 8px 0 4px; }
.qrImg { width: 230px; height: 230px; border-radius: 16px; background: #fff; padding: 12px; }
.qrImg img { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.amountBig { font-size: 26px; font-weight: 800; }
.amountBig small { font-size: 14px; color: var(--tx2); font-weight: 500; margin-right: 4px; }
.pill {
  display: inline-block; font-size: 12px; padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--tx2); background: rgba(255,255,255,.04);
}
.pill.danger { color: var(--bad); border-color: rgba(248,113,113,.35); }
.pill.warn { color: var(--warn); border-color: rgba(251,191,36,.35); }
.pill.ok { color: var(--ok); border-color: rgba(52,211,153,.4); }
.center { text-align: center; }
.mt { margin-top: 14px; }
.small { font-size: 12px; color: var(--tx2); }

.mono { font-family: Consolas, Menlo, monospace; font-size: 11.5px; }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid rgba(148,180,255,.08); }
th { color: var(--tx2); font-weight: 500; }
td.mono { font-family: Consolas, monospace; font-size: 11.5px; }
.chip { font-size: 11px; padding: 3px 8px; border-radius: 999px; }
.chip.ok { background: rgba(52,211,153,.14); color: var(--ok); }
.chip.bad { background: rgba(248,113,113,.14); color: var(--bad); }
.chip.warn { background: rgba(251,191,36,.14); color: var(--warn); }
.chip.acc { background: rgba(56,189,248,.14); color: var(--acc); }
.chip.gray { background: rgba(148,163,184,.14); color: #b6c2d4; }
.statRow { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.stat {
  flex: 1; min-width: 120px; border: 1px solid var(--line); border-radius: 13px;
  padding: 12px; background: rgba(255,255,255,.03);
}
.stat .k { font-size: 11px; color: var(--tx2); }
.stat .v { font-size: 19px; font-weight: 700; margin-top: 4px; }
.foot { text-align: center; color: var(--tx2); font-size: 11.5px; line-height: 1.8; }
.okMark {
  width: 64px; height: 64px; border-radius: 50%; margin: 6px auto 14px;
  display: grid; place-items: center; font-size: 30px; color: #052e1f;
  background: linear-gradient(135deg, #10b981, #34d399);
  box-shadow: 0 10px 30px rgba(52,211,153,.3);
}
.error { color: var(--bad); font-size: 13px; margin-top: 8px; }
.hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
