/* ImagineArt Playground Custom Styles */

/* Smooth transitions */
* {
  transition: all 0.2s ease-in-out;
}

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

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

/* Loading animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Animation classes */
.fade-in {
  animation: fadeIn 0.5s ease-out;
}

.slide-in {
  animation: slideIn 0.3s ease-out;
}

.pulse {
  animation: pulse 2s infinite;
}

/* Custom button styles */
.btn-primary {
  @apply bg-blue-500 hover:bg-blue-600 text-white font-semibold py-2 px-4 rounded-lg transition-colors;
}

.btn-secondary {
  @apply bg-gray-200 hover:bg-gray-300 text-gray-800 font-semibold py-2 px-4 rounded-lg transition-colors;
}

.btn-danger {
  @apply bg-red-500 hover:bg-red-600 text-white font-semibold py-2 px-4 rounded-lg transition-colors;
}

/* Form styles */
.form-input {
  @apply w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent;
}

.form-textarea {
  @apply w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent resize-vertical;
}

.form-select {
  @apply w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent;
}

/* Card styles */
.card {
  @apply bg-white rounded-lg shadow-md p-6;
}

.card-header {
  @apply border-b border-gray-200 pb-4 mb-4;
}

.card-title {
  @apply text-lg font-semibold text-gray-800;
}

/* Image gallery styles */
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.image-card {
  @apply bg-white rounded-lg shadow-md overflow-hidden hover:shadow-lg;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.image-card:hover {
  transform: translateY(-2px);
}

.image-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.image-card-content {
  @apply p-4;
}

/* Status badges */
.status-badge {
  @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium;
}

.status-pending {
  @apply bg-yellow-100 text-yellow-800;
}

.status-processing {
  @apply bg-blue-100 text-blue-800;
}

.status-completed {
  @apply bg-green-100 text-green-800;
}

.status-failed {
  @apply bg-red-100 text-red-800;
}

.status-cancelled {
  @apply bg-gray-100 text-gray-800;
}

/* Modal styles */
.modal-overlay {
  backdrop-filter: blur(4px);
}

.modal-content {
  max-height: 90vh;
  overflow-y: auto;
}

/* Notification styles */
.notification {
  @apply fixed top-4 right-4 p-4 rounded-lg shadow-lg z-50 max-w-sm;
  animation: slideIn 0.3s ease-out;
}

.notification-success {
  @apply bg-green-500 text-white;
}

.notification-error {
  @apply bg-red-500 text-white;
}

.notification-info {
  @apply bg-blue-500 text-white;
}

.notification-warning {
  @apply bg-yellow-500 text-white;
}

/* Loading spinner */
.spinner {
  @apply animate-spin rounded-full border-b-2;
}

/* Responsive design helpers */
@media (max-width: 640px) {
  .mobile-full {
    @apply w-full;
  }
  
  .mobile-hidden {
    @apply hidden;
  }
  
  .mobile-text-sm {
    @apply text-sm;
  }
}

/* Dark mode support (future enhancement) */
@media (prefers-color-scheme: dark) {
  .dark-mode {
    @apply bg-gray-900 text-white;
  }
  
  .dark-mode .card {
    @apply bg-gray-800 text-white;
  }
  
  .dark-mode .form-input,
  .dark-mode .form-textarea,
  .dark-mode .form-select {
    @apply bg-gray-700 border-gray-600 text-white;
  }
}

/* Custom focus styles for accessibility */
.focus-visible:focus {
  @apply outline-none ring-2 ring-blue-500 ring-offset-2;
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  .print-full-width {
    width: 100% !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .high-contrast {
    @apply border-2 border-black;
  }
  
  .high-contrast .btn-primary {
    @apply bg-black text-white border-2 border-black;
  }
}

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

/* Custom aspect ratio utilities */
.aspect-square {
  aspect-ratio: 1 / 1;
}

.aspect-landscape {
  aspect-ratio: 16 / 9;
}

.aspect-portrait {
  aspect-ratio: 9 / 16;
}

/* Image hover effects */
.image-hover-zoom {
  overflow: hidden;
}

.image-hover-zoom img {
  transition: transform 0.3s ease-in-out;
}

.image-hover-zoom:hover img {
  transform: scale(1.05);
}

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

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

.gradient-success {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* Text selection */
::selection {
  @apply bg-blue-200 text-blue-900;
}

/* Custom checkbox and radio styles */
.custom-checkbox,
.custom-radio {
  @apply appearance-none w-4 h-4 border border-gray-300 rounded focus:ring-2 focus:ring-blue-500;
}

.custom-checkbox:checked,
.custom-radio:checked {
  @apply bg-blue-500 border-blue-500;
}

.custom-radio {
  @apply rounded-full;
}

/* Loading placeholder */
.skeleton {
  @apply bg-gray-200 animate-pulse rounded;
}

.skeleton-text {
  @apply h-4 bg-gray-200 animate-pulse rounded mb-2;
}

.skeleton-avatar {
  @apply w-10 h-10 bg-gray-200 animate-pulse rounded-full;
}

/* Tooltip styles (for future enhancement) */
.tooltip {
  @apply relative;
}

.tooltip:hover::after {
  content: attr(data-tooltip);
  @apply absolute bottom-full left-1/2 transform -translate-x-1/2 bg-black text-white text-xs rounded py-1 px-2 mb-1 z-50;
}

/* Error states */
.error-border {
  @apply border-red-500 ring-red-500;
}

.error-text {
  @apply text-red-600 text-sm mt-1;
}