/* Custom animations and styles */

@keyframes scaleIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

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

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1);
  }
}

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

.result-animation {
  animation: scaleIn 0.3s ease-out;
}

.notification-animation {
  animation: slideInUp 0.3s ease-out;
}

/* Input focus effects */
input:focus {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Suggestion dropdown animation */
.suggestions-dropdown {
  animation: fadeInDown 0.2s ease-out;
}

/* Smooth transitions for all interactive elements */
button {
  transition: all 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
}

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

/* Custom scrollbar for suggestions */
.suggestions-dropdown::-webkit-scrollbar {
  width: 4px;
}

.suggestions-dropdown::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 2px;
}

.suggestions-dropdown::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 2px;
}

.suggestions-dropdown::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Pulse animation for successful parse */
.success-pulse {
  animation: pulse 0.6s ease-in-out;
}

/* Typewriter effect for placeholder (handled in JS) */
.typewriter {
  border-right: 2px solid #4299E1;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 50% {
    border-color: #4299E1;
  }
  51%, 100% {
    border-color: transparent;
  }
}

/* Enhanced focus states */
.focus-ring:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .text-5xl {
    font-size: 2.5rem;
  }
  
  input {
    font-size: 16px; /* Prevent zoom on iOS */
  }
}

/* Custom styling for monospace font */
.font-mono {
  font-feature-settings: "liga" 0;
  letter-spacing: -0.025em;
}

/* Subtle background pattern */
body {
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.3) 1px, transparent 0);
  background-size: 20px 20px;
}

/* Enhanced shadows */
.shadow-lg {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1), 0 1px 8px rgba(0, 0, 0, 0.06);
}

/* Improved hover effects */
.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

/* Confidence indicator styling */
.confidence-high {
  background: linear-gradient(135deg, #48BB78, #38A169);
}

.confidence-medium {
  background: linear-gradient(135deg, #ED8936, #DD6B20);
}

.confidence-low {
  background: linear-gradient(135deg, #F56565, #E53E3E);
}