:root {
  --brand: #1677ff;
  --brand-2: #0a5fd6;
  --brand-soft: rgba(22, 119, 255, 0.08);
  --bg: #f4f6fa;
  --card: #ffffff;
  --text: #16233a;
  --text-2: #5b6b85;
  --text-3: #94a2b8;
  --line: #e8edf5;
  --ok: #00b578;
  --ok-soft: rgba(0, 181, 120, 0.1);
  --warn: #ff9f0a;
  --warn-soft: rgba(255, 159, 10, 0.12);
  --radius: 20px;
  --shadow: 0 2px 8px rgba(22, 35, 58, 0.04), 0 12px 32px rgba(22, 35, 58, 0.06);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* hidden 必须能压过 .kv 等 display:flex 规则 */
[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 280px;
  background: linear-gradient(160deg, #1677ff 0%, #3f8cff 45%, #7fb4ff 100%);
  z-index: -1;
}

.wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 32px 18px 48px;
}

.wrap.wide {
  max-width: 560px;
}

/* ---------- 品牌头 ---------- */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  margin-bottom: 22px;
  padding: 0 4px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.5px;
  backdrop-filter: blur(6px);
}

.brand-text strong {
  display: block;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.brand-text span {
  font-size: 12.5px;
  opacity: 0.82;
}

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 22px;
  margin-bottom: 14px;
}

.card.tight {
  padding: 18px 20px;
}

.card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: 0.6px;
  margin: 0 0 14px;
  text-transform: uppercase;
}

/* ---------- 金额输入 ---------- */
.amount-label {
  font-size: 13.5px;
  color: var(--text-2);
  margin-bottom: 6px;
}

.amount-field {
  display: flex;
  align-items: baseline;
  gap: 8px;
  border-bottom: 2px solid var(--line);
  padding-bottom: 10px;
  transition: border-color 0.2s;
}

.amount-field:focus-within {
  border-bottom-color: var(--brand);
}

.amount-field .cny {
  font-size: 26px;
  font-weight: 500;
  color: var(--text);
}

.amount-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -1px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-family: inherit;
}

.amount-field input::placeholder {
  color: #c9d3e2;
  font-weight: 500;
}

.amount-hint {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--text-3);
  margin-top: 8px;
  min-height: 18px;
}

.amount-hint .err {
  color: #e5484d;
}

/* ---------- 快捷金额 ---------- */
.quick {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  margin-top: 18px;
}

.quick button {
  border: 1px solid var(--line);
  background: #fbfcfe;
  color: var(--text);
  border-radius: 12px;
  padding: 11px 0;
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.quick button:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-soft);
}

.quick button:active {
  transform: scale(0.97);
}

/* ---------- 支付方式 ---------- */
.pay-method {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcfe;
}

.pay-method.active {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.pay-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #1677ff;
  display: grid;
  place-items: center;
  flex: none;
}

.pay-icon svg {
  width: 22px;
  height: 22px;
  fill: #fff;
}

.pay-method-info strong {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
}

.pay-method-info span {
  font-size: 12.5px;
  color: var(--text-3);
}

.radio {
  margin-left: auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid #cfd8e6;
  display: grid;
  place-items: center;
  flex: none;
}

.radio.on {
  border-color: var(--brand);
  background: var(--brand);
}

.radio.on::after {
  content: "";
  width: 6px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}

/* ---------- 按钮 ---------- */
.btn {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 16px;
  font-size: 17px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.18s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, #1677ff, #0a5fd6);
  color: #fff;
  box-shadow: 0 8px 20px rgba(22, 119, 255, 0.28);
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.btn-primary:active {
  transform: translateY(1px);
  box-shadow: 0 4px 12px rgba(22, 119, 255, 0.24);
}

.btn-primary:disabled {
  background: #c8d5e8;
  box-shadow: none;
  cursor: not-allowed;
  color: #fff;
}

.btn-ghost {
  background: #fff;
  color: var(--brand);
  border: 1px solid #d6e4ff;
}

.btn-ghost:hover {
  background: var(--brand-soft);
}

.btn-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

/* ---------- 条款 ---------- */
.legal {
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
  margin-top: 16px;
  line-height: 1.7;
}

.legal a {
  color: var(--text-2);
  text-decoration: none;
}

/* ---------- 详情列表 ---------- */
.kv {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.kv:last-child {
  border-bottom: 0;
  padding-bottom: 2px;
}

.kv .k {
  color: var(--text-2);
  flex: none;
}

.kv .v {
  text-align: right;
  font-variant-numeric: tabular-nums;
  word-break: break-all;
  font-weight: 500;
}

.kv .v.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  letter-spacing: -0.2px;
}

/* ---------- 结果页 ---------- */
.result-hero {
  text-align: center;
  padding: 12px 0 4px;
}

.result-icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  background: var(--ok-soft);
}

.result-icon svg {
  width: 34px;
  height: 34px;
}

.result-icon.ok svg {
  stroke: var(--ok);
}

.result-icon.wait {
  background: var(--warn-soft);
}

.result-icon.wait svg {
  stroke: var(--warn);
}

.result-icon.fail {
  background: rgba(229, 72, 77, 0.1);
}

.result-icon.fail svg {
  stroke: #e5484d;
}

.result-title {
  font-size: 21px;
  font-weight: 650;
  margin: 0 0 6px;
  letter-spacing: -0.3px;
}

.result-sub {
  font-size: 13.5px;
  color: var(--text-3);
  margin: 0;
}

.result-amount {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -1.5px;
  margin: 18px 0 4px;
  font-variant-numeric: tabular-nums;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}

.badge.ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.badge.wait {
  background: var(--warn-soft);
  color: #b26b00;
}

.badge.fail {
  background: rgba(229, 72, 77, 0.1);
  color: #c8393d;
}

/* ---------- 时间线 ---------- */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 6px;
}

.timeline li {
  position: relative;
  padding: 0 0 16px 20px;
  font-size: 13.5px;
  color: var(--text-2);
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #cfd8e6;
}

.timeline li::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 16px;
  bottom: 0;
  width: 1px;
  background: var(--line);
}

.timeline li:last-child {
  padding-bottom: 0;
}

.timeline li:last-child::after {
  display: none;
}

.timeline li.done::before {
  background: var(--ok);
}

.timeline li:last-child::before {
  background: var(--brand);
}

.timeline .t {
  color: var(--text-3);
  font-size: 12px;
  margin-left: 6px;
  font-variant-numeric: tabular-nums;
}

/* ---------- 提示条 ---------- */
.tip {
  display: flex;
  gap: 10px;
  padding: 13px 15px;
  border-radius: 14px;
  background: #fffaf0;
  border: 1px solid #ffe8bf;
  font-size: 12.8px;
  color: #8a5a00;
  line-height: 1.65;
  margin-bottom: 14px;
}

.tip.blue {
  background: #f2f7ff;
  border-color: #dbe8ff;
  color: #28527a;
}

/* ---------- 加载态 ---------- */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.pulse {
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

/* ---------- 落地页 ---------- */
.landing-hero {
  text-align: center;
  color: #fff;
  padding: 6px 0 24px;
}

.landing-hero h1 {
  font-size: 25px;
  font-weight: 650;
  letter-spacing: -0.5px;
  margin: 0 0 8px;
}

.landing-hero p {
  margin: 0;
  font-size: 14px;
  opacity: 0.86;
}

.feature {
  display: flex;
  gap: 12px;
  padding: 12px 0;
}

.feature-ico {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
  flex: none;
  font-size: 15px;
}

.feature div strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.feature div span {
  font-size: 12.5px;
  color: var(--text-3);
}

.footer-note {
  text-align: center;
  font-size: 11.5px;
  color: #8d99ab;
  padding: 10px 20px 0;
  line-height: 1.7;
}

/* ---------- 移动端 ---------- */
@media (max-width: 420px) {
  .wrap {
    padding: 22px 14px 40px;
  }
  .card {
    padding: 22px 18px;
    border-radius: 18px;
  }
  .amount-field input {
    font-size: 34px;
  }
  .result-amount {
    font-size: 32px;
  }
}
