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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
}

.card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  padding: 40px;
  width: 100%;
  max-width: 560px;
  text-align: center;
}

h1 {
  font-size: 36px;
  color: #333;
  margin-bottom: 8px;
}

.sub {
  color: #888;
  margin-bottom: 28px;
}

.info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 28px;
}

.info div {
  background: #f7f8fc;
  border-radius: 10px;
  padding: 14px;
}

.info span {
  display: block;
  color: #999;
  font-size: 13px;
  margin-bottom: 6px;
}

.info b {
  color: #4f46e5;
  font-size: 15px;
  word-break: break-all;
}

button {
  background: #4f46e5;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 14px 28px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s;
}

button:hover {
  background: #4338ca;
}

button:disabled {
  background: #a5b4fc;
  cursor: not-allowed;
}

pre {
  margin-top: 24px;
  text-align: left;
  background: #1e1e2e;
  color: #a6e3a1;
  border-radius: 10px;
  padding: 16px;
  font-size: 13px;
  line-height: 1.6;
  overflow-x: auto;
  min-height: 80px;
  white-space: pre-wrap;
  word-break: break-all;
}

/* ===== 微信支付入口 ===== */
.sep {
  border: none;
  border-top: 1px dashed #e5e7eb;
  margin: 28px 0;
}

.pay-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 16px 18px;
  text-align: left;
}

.pay-entry b {
  color: #166534;
}

.muted {
  color: #6b7280;
  font-size: 13px;
  margin-top: 4px;
}

.pay-btn {
  background: #07c160;
  white-space: nowrap;
}

.pay-btn:hover {
  background: #06ad56;
}

/* ===== 弹窗 ===== */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
  backdrop-filter: blur(2px);
}

.hidden {
  display: none !important;
}

.modal {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  animation: modal-in 0.18s ease-out;
}

@keyframes modal-in {
  from { transform: translateY(12px) scale(0.98); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid #f3f4f6;
}

.wx-logo {
  font-weight: 700;
  color: #07c160;
  font-size: 16px;
}

.wx-logo::before {
  content: "●";
  margin-right: 6px;
  font-size: 12px;
}

.modal-close {
  background: transparent;
  color: #9ca3af;
  font-size: 24px;
  line-height: 1;
  padding: 0 6px;
  border-radius: 8px;
}

.modal-close:hover {
  background: #f3f4f6;
  color: #4b5563;
}

.modal-body {
  padding: 22px 22px 26px;
  text-align: center;
}

.amount {
  font-size: 34px;
  font-weight: 700;
  color: #111827;
}

.amount span {
  font-size: 34px;
}

.modal-tip {
  color: #6b7280;
  font-size: 13px;
  margin: 6px 0 18px;
}

.qr-wrap {
  width: 240px;
  height: 240px;
  margin: 0 auto 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #fff;
}

.qr-img {
  width: 232px;
  height: 232px;
  display: block;
}

.qr-loading {
  color: #9ca3af;
  font-size: 14px;
}

.pay-status {
  font-size: 15px;
  color: #b45309;
  font-weight: 600;
  min-height: 22px;
}

.pay-status.success {
  color: #07c160;
}

.pay-status.fail {
  color: #dc2626;
}

.order-no {
  color: #9ca3af;
  font-size: 12px;
  margin-top: 6px;
  word-break: break-all;
}

.modal-actions {
  margin-top: 18px;
}

.ghost-btn {
  background: #f3f4f6;
  color: #374151;
  font-size: 14px;
  padding: 10px 20px;
}

.ghost-btn:hover {
  background: #e5e7eb;
}
