/* 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 {
    transition: all 0.2s ease-in-out;
}

/* Focus styles for accessibility */
input:focus, button: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 toast notification animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Toast animations */
.fixed.top-4.right-4 {
    animation: slideInRight 0.3s ease-out;
}

/* Responsive font sizing */
@media (max-width: 640px) {
    .text-4xl {
        font-size: 2.25rem;
        line-height: 2.5rem;
    }
    
    .text-6xl {
        font-size: 3rem;
        line-height: 1;
    }
    
    .grid-cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* 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;
}

/* Enhanced address display in search history */
.font-mono.text-blue-300 {
    word-break: break-all;
    line-height: 1.2;
}

/* Status indicator colors for search results */
.text-rhea-orange {
    color: #f59e0b;
}

.text-rhea-yellow {
    color: #eab308;
}

/* Enhanced badge styling */
.bg-rhea-green {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

/* Loading state improvements */
button:disabled {
    position: relative;
    overflow: hidden;
}

button:disabled::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Enhanced grid responsiveness */
@media (max-width: 768px) {
    .grid.grid-cols-2.md\:grid-cols-4 {
        gap: 1rem;
    }
}

/* Improved truncated address styling */
.min-w-0 {
    min-width: 0;
}

/* Enhanced focus states for better accessibility */
.rounded-lg:focus-within {
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
}

/* Better contrast for small text */
.text-xs.text-blue-400 {
    opacity: 0.9;
}

/* Improved button hover states */
.bg-blue-500\/20:hover {
    background-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
}

/* Enhanced card borders */
.border-white\/20 {
    border-color: rgba(255, 255, 255, 0.2);
}

.border-white\/10 {
    border-color: rgba(255, 255, 255, 0.1);
}