/* Custom styles for AI-enhanced UX */

.ai-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #e5e7eb;
    border-top: 3px solid #6366f1;
    border-radius: 50%;
    animation: ai-spin 1s linear infinite;
}

@keyframes ai-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Pulsing AI indicator */
.ai-pulse {
    animation: ai-pulse 2s infinite;
}

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

/* AI progress bar */
.ai-progress {
    background: linear-gradient(90deg, #6366f1, #10b981);
    height: 4px;
    border-radius: 2px;
    animation: ai-progress 3s ease-in-out infinite;
}

@keyframes ai-progress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* Custom scrollbar for AI output */
pre::-webkit-scrollbar {
    width: 8px;
}

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

pre::-webkit-scrollbar-thumb {
    background: #6366f1;
    border-radius: 4px;
}

pre::-webkit-scrollbar-thumb:hover {
    background: #4f46e5;
}

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

/* Enhanced focus states for AI inputs */
input:focus, select:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    border-color: #6366f1;
}

/* AI card hover effects */
.bg-white {
    transition: all 0.2s ease-in-out;
}

.bg-white:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

/* AI model badges */
.model-badge {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* AI insight cards */
.ai-insight-card {
    border-left: 4px solid #6366f1;
    background: linear-gradient(to right, rgba(99, 102, 241, 0.05), transparent);
}

/* Real-time indicator */
.real-time-indicator {
    position: relative;
}

.real-time-indicator::before {
    content: '';
    position: absolute;
    top: 0;
    left: -8px;
    width: 4px;
    height: 100%;
    background: #10b981;
    border-radius: 2px;
    animation: ai-pulse 1.5s infinite;
}

/* Research progress styles */
.research-progress {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    background: #fafafa;
}

.research-item {
    padding: 0.5rem;
    margin: 0.25rem 0;
    border-radius: 4px;
    font-size: 0.875rem;
    border-left: 3px solid transparent;
}

.research-item.system {
    background: #eff6ff;
    border-left-color: #3b82f6;
    color: #1e40af;
}

.research-item.ai-model {
    background: #f0f9ff;
    border-left-color: #6366f1;
    color: #4f46e5;
}

.research-item.success {
    background: #f0fdf4;
    border-left-color: #10b981;
    color: #059669;
}

.research-item.error {
    background: #fef2f2;
    border-left-color: #ef4444;
    color: #dc2626;
}

/* Responsive design for AI elements */
@media (max-width: 640px) {
    .text-3xl {
        font-size: 1.875rem;
        line-height: 2.25rem;
    }
    
    .text-2xl {
        font-size: 1.5rem;
        line-height: 2rem;
    }
    
    .ai-spinner {
        width: 16px;
        height: 16px;
        border-width: 2px;
    }
}

/* AI verification badges */
.verification-badge {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Animated AI typing effect */
.ai-typing {
    position: relative;
}

.ai-typing::after {
    content: '|';
    animation: ai-blink 1s infinite;
    color: #6366f1;
}

@keyframes ai-blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Citation styling */
.ai-citation {
    font-style: italic;
    color: #6b7280;
    font-size: 0.875rem;
    border-left: 3px solid #6366f1;
    padding-left: 1rem;
    margin-top: 1rem;
}