/**
 * ReactBits Theme Integration for Arkham Horror LCG
 * Enhances animations with theme-specific styling
 */

/* Enhanced Glow Effects for Dark Theme */
[data-glow] {
  position: relative;
  overflow: visible;
}

[data-glow]:before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, transparent, rgba(106, 183, 255, 0.1), transparent);
  border-radius: inherit;
  opacity: 0;
  transition: opacity 300ms ease-in-out;
  z-index: -1;
}

[data-glow]:hover:before {
  opacity: 1;
}

/* Enhanced Bounce Effects */
[data-bounce] {
  transform-origin: center center;
  will-change: transform;
}

/* Smooth Fade In Enhancements */
[data-fadein] {
  will-change: opacity, transform;
}

/* Card-specific animations */
.card {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              filter 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
  transform: scale(1.02) translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  filter: brightness(1.05);
}

/* Filter chip animations */
.filtersBar .chip {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

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

.filtersBar .chip:hover::before {
  left: 100%;
}

.filtersBar .chip:active {
  transform: scale(0.95);
}

/* Navigation enhancements */
.nav-item {
  position: relative;
  overflow: hidden;
}

.nav-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(106, 183, 255, 0.1), transparent);
  transition: left 0.6s ease-in-out;
}

.nav-item:hover::after {
  left: 100%;
}

/* Sidebar logo animation */
.sidebar-logo img {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              filter 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-logo:hover img {
  transform: scale(1.05) rotate(5deg);
  filter: drop-shadow(0 4px 20px rgba(106, 183, 255, 0.3));
}

/* Loading spinner enhancements */
.spinner {
  animation: spin 1s linear infinite, pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

/* Stagger animation for filter groups */
.filterGroup {
  animation: slideInUp 0.6s ease-out;
}

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

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Card grid stagger animation */
.card {
  animation: fadeInScale 0.6s ease-out;
}

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

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Reset button special animation */
.reset-btn {
  position: relative;
  overflow: hidden;
}

.reset-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, rgba(255, 59, 48, 0.3) 0%, transparent 70%);
  transition: all 0.3s ease-out;
  transform: translate(-50%, -50%);
}

.reset-btn:active::before {
  width: 200px;
  height: 200px;
}

/* Responsive animations */
@media (max-width: 768px) {
  .card:hover {
    transform: scale(1.01) translateY(-2px);
  }
  
  [data-bounce] {
    animation-duration: 0.4s;
  }
  
  .filterGroup {
    animation-duration: 0.4s;
  }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  [data-bounce],
  [data-pulse],
  [data-fadein],
  [data-slide] {
    animation: none !important;
    transition: none !important;
  }
}




