.coin-celebration-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  pointer-events: none;
  overflow: hidden;
}

.coin-celebration-overlay.is-active {
  animation: coin-celebration-flash 0.55s ease-out;
}

.coin-celebration-glow {
  position: absolute;
  left: 50%;
  top: 42%;
  width: min(90vw, 28rem);
  height: min(90vw, 28rem);
  transform: translate(-50%, -50%) scale(0.2);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 143, 168, 0.55) 0%,
    rgba(232, 93, 117, 0.28) 38%,
    rgba(255, 107, 138, 0.08) 62%,
    transparent 72%
  );
  opacity: 0;
  animation: coin-celebration-glow 1.35s ease-out forwards;
}

.coin-celebration-banner {
  position: absolute;
  left: 50%;
  top: 38%;
  transform: translate(-50%, -50%) scale(0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 1.1rem 1.65rem 1rem;
  border-radius: 1.35rem;
  background: linear-gradient(145deg, rgba(28, 18, 6, 0.92) 0%, rgba(12, 8, 4, 0.88) 100%);
  border: 1px solid rgba(255, 107, 138, 0.45);
  box-shadow:
    0 0 0 1px rgba(255, 210, 100, 0.12) inset,
    0 18px 48px rgba(0, 0, 0, 0.55),
    0 0 42px rgba(255, 107, 138, 0.35);
  opacity: 0;
  animation: coin-celebration-banner 0.85s cubic-bezier(0.22, 1.15, 0.36, 1) 0.08s forwards;
}

.coin-celebration-banner__title {
  margin: 0 0 0.1rem;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  background: linear-gradient(180deg, #fff8dc 0%, #ffc0d0 42%, #ff6b8a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 1px 6px rgba(255, 107, 138, 0.3));
}

.coin-celebration-banner__icon {
  --coin-size: 3.4rem;
  filter: drop-shadow(0 6px 14px rgba(255, 107, 138, 0.45));
  animation: coin-celebration-icon-spin 0.9s cubic-bezier(0.22, 1.1, 0.36, 1) 0.12s both;
}

.coin-celebration-banner__sparkle {
  font-size: 3.1rem;
  line-height: 1;
  color: #ffc0d0;
  font-variation-settings: "FILL" 1, "wght" 600, "GRAD" 0, "opsz" 48;
  filter: drop-shadow(0 6px 14px rgba(255, 107, 138, 0.45));
  animation: coin-celebration-icon-spin 0.9s cubic-bezier(0.22, 1.1, 0.36, 1) 0.12s both;
}

.coin-celebration-particle--star {
  background: none;
  color: #ffc0d0;
  font-size: var(--coin-size, 1.5rem);
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 0 10px rgba(255, 176, 196, 0.85);
}

.coin-celebration-banner__amount {
  margin: 0;
  font-size: clamp(1.85rem, 6vw, 2.45rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  background: linear-gradient(180deg, #fff8dc 0%, #ffc0d0 42%, #ff6b8a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 2px 8px rgba(255, 107, 138, 0.35));
}

.coin-celebration-banner__label {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
}

.coin-celebration-particle {
  position: absolute;
  left: var(--coin-x, 50%);
  top: var(--coin-y, 50%);
  width: var(--coin-size, 1.5rem);
  height: var(--coin-size, 1.5rem);
  margin-left: calc(var(--coin-size, 1.5rem) / -2);
  margin-top: calc(var(--coin-size, 1.5rem) / -2);
  background: center / contain no-repeat url("../icons/coin.svg");
  opacity: 0;
  transform: translate3d(0, 0, 0) rotate(0deg) scale(0.4);
  animation: coin-celebration-burst var(--coin-duration, 1.4s) cubic-bezier(0.22, 0.85, 0.36, 1) var(--coin-delay, 0s) forwards;
  will-change: transform, opacity;
}

.coin-celebration-particle--fall {
  top: -8%;
  left: var(--coin-x, 50%);
  animation-name: coin-celebration-fall;
  animation-duration: var(--coin-duration, 2.4s);
  animation-timing-function: linear;
}

.coin-celebration-spark {
  position: absolute;
  left: var(--spark-x, 50%);
  top: var(--spark-y, 50%);
  width: var(--spark-size, 6px);
  height: var(--spark-size, 6px);
  margin-left: calc(var(--spark-size, 6px) / -2);
  margin-top: calc(var(--spark-size, 6px) / -2);
  border-radius: 50%;
  background: radial-gradient(circle, #fff8dc 0%, #ffc0d0 55%, transparent 100%);
  opacity: 0;
  animation: coin-celebration-spark var(--spark-duration, 0.9s) ease-out var(--spark-delay, 0s) forwards;
}

.recharge-modal.is-payment-celebrating {
  z-index: 10060;
}

.recharge-modal-sheet.is-payment-success {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: min(100%, 22rem);
  max-height: none;
  overflow: visible;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  animation: none;
}

.recharge-modal-sheet.is-payment-success .recharge-modal-handle {
  display: none;
}

#recharge-step-pix.is-paid-step {
  background: transparent;
}

.recharge-pix-body.is-paid .recharge-pix-amount,
.recharge-pix-body.is-paid .recharge-pix-qr-wrap,
.recharge-pix-body.is-paid .recharge-pix-copy,
.recharge-pix-body.is-paid .recharge-pix-status {
  opacity: 0;
  max-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
  border-width: 0;
  transform: scale(0.94);
}

.recharge-pix-amount,
.recharge-pix-qr-wrap,
.recharge-pix-copy,
.recharge-pix-status {
  max-height: 24rem;
  transition:
    opacity 0.35s ease,
    transform 0.35s ease,
    max-height 0.45s ease,
    margin 0.35s ease,
    padding 0.35s ease,
    visibility 0s linear 0.35s;
}

.recharge-pix-body.is-paid .recharge-pix-amount,
.recharge-pix-body.is-paid .recharge-pix-qr-wrap,
.recharge-pix-body.is-paid .recharge-pix-copy,
.recharge-pix-body.is-paid .recharge-pix-status {
  transition:
    opacity 0.35s ease,
    transform 0.35s ease,
    max-height 0.45s ease,
    margin 0.35s ease,
    padding 0.35s ease,
    visibility 0s linear 0.35s;
}

.recharge-pix-body.is-paid {
  justify-content: center;
  min-height: 0;
  padding: 0;
  gap: 0;
  overflow: visible;
  background: transparent;
}

#recharge-step-pix.is-paid-step .recharge-modal-header {
  opacity: 0;
  max-height: 0;
  margin: 0;
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
}

.recharge-pix-celebration {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  width: min(100%, 20rem);
  padding: 1.35rem 1.25rem 1.15rem;
  border-radius: 1.35rem;
  text-align: center;
  background: linear-gradient(145deg, rgba(28, 18, 6, 0.92) 0%, rgba(12, 8, 4, 0.88) 100%);
  border: 1px solid rgba(255, 107, 138, 0.45);
  box-shadow:
    0 0 0 1px rgba(255, 210, 100, 0.12) inset,
    0 18px 48px rgba(0, 0, 0, 0.55),
    0 0 42px rgba(255, 107, 138, 0.35);
}

.recharge-pix-body.is-paid .recharge-pix-celebration {
  display: flex;
  animation: recharge-pix-celebration-in 0.85s cubic-bezier(0.22, 1.15, 0.36, 1) 0.08s both;
}

.recharge-pix-celebration__title {
  margin: 0 0 0.15rem;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  background: linear-gradient(180deg, #fff8dc 0%, #ffc0d0 42%, #ff6b8a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 1px 6px rgba(255, 107, 138, 0.3));
}

.recharge-pix-celebration__icon {
  --coin-size: 3.4rem;
  filter: drop-shadow(0 6px 14px rgba(255, 107, 138, 0.45));
  animation: coin-celebration-icon-spin 0.9s cubic-bezier(0.22, 1.1, 0.36, 1) 0.12s both;
}

.recharge-pix-celebration__amount {
  margin: 0;
  font-size: clamp(1.85rem, 6vw, 2.45rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  background: linear-gradient(180deg, #fff8dc 0%, #ffc0d0 42%, #ff6b8a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 8px rgba(255, 107, 138, 0.35));
}

.recharge-pix-celebration__label {
  margin: 0.15rem 0 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
}

.recharge-pix-status.is-success {
  font-size: 0;
  line-height: 0;
  color: transparent;
  min-height: 0;
  overflow: hidden;
}

@keyframes coin-celebration-flash {
  0% {
    background: rgba(255, 143, 168, 0.22);
  }
  100% {
    background: transparent;
  }
}

@keyframes coin-celebration-glow {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2);
  }
  35% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.35);
  }
}

@keyframes coin-celebration-banner {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.35);
  }
  55% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes coin-celebration-icon-spin {
  0% {
    transform: rotateY(0deg) scale(0.5);
  }
  45% {
    transform: rotateY(540deg) scale(1.12);
  }
  100% {
    transform: rotateY(720deg) scale(1);
  }
}

@keyframes coin-celebration-burst {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(0deg) scale(0.35);
  }
  12% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--coin-tx, 0px), var(--coin-ty, -120px), 0) rotate(var(--coin-rot-end, 360deg)) scale(0.85);
  }
}

@keyframes coin-celebration-fall {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(0deg) scale(0.6);
  }
  8% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--coin-drift, 0px), 110vh, 0) rotate(var(--coin-rot-end, 720deg)) scale(1);
  }
}

@keyframes coin-celebration-spark {
  0% {
    opacity: 0;
    transform: scale(0.2);
  }
  20% {
    opacity: 1;
    transform: scale(1.2);
  }
  100% {
    opacity: 0;
    transform: scale(0.1);
  }
}

@keyframes recharge-pix-celebration-in {
  0% {
    opacity: 0;
    transform: scale(0.35);
  }
  55% {
    opacity: 1;
    transform: scale(1.08);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes recharge-success-pulse {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.015);
  }
  100% {
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .coin-celebration-overlay.is-active,
  .coin-celebration-glow,
  .coin-celebration-banner,
  .coin-celebration-particle,
  .coin-celebration-spark,
  .coin-celebration-banner__sparkle,
  .recharge-modal-sheet.is-payment-success,
  .recharge-pix-body.is-paid .recharge-pix-celebration,
  .recharge-pix-celebration__icon {
    animation: none !important;
  }

  .coin-celebration-banner {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }

  .coin-celebration-particle,
  .coin-celebration-spark {
    display: none;
  }
}
