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

:root {
    --primary-color: #5856d6;
    --primary-hover: #4744c9;
    --secondary-color: #34c759;
    --danger-color: #ff3b30;
    --bg-color: #f7f7fc;
    --card-bg: #ffffff;
    --text-primary: #1c1c1e;
    --text-secondary: #6b7280;
    --border-color: #e5e5ea;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 800px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header {
    padding: 32px;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
}

.title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
}

.logo {
    animation: rotate 2s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.subtitle {
    font-size: 16px;
    opacity: 0.95;
    font-weight: 400;
}

.main-content {
    padding: 32px;
}

.upload-section {
    margin-bottom: 32px;
}

.dropzone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-color);
}

.dropzone:hover {
    border-color: var(--primary-color);
    background: rgba(88, 86, 214, 0.05);
}

.dropzone.dragover {
    border-color: var(--primary-color);
    background: rgba(88, 86, 214, 0.1);
    transform: scale(1.02);
}

.upload-icon {
    color: var(--primary-color);
    margin-bottom: 16px;
}

.dropzone-text {
    font-size: 18px;
    color: var(--text-primary);
    font-weight: 500;
}

.dropzone-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 400;
}

.settings {
    margin-top: 24px;
    padding: 20px;
    background: var(--bg-color);
    border-radius: var(--radius-md);
}

.setting-item {
    margin-bottom: 20px;
}

.setting-item:last-child {
    margin-bottom: 0;
}

.setting-item label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.quality-control {
    display: flex;
    align-items: center;
    gap: 16px;
}

#quality {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: var(--border-color);
    outline: none;
    -webkit-appearance: none;
}

#quality::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    transition: transform 0.2s;
}

#quality::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.quality-value {
    min-width: 40px;
    text-align: center;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 16px;
}

.format-options {
    display: flex;
    gap: 24px;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
}

.radio-label input[type="radio"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.file-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 24px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg-color);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.file-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.file-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.file-size {
    font-size: 12px;
    color: var(--text-secondary);
}

.file-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-status {
    font-size: 12px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
}

.file-status.converting {
    color: var(--primary-color);
    background: rgba(88, 86, 214, 0.1);
}

.file-status.complete {
    color: var(--secondary-color);
    background: rgba(52, 199, 89, 0.1);
}

.file-status.error {
    color: var(--danger-color);
    background: rgba(255, 59, 48, 0.1);
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-download {
    background: var(--secondary-color);
    color: white;
}

.btn-download:hover {
    background: #2fb54d;
    transform: translateY(-1px);
}

.btn-remove {
    background: transparent;
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

.btn-remove:hover {
    background: var(--danger-color);
    color: white;
}

.action-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.btn {
    flex: 1;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #2fb54d;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
}

.btn-outline:hover:not(:disabled) {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

.progress-section {
    padding: 24px;
    background: var(--bg-color);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.progress-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

.footer {
    padding: 24px 32px;
    background: var(--bg-color);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.language-selector select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: white;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.language-selector select:hover {
    border-color: var(--primary-color);
}

.footer-text {
    font-size: 12px;
    color: var(--text-secondary);
}

@media (max-width: 640px) {
    .container {
        border-radius: 0;
        height: 100vh;
        max-width: 100%;
    }
    
    .header {
        padding: 24px 20px;
    }
    
    .title {
        font-size: 24px;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .dropzone {
        padding: 32px 20px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .footer {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}