/* Alle Keyframes + Animations-Klassen der App */

/* Generischer Fade-In */
.fade-in { animation: fade .25s ease; }
@keyframes fade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}

/* Tap-Feedback auf Buttons */
button:active { transform: scale(0.97); transition: transform 80ms; }

/* Pulse beim guten Score */
.pulse-good { animation: pgood .6s ease; }
@keyframes pgood {
  0%   { background: var(--accent-soft); }
  100% { background: transparent; }
}

/* Toasts */
.toast { animation: toast-in .25s ease, toast-out .25s ease 3.3s forwards; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: none; }
}
@keyframes toast-out {
  to { opacity: 0; transform: translateY(-8px); }
}

/* Mikro-Animationen */

/* Sanftes Pop-In fuer neu erscheinende Elemente */
.pop-in { animation: pop-in .35s cubic-bezier(.22,1.4,.36,1) both; }
@keyframes pop-in {
  0%   { opacity: 0; transform: scale(.92); }
  60%  { opacity: 1; transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* Slide-up fuer Bottom-Sheets */
.slide-up { animation: slide-up .25s ease; }
@keyframes slide-up {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

/* Score zaehlt hoch / aktualisiert sich */
.count-bump { animation: count-bump .35s ease; }
@keyframes count-bump {
  0%   { transform: scale(1); color: inherit; }
  40%  { transform: scale(1.18); color: var(--accent); }
  100% { transform: scale(1); color: inherit; }
}

/* Glow beim Birdie+ */
.birdie-glow { animation: birdie-glow .9s ease; }
@keyframes birdie-glow {
  0%   { box-shadow: 0 0 0 0 rgba(232, 116, 60, .55); }
  60%  { box-shadow: 0 0 0 14px rgba(232, 116, 60, 0); }
  100% { box-shadow: 0 0 0 0 rgba(232, 116, 60, 0); }
}

/* Sanftes Wackeln bei Strafschlag */
.shake-soft { animation: shake-soft .35s ease; }
@keyframes shake-soft {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-3px); }
  75%      { transform: translateX(3px); }
}

/* Pulsierender Akzent fuer aktiven Status */
.pulse-dot { animation: pulse-dot 1.6s ease infinite; }
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .6; transform: scale(1.15); }
}

/* Skeleton Shimmer fuer Lade-Zustaende */
.shimmer {
  background: linear-gradient(90deg, #f3f1ee 0%, #faf9f7 50%, #f3f1ee 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* Stagger-Liste: jede Zeile etwas spaeter */
.stagger > *      { animation: fade .35s ease both; }
.stagger > *:nth-child(1) { animation-delay: 0ms; }
.stagger > *:nth-child(2) { animation-delay: 60ms; }
.stagger > *:nth-child(3) { animation-delay: 120ms; }
.stagger > *:nth-child(4) { animation-delay: 180ms; }
.stagger > *:nth-child(5) { animation-delay: 240ms; }
.stagger > *:nth-child(6) { animation-delay: 300ms; }
.stagger > *:nth-child(7) { animation-delay: 360ms; }
.stagger > *:nth-child(8) { animation-delay: 420ms; }

/* Reduced Motion respektieren */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
