/* ============================================================
 *  支付弹窗 —— 商业化设计
 *  核心：QR码居中，周边强化信任感与转化引导
 * ============================================================ */

/* ---- Overlay ---- */
.pay-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 20, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.pay-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* ---- Modal ---- */
.pay-modal {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: linear-gradient(180deg, #0d1b2e 0%, #081421 100%);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(0, 212, 255, 0.06),
    inset 0 1px 0 rgba(0, 212, 255, 0.1);
  transform: translateY(20px) scale(0.96);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 32px);
}
.pay-modal-overlay.open .pay-modal {
  transform: translateY(0) scale(1);
}

/* ---- Close ---- */
.pay-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  padding: 0;
  z-index: 10;
}
.pay-modal-close:hover {
  background: rgba(255, 80, 80, 0.15);
  border-color: rgba(255, 80, 80, 0.4);
  color: #ff6b6b;
  transform: rotate(90deg);
}
.pay-modal-close svg {
  width: 14px;
  height: 14px;
}

/* ---- Brand Bar ---- */
.pay-modal-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.pay-modal-brand-logo {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, #00d4ff, #00ffb3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #0b1a2e;
  flex-shrink: 0;
}
.pay-modal-brand-name {
  font-size: 14px;
  font-weight: 600;
  color: #e2e8f0;
  letter-spacing: 0.5px;
}
.pay-modal-brand-badge {
  font-size: 10px;
  font-weight: 600;
  color: #00ffb3;
  background: rgba(0, 255, 179, 0.1);
  border: 1px solid rgba(0, 255, 179, 0.2);
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 4px;
}

/* ---- Product Info ---- */
.pay-modal-product {
  text-align: center;
  padding: 10px 20px 6px;
}
.pay-modal-product-name {
  font-size: 14px;
  font-weight: 500;
  color: #cbd5e1;
  line-height: 1.4;
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pay-modal-amount {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
}
.pay-modal-amount-label {
  font-size: 12px;
  color: #64748b;
  margin-right: 6px;
}
.pay-modal-amount-symbol {
  font-size: 18px;
  font-weight: 700;
  color: #00ffb3;
}
.pay-modal-amount-num {
  font-size: 30px;
  font-weight: 800;
  color: #00ffb3;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.pay-modal-amount-suffix {
  font-size: 13px;
  color: #00ffb3;
  margin-left: 1px;
  font-weight: 600;
}

/* ---- QR Section ---- */
.pay-modal-qr-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 20px 10px;
}
.pay-modal-qr-frame {
  position: relative;
  width: 170px;
  height: 170px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 8px 28px rgba(0, 212, 255, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}
.pay-modal-qr-frame::before,
.pay-modal-qr-frame::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid #00d4ff;
}
.pay-modal-qr-frame::before {
  top: -2px;
  left: -2px;
  border-right: none;
  border-bottom: none;
  border-top-left-radius: 14px;
}
.pay-modal-qr-frame::after {
  bottom: -2px;
  right: -2px;
  border-left: none;
  border-top: none;
  border-bottom-right-radius: 14px;
}
.pay-modal-qr {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}
.pay-modal-qr-scan-hint {
  margin-top: 8px;
  font-size: 11px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 5px;
}
.pay-modal-qr-scan-hint svg {
  width: 13px;
  height: 13px;
  color: #00d4ff;
}

/* ---- Steps ---- */
.pay-modal-steps {
  display: flex;
  gap: 0;
  padding: 0 20px 10px;
}
.pay-modal-step {
  flex: 1;
  text-align: center;
  position: relative;
}
.pay-modal-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 12px;
  right: -50%;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(0, 212, 255, 0.3), rgba(0, 212, 255, 0.05));
}
.pay-modal-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: #00d4ff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 4px;
}
.pay-modal-step-text {
  font-size: 10px;
  color: #94a3b8;
  line-height: 1.4;
}

/* ---- Trust Bar ---- */
.pay-modal-trust {
  display: flex;
  justify-content: center;
  gap: 14px;
  padding: 8px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.pay-modal-trust-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #64748b;
}
.pay-modal-trust-item svg {
  width: 13px;
  height: 13px;
  color: #00ffb3;
  flex-shrink: 0;
}

/* ---- Contact ---- */
.pay-modal-contact {
  padding: 10px 20px 6px;
  display: flex;
  gap: 8px;
}
.pay-modal-contact-item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 6px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}
.pay-modal-contact-item svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.pay-modal-contact-wechat {
  background: rgba(7, 193, 96, 0.12);
  border: 1px solid rgba(7, 193, 96, 0.3);
  color: #25c161;
}
.pay-modal-contact-wechat:hover {
  background: rgba(7, 193, 96, 0.2);
}
.pay-modal-contact-phone {
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.25);
  color: #00d4ff;
}
.pay-modal-contact-phone:hover {
  background: rgba(0, 212, 255, 0.18);
}
.pay-modal-contact-whatsapp {
  background: rgba(37, 211, 102, 0.1);
  border: 1px solid rgba(37, 211, 102, 0.25);
  color: #25d366;
}
.pay-modal-contact-whatsapp:hover {
  background: rgba(37, 211, 102, 0.18);
}

/* ---- CTA ---- */
.pay-modal-cta {
  padding: 6px 20px 12px;
}
.pay-modal-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
  border: none;
  transition: all 0.25s;
  text-align: center;
  background: linear-gradient(135deg, #00d4ff 0%, #00ffb3 100%);
  color: #0b1a2e;
  box-shadow: 0 4px 16px rgba(0, 212, 255, 0.3);
  text-decoration: none;
}
.pay-modal-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 212, 255, 0.45);
}
.pay-modal-cta-btn:active {
  transform: translateY(0);
}
.pay-modal-cta-btn svg {
  width: 16px;
  height: 16px;
}

/* ---- Footer ---- */
.pay-modal-footer {
  text-align: center;
  padding: 0 20px 12px;
}
.pay-modal-footer-text {
  font-size: 10px;
  color: #475569;
  line-height: 1.5;
  margin: 0;
}
.pay-modal-footer-text strong {
  color: #64748b;
}

/* ---- Mobile ---- */
@media (max-width: 480px) {
  .pay-modal-overlay {
    padding: 0;
    align-items: flex-end;
  }
  .pay-modal {
    border-radius: 20px 20px 0 0;
    max-width: 100%;
    max-height: 92vh;
    overflow-y: auto;
  }
  .pay-modal-qr-frame {
    width: 190px;
    height: 190px;
  }
  .pay-modal-steps {
    gap: 4px;
  }
  .pay-modal-step:not(:last-child)::after {
    right: -25%;
    width: 50%;
  }
}

/* ---- Button Ripple ---- */
.btn-buy {
  position: relative;
  overflow: hidden;
}
.btn-buy::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.5s, height 0.5s;
}
.btn-buy:active::after {
  width: 300px;
  height: 300px;
  transition: 0s;
}
