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

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

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.header p {
    opacity: 0.9;
    font-size: 1.1rem;
    font-weight: 400;
}

.header .version {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-top: 8px;
    font-family: 'Monaco', 'Menlo', monospace;
}

.main {
    padding: 30px;
}

.section {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-subtitle {
    font-size: 0.9rem;
    color: #6b7280;
    margin-top: -10px;
    margin-bottom: 15px;
    font-weight: 400;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #374151;
}

input[type="text"],
input[type="url"],
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

input[type="text"]:focus,
input[type="url"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

input[type="file"] {
    display: none;
}

.file-upload-btn {
    display: inline-block;
    padding: 12px 24px;
    background: #4f46e5;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
    text-align: center;
}

.file-upload-btn:hover {
    background: #4338ca;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.file-upload-btn:active {
    transform: translateY(0);
}

.file-upload-btn.has-file {
    background: #10b981;
}

.file-upload-btn.has-file:hover {
    background: #059669;
}

.file-info {
    margin-top: 10px;
    padding: 10px;
    background: #e0e7ff;
    border-radius: 8px;
    font-size: 14px;
    color: #3730a3;
}

.submit-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}

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

.status {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    font-weight: 500;
}

.status.loading {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.status.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #34d399;
}

.status.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #f87171;
}

.result {
    margin-top: 20px;
    padding: 20px;
    background: #1f2937;
    color: #f9fafb;
    border-radius: 8px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 14px;
    white-space: pre-wrap;
    max-height: 400px;
    overflow-y: auto;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.tab {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.2s;
}

.tab.active {
    color: #4f46e5;
    border-bottom-color: #4f46e5;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.help-text {
    font-size: 12px;
    color: #6b7280;
    margin-top: 5px;
}

.audio-player,
.media-preview {
    margin-top: 10px;
    width: 100%;
    outline: none;
    border-radius: 6px;
}

.media-preview:focus {
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.processing-mode-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
}

.processing-mode-fast { background: #10b981; color: white; }
.processing-mode-balanced { background: #3b82f6; color: white; }
.processing-mode-quality { background: #8b5cf6; color: white; }
.processing-mode-large-file { background: #dc2626; color: white; }
.processing-mode-custom { background: #6b7280; color: white; }

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

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #e5e7eb;
    border-top-color: #4f46e5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

/* 媒体预览容器样式 */
#video-preview {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: #f9fafb;
}

#video-preview h4 {
    background: #f3f4f6;
    padding: 10px 15px;
    margin: 0;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
}

#audio-preview {
    border: 2px solid #3b82f6;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    margin-top: 15px;
}

#audio-preview h4 {
    background: #dbeafe;
    color: #1e40af;
    padding: 12px 15px;
    margin: 0;
    border-bottom: 1px solid #bfdbfe;
    font-size: 14px;
    font-weight: 600;
}

#audio-preview .media-preview {
    width: 100%;
    padding: 15px;
    background: #f0f9ff;
}


/* 文件上传区域增强样式 */
.file-upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: #4f46e5;
    background: #f8faff;
}

.file-upload-area.dragover {
    border-color: #4f46e5;
    background: #ede9fe;
    transform: scale(1.02);
}