/* Custom animations and overrides for Astromania Hugo theme */

/* Keyframe animations */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(147, 51, 234, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(147, 51, 234, 0.6);
  }
}

@keyframes marquee {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(-100%);
  }
}

@keyframes tilt {
  0%,
  100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(1deg);
  }
  75% {
    transform: rotate(-1deg);
  }
}

@keyframes particle-float {
  0% {
    transform: translateY(0px) translateX(0px);
    opacity: 0.7;
  }
  33% {
    transform: translateY(-20px) translateX(10px);
    opacity: 1;
  }
  66% {
    transform: translateY(-10px) translateX(-5px);
    opacity: 0.8;
  }
  100% {
    transform: translateY(0px) translateX(0px);
    opacity: 0.7;
  }
}

@keyframes spin-slow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Animation classes */
.float-animation {
  animation: float 3s ease-in-out infinite;
}

.pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

.marquee {
  animation: marquee 20s linear infinite;
}

.tilt-animation {
  animation: tilt 4s ease-in-out infinite;
}

.particle-animation {
  animation: particle-float 6s ease-in-out infinite;
}

.spin-slow {
  animation: spin-slow 20s linear infinite;
}

/* Space theme particles */
.space-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.space-particles::before,
.space-particles::after {
  content: "";
  position: absolute;
  width: 3px;
  height: 3px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow:
    20px 30px #ffffff,
    40px 70px #ffffff,
    90px 40px #ffffff,
    130px 80px #ffffff,
    160px 30px #ffffff,
    200px 90px #ffffff,
    240px 50px #ffffff,
    280px 120px #ffffff,
    320px 80px #ffffff,
    360px 40px #ffffff;
  animation: particle-float 8s ease-in-out infinite;
}

.space-particles::after {
  animation-delay: -4s;
  transform: translateX(50px);
}

/* Alien glow effects */
.alien-glow {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #1e1b4b 100%);
  position: relative;
}

.alien-glow::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #8b5cf6, #06b6d4, #8b5cf6);
  border-radius: inherit;
  z-index: -1;
  opacity: 0.7;
  filter: blur(8px);
}

/* Cosmic background patterns */
.cosmic-bg {
  background: radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%),
    linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
}

/* Neon text effects */
.neon-text {
  text-shadow: 0 0 5px currentColor, 0 0 10px currentColor, 0 0 15px currentColor, 0 0 20px #8b5cf6;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #1a1a2e;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(45deg, #8b5cf6, #06b6d4);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(45deg, #7c3aed, #0891b2);
}

/* Prose styling for content blocks */
.prose-custom {
  line-height: 1.6;
  color: #e2e8f0;
}

.prose-custom h3 {
  color: #8b5cf6;
  margin-bottom: 1rem;
}

.prose-custom p {
  margin-bottom: 1rem;
}

.prose-custom ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.prose-custom li {
  margin-bottom: 0.5rem;
}

/* Responsive utilities */
@media (max-width: 1024px) {
  .space-particles::before,
  .space-particles::after {
    box-shadow: 20px 30px #ffffff, 60px 70px #ffffff, 100px 40px #ffffff, 140px 80px #ffffff;
  }
}

/* Focus states for accessibility */
.focus-visible:focus {
  outline: 2px solid #8b5cf6;
  outline-offset: 2px;
}

/* Smooth transitions */
* {
  transition: all 0.3s ease;
}

/* Island bottom menu */
.bottom-island {
  background: rgba(30, 27, 75, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(139, 92, 246, 0.3);
}

/* Bonus badge styling */
.bonus-badge {
  background: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
  position: relative;
  overflow: hidden;
}

.bonus-badge::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: rotate(45deg);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}
