/* G2Own Advanced Animations - Futuristic Effects */

/* ===== KEYFRAME ANIMATIONS ===== */

/* Glow Effect Animation */
@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(139, 0, 0, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(139, 0, 0, 0.8), 0 0 30px rgba(139, 0, 0, 0.6);
  }
}

/* Pulse Glow Animation */
@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(139, 0, 0, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(139, 0, 0, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(139, 0, 0, 0);
  }
}

/* Floating Animation */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Slide In Animations */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scale Animations */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes scaleInBounce {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Rotation Animations */
@keyframes rotateIn {
  from {
    opacity: 0;
    transform: rotate(-180deg) scale(0.5);
  }
  to {
    opacity: 1;
    transform: rotate(0) scale(1);
  }
}

/* Shimmer Effect */
@keyframes shimmer {
  0% {
    background-position: -468px 0;
  }
  100% {
    background-position: 468px 0;
  }
}

/* Particle Float */
@keyframes particleFloat {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  33% {
    transform: translateY(-10px) rotate(120deg);
  }
  66% {
    transform: translateY(5px) rotate(240deg);
  }
}

/* Neon Border Animation */
@keyframes neonBorder {
  0%, 100% {
    border-color: rgba(139, 0, 0, 0.3);
    box-shadow: 0 0 5px rgba(139, 0, 0, 0.2);
  }
  50% {
    border-color: rgba(139, 0, 0, 0.8);
    box-shadow: 0 0 20px rgba(139, 0, 0, 0.6), inset 0 0 20px rgba(139, 0, 0, 0.1);
  }
}

/* Text Glow Animation */
@keyframes textGlow {
  0%, 100% {
    text-shadow: 0 0 5px rgba(139, 0, 0, 0.5);
  }
  50% {
    text-shadow: 0 0 20px rgba(139, 0, 0, 0.8), 0 0 30px rgba(139, 0, 0, 0.6);
  }
}

/* Title Glow Animation */
@keyframes titleGlow {
  0% {
    text-shadow: 0 0 10px rgba(139, 0, 0, 0.5);
  }
  100% {
    text-shadow: 
      0 0 20px rgba(139, 0, 0, 0.8),
      0 0 30px rgba(139, 0, 0, 0.6),
      0 0 40px rgba(139, 0, 0, 0.4);
  }
}

/* Bounce Animation */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* Enhanced Float Animation */
@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  25% {
    transform: translateY(-5px) rotate(1deg);
  }
  50% {
    transform: translateY(-10px) rotate(0deg);
  }
  75% {
    transform: translateY(-5px) rotate(-1deg);
  }
}

/* Fade In Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== ANIMATION CLASSES ===== */

/* Glow Effects */
.glow {
  animation: glow 2s ease-in-out infinite alternate;
}

.pulse-glow {
  animation: pulseGlow 2s infinite;
}

.text-glow {
  animation: textGlow 3s ease-in-out infinite;
}

/* Floating Elements */
.float {
  animation: float 3s ease-in-out infinite;
}

.float-delayed {
  animation: float 3s ease-in-out infinite;
  animation-delay: 1s;
}

/* Slide Animations */
.slide-in-left {
  animation: slideInLeft 0.8s ease-out forwards;
}

.slide-in-right {
  animation: slideInRight 0.8s ease-out forwards;
}

.slide-in-up {
  animation: slideInUp 0.8s ease-out forwards;
}

.slide-in-down {
  animation: slideInDown 0.8s ease-out forwards;
}

/* Scale Animations */
.scale-in {
  animation: scaleIn 0.6s ease-out forwards;
}

.scale-in-bounce {
  animation: scaleInBounce 0.8s ease-out forwards;
}

/* Rotation Animations */
.rotate-in {
  animation: rotateIn 0.8s ease-out forwards;
}

/* Particle Effects */
.particle-float {
  animation: particleFloat 4s ease-in-out infinite;
}

/* Border Effects */
.neon-border {
  animation: neonBorder 2s ease-in-out infinite;
}

/* Hero and UI Animations */
.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-bounce {
  animation: bounce 2s infinite;
}

.animate-glow {
  animation: glow 2s ease-in-out infinite;
}

.animate-pulse-glow {
  animation: pulseGlow 2s infinite;
}

.animate-fade-in {
  animation: fadeIn 0.6s ease-out;
}

.animate-scale-in {
  animation: scaleIn 0.4s ease-out;
}

.animate-slide-in-left {
  animation: slideInLeft 0.6s ease-out;
}

.animate-slide-in-right {
  animation: slideInRight 0.6s ease-out;
}

/* ===== HOVER ANIMATIONS ===== */

/* Magnetic Effect */
.magnetic {
  transition: transform 0.3s ease;
  cursor: pointer;
}

.magnetic:hover {
  transform: translateY(-5px);
}

/* Glow on Hover */
.hover-glow {
  transition: all 0.3s ease;
}

.hover-glow:hover {
  box-shadow: 0 0 20px rgba(139, 0, 0, 0.6);
  transform: translateY(-2px);
}

/* Scale on Hover */
.hover-scale {
  transition: transform 0.3s ease;
}

.hover-scale:hover {
  transform: scale(1.05);
}

/* Rotate on Hover */
.hover-rotate {
  transition: transform 0.3s ease;
}

.hover-rotate:hover {
  transform: rotate(5deg);
}

/* Shimmer Effect */
.shimmer {
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

/* ===== ADVANCED CARD ANIMATIONS ===== */

/* Card Flip */
.card-flip {
  perspective: 1000px;
}

.card-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.card-flip:hover .card-flip-inner {
  transform: rotateY(180deg);
}

.card-flip-front,
.card-flip-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: var(--border-radius-lg);
}

.card-flip-back {
  transform: rotateY(180deg);
}

/* Card Slide */
.card-slide {
  overflow: hidden;
  position: relative;
}

.card-slide::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(139, 0, 0, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.card-slide:hover::before {
  left: 100%;
}

/* ===== LOADING ANIMATIONS ===== */

/* Spinner */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.spinner {
  animation: spin 1s linear infinite;
}

/* Pulse */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Loading Dots */
@keyframes loadingDots {
  0%, 80%, 100% {
    opacity: 0.3;
    transform: scale(0.8);
  }
  40% {
    opacity: 1;
    transform: scale(1);
  }
}

.loading-dots {
  display: inline-block;
}

.loading-dots::after {
  content: '...';
  animation: loadingDots 1.4s ease-in-out infinite;
}

/* ===== SCROLL ANIMATIONS ===== */

/* Fade in on scroll */
.fade-in-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.fade-in-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Slide in on scroll */
.slide-in-scroll {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.8s ease;
}

.slide-in-scroll.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Scale in on scroll */
.scale-in-scroll {
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.6s ease;
}

.scale-in-scroll.visible {
  opacity: 1;
  transform: scale(1);
}

/* ===== PARTICLE SYSTEM ANIMATIONS ===== */

.particle {
  position: absolute;
  pointer-events: none;
  opacity: 0.6;
}

.particle-1 {
  animation: particleFloat 6s ease-in-out infinite;
}

.particle-2 {
  animation: particleFloat 8s ease-in-out infinite reverse;
}

.particle-3 {
  animation: particleFloat 10s ease-in-out infinite;
  animation-delay: -2s;
}

/* ===== STAGGER ANIMATIONS ===== */

.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }

/* ===== RESPONSIVE ANIMATIONS ===== */

@media (max-width: 768px) {
  /* Reduce animation intensity on mobile */
  .hover-scale:hover {
    transform: scale(1.02);
  }
  
  .magnetic:hover {
    transform: translateY(-2px);
  }
  
  /* Disable heavy animations on mobile for performance */
  .particle-float,
  .float,
  .float-delayed {
    animation: none;
  }
}

/* ===== ACCESSIBILITY ===== */

@media (prefers-reduced-motion: reduce) {
  /* Disable all animations for users who prefer reduced motion */
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .hover-scale:hover,
  .hover-rotate:hover,
  .magnetic:hover {
    transform: none;
  }
}
