/* AI Video Editor - Custom Styles */

/* Custom scrollbar for better UX */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.5);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 85, 247, 0.8);
}

/* Enhanced glass morphism effects */
.backdrop-blur-lg {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* Custom gradient backgrounds */
.gradient-bg-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-bg-secondary {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* Animation keyframes */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.6);
  }
}

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

@keyframes slide-in-right {
  0% {
    opacity: 0;
    transform: translateX(50px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Platform button enhancements */
.platform-btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.platform-btn: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;
}

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

.platform-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Upload area enhancements */
.upload-area {
  transition: all 0.3s ease;
  position: relative;
}

.upload-area:hover {
  border-color: #a855f7;
  background-color: rgba(168, 85, 247, 0.05);
}

.upload-area.drag-over {
  border-color: #10b981;
  background-color: rgba(16, 185, 129, 0.1);
  transform: scale(1.02);
}

/* Results section animations */
.result-card {
  animation: float-up 0.6s ease-out;
}

.result-card:nth-child(2) {
  animation-delay: 0.1s;
}

.result-card:nth-child(3) {
  animation-delay: 0.2s;
}

/* Caption preview enhancements */
.caption-preview {
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Loading states */
.loading {
  position: relative;
  overflow: hidden;
}

.loading:after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Success states */
.success {
  border-color: #10b981 !important;
  background-color: rgba(16, 185, 129, 0.1) !important;
}

/* Error states */
.error {
  border-color: #ef4444 !important;
  background-color: rgba(239, 68, 68, 0.1) !important;
}

/* Notification styles */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 16px 24px;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  border-radius: 8px;
  border-left: 4px solid #10b981;
  z-index: 1000;
  animation: slide-in-right 0.3s ease-out;
  max-width: 400px;
  backdrop-filter: blur(10px);
}

.notification.error {
  border-left-color: #ef4444;
}

.notification.warning {
  border-left-color: #f59e0b;
}

/* Progress bar */
.progress-bar {
  width: 100%;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #8b5cf6, #a855f7, #c084fc);
  border-radius: 2px;
  transition: width 0.3s ease;
  position: relative;
}

.progress-fill:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background-image: linear-gradient(
    -45deg,
    rgba(255, 255, 255, .2) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, .2) 50%,
    rgba(255, 255, 255, .2) 75%,
    transparent 75%,
    transparent
  );
  background-size: 30px 30px;
  animation: progress-stripes 1s linear infinite;
}

@keyframes progress-stripes {
  0% { background-position: 0 0; }
  100% { background-position: 30px 0; }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .platform-btn {
    padding: 1rem;
  }
  
  .upload-area {
    padding: 2rem 1rem;
  }
  
  .notification {
    right: 10px;
    left: 10px;
    max-width: none;
  }
}

/* Focus states for accessibility */
button:focus,
input:focus {
  outline: 2px solid #a855f7;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .backdrop-blur-lg {
    background-color: rgba(0, 0, 0, 0.9);
  }
  
  .platform-btn {
    border: 2px solid currentColor;
  }
}

/* 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;
  }
}