:root {
  --alipay: #1677ff;
  --wechat: #07c160;
  --bg: #f3f5f9;
  --card: #ffffff;
  --text: #1f2329;
  --muted: #8a9099;
  --border: #e6e8eb;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.card {
  background: var(--card);
  width: 100%;
  max-width: 420px;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  padding: 32px 28px;
  text-align: center;
}

h1 { font-size: 20px; margin-bottom: 6px; }
.subtitle { color: var(--muted); font-size: 13px; margin-bottom: 24px; }

/* 金额输入 */
.amount-field { text-align: left; margin-bottom: 22px; }
.amount-field label { font-size: 13px; color: var(--muted); display: block; margin-bottom: 8px; }
.amount-input-wrap {
  display: flex; align-items: center;
  border: 1.5px solid var(--border);
  border-radius: 12px; padding: 0 14px;
  transition: border-color .2s;
}
.amount-input-wrap:focus-within { border-color: var(--alipay); }
.amount-input-wrap .currency { font-size: 24px; color: var(--text); margin-right: 6px; }
.amount-input-wrap input {
  border: none; outline: none; flex: 1;
  font-size: 28px; padding: 14px 0; width: 100%;
  background: transparent;
}

/* 渠道选择 */
.channels { display: flex; gap: 12px; margin-bottom: 24px; }
.channel {
  flex: 1; border: 1.5px solid var(--border); border-radius: 12px;
  padding: 16px 10px; cursor: pointer; transition: all .2s;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500; background: #fff;
}
.channel .icon { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; color: #fff; font-size: 18px; }
.channel.alipay .icon { background: var(--alipay); }
.channel.wechat .icon { background: var(--wechat); }
.channel.selected.alipay { border-color: var(--alipay); background: #f0f6ff; }
.channel.selected.wechat { border-color: var(--wechat); background: #effaf3; }

/* 按钮 */
.btn {
  width: 100%; border: none; border-radius: 12px; cursor: pointer;
  font-size: 16px; font-weight: 600; padding: 15px; color: #fff;
  background: var(--alipay); transition: opacity .2s;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.secondary { background: #fff; color: var(--text); border: 1.5px solid var(--border); }
.btn + .btn { margin-top: 12px; }
.btn-wechat { background: var(--wechat); }

.error { color: #e64340; font-size: 13px; margin-top: -10px; margin-bottom: 14px; min-height: 18px; text-align: left; }

/* 二维码页 */
.qr-header { padding: 14px; border-radius: 12px; color: #fff; margin-bottom: 20px; font-weight: 600; }
.qr-amount { font-size: 32px; font-weight: 700; margin: 8px 0 20px; }
.qr-box {
  display: inline-block; padding: 16px; border-radius: 16px;
  border: 3px solid var(--border); margin-bottom: 16px;
}
.qr-box img { display: block; width: 240px; height: 240px; }
.qr-tip { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.qr-order { color: var(--muted); font-size: 12px; margin-bottom: 12px; word-break: break-all; }
.qr-order span { color: var(--text); font-family: ui-monospace, Menlo, Consolas, monospace; }
.countdown { font-size: 14px; color: var(--text); margin-bottom: 18px; }
.countdown b { color: #e64340; }

.status-line { font-size: 14px; color: var(--muted); margin-bottom: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
@keyframes blink { 0%,100%{opacity:.3} 50%{opacity:1} }

/* 结果页 */
.result-icon { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; margin: 8px auto 20px; font-size: 40px; color: #fff; }
.result-icon.ok { background: var(--wechat); }
.result-icon.err { background: #e64340; }
.result-title { font-size: 22px; margin-bottom: 8px; }
.result-meta { color: var(--muted); font-size: 14px; margin-bottom: 24px; line-height: 1.7; }
.result-meta .mono, .mono { font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--text); word-break: break-all; }

.mock-bar { margin-top: 20px; padding-top: 18px; border-top: 1px dashed var(--border); }
.mock-bar .label { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.mock-bar .row { display: flex; gap: 10px; }
.mock-bar .btn { font-size: 13px; padding: 10px; }
.hidden { display: none !important; }
