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

@media (prefers-reduced-motion: no-preference) {
  .screen {
    animation: screenIn 260ms ease both;
  }

  .mascot {
    animation: mascotBob 3s ease-in-out infinite;
  }

  .table-tile,
  .mode-card,
  .answer-card,
  .btn,
  .icon-btn,
  .confidence-btn,
  .match-card,
  .flash-card {
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
  }

  .table-tile:hover,
  .mode-card:hover,
  .answer-card:hover,
  .btn:hover,
  .icon-btn:hover,
  .confidence-btn:hover,
  .match-card:hover,
  .flash-card:hover {
    transform: translateY(-2px);
  }

  .pop {
    animation: pop 420ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
  }

  .shake {
    animation: shake 420ms ease both;
  }

  .flip {
    animation: flip 360ms ease both;
  }

  .boss.hit {
    animation: bossHit 460ms ease both;
  }
}

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

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

@keyframes pop {
  0% {
    transform: scale(0.92);
  }
  55% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-8px);
  }
  40% {
    transform: translateX(8px);
  }
  60% {
    transform: translateX(-5px);
  }
  80% {
    transform: translateX(5px);
  }
}

@keyframes flip {
  0% {
    transform: rotateY(0);
  }
  50% {
    transform: rotateY(90deg);
  }
  100% {
    transform: rotateY(0);
  }
}

@keyframes bossHit {
  0%,
  100% {
    transform: scale(1) rotate(0);
  }
  35% {
    transform: scale(1.08) rotate(-3deg);
  }
  70% {
    transform: scale(0.98) rotate(3deg);
  }
}
