/* ============================================
   NEXDRIVE — ANIMATIONS CSS
   ============================================ */

/* RGB border animation */
@keyframes rgb-border {
  0% { border-color: rgba(0, 245, 255, 0.6); box-shadow: 0 0 20px rgba(0, 245, 255, 0.3); }
  33% { border-color: rgba(155, 77, 255, 0.6); box-shadow: 0 0 20px rgba(155, 77, 255, 0.3); }
  66% { border-color: rgba(255, 45, 120, 0.6); box-shadow: 0 0 20px rgba(255, 45, 120, 0.3); }
  100% { border-color: rgba(0, 245, 255, 0.6); box-shadow: 0 0 20px rgba(0, 245, 255, 0.3); }
}

/* Neon text flicker */
@keyframes flicker {
  0%, 95%, 100% { opacity: 1; }
  96% { opacity: 0.8; }
  97% { opacity: 1; }
  98% { opacity: 0.6; }
  99% { opacity: 1; }
}

/* Slide in from bottom */
@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Fade in */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Scale in */
@keyframes scaleIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Neon glow pulse */
@keyframes neon-pulse {
  0%, 100% { text-shadow: 0 0 10px var(--cyan), 0 0 20px var(--cyan), 0 0 40px var(--cyan); }
  50% { text-shadow: 0 0 5px var(--cyan), 0 0 10px var(--cyan); }
}

/* Scan line sweep */
@keyframes scan {
  from { transform: translateY(-100%); }
  to { transform: translateY(100vh); }
}

/* RGB background sweep */
@keyframes rgb-sweep {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Entry animations for page elements */
.anim-slide-up {
  animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}
.anim-fade-in {
  animation: fadeIn 0.5s ease both;
}
.anim-scale-in {
  animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* Stagger children */
.stagger-children > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(7) { animation-delay: 0.35s; }
.stagger-children > *:nth-child(8) { animation-delay: 0.4s; }

/* Neon text effect */
.neon-text {
  color: var(--cyan);
  text-shadow: 0 0 10px var(--cyan), 0 0 20px var(--cyan);
  animation: flicker 8s infinite;
}

/* RGB border card effect */
.rgb-border {
  animation: rgb-border 3s linear infinite;
}

/* Typing cursor */
.typing-cursor::after {
  content: '|';
  animation: blink-cursor 1s step-end infinite;
  color: var(--cyan);
}
@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Holographic shimmer */
.holo-shimmer {
  background: linear-gradient(
    135deg,
    rgba(0,245,255,0.1) 0%,
    rgba(155,77,255,0.1) 25%,
    rgba(255,45,120,0.1) 50%,
    rgba(155,77,255,0.1) 75%,
    rgba(0,245,255,0.1) 100%
  );
  background-size: 400% 400%;
  animation: rgb-sweep 6s ease infinite;
}

/* Loading spinner */
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Progress bar animation */
.progress-bar-animated {
  background-image: linear-gradient(
    45deg,
    rgba(255,255,255,0.15) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255,255,255,0.15) 50%,
    rgba(255,255,255,0.15) 75%,
    transparent 75%,
    transparent
  );
  background-size: 40px 40px;
  animation: progress-stripes 1s linear infinite;
}
@keyframes progress-stripes {
  from { background-position: 40px 0; }
  to { background-position: 0 0; }
}

/* Notification bell animation */
@keyframes bell-ring {
  0%, 100% { transform: rotate(0); }
  10% { transform: rotate(15deg); }
  20% { transform: rotate(-12deg); }
  30% { transform: rotate(10deg); }
  40% { transform: rotate(-8deg); }
  50% { transform: rotate(6deg); }
  60% { transform: rotate(-4deg); }
  70% { transform: rotate(2deg); }
}
.bell-ring { animation: bell-ring 0.8s ease; }

/* Game card hover RGB */
.game-card:hover {
  --card-glow: var(--cyan);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .scanlines { display: none; }
  #particles-canvas { display: none; }
}
