/* 全局样式 */
* {
    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;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
.header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    padding: 20px;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
}

/* 主内容区 */
.main-content {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

/* 配置面板 */
.config-panel {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    height: fit-content;
}

.config-panel h2 {
    margin-bottom: 20px;
    color: #667eea;
    font-size: 1.5em;
}

.config-section {
    margin-bottom: 20px;
}

.config-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.config-section textarea,
.config-section select,
.config-section input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.config-section textarea:focus,
.config-section select:focus,
.config-section input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
}

.config-section textarea {
    resize: vertical;
    font-family: monospace;
}

.config-section input[type="checkbox"] {
    margin-right: 5px;
}

/* 文件面板 */
.file-panel {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.file-panel h2 {
    margin-bottom: 20px;
    color: #667eea;
    font-size: 1.5em;
}

/* 文件选择按钮 */
.file-selection {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

/* 按钮样式 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-success:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

/* 文件列表 */
.file-list-container {
    margin-bottom: 20px;
}

.file-list-container h3 {
    margin-bottom: 10px;
    color: #555;
    font-size: 1.1em;
}

.file-list {
    list-style: none;
    max-height: 300px;
    overflow-y: auto;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    padding: 10px;
}

.file-list li {
    padding: 8px;
    margin-bottom: 5px;
    background: #f8f9fa;
    border-radius: 3px;
    font-size: 13px;
    word-break: break-all;
}

.file-list li:hover {
    background: #e9ecef;
}

/* 控制按钮 */
.control-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.control-buttons .btn {
    flex: 1;
    justify-content: center;
}

/* 任务队列 */
.task-queue {
    border-top: 2px solid #e0e0e0;
    padding-top: 20px;
}

.task-queue h3 {
    margin-bottom: 15px;
    color: #555;
    font-size: 1.1em;
}

.task-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #666;
}

.task-stats span {
    background: #f8f9fa;
    padding: 5px 10px;
    border-radius: 3px;
}

.task-list {
    max-height: 200px;
    overflow-y: auto;
}

/* 模态框 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    text-align: center;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #667eea;
}

.progress-info {
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    margin: 15px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s;
}

.current-video {
    margin: 15px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    font-size: 13px;
    word-break: break-all;
}

/* 页脚 */
.footer {
    text-align: center;
    color: white;
    padding: 20px;
    opacity: 0.9;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .header h1 {
        font-size: 1.8em;
    }
    
    .file-selection {
        flex-direction: column;
    }
    
    .control-buttons {
        flex-direction: column;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}
