/* ==========================================
   Millennium Dawn - Animations
   Keyframes, Transitions, Effects
   ========================================== */

@keyframes skeleton-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
  from { transform: translateX(-20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInRight {
  from { transform: translateX(20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 4px rgba(56, 189, 248, 0.3); }
  50% { box-shadow: 0 0 12px rgba(56, 189, 248, 0.6); }
}

@keyframes pulse-red {
  0%, 100% { box-shadow: 0 0 4px rgba(239, 68, 68, 0.3); }
  50% { box-shadow: 0 0 12px rgba(239, 68, 68, 0.6); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes countUp {
  from { opacity: 0.5; transform: scale(1.15); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes moveDash {
  to { stroke-dashoffset: -100; }
}

@keyframes notification-bell {
  0%, 100% { transform: rotate(0); }
  10% { transform: rotate(15deg); }
  20% { transform: rotate(-15deg); }
  30% { transform: rotate(10deg); }
  40% { transform: rotate(-10deg); }
  50% { transform: rotate(5deg); }
  60% { transform: rotate(0); }
}

@keyframes province-capture {
  0% { filter: brightness(2); }
  100% { filter: brightness(1); }
}

/* Utility animation classes */
.animate-fade-in { animation: fadeIn 0.3s ease-out forwards; }
.animate-fade-in-up { animation: fadeInUp 0.4s var(--transition-spring) forwards; }
.animate-slide-left { animation: slideInLeft 0.4s var(--transition-spring) forwards; }
.animate-slide-right { animation: slideInRight 0.4s var(--transition-spring) forwards; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }
.animate-pulse-glow { animation: pulse-glow 2s ease-in-out infinite; }
.animate-spin { animation: spin 1s linear infinite; }

/* Count-up number transition */
.counter-update {
  animation: countUp 0.3s ease-out;
}

/* Army movement line */
.army-move-line {
  stroke: var(--accent);
  stroke-dasharray: 8, 6;
  stroke-width: 2;
  stroke-linecap: round;
  animation: moveDash 1s linear infinite;
  opacity: 0.7;
  pointer-events: none;
}

/* Province hover glow (applied via JS to SVG paths) */
.province-hover {
  filter: drop-shadow(0 0 5px rgba(56, 189, 248, 0.6));
  transition: filter 0.15s ease;
}

/* Notification badge bounce */
.notification-badge {
  animation: notification-bell 0.8s ease-out forwards;
}

/* Panel transition helper */
.panel-transitioning {
  pointer-events: none;
}

/* Map overlay fade */
.map-overlay-fade {
  transition: opacity 0.3s ease;
}

/* Button press effect */
.btn-press {
  transform: scale(0.97) !important;
  transition: transform 0.1s ease !important;
}

/* Progress bar fill pulse */
.progress-bar .fill.pulse {
  animation: pulse 1.5s ease-in-out infinite;
}

/* Warning pulse for tension */
.tension-warning {
  animation: pulse-red 1.5s ease-in-out infinite;
}
