/* demo.ncg.games only: instant "Credits Added" reveal (see arcade-demo.js). */
.credit-celebrate--instant { overflow: hidden; }
.credit-celebrate--instant .credit-celebrate-card {
  position: relative;
  z-index: 3;
  animation: cciCardSlam 0.55s cubic-bezier(0.2, 1.5, 0.35, 1) both;
}
.credit-celebrate--instant .credit-celebrate-amount {
  position: relative;
  overflow: hidden;
  animation: cciAmountSlam 0.6s cubic-bezier(0.18, 1.6, 0.4, 1) both, cciAmountGlow 1.4s ease-in-out 0.6s infinite alternate;
}
.credit-celebrate--instant .credit-celebrate-amount::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.85), transparent);
  transform: skewX(-20deg) translateX(0);
  animation: cciShine 0.9s ease-out 0.35s both;
  pointer-events: none;
}
.credit-celebrate--instant.credit-celebrate-done .credit-celebrate-amount {
  animation: creditAmountFlash 0.45s ease-out;
}

.cci-flash,
.cci-rays,
.cci-ring {
  position: absolute;
  pointer-events: none;
}
.cci-flash {
  inset: 0;
  z-index: 4;
  background: radial-gradient(circle at 50% 45%, rgba(255, 250, 220, 0.95), rgba(255, 205, 80, 0.55) 35%, transparent 70%);
  animation: cciFlash 0.7s ease-out forwards;
}
.cci-rays {
  left: 50%;
  top: 50%;
  z-index: 1;
  width: 2400px;
  height: 2400px;
  margin: -1200px 0 0 -1200px;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(255, 210, 90, 0.26) 0deg 7deg, transparent 7deg 20deg);
  -webkit-mask-image: radial-gradient(circle, #000 8%, transparent 55%);
  mask-image: radial-gradient(circle, #000 8%, transparent 55%);
  animation: cciRaysIn 0.5s ease-out both, cciRaysSpin 14s linear infinite;
}
.cci-ring {
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 300px;
  height: 300px;
  margin: -150px 0 0 -150px;
  border-radius: 50%;
  border: 10px solid rgba(255, 215, 94, 0.9);
  box-shadow: 0 0 40px rgba(255, 200, 70, 0.8), inset 0 0 30px rgba(255, 200, 70, 0.6);
  animation: cciRing 0.9s cubic-bezier(0.1, 0.6, 0.3, 1) forwards;
}
.cci-ring--2 { animation-delay: 0.16s; border-width: 6px; }

.cci-coin {
  position: fixed;
  z-index: 10090;
  width: 50px;
  height: 50px;
  margin: -25px 0 0 -25px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle at 35% 30%, #fffbe6 0 12%, #ffd75e 30%, #c8922a 70%, #7a4e10 100%);
  box-shadow: inset 0 0 0 4px rgba(122, 78, 16, 0.75), 0 4px 10px rgba(0, 0, 0, 0.45);
  color: #6e4a12;
  font: 900 26px/50px Georgia, serif;
  text-align: center;
  will-change: transform, opacity;
}

@keyframes cciCardSlam {
  0% { transform: scale(1.35); opacity: 0; }
  60% { transform: scale(0.96); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes cciAmountSlam {
  0% { transform: scale(2.4); opacity: 0; }
  55% { transform: scale(0.9); opacity: 1; }
  78% { transform: scale(1.06); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes cciAmountGlow {
  from { transform: scale(1); }
  to { transform: scale(1.04); }
}
@keyframes cciShine {
  from { transform: skewX(-20deg) translateX(0); }
  to { transform: skewX(-20deg) translateX(420%); }
}
@keyframes cciFlash {
  0% { opacity: 0; }
  15% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes cciRaysIn {
  from { opacity: 0; transform: scale(0.4); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes cciRaysSpin {
  to { rotate: 360deg; }
}
@keyframes cciRing {
  0% { transform: scale(0.3); opacity: 1; }
  100% { transform: scale(5.5); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .credit-celebrate--instant .credit-celebrate-card,
  .credit-celebrate--instant .credit-celebrate-amount,
  .credit-celebrate--instant .credit-celebrate-amount::after,
  .cci-rays,
  .cci-ring { animation: none; }
  .cci-ring, .cci-flash { display: none; }
}
