/* Celebration & motion helpers */
.confetti-piece {
  position: absolute;
  width: 10px;
  height: 14px;
  border-radius: 2px;
  animation: confettiFall linear forwards;
  z-index: 95;
}
@keyframes confettiFall {
  0% { transform: translate3d(0,0,0) rotate(0deg); opacity: 1; }
  100% { transform: translate3d(var(--dx), var(--dy), 0) rotate(540deg); opacity: 0; }
}

.burst-particle {
  position: absolute;
  font-size: 28px;
  pointer-events: none;
  animation: burstOut 0.9s ease-out forwards;
  z-index: 96;
}
@keyframes burstOut {
  0% { transform: translate3d(0,0,0) scale(0.4); opacity: 1; }
  100% { transform: translate3d(var(--dx), var(--dy), 0) scale(1.2); opacity: 0; }
}

.flyer {
  position: fixed;
  z-index: 97;
  pointer-events: none;
  font-size: 28px;
  transition: transform 0.7s cubic-bezier(.2,.8,.2,1), opacity 0.7s ease;
}

.cele-banner {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%) scale(0.8);
  background: #fff;
  border-radius: 28px;
  padding: 28px 36px;
  text-align: center;
  box-shadow: var(--shadow-card);
  opacity: 0;
  animation: celeIn 0.35s ease forwards;
  z-index: 98;
  min-width: min(420px, 90vw);
}
.cele-banner .big {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
}
.cele-banner .sub {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-secondary);
  margin-top: 6px;
}
@keyframes celeIn {
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.screen-enter {
  animation: screenIn 0.2s ease;
}
@keyframes screenIn {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.shake {
  animation: shakeX 0.4s ease;
}
@keyframes shakeX {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.glow-pulse {
  animation: glowPulse 1s ease;
}
@keyframes glowPulse {
  0%, 100% { box-shadow: var(--shadow-card); }
  50% { box-shadow: 0 0 0 8px rgba(255,209,102,0.45), var(--shadow-card); }
}

.level-rays {
  position: absolute;
  inset: 0;
  background: conic-gradient(from 0deg, rgba, rgba 80%, rgba(255,209,102,0.35), transparent 100%);
  animation: spinRays 2s linear;
  z-index: 94;
  pointer-events: none;
}
@keyframes spinRays {
  to { transform: rotate(180deg); opacity: 0; }
}

.chest-shake {
  animation: chestShake 0.5s ease;
}
@keyframes chestShake {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-8deg) scale(1.05); }
  40% { transform: rotate(8deg) scale(1.08); }
  60% { transform: rotate(-6deg); }
  80% { transform: rotate(6deg); }
}
