/* ===== ADVANCED ANIMATIONS & TRANSITIONS ===== */

/* Mode transition effects */
.mode-transition * {
  transition: color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              background-color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              border-color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

/* Parallax scrolling effect for hero section */
.hero-section {
  transform-style: preserve-3d;
}

.hero-background {
  transform: translateZ(-1px) scale(1.5);
}

.hero-content {
  transform: translateZ(0);
}

/* Advanced dragon animation */
@keyframes dragonEyeGlow {
  0%, 100% { 
    box-shadow: 0 0 10px var(--yamata-pink);
  }
  50% { 
    box-shadow: 0 0 20px var(--yamata-pink), 0 0 30px var(--yamata-pink);
  }
}

.dragon-head:before {
  content: '';
  position: absolute;
  top: 20%;
  left: 70%;
  width: 4px;
  height: 4px;
  background: #fff;
  border-radius: 50%;
  animation: dragonEyeGlow 3s ease-in-out infinite;
}

.dragon-head:after {
  content: '';
  position: absolute;
  top: 20%;
  right: 70%;
  width: 4px;
  height: 4px;
  background: #fff;
  border-radius: 50%;
  animation: dragonEyeGlow 3s ease-in-out infinite 0.5s;
}

/* Enhanced utility block animations */
.utility-block {
  position: relative;
  overflow: hidden;
}

.utility-block:before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 23, 68, 0.1), transparent);
  transform: rotate(45deg);
  transition: var(--transition-primary);
  opacity: 0;
}

.utility-block:hover:before {
  opacity: 1;
  animation: shimmer 1.5s ease-in-out;
}

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

/* NFT card hover effects */
.nft-card {
  position: relative;
  overflow: hidden;
}

.nft-card:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 23, 68, 0.1) 0%, transparent 50%, rgba(255, 23, 68, 0.1) 100%);
  opacity: 0;
  transition: var(--transition-primary);
  pointer-events: none;
}

.nft-card:hover:before {
  opacity: 1;
}

/* Enhanced timeline animations */
.timeline-item {
  position: relative;
}

.timeline-item:before {
  content: '';
  position: absolute;
  left: -40px;
  top: 30px;
  width: 100px;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--yamata-pink) 50%, transparent 100%);
  opacity: 0;
  animation: timelinePulse 2s ease-in-out infinite;
}

@keyframes timelinePulse {
  0%, 100% { opacity: 0; transform: scaleX(0.5); }
  50% { opacity: 1; transform: scaleX(1); }
}

/* Loading animations for content */
@keyframes contentLoad {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

.content-loaded {
  animation: contentLoad 0.6s ease-out;
}

/* Button press animations */
.hero-cta-btn:active {
  transform: translateY(-1px) scale(0.98);
}

.rewards-btn:active {
  transform: translateY(-1px) scale(0.98);
}

/* FAQ accordion smooth animations */
.faq-answer {
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.active .faq-answer {
  max-height: 300px; /* Increased for longer content */
}

/* Scroll-triggered animations */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.in-view {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-left.in-view {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-right.in-view {
  opacity: 1;
  transform: translateX(0);
}

/* Staggered animation delays */
.utility-block:nth-child(1) { animation-delay: 0.1s; }
.utility-block:nth-child(2) { animation-delay: 0.2s; }
.utility-block:nth-child(3) { animation-delay: 0.3s; }
.utility-block:nth-child(4) { animation-delay: 0.4s; }
.utility-block:nth-child(5) { animation-delay: 0.5s; }

.nft-card:nth-child(1) { animation-delay: 0.1s; }
.nft-card:nth-child(2) { animation-delay: 0.2s; }
.nft-card:nth-child(3) { animation-delay: 0.3s; }

.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-item:nth-child(4) { animation-delay: 0.4s; }

/* Mode-specific animations */
.lore-mode .dragon-hero-img {
  filter: hue-rotate(0deg) brightness(1) saturate(1.1);
  transition: filter 0.6s ease;
}

.no-lore-mode .dragon-hero-img {
  filter: hue-rotate(180deg) brightness(1.1) saturate(1.2);
  transition: filter 0.6s ease;
}

.lore-mode .particle {
  background: var(--yamata-pink);
  box-shadow: 0 0 10px var(--yamata-pink);
}

.no-lore-mode .particle {
  background: #00d4ff;
  box-shadow: 0 0 10px #00d4ff;
}

/* Enhanced glow effects */
.glow-text {
  text-shadow: 0 0 20px currentColor;
  animation: textGlow 3s ease-in-out infinite alternate;
}

@keyframes textGlow {
  0% { text-shadow: 0 0 20px currentColor; }
  100% { text-shadow: 0 0 30px currentColor, 0 0 40px currentColor; }
}

/* Particle effect for hero section */
.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--yamata-pink);
  border-radius: 50%;
  pointer-events: none;
  animation: particleFloat 10s linear infinite;
}

@keyframes particleFloat {
  0% {
    opacity: 0;
    transform: translateY(100vh) translateX(0) scale(0);
  }
  10% {
    opacity: 1;
    transform: translateY(90vh) translateX(10px) scale(1);
  }
  90% {
    opacity: 1;
    transform: translateY(10vh) translateX(-10px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(0vh) translateX(0) scale(0);
  }
}

/* Performance optimizations */
.gpu-accelerated {
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .dragon-animation,
  .energy-wisps,
  .wisp {
    animation: none !important;
  }
}