.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, 92, 122, 0.55) 0%,
    rgba(232, 37, 58, 0.28) 38%,
    rgba(232, 37, 58, 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: 2.08rem;
  background: linear-gradient(145deg, rgba(28, 18, 6, 0.92) 0%, rgba(12, 8, 4, 0.88) 100%);
  border: 1px solid rgba(255, 92, 122, 0.45);
  box-shadow:
    0 0 0 1px rgba(232, 37, 58, 0.12) inset,
    0 18px 48px rgba(0, 0, 0, 0.55),
    0 0 42px rgba(232, 37, 58, 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%, #ff9aab 42%, #e8253a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 1px 6px rgba(232, 37, 58, 0.3));
}

.coin-celebration-banner__icon {
  --coin-size: 3.4rem;
  filter: drop-shadow(0 6px 14px rgba(232, 37, 58, 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: #ff9aab;
  font-variation-settings: "FILL" 1, "wght" 600, "GRAD" 0, "opsz" 48;
  filter: drop-shadow(0 6px 14px rgba(232, 37, 58, 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: #ff9aab;
  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, 154, 171, 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%, #ff9aab 42%, #e8253a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 2px 8px rgba(232, 37, 58, 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%, #ff9aab 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 {
  overflow: hidden;
  animation: recharge-success-pulse 0.9s ease-out both;
}

.recharge-modal-sheet.is-payment-success::before {
  background: linear-gradient(90deg, transparent, #2d8f4e 18%, #7dffa0 50%, #2d8f4e 82%, transparent);
}

.recharge-modal-sheet.is-payment-success .recharge-modal-handle {
  display: none;
}

#recharge-step-pix.is-paid-step {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  background: transparent;
}

.recharge-pix-body.is-paid .recharge-pix-amount,
.recharge-pix-body.is-paid .recharge-pix-amount-card,
.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-amount-card,
.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-amount-card,
.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 {
  flex: 1;
  justify-content: center;
  align-items: stretch;
  min-height: 18rem;
  padding: 1rem 1.15rem 1.35rem;
  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 {
  position: relative;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 17.5rem;
  padding: 1.75rem 1.25rem 1.45rem;
  border-radius: 1.35rem;
  text-align: center;
  overflow: hidden;
  border: 1.5px solid rgba(45, 143, 78, 0.4);
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 45, 85, 0.22), transparent 42%),
    radial-gradient(circle at 80% 90%, rgba(45, 143, 78, 0.22), transparent 45%),
    linear-gradient(165deg, #18241c 0%, #101610 48%, #180e12 100%);
  box-shadow:
    0 1rem 2.5rem rgba(0, 0, 0, 0.45),
    inset 0 1px rgba(255, 255, 255, 0.08);
}

.recharge-pix-celebration::before {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  top: 0;
  height: 3px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, #2d8f4e, #ff2d55, #2d8f4e);
}

.recharge-pix-celebration::after {
  content: "";
  position: absolute;
  inset: 0.55rem;
  border-radius: 1.05rem;
  border: 1px dashed rgba(45, 143, 78, 0.28);
  pointer-events: none;
}

.recharge-pix-body.is-paid .recharge-pix-celebration {
  display: flex;
  animation: recharge-pix-celebration-in 0.7s cubic-bezier(0.22, 1.15, 0.36, 1) both;
}

.recharge-pix-celebration__glow {
  position: absolute;
  left: 50%;
  top: 28%;
  width: 12rem;
  height: 12rem;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(125, 255, 160, 0.28), transparent 68%);
  pointer-events: none;
  animation: recharge-pix-glow-pulse 2.2s ease-in-out infinite;
}

.recharge-pix-celebration__check {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 999px;
  background: linear-gradient(145deg, #3cb86a, #2d8f4e 55%, #1f6b3a);
  color: #fff;
  box-shadow:
    0 0 0 0.35rem rgba(45, 143, 78, 0.18),
    0 0.55rem 1.35rem rgba(45, 143, 78, 0.4);
  animation: recharge-pix-check-pop 0.65s cubic-bezier(0.22, 1.2, 0.36, 1) 0.05s both;
}

.recharge-pix-celebration__check .material-symbols-outlined {
  font-size: 1.85rem;
  font-variation-settings: "FILL" 1, "wght" 700, "GRAD" 0, "opsz" 40;
}

.recharge-pix-celebration__title {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #fff;
}

.recharge-pix-celebration__score {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.95rem 1rem;
  border-radius: 1.1rem;
  border: 1px solid rgba(255, 45, 85, 0.28);
  background:
    linear-gradient(135deg, rgba(255, 45, 85, 0.16), rgba(45, 143, 78, 0.1)),
    rgba(0, 0, 0, 0.28);
}

.recharge-pix-celebration__icon {
  --coin-size: 3.6rem;
  flex-shrink: 0;
  filter: drop-shadow(0 0.45rem 0.9rem rgba(255, 45, 85, 0.35));
  animation: coin-celebration-icon-spin 0.95s cubic-bezier(0.22, 1.1, 0.36, 1) 0.12s both;
}

.recharge-pix-celebration__score-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  min-width: 0;
}

.recharge-pix-celebration__amount {
  margin: 0;
  font-size: clamp(2.35rem, 9vw, 3.1rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, #fff 0%, #ff8fa3 45%, #ff2d55 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 10px rgba(255, 45, 85, 0.28));
}

.recharge-pix-celebration__unit {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(125, 255, 160, 0.85);
}

.recharge-pix-celebration__label {
  position: relative;
  z-index: 1;
  margin: 0.15rem 0 0;
  max-width: 18rem;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.72);
}

.recharge-pix-celebration__hint {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(45, 143, 78, 0.35);
  background: rgba(45, 143, 78, 0.14);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9dffa8;
}

.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, 92, 122, 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: translateY(0.85rem) scale(0.94);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes recharge-pix-check-pop {
  0% {
    opacity: 0;
    transform: scale(0.4);
  }
  60% {
    opacity: 1;
    transform: scale(1.12);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes recharge-pix-glow-pulse {
  0%, 100% {
    opacity: 0.55;
    transform: translate(-50%, -50%) scale(0.92);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08);
  }
}

@keyframes recharge-success-pulse {
  0% {
    transform: scale(0.98);
  }
  40% {
    transform: scale(1.012);
  }
  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,
  .recharge-pix-celebration__check,
  .recharge-pix-celebration__glow {
    animation: none !important;
  }

  .coin-celebration-banner {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }

  .coin-celebration-particle,
  .coin-celebration-spark {
    display: none;
  }
}
