/* ===== Globale Animationen ===== */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes floatSlow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(143, 174, 127, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(143, 174, 127, 0); }
}

@keyframes spinIn {
  from { opacity: 0; transform: scale(0.85) rotate(-4deg); }
  to { opacity: 1; transform: scale(1) rotate(0deg); }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-deco {
  animation: floatSlow 5s ease-in-out infinite;
}

.logo {
  animation: fadeInUp 0.6s ease;
}

.navbar {
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

.navbar.scrolled {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.task-card {
  opacity: 0;
  animation: fadeInUp 0.5s ease forwards;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.task-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.task-card.completed {
  animation: spinIn 0.5s ease forwards;
  opacity: 1;
}

.task-badge {
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.task-card.completed .task-badge {
  animation: pulseGlow 1.6s ease 1;
}

.upload-btn, .admin-link, button {
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.upload-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(143, 174, 127, 0.35);
}

.upload-btn:active {
  transform: translateY(0);
}

.counter-box {
  animation: fadeInUp 0.7s ease;
}

.counter-box.bump {
  animation: pulseGlow 0.6s ease 1;
}

#counterNumber {
  display: inline-block;
  transition: transform 0.2s ease;
}

.image-frame, .page-image {
  animation: fadeInUp 0.6s ease;
}

.leaderboard-row {
  opacity: 0;
  animation: fadeInUp 0.4s ease forwards;
}

.theme-toggle-float {
  transition: transform 0.4s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.theme-toggle-float.spin {
  transform: rotate(360deg) scale(1.1);
}

.nav-links {
  transition: max-height 0.35s ease, opacity 0.3s ease;
}

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