/* Claw Liquidity · X402 支付终端 · pay.clawpassport.cc */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
  background: #0a0e1a;
  color: #e6e9f0;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 背景光晕 */
#bg-glow {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(circle at 20% 10%, rgba(99, 102, 241, 0.18), transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(16, 185, 129, 0.12), transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(236, 72, 153, 0.06), transparent 60%);
}

/* 顶部 bar */
.topbar {
  position: relative; z-index: 1;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
  position: relative;
}
.brand-mark::after {
  content: ''; position: absolute; inset: 6px;
  border: 2px solid rgba(255,255,255,0.5); border-radius: 5px;
  border-right-color: transparent; border-bottom-color: transparent;
  transform: rotate(-45deg);
}
.brand-name { font-size: 16px; font-weight: 600; letter-spacing: 0.3px; }
.brand-sub { font-size: 11px; color: #8b93a8; margin-top: 2px; letter-spacing: 1px; }

.countdown {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 20px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  font-size: 13px; font-variant-numeric: tabular-nums;
}
.countdown .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #10b981; box-shadow: 0 0 8px #10b981;
  animation: pulse 1.4s ease-in-out infinite;
}
.countdown.warn .dot { background: #f59e0b; box-shadow: 0 0 8px #f59e0b; }
.countdown.danger .dot { background: #ef4444; box-shadow: 0 0 8px #ef4444; }
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* 卡片包裹 */
.card-wrap {
  position: relative; z-index: 1;
  max-width: 460px; margin: 32px auto 60px; padding: 0 16px;
}

.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 28px 24px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.3);
}

/* 骨架 */
.skeleton .sk-row {
  height: 16px; border-radius: 8px;
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  margin-bottom: 16px;
}
.sk-row-1 { width: 60%; }
.sk-row-2 { width: 90%; height: 48px; }
.sk-row-3 { width: 100%; height: 64px; }
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* card head */
.card-head { margin-bottom: 28px; }
.badge-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.badge {
  display: inline-flex; align-items: center;
  padding: 4px 10px; border-radius: 12px;
  font-size: 11px; font-weight: 500; letter-spacing: 0.3px;
}
.badge-ai {
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.badge-tier {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.25);
}
.badge-tier:empty { display: none; }
.order-no { color: #6b7388; font-size: 12px; font-variant-numeric: tabular-nums; }

/* 金额块 */
.amount-block { margin-bottom: 28px; }
.amount-label {
  font-size: 13px; color: #8b93a8; margin-bottom: 8px;
  display: flex; align-items: center; gap: 8px;
}
.tail-tip {
  font-size: 11px; padding: 2px 8px; border-radius: 8px;
  background: rgba(251, 191, 36, 0.12); color: #fbbf24;
}
.tail-tip:empty { display: none; }
.amount-num {
  display: flex; align-items: baseline; gap: 6px;
  margin-bottom: 10px;
}
.amount-sym {
  font-size: 18px; font-weight: 500; color: #8b93a8;
}
.amount-val {
  font-size: 56px; font-weight: 700;
  letter-spacing: -1.5px;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff 0%, #b8bdcc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.amount-sub {
  font-size: 13px; color: #8b93a8;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.amount-sub strong { color: #e6e9f0; font-weight: 600; }
.dot-sep { color: #4a5168; }
.lock-tip { color: #10b981; }

/* 通道选择 */
.channels-title {
  font-size: 13px; color: #8b93a8; margin-bottom: 12px;
}
.channels { display: flex; flex-direction: column; gap: 10px; }

.channel {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; border-radius: 14px; cursor: pointer;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  color: #e6e9f0;
  transition: all 0.2s ease;
  position: relative;
  text-align: left;
  font-family: inherit;
}
.channel:hover:not(:disabled) {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
  transform: translateY(-1px);
}
.channel:disabled {
  opacity: 0.4; cursor: not-allowed;
}
.channel.ch-wechat:not(:disabled):hover {
  border-color: rgba(7, 193, 96, 0.4);
  box-shadow: 0 0 0 1px rgba(7, 193, 96, 0.2), 0 8px 24px rgba(7, 193, 96, 0.15);
}
.channel.ch-alipay:not(:disabled):hover {
  border-color: rgba(22, 119, 255, 0.4);
  box-shadow: 0 0 0 1px rgba(22, 119, 255, 0.2), 0 8px 24px rgba(22, 119, 255, 0.15);
}

.ch-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ch-wechat .ch-icon { background: linear-gradient(135deg, #07C160 0%, #06AD56 100%); color: #fff; }
.ch-alipay .ch-icon { background: linear-gradient(135deg, #1677FF 0%, #0E5FD0 100%); color: #fff; }

.ch-text { flex: 1; min-width: 0; }
.ch-name { font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.ch-tip { font-size: 12px; color: #6b7388; }
.channel:not(:disabled) .ch-tip { color: #10b981; }

.ch-arrow {
  font-size: 22px; color: #4a5168; transition: transform 0.2s;
}
.channel:hover:not(:disabled) .ch-arrow { transform: translateX(3px); color: #e6e9f0; }

/* footer */
.footer-note {
  margin-top: 24px; padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 11px; color: #6b7388; line-height: 1.8; text-align: center;
}
.footer-note a { color: #8b93a8; text-decoration: none; }
.footer-note a:hover { color: #6366f1; }
.footer-note strong { color: #8b93a8; font-weight: 500; }

/* msg card (error / success) */
.msg-card, .success-card { text-align: center; padding: 40px 24px; }
.msg-icon { font-size: 56px; margin-bottom: 16px; }
.msg-title { font-size: 20px; font-weight: 600; margin-bottom: 8px; }
.msg-text { font-size: 13px; color: #8b93a8; line-height: 1.6; margin-bottom: 24px; }
.msg-back {
  display: inline-block; padding: 10px 24px; border-radius: 10px;
  background: rgba(255,255,255,0.06); color: #e6e9f0;
  text-decoration: none; font-size: 13px;
  transition: background 0.2s;
}
.msg-back:hover { background: rgba(255,255,255,0.1); }

.success-anim { margin-bottom: 20px; }
.success-anim circle { stroke-dasharray: 157; stroke-dashoffset: 157; animation: drawCircle 0.6s ease-out forwards; }
.success-anim path { stroke-dasharray: 50; stroke-dashoffset: 50; animation: drawCheck 0.4s ease-out 0.5s forwards; }
@keyframes drawCircle { to { stroke-dashoffset: 0; } }
@keyframes drawCheck { to { stroke-dashoffset: 0; } }

.tx-link { margin-bottom: 20px; font-size: 12px; }
.tx-link a { color: #6366f1; text-decoration: none; }

/* modal */
.modal-mask {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease-out;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: #1a1f2e;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 28px 24px;
  max-width: 380px; width: 100%;
  position: relative;
  animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,0.06); border: none; cursor: pointer;
  color: #8b93a8; font-size: 20px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.modal-close:hover { background: rgba(255,255,255,0.12); color: #fff; }

/* qr modal */
.modal-qr.ch-wechat-theme { border-color: rgba(7, 193, 96, 0.3); box-shadow: 0 24px 60px rgba(7,193,96,0.2); }
.modal-qr.ch-alipay-theme { border-color: rgba(22, 119, 255, 0.3); box-shadow: 0 24px 60px rgba(22,119,255,0.2); }

.qr-head { text-align: center; margin-bottom: 20px; }
.qr-channel { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.qr-amount {
  font-size: 28px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff 0%, #b8bdcc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.qr-img-wrap {
  background: #fff; padding: 16px; border-radius: 14px;
  margin: 0 auto 16px; width: 220px; height: 220px;
  display: flex; align-items: center; justify-content: center;
}
.qr-img-wrap img { width: 100%; height: 100%; object-fit: contain; }

.qr-instr {
  font-size: 12px; color: #8b93a8;
  text-align: center; line-height: 1.7; margin-bottom: 12px;
}
.qr-instr strong { color: #e6e9f0; }

.qr-receiver {
  font-size: 12px; color: #6b7388; text-align: center;
  padding: 8px 12px; background: rgba(255,255,255,0.03);
  border-radius: 8px; margin-bottom: 20px;
}
.qr-receiver span { color: #e6e9f0; font-weight: 500; }

.qr-actions { display: flex; gap: 10px; }
.qr-actions button {
  flex: 1; padding: 12px 0; border-radius: 12px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: all 0.2s; border: none;
}
.btn-cancel {
  background: rgba(255,255,255,0.06); color: #8b93a8;
}
.btn-cancel:hover { background: rgba(255,255,255,0.1); color: #fff; }
.btn-confirm {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff; box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}
.btn-confirm:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4); }
.btn-confirm:active { transform: translateY(0); }

/* wait modal */
.modal-wait { text-align: center; padding: 40px 28px; }
.wait-anim {
  position: relative; width: 80px; height: 80px;
  margin: 0 auto 24px;
}
.wait-ring, .wait-ring-2 {
  position: absolute; inset: 0;
  border: 3px solid transparent;
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: spin 1.2s linear infinite;
}
.wait-ring-2 {
  inset: 10px;
  border-top-color: #ec4899;
  animation-duration: 0.8s; animation-direction: reverse;
}
@keyframes spin { to { transform: rotate(360deg); } }
.wait-tip { font-size: 11px; color: #6b7388; margin-top: 16px; }

@media (max-width: 480px) {
  .topbar { padding: 14px 18px; }
  .card-wrap { margin-top: 20px; padding: 0 12px; }
  .card { padding: 22px 20px; }
  .amount-val { font-size: 48px; }
  .qr-img-wrap { width: 200px; height: 200px; }
}
