/* Receipt Capture App - Futuristic Styles */

/* Custom Animations */
@keyframes glow {
  0% { 
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.5), 
                0 0 30px rgba(99, 102, 241, 0.3), 
                0 0 40px rgba(99, 102, 241, 0.1); 
  }
  50% { 
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.7), 
                0 0 40px rgba(139, 92, 246, 0.4), 
                0 0 50px rgba(139, 92, 246, 0.2); 
  }
  100% { 
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.5), 
                0 0 30px rgba(99, 102, 241, 0.3), 
                0 0 40px rgba(99, 102, 241, 0.1); 
  }
}

@keyframes pulse-recording {
  0%, 100% { 
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  50% { 
    transform: scale(1.1);
    box-shadow: 0 0 0 20px rgba(239, 68, 68, 0);
  }
}

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

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Base Styles */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* Glass Morphism */
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Neon Text Effect */
.neon-text {
  text-shadow: 
    0 0 5px currentColor,
    0 0 10px currentColor,
    0 0 15px currentColor,
    0 0 20px currentColor;
}

/* Button Enhancements */
button {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
  -webkit-tap-highlight-color: transparent;
}

button:active {
  transform: scale(0.95);
}

button:disabled {
  transform: none !important;
  cursor: not-allowed;
}

/* Recording Animation */
.recording {
  animation: pulse-recording 1.5s infinite;
}

/* Status Messages */
.status-success {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(22, 163, 74, 0.2));
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: rgb(134, 239, 172);
}

.status-error {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.2));
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: rgb(252, 165, 165);
}

.status-info {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.2));
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: rgb(147, 197, 253);
}

/* Animation Utilities */
.animate-slide-up {
  animation: slideUp 0.3s ease-out;
}

.animate-fade-in {
  animation: fadeIn 0.3s ease-out;
}

/* Mobile Optimizations */
@media (max-width: 480px) {
  .glass {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  
  button {
    font-size: 1.1rem;
    padding: 1.25rem 1.5rem;
  }
}

/* High DPI Display Optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .neon-text {
    text-shadow: 
      0 0 2px currentColor,
      0 0 4px currentColor,
      0 0 6px currentColor,
      0 0 8px currentColor;
  }
}

/* Dark Mode Enhancements */
@media (prefers-color-scheme: dark) {
  .glass {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus Styles for Keyboard Navigation */
button:focus-visible {
  outline: 2px solid rgba(99, 102, 241, 0.8);
  outline-offset: 2px;
}

textarea:focus,
input:focus {
  outline: none;
  ring: 2px;
  ring-color: rgba(99, 102, 241, 0.8);
}

/* PWA Specific Styles */
@media (display-mode: standalone) {
  body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
}