/* Enhanced retro-futuristic styling with FFmpeg integration */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&display=swap');

body {
    font-family: 'Orbitron', monospace;
    overflow-x: hidden;
}

.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

.glass-card:hover {
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.5);
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

/* Enhanced animated background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 60% 60%, rgba(255, 0, 110, 0.2) 0%, transparent 50%);
    animation: float 25s ease-in-out infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg) scale(1); }
    33% { transform: translateY(-30px) rotate(120deg) scale(1.1); }
    66% { transform: translateY(-15px) rotate(240deg) scale(0.9); }
}

/* Enhanced button animations with cassette tape effects */
button {
    position: relative;
    overflow: hidden;
}

button::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;
}

button:hover::before {
    left: 100%;
}

button:active {
    transform: scale(0.98);
}

/* Enhanced VHS-style glitch effects */
.glitch {
    text-shadow: 
        0.05em 0 0 rgba(255, 0, 0, 0.75),
        -0.025em -0.05em 0 rgba(0, 255, 0, 0.75),
        0.025em 0.05em 0 rgba(0, 0, 255, 0.75);
    animation: glitch 500ms infinite;
}

@keyframes glitch {
    0% { 
        text-shadow: 0.05em 0 0 rgba(255, 0, 0, 0.75), -0.025em -0.05em 0 rgba(0, 255, 0, 0.75), 0.025em 0.05em 0 rgba(0, 0, 255, 0.75); 
    }
    15% { 
        text-shadow: 0.05em 0 0 rgba(255, 0, 0, 0.75), -0.025em -0.05em 0 rgba(0, 255, 0, 0.75), 0.025em 0.05em 0 rgba(0, 0, 255, 0.75); 
    }
    16% { 
        text-shadow: -0.05em -0.025em 0 rgba(255, 0, 0, 0.75), 0.025em 0.025em 0 rgba(0, 255, 0, 0.75), -0.05em -0.05em 0 rgba(0, 0, 255, 0.75); 
    }
    49% { 
        text-shadow: -0.05em -0.025em 0 rgba(255, 0, 0, 0.75), 0.025em 0.025em 0 rgba(0, 255, 0, 0.75), -0.05em -0.05em 0 rgba(0, 0, 255, 0.75); 
    }
    50% { 
        text-shadow: 0.025em 0.05em 0 rgba(255, 0, 0, 0.75), 0.05em 0 0 rgba(0, 255, 0, 0.75), 0 -0.05em 0 rgba(0, 0, 255, 0.75); 
    }
    99% { 
        text-shadow: 0.025em 0.05em 0 rgba(255, 0, 0, 0.75), 0.05em 0 0 rgba(0, 255, 0, 0.75), 0 -0.05em 0 rgba(0, 0, 255, 0.75); 
    }
    100% { 
        text-shadow: -0.025em 0 0 rgba(255, 0, 0, 0.75), -0.025em -0.025em 0 rgba(0, 255, 0, 0.75), -0.025em -0.05em 0 rgba(0, 0, 255, 0.75); 
    }
}

/* Enhanced neon glow effects */
.neon-glow {
    box-shadow: 
        0 0 5px theme('colors.pink.500'),
        0 0 10px theme('colors.pink.500'),
        0 0 15px theme('colors.pink.500'),
        0 0 20px theme('colors.pink.500'),
        inset 0 0 5px rgba(255, 0, 110, 0.1);
}

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #ff006e, #8338ec);
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #ff1085, #9d4edd);
    box-shadow: 0 0 10px rgba(255, 0, 110, 0.5);
}

/* Enhanced cassette tape animations */
@keyframes tape-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.tape-spinning {
    animation: tape-spin 2s linear infinite;
}

@keyframes cassette-insert {
    0% { transform: translateY(-20px) scale(0.8); opacity: 0; }
    50% { transform: translateY(-5px) scale(1.1); opacity: 0.7; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

.cassette-inserting {
    animation: cassette-insert 0.5s ease-out;
}

/* Enhanced drag and drop effects */
.drag-active-background {
    background: rgba(236, 72, 153, 0.1);
    border-color: rgb(236, 72, 153);
    box-shadow: 
        inset 0 0 20px rgba(236, 72, 153, 0.2),
        0 0 20px rgba(236, 72, 153, 0.3);
}

.drag-active-audio {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgb(34, 197, 94);
    box-shadow: 
        inset 0 0 20px rgba(34, 197, 94, 0.2),
        0 0 20px rgba(34, 197, 94, 0.3);
}

/* Enhanced range slider styling */
input[type="range"] {
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #ff006e, #8338ec);
    outline: none;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.3);
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffffff, #f0f0f0);
    cursor: pointer;
    box-shadow: 
        0 0 10px rgba(255, 0, 110, 0.5),
        inset 0 2px 4px rgba(255, 255, 255, 0.3),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2);
    border: 2px solid #ff006e;
}

input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffffff, #f0f0f0);
    cursor: pointer;
    border: 2px solid #ff006e;
    box-shadow: 
        0 0 10px rgba(255, 0, 110, 0.5),
        inset 0 2px 4px rgba(255, 255, 255, 0.3);
}

/* Enhanced select boxes with retro styling */
select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23ff006e' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.3);
}

select:focus {
    box-shadow: 
        inset 0 0 5px rgba(0, 0, 0, 0.3),
        0 0 10px rgba(255, 0, 110, 0.3);
}

/* FFmpeg terminal-style output */
.ffmpeg-terminal {
    background: #0a0a0a;
    border: 1px solid #00ff00;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #00ff00;
    padding: 1rem;
    font-size: 0.75rem;
    line-height: 1.4;
    box-shadow: 
        inset 0 0 10px rgba(0, 255, 0, 0.1),
        0 0 20px rgba(0, 255, 0, 0.2);
}

.ffmpeg-terminal::before {
    content: '> ';
    color: #00ff00;
    font-weight: bold;
}

/* Enhanced pulse animation for processing indicators */
@keyframes enhanced-pulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 0, 110, 0.7);
    }
    50% { 
        opacity: 0.7; 
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 0, 110, 0);
    }
}

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

/* Video preview enhancements */
video {
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(255, 0, 110, 0.2);
    border-radius: 8px;
}

video:hover {
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.6),
        0 0 30px rgba(255, 0, 110, 0.3);
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

/* Mobile responsiveness improvements */
@media (max-width: 768px) {
    .glass-card {
        margin: 0.5rem;
        padding: 1rem;
    }
    
    .grid {
        gap: 1rem;
    }
    
    h1 {
        font-size: 2rem !important;
    }
    
    .text-6xl {
        font-size: 3rem;
    }
    
    canvas {
        height: 120px !important;
    }
    
    video {
        max-height: 200px !important;
    }
}

/* Enhanced input styling */
input[type="text"], input[type="number"] {
    transition: all 0.3s ease;
}

input[type="text"]:focus, input[type="number"]:focus {
    box-shadow: 0 0 10px rgba(255, 0, 110, 0.3);
    transform: translateY(-1px);
}

/* Enhanced loading states */
.loading-shimmer {
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.2) 50%, 
        rgba(255, 255, 255, 0.1) 100%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

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

/* Enhanced canvas styling */
canvas {
    box-shadow: 
        inset 0 0 10px rgba(0, 0, 0, 0.3),
        0 0 15px rgba(255, 0, 110, 0.2);
    border-radius: 8px;
}

/* Progress bar enhancements */
.progress-bar {
    background: linear-gradient(90deg, #ff006e, #8338ec, #00f5ff);
    background-size: 200% 100%;
    animation: progress-flow 3s ease-in-out infinite;
}

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