/* MoreThanTools v1 - Custom Styles */

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

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

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

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

/* Smooth transitions */
* {
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, 
             transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

/* Hover effects for cards */
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Loading animation */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* QR Code preview container */
.qr-preview {
  background-image: 
    radial-gradient(circle, #e5e7eb 1px, transparent 1px);
  background-size: 20px 20px;
}

/* Custom button styles */
.btn-primary {
  @apply bg-indigo-600 hover:bg-indigo-700 text-white font-semibold px-6 py-3 rounded-md transition-all duration-200 transform hover:scale-105 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2;
}

.btn-secondary {
  @apply bg-gray-600 hover:bg-gray-700 text-white font-semibold px-6 py-3 rounded-md transition-all duration-200 transform hover:scale-105 focus:outline-none focus:ring-2 focus:ring-gray-500 focus:ring-offset-2;
}

.btn-success {
  @apply bg-green-600 hover:bg-green-700 text-white font-semibold px-6 py-3 rounded-md transition-all duration-200 transform hover:scale-105 focus:outline-none focus:ring-2 focus:ring-green-500 focus:ring-offset-2;
}

.btn-danger {
  @apply bg-red-600 hover:bg-red-700 text-white font-semibold px-6 py-3 rounded-md transition-all duration-200 transform hover:scale-105 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2;
}

/* Form elements */
.form-input {
  @apply w-full px-4 py-3 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent transition-all duration-200;
}

.form-label {
  @apply block text-sm font-medium text-gray-700 mb-2;
}

/* Plan badges */
.plan-free {
  @apply inline-flex items-center px-3 py-1 rounded-full text-xs font-medium bg-green-100 text-green-800;
}

.plan-professional {
  @apply inline-flex items-center px-3 py-1 rounded-full text-xs font-medium bg-yellow-100 text-yellow-800;
}

/* Stats cards */
.stat-card {
  @apply bg-white rounded-lg shadow-md p-6 transition-all duration-200 hover:shadow-lg;
}

/* Navigation improvements */
.nav-link {
  @apply text-gray-600 hover:text-indigo-600 px-3 py-2 rounded-md text-sm font-medium transition-colors duration-200;
}

.nav-link.active {
  @apply text-indigo-600 bg-indigo-50;
}

/* Modal improvements */
.modal-overlay {
  @apply fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50;
  backdrop-filter: blur(4px);
}

.modal-content {
  @apply bg-white rounded-lg shadow-xl max-w-md w-full mx-4 transform transition-all duration-300;
}

/* Table styles */
.table {
  @apply w-full divide-y divide-gray-200;
}

.table thead {
  @apply bg-gray-50;
}

.table th {
  @apply px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider;
}

.table td {
  @apply px-6 py-4 whitespace-nowrap text-sm text-gray-900;
}

.table tbody tr:hover {
  @apply bg-gray-50;
}

/* QR code grid */
.qr-grid {
  @apply grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6;
}

.qr-card {
  @apply bg-white rounded-lg shadow-md overflow-hidden transition-all duration-200 hover:shadow-lg hover:-translate-y-1;
}

.qr-card-image {
  @apply w-full h-48 object-cover bg-gray-100;
}

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

.qr-card-title {
  @apply text-lg font-semibold text-gray-900 mb-2 truncate;
}

.qr-card-meta {
  @apply text-sm text-gray-500 space-y-1;
}

/* Analytics charts */
.chart-container {
  @apply bg-white rounded-lg shadow-md p-6;
}

.chart-title {
  @apply text-lg font-semibold text-gray-900 mb-4 flex items-center;
}

/* Responsive improvements */
@media (max-width: 640px) {
  .container-mobile {
    @apply px-4;
  }
  
  .grid-mobile {
    @apply grid-cols-1;
  }
  
  .text-mobile {
    @apply text-sm;
  }
}

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

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

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

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

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

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

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

/* Success states */
.success-checkmark {
  @apply w-6 h-6 text-green-500;
}

/* Error states */
.error-icon {
  @apply w-6 h-6 text-red-500;
}

/* Premium features highlight */
.premium-feature {
  @apply border-2 border-yellow-200 bg-yellow-50 rounded-lg p-4;
}

.premium-badge {
  @apply inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-yellow-100 text-yellow-800;
}

/* Notification styles */
.notification {
  @apply fixed top-4 right-4 max-w-sm w-full z-50;
}

.notification-success {
  @apply bg-green-500 text-white p-4 rounded-lg shadow-lg;
}

.notification-error {
  @apply bg-red-500 text-white p-4 rounded-lg shadow-lg;
}

.notification-info {
  @apply bg-blue-500 text-white p-4 rounded-lg shadow-lg;
}

.notification-warning {
  @apply bg-yellow-500 text-white p-4 rounded-lg shadow-lg;
}

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

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  .qr-code-print {
    @apply max-w-full h-auto;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .high-contrast {
    @apply 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;
  }
}