:root {
  --bg: #0f141c;
  --bg-soft: #141b26;
  --card: #1a2230;
  --line: rgba(255, 255, 255, 0.08);
  --text: #e8eef8;
  --muted: #8b97ab;
  --gold: #d4a857;
  --gold-2: #e8c27a;
  --ok: #5dca8a;
  --err: #f07178;
  --radius: 14px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  font-size: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(212, 168, 87, 0.12), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

.brand {
  text-align: center;
  margin-bottom: 28px;
}

.brand .logo {
  width: 72px;
  height: 72px;
  margin: 0 auto 12px;
  display: block;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(212, 168, 87, 0.22);
  object-fit: cover;
}

.brand h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--gold);
}

.brand p {
  margin: 8px 0 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 18px 20px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}

.card-title {
  margin: 0 0 18px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 8px;
  letter-spacing: 0.04em;
}

.input {
  width: 100%;
  height: 46px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text);
  padding: 0 14px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input:focus {
  border-color: rgba(212, 168, 87, 0.65);
  box-shadow: 0 0 0 3px rgba(212, 168, 87, 0.15);
}

.input.mono {
  font-family: ui-monospace, Consolas, "Courier New", monospace;
  letter-spacing: 0.08em;
  text-align: center;
}

.hint {
  margin: 8px 0 16px;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.5;
}

.plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.plan {
  border: 1px solid var(--line);
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 14px 10px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}

.plan:hover { border-color: rgba(212, 168, 87, 0.35); }
.plan:active { transform: scale(0.98); }

.plan.is-active {
  border-color: var(--gold);
  background: rgba(212, 168, 87, 0.08);
  box-shadow: inset 0 0 0 1px rgba(212, 168, 87, 0.35);
}

.plan-name { font-size: 0.875rem; font-weight: 600; }
.plan-price { font-size: 1.35rem; font-weight: 700; color: var(--gold); }
.plan-meta { font-size: 0.75rem; color: var(--muted); }

.btn {
  width: 100%;
  height: 46px;
  border: none;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn.primary {
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: #141820;
}

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

.btn.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  margin-top: 10px;
}

.btn.ghost:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.18); }

.row {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 10px;
}

.row .btn.ghost { margin-top: 0; }

.msg {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.8125rem;
  line-height: 1.45;
  word-break: break-all;
}

.msg.ok {
  background: rgba(93, 202, 138, 0.1);
  border: 1px solid rgba(93, 202, 138, 0.25);
  color: var(--ok);
}

.msg.err {
  background: rgba(240, 113, 120, 0.1);
  border: 1px solid rgba(240, 113, 120, 0.25);
  color: var(--err);
}

.pay-amount {
  text-align: center;
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.02em;
}

.pay-sub {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--muted);
  margin: 4px 0 16px;
}

.qr {
  width: 220px;
  height: 220px;
  margin: 0 auto 14px;
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr canvas, .qr img { display: block; max-width: 100%; height: auto; }

.center { text-align: center; }
.muted { color: var(--muted); font-size: 0.75rem; line-height: 1.6; }

.status {
  text-align: center;
  margin: 14px 0 8px;
  font-size: 0.8125rem;
  color: #9db7e8;
}

.ok-badge {
  width: 48px;
  height: 48px;
  margin: 4px auto 10px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--ok);
  background: rgba(93, 202, 138, 0.12);
  border: 1px solid rgba(93, 202, 138, 0.28);
}

.key {
  width: 100%;
  min-height: 96px;
  resize: none;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text);
  font-family: ui-monospace, Consolas, "Courier New", monospace;
  font-size: 0.75rem;
  line-height: 1.5;
  padding: 12px;
  word-break: break-all;
  outline: none;
}

.key:focus { border-color: rgba(212, 168, 87, 0.5); }

.foot {
  text-align: center;
  margin-top: 8px;
  font-size: 0.6875rem;
  color: #5a6578;
  line-height: 1.5;
}

/* 蜜罐字段：视觉隐藏但可被 bot 填写 */
.hp {
  position: absolute !important;
  left: -9999px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

@media (max-width: 360px) {
  .plans { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; }
}
