/* ========================================
   ARCADIAN - WOW Effects & Animations
   Modern UI/UX Effects 2025-2026
   ======================================== */

/* ========================================
   1. GLASSMORPHISM EFFECTS
   Effet verre dépoli moderne
   ======================================== */

.glass {
  background: rgba(15, 15, 26, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.glass-card {
  background: rgba(15, 15, 26, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: transform 0.3s ease-out, box-shadow 0.3s ease-out, background 0.3s ease-out, border-color 0.3s ease-out;
  will-change: transform;
}

.glass-card:hover {
  background: rgba(15, 15, 26, 0.8);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-8px);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Glass with neon glow */
.glass-pink {
  background: rgba(255, 45, 117, 0.08);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 45, 117, 0.2);
  box-shadow:
    0 8px 32px rgba(255, 45, 117, 0.15),
    inset 0 1px 0 rgba(255, 45, 117, 0.1);
}

.glass-cyan {
  background: rgba(0, 245, 255, 0.08);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 245, 255, 0.2);
  box-shadow:
    0 8px 32px rgba(0, 245, 255, 0.15),
    inset 0 1px 0 rgba(0, 245, 255, 0.1);
}

.glass-green {
  background: rgba(57, 255, 20, 0.08);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(57, 255, 20, 0.2);
  box-shadow:
    0 8px 32px rgba(57, 255, 20, 0.15),
    inset 0 1px 0 rgba(57, 255, 20, 0.1);
}

/* ========================================
   2. MICRO-ANIMATIONS & HOVER EFFECTS
   Animations subtiles et réactives
   ======================================== */

/* Button pulse effect */
.btn-pulse {
  position: relative;
  overflow: hidden;
}

.btn-pulse::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease-out, height 0.3s ease-out;
}

.btn-pulse:hover::before {
  width: 150px;
  height: 150px;
}

/* Glow pulse animation */
@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(255, 45, 117, 0.4);
  }
  50% {
    box-shadow: 0 0 40px rgba(255, 45, 117, 0.8), 0 0 60px rgba(255, 45, 117, 0.4);
  }
}

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

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

@keyframes glowPulseCyan {
  0%, 100% {
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.4);
  }
  50% {
    box-shadow: 0 0 40px rgba(0, 245, 255, 0.8), 0 0 60px rgba(0, 245, 255, 0.4);
  }
}

/* Shine sweep effect */
.shine-effect {
  position: relative;
  overflow: hidden;
}

.shine-effect::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 100%
  );
  transform: rotate(30deg) translateX(-100%);
  transition: transform 0.8s;
}

.shine-effect:hover::after {
  transform: rotate(30deg) translateX(100%);
}

/* Magnetic hover effect (JS enhanced) */
.magnetic {
  transition: transform 0.2s ease-out;
  will-change: transform;
  backface-visibility: hidden;
}

/* Icon bounce on hover */
.icon-bounce:hover svg,
.icon-bounce:hover i {
  animation: iconBounce 0.5s ease;
}

@keyframes iconBounce {
  0%, 100% { transform: translateY(0); }
  25% { transform: translateY(-6px); }
  50% { transform: translateY(0); }
  75% { transform: translateY(-3px); }
}

/* Text reveal animation */
.text-reveal {
  overflow: hidden;
}

.text-reveal span {
  display: inline-block;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.6s;
}

.text-reveal.revealed span {
  transform: translateY(0);
  opacity: 1;
}

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

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

.float-delayed {
  animation: float 3s ease-in-out infinite;
  animation-delay: 0.5s;
}

/* ========================================
   3. SCROLL-TRIGGERED ANIMATIONS
   Animations déclenchées au scroll
   ======================================== */

/* Fade in up */
.scroll-fade-in {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Fade in from left */
.scroll-fade-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-fade-left.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Fade in from right */
.scroll-fade-right {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-fade-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Scale in */
.scroll-scale {
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.scroll-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* Staggered children animation */
.stagger-children > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.6s; }

.stagger-children.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* Counter animation placeholder */
.counter {
  font-variant-numeric: tabular-nums;
}

/* ========================================
   4. ANIMATED GRADIENTS
   Dégradés animés style arcade
   ======================================== */

/* Aurora gradient background */
@keyframes auroraShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.aurora-bg {
  background: linear-gradient(
    -45deg,
    rgba(255, 45, 117, 0.3),
    rgba(0, 245, 255, 0.3),
    rgba(57, 255, 20, 0.3),
    rgba(191, 90, 242, 0.3),
    rgba(255, 45, 117, 0.3)
  );
  background-size: 400% 400%;
  animation: auroraShift 15s ease infinite;
}

/* Neon gradient text animation */
@keyframes neonGradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.animated-gradient-text {
  background: linear-gradient(
    90deg,
    var(--pink),
    var(--cyan),
    var(--green),
    var(--pink)
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: neonGradientShift 4s ease infinite;
}

/* Border gradient animation */
@keyframes borderGradient {
  0%, 100% {
    border-color: rgba(255, 45, 117, 0.5);
    box-shadow: 0 0 20px rgba(255, 45, 117, 0.3);
  }
  33% {
    border-color: rgba(0, 245, 255, 0.5);
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.3);
  }
  66% {
    border-color: rgba(57, 255, 20, 0.5);
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.3);
  }
}

.animated-border {
  animation: borderGradient 6s ease infinite;
}

/* Mesh gradient (static but beautiful) */
.mesh-gradient {
  background:
    radial-gradient(at 40% 20%, rgba(255, 45, 117, 0.3) 0px, transparent 50%),
    radial-gradient(at 80% 0%, rgba(0, 245, 255, 0.2) 0px, transparent 50%),
    radial-gradient(at 0% 50%, rgba(57, 255, 20, 0.2) 0px, transparent 50%),
    radial-gradient(at 80% 50%, rgba(191, 90, 242, 0.2) 0px, transparent 50%),
    radial-gradient(at 0% 100%, rgba(255, 45, 117, 0.2) 0px, transparent 50%),
    radial-gradient(at 80% 100%, rgba(0, 245, 255, 0.2) 0px, transparent 50%),
    var(--bg-dark);
}

/* ========================================
   5. 3D TILT CARD EFFECT
   Effet de profondeur sur les cartes
   ======================================== */

.tilt-card {
  transform-style: preserve-3d;
  perspective: 1000px;
  transition: transform 0.1s ease-out;
}

.tilt-card-inner {
  transform: translateZ(0);
  transition: transform 0.3s ease-out;
}

.tilt-card:hover .tilt-card-inner {
  transform: translateZ(30px);
}

/* Tilt card shine effect */
.tilt-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.05) 45%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.05) 55%,
    transparent 60%
  );
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

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

/* ========================================
   6. CURSOR EFFECTS
   Effets de curseur personnalisé
   ======================================== */

/* Custom cursor (applied via JS) */
.custom-cursor {
  position: fixed;
  width: 20px;
  height: 20px;
  border: 2px solid var(--pink);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.15s ease-out, border-color 0.3s, width 0.3s, height 0.3s;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
}

.custom-cursor.hover {
  width: 50px;
  height: 50px;
  border-color: var(--cyan);
  background: rgba(0, 245, 255, 0.1);
}

/* Cursor trail dot */
.cursor-dot {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--pink);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
}

/* Spotlight effect following cursor */
.spotlight {
  position: fixed;
  width: 300px;
  height: 300px;
  background: radial-gradient(
    circle,
    rgba(255, 45, 117, 0.15) 0%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
}

/* ========================================
   7. PARTICLE CANVAS STYLES
   Styles pour le canvas de particules
   ======================================== */

#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

/* ========================================
   8. SPECIAL BUTTON EFFECTS
   Boutons avec effets spéciaux
   ======================================== */

/* Neon border button */
.btn-neon {
  position: relative;
  background: transparent;
  border: 2px solid var(--pink);
  color: var(--pink);
  overflow: hidden;
  transition: all 0.4s;
}

.btn-neon::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 45, 117, 0.4), transparent);
  transition: left 0.5s;
}

.btn-neon:hover::before {
  left: 100%;
}

.btn-neon:hover {
  box-shadow: 0 0 20px rgba(255, 45, 117, 0.5), 0 0 40px rgba(255, 45, 117, 0.3);
  text-shadow: 0 0 10px rgba(255, 45, 117, 0.8);
}

/* Glitch effect button */
.btn-glitch {
  position: relative;
}

.btn-glitch:hover {
  animation: glitch 0.3s linear;
}

@keyframes glitch {
  0% { transform: translate(0); }
  20% { transform: translate(-2px, 2px); }
  40% { transform: translate(-2px, -2px); }
  60% { transform: translate(2px, 2px); }
  80% { transform: translate(2px, -2px); }
  100% { transform: translate(0); }
}

/* Ripple effect */
.btn-ripple {
  position: relative;
  overflow: hidden;
}

/* Global ripple style - applique a tous les boutons via JS */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: scale(0);
  animation: rippleEffect 0.6s linear;
  pointer-events: none;
}

@keyframes rippleEffect {
  to {
    transform: scale(2);
    opacity: 0;
  }
}

/* ========================================
   9. CARD HOVER EFFECTS
   Effets de survol pour les cartes
   ======================================== */

/* Lift and glow */
.card-lift {
  transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
  will-change: transform;
}

.card-lift:hover {
  transform: translateY(-8px);
  box-shadow:
    0 16px 32px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(255, 45, 117, 0.15);
}

/* Border reveal */
.card-border-reveal {
  position: relative;
}

.card-border-reveal::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(135deg, var(--pink), var(--cyan), var(--green));
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s;
}

.card-border-reveal:hover::before {
  opacity: 1;
}

/* Image zoom on card hover */
.card-zoom-img {
  overflow: hidden;
}

.card-zoom-img img {
  transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-zoom-img:hover img {
  transform: scale(1.1);
}

/* ========================================
   10. LOADING ANIMATIONS
   Animations de chargement
   ======================================== */

/* Neon spinner */
.spinner-neon {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 45, 117, 0.2);
  border-top-color: var(--pink);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Dots loading */
.loading-dots {
  display: flex;
  gap: 8px;
}

.loading-dots span {
  width: 10px;
  height: 10px;
  background: var(--cyan);
  border-radius: 50%;
  animation: dotPulse 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotPulse {
  0%, 80%, 100% {
    transform: scale(0.6);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ========================================
   11. TEXT EFFECTS
   Effets de texte spéciaux
   ======================================== */

/* Typewriter effect placeholder */
.typewriter {
  overflow: hidden;
  border-right: 2px solid var(--pink);
  white-space: nowrap;
  animation: typing 3s steps(30) 1s forwards, blinkCaret 0.75s step-end infinite;
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blinkCaret {
  from, to { border-color: transparent; }
  50% { border-color: var(--pink); }
}

/* Glowing text */
.text-glow {
  animation: textGlow 2s ease-in-out infinite alternate;
}

@keyframes textGlow {
  from {
    text-shadow:
      0 0 10px currentColor,
      0 0 20px currentColor;
  }
  to {
    text-shadow:
      0 0 20px currentColor,
      0 0 40px currentColor,
      0 0 60px currentColor;
  }
}

/* ========================================
   12. ACCESSIBILITY - Reduced Motion
   Respect des préférences utilisateur
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .scroll-fade-in,
  .scroll-fade-left,
  .scroll-fade-right,
  .scroll-scale {
    opacity: 1;
    transform: none;
  }

  .stagger-children > * {
    opacity: 1;
    transform: none;
  }

  #particles-canvas {
    display: none;
  }
}

/* ========================================
   13. INTEGRATION WITH EXISTING STYLES
   Styles spécifiques pour l'intégration
   ======================================== */

/* Hero stats with glass effect */
.hero-stat.glass-card {
  padding: 16px 24px;
  min-width: 100px;
}

/* Game cards enhancement */
.game-card.glass-card {
  background: rgba(15, 15, 26, 0.85);
}

.game-card.glass-card:hover {
  background: rgba(15, 15, 26, 0.95);
}

/* Mode cards enhancement */
.mode-card.glass-card {
  background: rgba(15, 15, 26, 0.7);
}

/* Pricing cards enhancement */
.pricing-card.glass-card {
  background: rgba(15, 15, 26, 0.8);
}

/* Feature cards enhancement */
.feature-card.glass-card {
  background: rgba(15, 15, 26, 0.6);
}

/* Step cards enhancement */
.step-card.glass-card {
  backdrop-filter: blur(10px);
}

/* FAQ items enhancement */
.faq-item.glass-card {
  background: rgba(15, 15, 26, 0.5);
  margin-bottom: 12px;
}

/* Code example enhancement */
.code-example.glass-card {
  padding: 24px 48px;
  display: inline-block;
}

/* Section badges with glass */
.section-badge.glass,
.section-badge.glass-cyan,
.section-badge.glass-pink,
.section-badge.glass-green {
  backdrop-filter: blur(10px);
}

/* Hero badge glass */
.hero-badge.glass {
  backdrop-filter: blur(10px);
}

/* Credits badge enhancement */
.hero-credits-badge.glass-green {
  padding: 12px 24px;
  border-radius: 50px;
}

/* ========================================
   14. PERFORMANCE OPTIMIZATIONS
   Optimisations GPU
   ======================================== */

.gpu-accelerated {
  transform: translateZ(0);
  will-change: transform;
  backface-visibility: hidden;
}

/* Disable effects on mobile for performance */
@media (max-width: 768px) {
  .custom-cursor,
  .cursor-dot,
  .spotlight {
    display: none !important;
  }

  #particles-canvas {
    opacity: 0.3;
  }

  .tilt-card {
    transform: none !important;
  }
}
