/* ============================================================
   图小宝 - 支付弹窗 / 铜金色调 · 清爽版
   ============================================================ */

.payment-overlay {
  position: fixed; inset: 0;
  background: rgba(10,12,18,0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  animation: payFadeIn .28s ease;
}
@keyframes payFadeIn { from{opacity:0} to{opacity:1} }

/* ─── 弹窗 ─── */
.payment-modal {
  background: #fff;
  border-radius: 20px;
  width: 90vw; max-width: 760px;
  box-shadow: 0 24px 72px rgba(0,0,0,.4), 0 0 0 1px rgba(176,139,106,.1);
  animation: payUp .4s cubic-bezier(.16,1,.3,1);
  overflow: hidden;
}
@keyframes payUp {
  from { opacity:0; transform:translateY(36px) scale(.97) }
  to   { opacity:1; transform:translateY(0) scale(1) }
}

/* ─── 头部 ─── */
.payment-header {
  text-align: center;
  padding: 38px 40px 0;
}
.payment-header .icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 54px; height: 54px; border-radius: 15px;
  margin-bottom: 16px; font-size: 26px;
  background: linear-gradient(135deg, #c8a975, #b08b6a);
  box-shadow: 0 6px 20px rgba(176,139,106,.25);
}
.payment-header h2 {
  margin: 0 0 6px; font-size: 22px; font-weight: 800;
  color: #1a1a2e; letter-spacing: -.2px;
}
.payment-header .subtitle {
  margin: 0; font-size: 13px; color: #999;
}
.payment-header .expired-badge {
  display: inline-block; margin-top: 12px; padding: 5px 16px;
  background: #fff8e6; color: #b45309; border: 1px solid #fde68a;
  border-radius: 20px; font-size: 12px; font-weight: 600;
}

/* ─── 套餐 ─── */
.payment-plans {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px; padding: 28px 40px;
}
.plan-card {
  position: relative; background: #fff; border: 2px solid #e8eaf0;
  border-radius: 14px; padding: 22px 14px 18px; text-align: center;
  cursor: pointer; transition: all .22s cubic-bezier(.16,1,.3,1);
}
.plan-card:hover {
  border-color: #c8a975;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(176,139,106,.1);
}
.plan-card.selected {
  border-color: #b08b6a;
  background: #fdfaf6;
  box-shadow: 0 0 0 4px rgba(176,139,106,.12), 0 4px 18px rgba(176,139,106,.16);
}
.plan-card.selected::after {
  content: '✓';
  position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%);
  width: 24px; height: 24px; line-height: 24px;
  background: #b08b6a; color: #fff; font-size: 12px; font-weight: 700;
  border-radius: 50%; box-shadow: 0 2px 8px rgba(176,139,106,.3);
}

/* 终身会员 - 红色高亮 */
.plan-card-lifetime {
  border-color: #e74c3c;
  background: linear-gradient(180deg, #fff5f5 0%, #fff 100%);
  box-shadow: 0 4px 20px rgba(231,76,60,.18);
}
.plan-card-lifetime::before {
  content: '最划算';
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: #fff; font-size: 12px; font-weight: 800; padding: 4px 16px;
  border-radius: 10px; white-space: nowrap;
  box-shadow: 0 3px 12px rgba(231,76,60,.35), 0 0 0 1px rgba(255,255,255,.2);
  letter-spacing: 1px; z-index: 1;
  text-shadow: 0 1px 2px rgba(0,0,0,.15);
  animation: pulse-tag 2s ease-in-out infinite;
}
@keyframes pulse-tag {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.06); }
}
.plan-card-lifetime:hover {
  border-color: #c0392b;
  box-shadow: 0 12px 32px rgba(231,76,60,.22);
  transform: translateY(-4px);
}
.plan-card-lifetime.selected {
  border-color: #c0392b;
  background: linear-gradient(180deg, #ffe8e8 0%, #fff5f5 100%);
  box-shadow: 0 0 0 4px rgba(231,76,60,.14), 0 6px 26px rgba(231,76,60,.24);
}
.plan-card-lifetime.selected::after {
  background: #e74c3c;
  box-shadow: 0 2px 8px rgba(231,76,60,.35);
}
.plan-card-lifetime .plan-name { color: #c0392b; }
.plan-card-lifetime .plan-price { color: #e74c3c; }
.plan-card-lifetime .plan-tag { display: none; }

/* 标签 */
.plan-card .plan-tag {
  position: absolute; top: -9px; right: -9px;
  background: #e74c3c; color: #fff; font-size: 12px; font-weight: 800;
  padding: 4px 12px; border-radius: 10px; line-height: 1.4; letter-spacing: .5px;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  z-index: 2;
}
.plan-card .plan-tag.recommend { background: #667eea; }
.plan-card .plan-tag.hot { background: #ff6348; }

/* 文字 */
.plan-card .plan-name { font-size: 14px; font-weight: 700; color: #2d3748; margin-bottom: 8px; }
.plan-card .plan-price { font-size: 30px; font-weight: 800; color: #b08b6a; margin: 2px 0; line-height: 1; }
.plan-card .plan-price .unit { font-size: 14px; font-weight: 600; vertical-align: super; margin-right: 2px; }
.plan-card .plan-original { font-size: 12px; color: #c4c4cc; text-decoration: line-through; margin: 5px 0 6px; min-height: 16px; }
.plan-card .plan-desc { font-size: 11px; color: #a0aec0; margin-top: 2px; }

/* ─── 按钮 ─── */
.payment-actions { padding: 0 40px 32px; display: flex; gap: 12px; justify-content: center; }
.btn-pay {
  padding: 13px 52px; border: none; border-radius: 12px;
  font-size: 15px; font-weight: 700; cursor: pointer;
  transition: all .22s cubic-bezier(.16,1,.3,1); letter-spacing: .2px;
}
.btn-pay.primary {
  background: linear-gradient(135deg, #b08b6a, #8b6f52);
  color: #fff; min-width: 200px;
  box-shadow: 0 4px 16px rgba(176,139,106,.26);
}
.btn-pay.primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(176,139,106,.35);
}
.btn-pay.primary:disabled { opacity: .35; cursor: not-allowed; }
.btn-pay.secondary {
  background: #f4f5f7; color: #6b7280;
}
.btn-pay.secondary:hover { background: #e8eaf0; color: #4b5563; }

/* ─── QR ─── */
.payment-qr {
  padding: 28px 40px 28px; text-align: center; position: relative;
}
.payment-qr .qr-title { font-size: 14px; font-weight: 700; color: #2d3748; margin-bottom: 4px; }
.payment-qr .qr-amount {
  font-size: 32px; font-weight: 800; color: #b08b6a; margin-bottom: 14px;
}
.payment-qr .qr-image {
  display: inline-block; padding: 14px; background: #fff;
  border: 1.5px solid #e8eaf0; border-radius: 18px;
  margin-bottom: 14px; box-shadow: 0 6px 24px rgba(0,0,0,.04);
}
.payment-qr .qr-image img { display: block; width: 180px; height: 180px; border-radius: 6px; }
.payment-qr .qr-tip { font-size: 12px; color: #a0aec0; margin-bottom: 14px; line-height: 1.6; }
.payment-qr .qr-tip .wechat-icon { color: #07c160; font-weight: 700; }
.payment-qr .qr-status {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 12px; color: #b08b6a; font-weight: 500;
}
.payment-qr .qr-status .spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid #e8eaf0; border-top-color: #b08b6a;
  border-radius: 50%; animation: paySpin .7s linear infinite;
}
@keyframes paySpin { to{transform:rotate(360deg)} }

/* ─── 成功 / 过期 ─── */
.payment-success, .payment-expired {
  padding: 48px 40px 40px; text-align: center;
}
.payment-success .success-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 68px; height: 68px; border-radius: 18px; margin-bottom: 20px;
  font-size: 32px;
  background: linear-gradient(135deg, #b08b6a, #c8a975);
  box-shadow: 0 8px 24px rgba(176,139,106,.18);
}
.payment-expired .expired-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 68px; height: 68px; border-radius: 18px; margin-bottom: 20px;
  font-size: 32px; background: #fdf6f0;
}
.payment-success h3, .payment-expired h3 {
  font-size: 20px; font-weight: 800; color: #1a1a2e; margin: 0 0 6px;
}
.payment-expired h3 { color: #c0392b; }
.payment-success .success-info, .payment-expired p {
  font-size: 13px; color: #888; margin-bottom: 24px; line-height: 1.7;
}

/* QR 过期遮罩 */
.payment-qr-expired {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 10;
  background: rgba(255,255,255,.92);
  border-radius: 14px;
}
.qr-expired-mask {
  text-align: center;
}
.qr-expired-text {
  font-size: 15px; font-weight: 700; color: #c0392b;
  margin-bottom: 16px;
}

/* ─── 响应式 ─── */
@media (max-width: 640px) {
  .payment-plans { grid-template-columns: repeat(2, 1fr); padding: 20px 20px; gap: 10px; }
  .plan-card { padding: 18px 12px 14px; }
  .plan-card .plan-price { font-size: 26px; }
  .payment-header { padding: 28px 20px 0; }
  .payment-actions { padding: 0 20px 24px; flex-direction: column; }
  .payment-qr { padding: 22px 20px 22px; }
  .payment-success, .payment-expired { padding: 36px 20px 32px; }
}
