/* Enhanced animations and visual effects */

@keyframes float {
  0%, 100% { 
    transform: translateY(0px) rotate(0deg); 
  }
  50% { 
    transform: translateY(-20px) rotate(2deg); 
  }
}

@keyframes pulse-glow {
  0%, 100% { 
    box-shadow: 0 0 20px rgba(107, 70, 193, 0.3);
    transform: scale(1);
  }
  50% { 
    box-shadow: 0 0 40px rgba(107, 70, 193, 0.6), 0 0 60px rgba(59, 130, 246, 0.4);
    transform: scale(1.05);
  }
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3) translateY(20px);
  }
  50% {
    opacity: 1;
    transform: scale(1.1) translateY(-10px);
  }
  70% {
    transform: scale(0.9) translateY(5px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes slideUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

@keyframes reactionFloat {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  50% {
    opacity: 0.8;
    transform: translateY(-50px) scale(1.2);
  }
  100% {
    opacity: 0;
    transform: translateY(-100px) scale(0.8);
  }
}

/* Enhanced utility classes */
.float-animation {
  animation: float 6s ease-in-out infinite;
}

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

.animate-bounce-in {
  animation: bounceIn 0.6s ease-out;
}

.animate-slide-up {
  animation: slideUp 0.4s ease-out;
}

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

.animate-pulse-glow {
  animation: pulse-glow 3s ease-in-out infinite;
}

.shimmer-effect {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Reaction floating animation */
.reaction-float {
  animation: reactionFloat 3s ease-out forwards;
  pointer-events: none;
  z-index: 1000;
}

/* Custom scrollbars for better visual consistency */
.chat-scrollbar::-webkit-scrollbar {
  width: 6px;
}

.chat-scrollbar::-webkit-scrollbar-track {
  background: rgba(107, 70, 193, 0.1);
  border-radius: 3px;
}

.chat-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(107, 70, 193, 0.5);
  border-radius: 3px;
  transition: background 0.3s ease;
}

.chat-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(107, 70, 193, 0.8);
}

/* Enhanced glassmorphism effects */
.backdrop-blur-xl {
  backdrop-filter: blur(20px);
}

/* Interactive hover effects for theater cards */
.group:hover .group-hover\:scale-110 {
  transform: scale(1.1);
}

/* Enhanced form controls */
input[type="checkbox"] {
  appearance: none;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(107, 70, 193, 0.5);
  border-radius: 0.25rem;
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
}

input[type="checkbox"]:checked {
  background: linear-gradient(135deg, #6B46C1, #3B82F6);
  border-color: #6B46C1;
}

input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 0.75rem;
  font-weight: bold;
}

/* Enhanced button interactions */
button:hover:not(:disabled) {
  transform: translateY(-2px);
}

button:active:not(:disabled) {
  transform: translateY(0);
}

/* Social indicator animations */
.online-indicator {
  animation: pulse-glow 2s ease-in-out infinite;
}

/* Theater ambiance lighting effects */
.theater-ambient-light {
  box-shadow: 
    inset 0 0 50px rgba(107, 70, 193, 0.1),
    0 0 100px rgba(107, 70, 193, 0.05);
}

/* Enhanced focus states for accessibility */
input:focus,
select:focus,
textarea:focus,
button:focus {
  outline: 2px solid rgba(107, 70, 193, 0.5);
  outline-offset: 2px;
}

/* Loading state improvements */
.loading-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  color: white;
  font-size: 1.5rem;
  background: linear-gradient(135deg, #1F2937 0%, #7C3AED 50%, #111827 100%);
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .line-clamp-2 {
    -webkit-line-clamp: 1;
  }
  
  .float-animation,
  .animate-float {
    animation-duration: 4s;
  }
  
  /* Improve mobile touch targets */
  button {
    min-height: 44px;
    min-width: 44px;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .bg-opacity-40 {
    background-opacity: 0.8;
  }
  
  .border-primary\/20 {
    border-color: rgba(107, 70, 193, 0.6);
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .animate-bounce-in,
  .animate-slide-up,
  .float-animation,
  .animate-float,
  .pulse-glow,
  .animate-pulse-glow,
  .reaction-float {
    animation: none;
  }
  
  button:hover {
    transform: none;
  }
  
  * {
    transition: none !important;
  }
}

/* Dark mode enhancements */
@media (prefers-color-scheme: dark) {
  .backdrop-blur-lg {
    backdrop-filter: blur(20px) brightness(0.8);
  }
}

/* Ensure proper text color inheritance */
input, select, textarea {
  color: inherit;
}

/* Fix for broken image fallbacks */
img {
  max-width: 100%;
  height: auto;
}