/* Animation styles for Nova Giggles - Neumorphism & Glassmorphism Theme */

/* Smooth transitions for all elements */
* {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Chat notification animations */
@keyframes fadeInOut {
  0% { 
    opacity: 0;
    transform: translate(-50%, -20px);
  }
  20% { 
    opacity: 1;
    transform: translate(-50%, 0);
  }
  70% { 
    opacity: 1;
    transform: translate(-50%, 0);
  }
  100% { 
    opacity: 0;
    transform: translate(-50%, -20px);
  }
}

@keyframes slideInFromTop {
  0% {
    transform: translate(-50%, -30px);
    opacity: 0;
  }
  100% {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

.chat-notification {
  animation: slideInFromTop 0.4s ease-out forwards, fadeInOut 3s ease-in-out forwards;
}

/* Enhanced hover effects on cards */
.post-card {
  transform-origin: center bottom;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-card:hover .post-image img,
.post-card:hover .post-image video {
  transform: scale(1.05);
}

.post-image img,
.post-image video {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Neumorphic button press effect */
.btn:active, 
.submit-btn:active,
.nav-links a:active {
  transform: scale(0.98) translateY(1px);
  box-shadow: 
    2px 2px 4px rgba(0, 0, 0, 0.1),
    -2px -2px 4px rgba(255, 255, 255, 0.8),
    inset 4px 4px 8px rgba(0, 0, 0, 0.1),
    inset -4px -4px 8px rgba(255, 255, 255, 0.6);
}

/* Enhanced focus effects */
.submit-btn:focus, 
.btn:focus,
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  box-shadow: 
    0 0 0 3px rgba(102, 126, 234, 0.3),
    8px 8px 16px rgba(0, 0, 0, 0.15),
    -8px -8px 16px rgba(255, 255, 255, 0.9);
}

/* Enhanced pulsing glow for aura badges */
.aura-badge {
  animation: softPulse 3s infinite alternate;
}

@keyframes softPulse {
  0% {
    box-shadow: 
      4px 4px 8px rgba(0, 0, 0, 0.1),
      -4px -4px 8px rgba(255, 255, 255, 0.8),
      inset 2px 2px 4px rgba(255, 255, 255, 0.6),
      inset -2px -2px 4px rgba(0, 0, 0, 0.05),
      0 0 10px rgba(102, 126, 234, 0.3);
  }
  100% {
    box-shadow: 
      6px 6px 12px rgba(0, 0, 0, 0.15),
      -6px -6px 12px rgba(255, 255, 255, 0.9),
      inset 2px 2px 4px rgba(255, 255, 255, 0.7),
      inset -2px -2px 4px rgba(0, 0, 0, 0.05),
      0 0 20px rgba(102, 126, 234, 0.6);
  }
}

/* Page transition effect */
.container {
  animation: fadeIn 0.5s ease-in-out;
}

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

/* Enhanced custom scrollbar */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: rgba(26, 26, 46, 0.5);
  border-radius: 6px;
  margin: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(102, 126, 234, 0.6);
  border-radius: 6px;
  border: 2px solid rgba(26, 26, 46, 0.8);
  box-shadow: 
    2px 2px 4px rgba(0, 0, 0, 0.3),
    -2px -2px 4px rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(102, 126, 234, 0.8);
  box-shadow: 
    3px 3px 6px rgba(0, 0, 0, 0.4),
    -3px -3px 6px rgba(255, 255, 255, 0.08);
}

/* Floating effect for profile images */
.profile-avatar img {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

/* Glass blur effect when modal is open */
body.modal-open .container {
  filter: blur(5px);
}

/* Form input focus effects */
.form-group input:focus,
.form-group textarea:focus,
.comment-form textarea:focus {
  transform: scale(1.01);
}

/* Button press effect */
.btn:active, 
.submit-btn:active {
  transform: scale(0.97);
}

/* Dark mode optimized media focus */
.post-media img:hover,
.post-media video:hover {
  box-shadow: 0 0 30px rgba(79, 70, 229, 0.4);
}

/* Scroll-triggered blur effect */
header {
  transition: backdrop-filter 0.3s ease, -webkit-backdrop-filter 0.3s ease;
}

header.scrolled {
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  background: rgba(26, 26, 46, 0.95);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Progressive blur animation (reduced intensity for scroll effect) */
header::before {
  animation: progressiveBlur 8s ease-in-out infinite alternate;
}

@keyframes progressiveBlur {
  0% {
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    background: linear-gradient(
      to bottom,
      rgba(26, 26, 46, 0.3) 0%,
      rgba(26, 26, 46, 0.5) 30%,
      rgba(26, 26, 46, 0.7) 60%,
      rgba(26, 26, 46, 0.9) 100%
    );
  }
  100% {
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    background: linear-gradient(
      to bottom,
      rgba(26, 26, 46, 0.4) 0%,
      rgba(26, 26, 46, 0.6) 30%,
      rgba(26, 26, 46, 0.8) 60%,
      rgba(26, 26, 46, 1.0) 100%
    );
  }
}
