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

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

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

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

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

/* Enhanced sparkle button animation */
.sparkle-button:hover {
    animation: sparkle 0.6s ease-in-out;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.5);
}

@keyframes sparkle {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Floating animation for header icon */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Typing animation for text mode */
@keyframes typing {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.7; }
}

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

/* Wave animation for audio mode */
@keyframes wave {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(1.2); }
}

.animate-wave {
    animation: wave 1.5s ease-in-out infinite;
}

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #6366f1, #ec4899);
    border-radius: 4px;
}

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

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

.dark ::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #7c3aed, #f472b6);
}

/* Enhanced loading animations */
@keyframes pulse-glow {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02);
        box-shadow: 0 0 30px rgba(168, 85, 247, 0.6);
    }
}

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

/* Enhanced image hover effects */
.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);
}

/* Enhanced gradient text */
.gradient-text {
    background: linear-gradient(135deg, #6366f1, #ec4899, #06b6d4);
    background-size: 400% 400%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 3s ease-in-out infinite;
}

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

/* Enhanced button hover effects with shimmer */
.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.2), transparent);
    transition: left 0.5s;
}

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

/* Enhanced modal animations */
.modal-enter {
    animation: modalEnter 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

/* Mode-specific accent colors */
.mode-images {
    --accent-from: #6366f1;
    --accent-to: #ec4899;
}

.mode-text {
    --accent-from: #2563eb;
    --accent-to: #0d9488;
}

.mode-audio {
    --accent-from: #059669;
    --accent-to: #eab308;
}

/* Enhanced tab hover effects */
.tab-hover {
    transition: all 0.3s ease;
}

.tab-hover:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

/* Content type icons with animations */
.content-icon {
    display: inline-block;
    transition: transform 0.2s ease;
}

.content-icon:hover {
    transform: scale(1.2) rotate(5deg);
}

/* Enhanced responsive utilities */
@media (max-width: 768px) {
    .glassmorphism {
        backdrop-filter: blur(10px);
    }
    
    .grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }
    
    .animate-float {
        animation-duration: 4s;
    }
}

@media (max-width: 640px) {
    .glassmorphism {
        backdrop-filter: blur(5px);
        margin: 0 -1rem;
        border-radius: 0;
    }
}

/* Enhanced loading skeleton with shimmer */
.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;
    }
}

/* Live feed indicator */
@keyframes live-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.live-indicator {
    animation: live-pulse 2s ease-in-out infinite;
}

/* Enhanced audio waveform visualization placeholder */
.audio-wave {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px;
}

.audio-wave::before {
    content: '';
    width: 100px;
    height: 40px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(34, 197, 94, 0.4) 25%,
        rgba(34, 197, 94, 0.8) 50%,
        rgba(34, 197, 94, 0.4) 75%,
        transparent 100%
    );
    border-radius: 20px;
    animation: wave-pulse 2s ease-in-out infinite;
}

@keyframes wave-pulse {
    0%, 100% { transform: scaleX(1); opacity: 0.5; }
    50% { transform: scaleX(1.2); opacity: 1; }
}

/* Smooth transitions for all interactive elements */
button, input, select, textarea, .glassmorphism {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus states for accessibility */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .glassmorphism {
        background: rgba(255, 255, 255, 0.95);
        border: 2px solid #000;
    }
    
    .dark .glassmorphism {
        background: rgba(0, 0, 0, 0.95);
        border: 2px solid #fff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .animate-float,
    .animate-pulse,
    .animate-spin,
    .animate-bounce,
    .sparkle-button,
    .gradient-text,
    .live-indicator,
    .audio-wave::before {
        animation: none;
    }
    
    .modal-enter {
        animation: none;
    }
    
    * {
        transition-duration: 0.1s !important;
    }
}

/* Print styles */
@media print {
    .glassmorphism {
        background: white;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    button {
        display: none;
    }
}