/* Custom styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Glassmorphism effect */
.glassmorphism {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

.dark .glassmorphism {
    background: rgba(31, 41, 55, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(55, 65, 81, 0.4);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Enhanced glowing border animation */
.glow-border:focus {
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.4);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.4);
    }
    to {
        box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.8), 0 0 20px rgba(168, 85, 247, 0.3);
    }
}

/* Floating animation for background elements */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-20px) rotate(1deg);
    }
    66% {
        transform: translateY(-10px) rotate(-1deg);
    }
}

/* Sparkle button animation */
.sparkle-button:hover {
    animation: sparkle 0.6s ease-in-out;
}

@keyframes sparkle {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.7);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(168, 85, 247, 0);
    }
}

/* Enhanced pulse animation */
@keyframes pulse-glow {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.4);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.02);
        box-shadow: 0 0 0 10px rgba(168, 85, 247, 0);
    }
}

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

/* Custom scrollbar with gradient */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #6366f1, #ec4899, #8b5cf6);
    border-radius: 5px;
    border: 1px solid #e2e8f0;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #4f46e5, #db2777, #7c3aed);
}

.dark ::-webkit-scrollbar-track {
    background: #374151;
}

.dark ::-webkit-scrollbar-thumb {
    border-color: #4b5563;
}

/* Enhanced loading animations */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.dark .skeleton {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200% 100%;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Hover effects for interactive elements */
.image-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-hover:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #6366f1, #ec4899, #8b5cf6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Enhanced button hover effects */
.btn-hover {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-hover:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-hover:hover:before {
    left: 100%;
}

/* Modal animations */
.modal-enter {
    animation: modalEnter 0.3s ease-out;
}

@keyframes modalEnter {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Audio waveform visualization placeholder */
.audio-waveform {
    background: linear-gradient(90deg, 
        rgba(249, 115, 22, 0.3), 
        rgba(239, 68, 68, 0.3), 
        rgba(249, 115, 22, 0.3)
    );
    background-size: 200% 100%;
    animation: waveform 2s ease-in-out infinite;
}

@keyframes waveform {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Tab transition effects */
.tab-content {
    animation: tabSlide 0.3s ease-in-out;
}

@keyframes tabSlide {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Enhanced responsive utilities */
@media (max-width: 768px) {
    .glassmorphism {
        backdrop-filter: blur(10px);
    }
    
    .grid-masonry {
        columns: 2;
        column-gap: 1rem;
    }
}

@media (max-width: 640px) {
    .grid-masonry {
        columns: 1;
    }
}

/* Custom focus styles */
.focus-ring:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.5);
    border-color: #a855f7;
}

/* Smooth transitions for theme switching */
* {
    transition: background-color 0.3s ease, 
                border-color 0.3s ease, 
                color 0.3s ease,
                box-shadow 0.3s ease;
}

/* Feed item animations */
.feed-item {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading states for different content types */
.loading-image {
    background: linear-gradient(135deg, #f3e8ff, #e0e7ff);
    position: relative;
    overflow: hidden;
}

.loading-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.8), 
        transparent
    );
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Status indicators */
.status-online {
    box-shadow: 0 0 0 2px #10b981, 0 0 10px rgba(16, 185, 129, 0.3);
}

.status-offline {
    box-shadow: 0 0 0 2px #ef4444, 0 0 10px rgba(239, 68, 68, 0.3);
}

.status-degraded {
    box-shadow: 0 0 0 2px #f59e0b, 0 0 10px rgba(245, 158, 11, 0.3);
}

/* Enhanced card hover effects */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.dark .card-hover:hover {
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* Creative workflow indicators */
.workflow-step {
    position: relative;
}

.workflow-step::after {
    content: '';
    position: absolute;
    right: -1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid currentColor;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

/* Audio player enhancements */
.audio-controls {
    background: linear-gradient(135deg, 
        rgba(249, 115, 22, 0.1), 
        rgba(239, 68, 68, 0.1)
    );
}

/* Multi-modal content type indicators */
.content-type-image {
    border-left: 4px solid #8b5cf6;
}

.content-type-text {
    border-left: 4px solid #10b981;
}

.content-type-audio {
    border-left: 4px solid #f59e0b;
}