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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 2.5em;
}

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

#videoInput {
    display: none;
}

.upload-btn {
    display: inline-block;
    padding: 15px 30px;
    background: #4CAF50;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1em;
}

.upload-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
}

.controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-group label {
    font-weight: 600;
    color: #555;
}

.control-group select,
.control-group input[type="range"] {
    padding: 8px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
}

.control-group input[type="range"] {
    padding: 0;
}

.preview-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.video-preview,
.gif-preview {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.video-preview h3,
.gif-preview h3 {
    margin-bottom: 15px;
    color: #333;
}

#gifPreview {
    max-width: 100%;
    max-height: 300px;
    border-radius: 5px;
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
}

.action-buttons button {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

#convertBtn {
    background: #2196F3;
    color: white;
}

#convertBtn:not(:disabled):hover {
    background: #1976D2;
}

#convertBtn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

#downloadBtn {
    background: #FF9800;
    color: white;
}

#downloadBtn:not(:disabled):hover {
    background: #F57C00;
}

#downloadBtn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.progress-section {
    margin-top: 20px;
}

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

.progress-fill {
    height: 100%;
    background: #2196F3;
    width: 0%;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.progress-text {
    text-align: center;
    color: #666;
    font-size: 0.9em;
}

@media (max-width: 768px) {
    .preview-section {
        grid-template-columns: 1fr;
    }
    
    .controls {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 15px;
    }
}
