/* 支付成功 · 灵境星轨弹窗 */
.psm-overlay {
  position: fixed;
  inset: 0;
  z-index: 12050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(6, 4, 14, 0.78);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.psm-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.psm-modal {
  position: relative;
  width: min(420px, 100%);
  padding: 32px 28px 26px;
  border-radius: 24px;
  border: 1px solid rgba(196, 181, 253, 0.35);
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(155, 77, 255, 0.28), transparent 55%),
    linear-gradient(165deg, rgba(34, 20, 56, 0.98) 0%, rgba(14, 10, 26, 0.99) 100%);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 0 60px rgba(124, 58, 237, 0.22);
  text-align: center;
  overflow: hidden;
  transform: scale(0.88) translateY(24px);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.psm-overlay.is-open .psm-modal {
  transform: scale(1) translateY(0);
}

.psm-modal::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(253, 230, 138, 0.5), rgba(155, 77, 255, 0.35), rgba(94, 234, 212, 0.25));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.85;
}

.psm-aurora {
  position: absolute;
  inset: -40% -20%;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 30%, rgba(155, 77, 255, 0.25), transparent 45%),
    radial-gradient(circle at 80% 20%, rgba(251, 191, 36, 0.15), transparent 40%),
    radial-gradient(circle at 50% 90%, rgba(94, 234, 212, 0.12), transparent 50%);
  animation: psmAurora 8s ease-in-out infinite alternate;
}

@keyframes psmAurora {
  from { transform: translate(0, 0) scale(1); opacity: 0.7; }
  to   { transform: translate(3%, -2%) scale(1.06); opacity: 1; }
}

.psm-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.psm-sparkle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fde68a;
  box-shadow: 0 0 8px rgba(253, 230, 138, 0.8);
  animation: psmSparkle 2.4s ease-in-out infinite;
}

.psm-sparkle:nth-child(1) { left: 12%; top: 18%; animation-delay: 0s; }
.psm-sparkle:nth-child(2) { left: 82%; top: 22%; animation-delay: 0.4s; }
.psm-sparkle:nth-child(3) { left: 68%; top: 72%; animation-delay: 0.8s; }
.psm-sparkle:nth-child(4) { left: 24%; top: 78%; animation-delay: 1.2s; }
.psm-sparkle:nth-child(5) { left: 50%; top: 8%; animation-delay: 0.6s; }

@keyframes psmSparkle {
  0%, 100% { opacity: 0.2; transform: scale(0.6); }
  50% { opacity: 1; transform: scale(1.2); }
}

.psm-icon-wrap {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0 auto 18px;
}

.psm-icon-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(110, 231, 183, 0.35);
  animation: psmRingPulse 2s ease-out infinite;
}

.psm-icon-ring::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(155, 77, 255, 0.25);
  animation: psmRingSpin 6s linear infinite;
}

@keyframes psmRingPulse {
  0% { transform: scale(0.92); opacity: 0.5; }
  70% { transform: scale(1.15); opacity: 0; }
  100% { transform: scale(1.15); opacity: 0; }
}

@keyframes psmRingSpin {
  to { transform: rotate(360deg); }
}

.psm-check {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 2rem;
  color: #ecfdf5;
  background: linear-gradient(145deg, rgba(52, 211, 153, 0.35), rgba(16, 185, 129, 0.55));
  box-shadow: 0 0 30px rgba(52, 211, 153, 0.45), inset 0 0 20px rgba(255, 255, 255, 0.08);
  animation: psmCheckPop 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

@keyframes psmCheckPop {
  from { transform: scale(0.4); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.psm-title {
  position: relative;
  margin: 0 0 6px;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #faf5ff;
  text-shadow: 0 0 24px rgba(196, 181, 253, 0.35);
}

.psm-subject {
  position: relative;
  margin: 0 0 14px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: rgba(196, 181, 253, 0.92);
}

.psm-amount {
  position: relative;
  margin: 0 0 16px;
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, #fde68a 0%, #fbbf24 45%, #f59e0b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 16px rgba(251, 191, 36, 0.35));
  animation: psmAmountIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

@keyframes psmAmountIn {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.psm-meta {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
}

.psm-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #ddd6fe;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(196, 181, 253, 0.22);
}

.psm-chip.is-alipay { color: #bfdbfe; border-color: rgba(59, 130, 246, 0.35); }
.psm-chip.is-wechat { color: #bbf7d0; border-color: rgba(34, 197, 94, 0.35); }
.psm-chip.is-test { color: #fde68a; border-color: rgba(251, 191, 36, 0.35); }
.psm-chip.is-redeem { color: #ddd6fe; border-color: rgba(196, 181, 253, 0.35); }

.psm-order {
  position: relative;
  margin: 0 0 22px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-family: ui-monospace, monospace;
  color: rgba(226, 198, 255, 0.75);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
  word-break: break-all;
}

.psm-order span {
  display: block;
  font-size: 0.68rem;
  color: rgba(196, 181, 253, 0.55);
  margin-bottom: 4px;
  font-family: inherit;
}

.psm-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.psm-btn-lottery {
  background: linear-gradient(135deg, #ffe566 0%, #ffb347 100%);
  color: #3b2200;
  box-shadow: 0 10px 32px rgba(255, 184, 107, 0.45);
}

.psm-btn-lottery:hover {
  box-shadow: 0 14px 36px rgba(255, 184, 107, 0.55);
}

.psm-btn {
  position: relative;
  width: 100%;
  padding: 13px 20px;
  border: none;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fffbeb;
  cursor: pointer;
  overflow: hidden;
  background: linear-gradient(135deg, #9b4dff 0%, #7c3aed 50%, #6d28d9 100%);
  box-shadow: 0 10px 32px rgba(124, 58, 237, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.psm-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.22) 50%, transparent 60%);
  transform: translateX(-120%);
  animation: psmBtnShine 2.8s ease-in-out infinite;
}

@keyframes psmBtnShine {
  0%, 100% { transform: translateX(-120%); }
  50% { transform: translateX(120%); }
}

.psm-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 14px 36px rgba(124, 58, 237, 0.55);
}

.psm-btn:active {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .psm-aurora, .psm-sparkle, .psm-icon-ring, .psm-icon-ring::before, .psm-btn::after {
    animation: none;
  }
  .psm-modal, .psm-check, .psm-amount {
    animation: none;
    transition: none;
  }
}

body.psm-open {
  overflow: hidden;
}
