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

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.animate-fade-in {
  animation: fadeIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.animate-scale-in {
  animation: scaleIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Prevent accidental iOS rubber-banding and touch gestures */
html, body {
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* Custom glowing pulse for special actions */
.pulse-glow {
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.6);
}

/* Canvas styling */
#gameCanvas {
  image-rendering: auto;
}

/* Stage Card Hover and Animation */
#stages-grid > div {
  animation: fadeIn 0.3s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
#stages-grid > div:nth-child(1) { animation-delay: 0.05s; }
#stages-grid > div:nth-child(2) { animation-delay: 0.1s; }
#stages-grid > div:nth-child(3) { animation-delay: 0.15s; }
#stages-grid > div:nth-child(4) { animation-delay: 0.2s; }
#stages-grid > div:nth-child(5) { animation-delay: 0.25s; }