/* Custom styles for enhanced visual effects */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

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

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.6);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.8);
}

/* Animation for loading state */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Custom gradient text */
.bg-clip-text {
    -webkit-background-clip: text;
    background-clip: text;
}

/* Smooth transitions for interactive elements */
button, input, textarea {
    transition: all 0.2s ease-in-out;
}

/* Focus styles for accessibility */
input:focus, button:focus, textarea:focus {
    outline: 2px solid rgba(16, 185, 129, 0.5);
    outline-offset: 2px;
}

/* Custom backdrop blur for better browser support */
.backdrop-blur-sm {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Hover effects for cards */
.bg-white\/10:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.bg-white\/5:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Loading button animation */
button:disabled .animate-spin {
    display: inline-block;
    margin-right: 0.5rem;
}

/* Enhanced copy button feedback */
button[onclick*="copyToClipboard"]:active {
    transform: scale(0.95);
}

/* JSON syntax highlighting enhancement */
pre {
    line-height: 1.4;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Custom selection color */
::selection {
    background-color: rgba(99, 102, 241, 0.3);
    color: white;
}

::-moz-selection {
    background-color: rgba(99, 102, 241, 0.3);
    color: white;
}

/* Progress bar animation */
@keyframes progress-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.animate-progress {
    animation: progress-pulse 2s ease-in-out infinite;
}

/* Address type badges */
.address-badge {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Batch result animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.batch-result-item {
    animation: slideIn 0.3s ease-out;
}

/* Enhanced error display */
.error-container {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.05) 100%);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Success display enhancements */
.success-container {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.05) 100%);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .text-3xl {
        font-size: 1.875rem;
        line-height: 2.25rem;
    }
    
    .text-5xl {
        font-size: 2.25rem;
        line-height: 2.5rem;
    }

    .grid-cols-5 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Enhanced accessibility */
@media (prefers-reduced-motion: reduce) {
    .animate-spin,
    .animate-progress,
    .batch-result-item {
        animation: none;
    }
    
    button, input, textarea {
        transition: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bg-white\/10 {
        background-color: rgba(255, 255, 255, 0.2);
        border: 2px solid rgba(255, 255, 255, 0.4);
    }
    
    .text-blue-200,
    .text-blue-300 {
        color: #bfdbfe;
    }
}

/* Print styles */
@media print {
    .bg-gradient-to-br {
        background: white !important;
        color: black !important;
    }
    
    button {
        display: none !important;
    }
}