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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

header {
    text-align: center;
    padding: 30px 20px;
    color: white;
}

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

header p {
    opacity: 0.85;
    font-size: 1rem;
}

.converter-box {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

/* Upload Area */
.upload-area {
    padding: 50px 30px;
    text-align: center;
    border: 3px dashed #d0d0d0;
    margin: 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafafa;
}

.upload-area:hover, .upload-area.dragover {
    border-color: #667eea;
    background: #f0f4ff;
    transform: scale(1.01);
}

.upload-icon {
    width: 70px;
    height: 70px;
    color: #667eea;
    margin-bottom: 15px;
}

.upload-area h2 {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 8px;
}

.upload-area p {
    color: #666;
    font-size: 1rem;
}

.browse-btn {
    color: #667eea;
    font-weight: 600;
    cursor: pointer;
}

#fileInput {
    display: none;
}

.formats {
    margin-top: 15px;
    color: #999;
    font-size: 0.8rem;
}

/* Settings */
.settings {
    padding: 25px 30px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

.settings h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.1rem;
}

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

.field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
}

.field select {
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
}

.field select:focus {
    outline: none;
    border-color: #667eea;
}

.checkboxes {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.checkboxes label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #555;
}

.checkboxes input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

/* File List */
.file-list {
    padding: 20px 30px;
    border-top: 1px solid #e0e0e0;
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.list-header h3 {
    font-size: 1.1rem;
    color: #333;
}

.clear-btn {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
}

.clear-btn:hover {
    background: #ff5252;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 8px;
    border: 1px solid #e8e8e8;
}

.file-thumb {
    width: 70px;
    height: 50px;
    background: #ddd;
    border-radius: 6px;
    margin-right: 15px;
    object-fit: cover;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-meta {
    font-size: 0.8rem;
    color: #888;
    margin-top: 3px;
}

.file-badge {
    display: inline-block;
    padding: 2px 10px;
    background: #667eea;
    color: white;
    border-radius: 12px;
    font-size: 0.7rem;
    margin-left: 8px;
}

.file-remove {
    background: #ff6b6b;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    margin-left: 10px;
}

/* Convert Button */
.convert-section {
    padding: 20px 30px;
    text-align: center;
    border-top: 1px solid #e0e0e0;
}

.convert-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 16px 50px;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    transition: all 0.3s;
    font-weight: 600;
}

.convert-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.5);
}

.convert-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Progress */
.progress-box {
    padding: 20px 30px;
    background: #f0f4ff;
    border-top: 1px solid #e0e0e0;
}

.progress-bar-bg {
    width: 100%;
    height: 28px;
    background: #e0e0e0;
    border-radius: 14px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 14px;
    transition: width 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.85rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    color: #555;
    font-size: 0.9rem;
}

#speedText {
    color: #667eea;
    font-weight: 600;
}

.current-file {
    text-align: center;
    color: #888;
    font-size: 0.85rem;
    margin-top: 8px;
}

/* Results */
.results {
    padding: 25px 30px;
    background: #f0fff4;
    border-top: 3px solid #4caf50;
}

.results h3 {
    color: #2e7d32;
    text-align: center;
    margin-bottom: 20px;
}

.result-item {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.result-video {
    width: 100%;
    max-height: 200px;
    border-radius: 8px;
    background: #000;
}

.result-name {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.result-meta {
    color: #888;
    font-size: 0.8rem;
}

.result-actions {
    display: flex;
    gap: 10px;
}

.download-btn {
    background: #4caf50;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    flex: 1;
}

.download-btn:hover {
    background: #45a049;
}

.download-all-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 40px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    display: block;
    margin: 20px auto 0;
    font-weight: 600;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 600px) {
    header h1 {
        font-size: 1.6rem;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .file-item {
        flex-direction: column;
        text-align: center;
    }

    .file-thumb {
        margin-right: 0;
        margin-bottom: 10px;
    }
}
