* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 25%, #2d2d2d 50%, #1a1a1a 75%, #000000 100%);
    color: #ffffff;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 25% 25%, #ff0050 0%, transparent 50%),
                radial-gradient(circle at 75% 75%, #00f5ff 0%, transparent 50%),
                radial-gradient(circle at 50% 50%, #fe2c55 0%, transparent 70%);
    opacity: 0.1;
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.free-banner {
    background: linear-gradient(45deg, #fe2c55, #ff0050, #25f4ee);
    background-size: 400% 400%;
    color: #ffffff;
    font-weight: bold;
    font-size: 1.1rem;
    padding: 12px 24px;
    border-radius: 25px;
    margin-bottom: 20px;
    display: inline-block;
    box-shadow: 0 0 30px rgba(254, 44, 85, 0.6), 0 0 60px rgba(37, 244, 238, 0.3);
    animation: gradientShift 3s ease-in-out infinite, pulse 2s infinite;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

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

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

.features {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.feature {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(254, 44, 85, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.feature:hover {
    border-color: rgba(37, 244, 238, 0.5);
    box-shadow: 0 6px 20px rgba(37, 244, 238, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

main {
    background: rgba(20, 20, 20, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px;
    backdrop-filter: blur(20px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 100px rgba(254, 44, 85, 0.1);
    position: relative;
    overflow: hidden;
}

main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(254, 44, 85, 0.5), rgba(37, 244, 238, 0.5), transparent);
}

.upload-section {
    text-align: center;
    margin-bottom: 30px;
}

#videoInput {
    display: none;
}

.upload-btn {
    display: inline-block;
    padding: 16px 32px;
    background: linear-gradient(45deg, #fe2c55, #ff0050);
    color: white;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 8px 32px rgba(254, 44, 85, 0.4), 0 0 20px rgba(254, 44, 85, 0.2);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.upload-btn::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 ease;
}

.upload-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 40px rgba(254, 44, 85, 0.6), 0 0 30px rgba(37, 244, 238, 0.3);
    background: linear-gradient(45deg, #ff0050, #fe2c55, #25f4ee);
    background-size: 200% 200%;
    animation: gradientShift 1s ease-in-out;
}

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

.video-section {
    margin-top: 30px;
}

.video-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 18px;
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.video-controls button {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    background: linear-gradient(45deg, #25f4ee, #00d4ff);
    color: white;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(37, 244, 238, 0.3);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.video-controls button::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.4s ease;
}

.video-controls button:hover {
    background: linear-gradient(45deg, #00d4ff, #25f4ee);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(37, 244, 238, 0.5);
}

.video-controls button:hover::before {
    left: 100%;
}

#progressSlider {
    flex: 1;
    height: 10px;
    background: rgba(50, 50, 50, 0.8);
    border-radius: 5px;
    outline: none;
    border: 1px solid rgba(254, 44, 85, 0.2);
    transition: all 0.3s ease;
}

#progressSlider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    background: linear-gradient(45deg, #fe2c55, #25f4ee);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(254, 44, 85, 0.6);
    transition: all 0.3s ease;
}

#progressSlider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 20px rgba(37, 244, 238, 0.8);
}

#timeDisplay {
    font-weight: 700;
    color: #25f4ee;
    text-shadow: 0 0 10px rgba(37, 244, 238, 0.3);
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.video-container {
    position: relative;
    text-align: center;
    margin-bottom: 30px;
}

#filterCanvas {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.filter-controls h3 {
    margin-bottom: 24px;
    color: #ffffff;
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(45deg, #fe2c55, #25f4ee, #00d4ff);
    background-size: 200% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(254, 44, 85, 0.5), 0 0 60px rgba(37, 244, 238, 0.3);
    animation: gradientShift 3s ease-in-out infinite, textGlow 2s ease-in-out infinite alternate;
    position: relative;
    padding: 12px 0;
}

.filter-controls h3::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, #fe2c55, #25f4ee);
    box-shadow: 0 0 20px rgba(254, 44, 85, 0.6);
}

@keyframes textGlow {
    0% { 
        filter: drop-shadow(0 0 10px rgba(254, 44, 85, 0.6)) drop-shadow(0 0 20px rgba(37, 244, 238, 0.4));
    }
    100% { 
        filter: drop-shadow(0 0 20px rgba(37, 244, 238, 0.8)) drop-shadow(0 0 30px rgba(254, 44, 85, 0.6));
    }
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.filter-btn {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.filter-btn:hover {
    border-color: #4834d4;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.filter-btn.active {
    background: #4834d4;
    color: white;
    border-color: #4834d4;
}

.parameter-controls {
    margin-bottom: 30px;
    padding: 24px;
    background: rgba(25, 25, 25, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.control-group {
    margin-bottom: 20px;
}

.control-group label {
    display: block;
    margin-bottom: 12px;
    font-weight: 700;
    color: #ffffff;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 0 10px rgba(37, 244, 238, 0.3);
}

.control-group input[type="range"] {
    width: 100%;
    height: 10px;
    background: rgba(50, 50, 50, 0.8);
    border-radius: 5px;
    outline: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(254, 44, 85, 0.2);
}

.control-group input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 22px;
    height: 22px;
    background: linear-gradient(45deg, #fe2c55, #25f4ee);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(254, 44, 85, 0.6);
    transition: all 0.3s ease;
}

.control-group input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 25px rgba(37, 244, 238, 0.8);
}

.export-controls {
    text-align: center;
}

.export-btn {
    padding: 18px 45px;
    background: linear-gradient(45deg, #25f4ee, #00d4ff, #fe2c55);
    background-size: 200% 200%;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 8px 32px rgba(37, 244, 238, 0.4), 0 0 40px rgba(254, 44, 85, 0.2);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: gradientShift 3s ease-in-out infinite;
}

.export-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.export-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 15px 50px rgba(37, 244, 238, 0.6), 0 0 60px rgba(254, 44, 85, 0.4);
    background-position: 100% 100%;
}

.export-btn:hover::before {
    opacity: 1;
    transform: rotate(45deg) translate(50%, 50%);
}

.export-btn:disabled {
    background: rgba(100, 100, 100, 0.5);
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: none;
}

.progress-section {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #4834d4, #3742fa);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

#progressText {
    font-size: 1.2rem;
    font-weight: 600;
    color: #4834d4;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .free-banner {
        font-size: 0.9rem;
        padding: 8px 16px;
    }
    
    .features {
        gap: 10px;
    }
    
    .feature {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    main {
        padding: 20px;
    }
    
    .filter-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .video-controls {
        flex-wrap: wrap;
        gap: 10px;
    }
}

.loading {
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #fff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

footer {
    margin-top: 40px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.footer-content h3 {
    text-align: center;
    color: #4834d4;
    font-size: 1.8rem;
    margin-bottom: 30px;
}

.benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.benefit {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.benefit:hover {
    transform: translateY(-5px);
}

.benefit h4 {
    color: #4834d4;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.benefit p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

.footer-note {
    text-align: center;
    font-size: 1.1rem;
    color: #4834d4;
    font-weight: 600;
    font-style: italic;
}