* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px 0;
}

.title {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(45deg, #00d4ff, #ff6b6b, #4ecdc4);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
    margin-bottom: 10px;
}

.icon {
    display: inline-block;
    margin-right: 15px;
    font-size: 3.5rem;
    filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.5));
}

.subtitle {
    font-size: 1.2rem;
    color: #b3b3b3;
    margin-top: 10px;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Upload Section */
.upload-section {
    width: 100%;
}

.upload-area {
    border: 3px dashed #00d4ff;
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    background: rgba(0, 212, 255, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.upload-area::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(0, 212, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.5s;
    opacity: 0;
}

.upload-area:hover::before {
    opacity: 1;
    animation: scan 2s linear infinite;
}

.upload-area:hover {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.3);
}

@keyframes scan {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

.upload-content h3 {
    font-size: 1.8rem;
    margin: 20px 0 10px;
    color: #ffffff;
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 15px rgba(0, 212, 255, 0.7));
}

.upload-btn {
    background: linear-gradient(45deg, #00d4ff, #4ecdc4);
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 212, 255, 0.5);
}

/* Controls Section */
.controls-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.control-group {
    margin-bottom: 25px;
}

.control-group label {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #00d4ff;
}

.select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.select:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.resolution-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.resolution-inputs input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    font-size: 1rem;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.slider {
    flex: 1;
    height: 8px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(45deg, #00d4ff, #4ecdc4);
    cursor: pointer;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
}

.process-btn {
    width: 100%;
    background: linear-gradient(45deg, #ff6b6b, #ff8e53);
    border: none;
    padding: 20px;
    border-radius: 15px;
    color: white;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    box-shadow: 0 15px 35px rgba(255, 107, 107, 0.4);
}

.process-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(255, 107, 107, 0.6);
}

/* Preview Section */
.preview-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.preview-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.preview-item {
    text-align: center;
}

.preview-item h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
    color: #00d4ff;
}

.preview-item video,
.preview-item canvas {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(0, 212, 255, 0.3);
}

.video-info {
    margin-top: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    font-size: 0.9rem;
    color: #b3b3b3;
}

/* Progress Section */
.progress-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.progress-header {
    margin-bottom: 20px;
}

.progress-header h3 {
    font-size: 1.5rem;
    color: #00d4ff;
    margin-bottom: 10px;
}

.progress-bar {
    width: 100%;
    height: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin: 20px 0;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00d4ff, #4ecdc4, #ff6b6b);
    background-size: 200% 100%;
    border-radius: 10px;
    width: 0%;
    transition: width 0.3s ease;
    animation: progressShine 2s linear infinite;
}

@keyframes progressShine {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    font-size: 0.9rem;
    color: #b3b3b3;
}

/* Download Section */
.download-section {
    background: rgba(0, 255, 0, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    border: 2px solid rgba(0, 255, 0, 0.3);
    text-align: center;
}

.download-content h3 {
    font-size: 2rem;
    color: #00ff88;
    margin-bottom: 15px;
}

.download-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 30px 0;
    flex-wrap: wrap;
}

.download-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.download-btn.primary {
    background: linear-gradient(45deg, #00ff88, #00d4ff);
    color: white;
    box-shadow: 0 15px 35px rgba(0, 255, 136, 0.3);
}

.download-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(0, 255, 136, 0.5);
}

.processing-stats {
    margin-top: 20px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    font-size: 0.9rem;
    color: #b3b3b3;
}

.footer {
    text-align: center;
    margin-top: 50px;
    padding: 20px;
    color: #666;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .preview-container {
        grid-template-columns: 1fr;
    }

    .download-buttons {
        flex-direction: column;
        align-items: center;
    }

    .title {
        font-size: 2rem;
    }

    .progress-stats {
        flex-direction: column;
        gap: 10px;
    }
}
