/* satellite-animations.css - Satellite movement, path traces, and visual effects */

/* Satellite movement animations */
@keyframes satellite-orbit {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes satellite-pulse {
  0%, 100% { 
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.8);
    transform: translate(-50%, -50%) scale(1);
  }
  50% { 
    box-shadow: 0 0 20px rgba(16, 185, 129, 1);
    transform: translate(-50%, -50%) scale(1.2);
  }
}

@keyframes iss-special {
  0%, 100% { 
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.8);
    background: var(--error-color);
  }
  25% { 
    box-shadow: 0 0 25px rgba(245, 158, 11, 1);
    background: var(--warning-color);
  }
  50% { 
    box-shadow: 0 0 30px rgba(239, 68, 68, 1);
    background: var(--error-color);
  }
  75% { 
    box-shadow: 0 0 25px rgba(245, 158, 11, 1);
    background: var(--warning-color);
  }
}

/* Enhanced satellite markers */
.satellite-marker {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.satellite-marker.moving {
  animation: satellite-pulse 3s ease-in-out infinite;
}

.satellite-marker.iss {
  animation: iss-special 4s ease-in-out infinite;
  z-index: 25;
}

.satellite-marker::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200%;
  height: 200%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.3) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: -1;
}

.satellite-marker:hover::before,
.satellite-marker.selected::before {
  opacity: 1;
  animation: ripple 2s ease-out infinite;
}

@keyframes ripple {
  0% {
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(2);
    opacity: 0;
  }
}

/* Satellite trails */
.satellite-trail {
  position: absolute;
  pointer-events: none;
  z-index: 5;
}

.trail-dot {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--secondary-color);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.6;
  animation: fade-trail 5s linear infinite;
}

@keyframes fade-trail {
  0% {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
  }
}

/* Path animations */
.prediction-path {
  stroke: var(--secondary-color);
  stroke-width: 2;
  fill: none;
  opacity: 0.4;
  stroke-dasharray: 8, 4;
  animation: path-flow 8s linear infinite;
}

.prediction-path.selected {
  stroke: var(--warning-color);
  stroke-width: 3;
  opacity: 0.7;
  animation: path-flow-selected 4s linear infinite;
}

@keyframes path-flow {
  0% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 48; }
}

@keyframes path-flow-selected {
  0% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 60; }
}

/* Compass animations */
.compass-ring {
  animation: compass-pulse 6s ease-in-out infinite;
}

@keyframes compass-pulse {
  0%, 100% { 
    border-color: rgba(37, 99, 235, 0.3);
  }
  50% { 
    border-color: rgba(37, 99, 235, 0.6);
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.3);
  }
}

/* Direction markers */
.direction-marker {
  animation: marker-glow 8s ease-in-out infinite;
}

.direction-marker.north { animation-delay: 0s; }
.direction-marker.east { animation-delay: 2s; }
.direction-marker.south { animation-delay: 4s; }
.direction-marker.west { animation-delay: 6s; }

@keyframes marker-glow {
  0%, 90%, 100% { 
    text-shadow: 0 0 10px rgba(37, 99, 235, 0.5);
    opacity: 0.8;
  }
  5% { 
    text-shadow: 0 0 20px rgba(37, 99, 235, 1);
    opacity: 1;
  }
}

/* Loading animations */
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-md);
}

.spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Smooth transitions */
.satellite-marker,
.trail-dot,
.prediction-path {
  will-change: transform, opacity;
}

/* Performance optimizations */
@media (prefers-reduced-motion: reduce) {
  .satellite-marker,
  .trail-dot,
  .prediction-path,
  .compass-ring,
  .direction-marker {
    animation: none !important;
    transition: none !important;
  }
  
  .satellite-marker::before {
    display: none;
  }
}
