* {
    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;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
}

/* 头部样式 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.header h1 {
    text-align: left;
    color: #333;
    font-size: 2.5em;
    font-weight: 300;
    margin: 0;
}

.preview-btn {
    background: #17a2b8;
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.preview-btn:hover {
    background: #138496;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

h2 {
    color: #555;
    margin-bottom: 20px;
    font-size: 1.3em;
    font-weight: 500;
}

.section {
    margin-bottom: 40px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

/* 文件夹选择器样式 */
.folder-selector {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-primary {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

.folder-path {
    color: #666;
    font-style: italic;
    flex: 1;
}

/* 输入组样式 */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.input-group input {
    width: 100%;
    max-width: 400px;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
}

/* 上传容器样式 */
.upload-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.upload-box {
    border: 3px dashed #ccc;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    background: #fafbfc;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 0;
}

.upload-box:hover {
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.1);
}

.upload-box.drag-over {
    border-color: #667eea;
    background: #f0f4ff;
}

.upload-content {
    width: 100%;
}

.upload-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.upload-box h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.4em;
}

.upload-box p {
    color: #666;
    margin-bottom: 20px;
}

.file-input {
    display: none;
}

.upload-box label {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.upload-box label:hover {
    background: #5a6fd8;
}

/* 预览区域样式 */
.preview {
    margin-top: 20px;
    max-height: 200px;
    overflow: hidden;
    border-radius: 8px;
    display: none;
}

.preview img {
    max-width: 100%;
    max-height: 180px;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 确认按钮样式 */
.btn-confirm {
    display: block;
    width: 200px;
    margin: 30px auto 0;
    background: #28a745;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-confirm:hover:not(:disabled) {
    background: #218838;
    transform: translateY(-2px);
}

.btn-confirm:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* 状态消息样式 */
.status-message {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    font-weight: 500;
}

.status-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .upload-container {
        flex-wrap: wrap;
    }
    
    .upload-box {
        flex: 1 1 calc(50% - 10px);
        min-width: 280px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
        margin: 10px;
    }
    
    .header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .header h1 {
        text-align: center;
        font-size: 2em;
    }
    
    .upload-container {
        flex-direction: column;
    }
    
    .upload-box {
        flex: 1 1 100%;
        min-height: 220px;
    }
}

/* 分页控件样式 */
.pagination-container {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin-bottom: 20px;
}

.pagination-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.page-size-select {
    padding: 5px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: white;
    margin: 0 5px;
}

.pagination-buttons {
    display: flex;
    gap: 5px;
}

.pagination-btn {
    padding: 6px 12px;
    border: 1px solid #007bff;
    transition: all 0.2s;
    background: white;
    color: #007bff;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    background: #007bff;
    color: white;
    transform: translateY(-1px);
}

.pagination-btn:disabled {
    background: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
    border-color: #dee2e6;
}

.edit-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #e9ecef;
    border-color: #ced4da;
}

.pagination-btn.active {
    background: #28a745;
    border-color: #28a745;
    color: white;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
    cursor: not-allowed;
}