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

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

.container {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    color: #333;
    font-size: 28px;
    margin-bottom: 10px;
}

header p {
    color: #666;
    font-size: 14px;
}

/* 拖拽区域 */
.drop-zone {
    border: 3px dashed #ccc;
    border-radius: 12px;
    padding: 60px 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #fafafa;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: #667eea;
    background: #f0f4ff;
}

.drop-zone-content {
    pointer-events: none;
}

.drop-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 15px;
}

.drop-zone p {
    color: #666;
    font-size: 16px;
    margin-bottom: 5px;
}

.drop-zone .hint {
    font-size: 12px;
    color: #999;
}

/* 控制面板 */
.control-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 25px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.config-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.config-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.config-item label {
    color: #555;
    font-size: 14px;
    white-space: nowrap;
}

.config-item input,
.config-item select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.config-item input:focus,
.config-item select:focus {
    outline: none;
    border-color: #667eea;
}

.config-item input[type="text"] {
    width: 160px;
}

.config-item input[type="number"] {
    width: 80px;
}

.config-item select {
    min-width: 160px;
}

.config-item .unit {
    color: #888;
    font-size: 13px;
}

.folder-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.folder-input label {
    color: #555;
    font-size: 14px;
    white-space: nowrap;
}

.folder-input input {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    width: 200px;
    transition: border-color 0.3s;
}

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

.buttons {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #5a6fd6;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #218838;
}

/* 进度显示 */
.progress-section {
    margin: 20px 0;
}

.progress-section.hidden {
    display: none;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
    color: #555;
}

.progress-bar {
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s ease;
}

/* 图片列表 */
.image-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.image-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.image-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.image-preview {
    width: 100%;
    height: 150px;
    object-fit: cover;
    background: #f5f5f5;
}

.image-info {
    padding: 12px;
}

.image-folder {
    font-size: 11px;
    color: #667eea;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.image-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 8px;
}

.image-details {
    font-size: 11px;
    color: #888;
    line-height: 1.6;
}

.image-status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    margin-top: 8px;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-processing {
    background: #cce5ff;
    color: #004085;
}

.status-completed {
    background: #d4edda;
    color: #155724;
}

.status-skipped {
    background: #e2e3e5;
    color: #383d41;
}

.status-error {
    background: #f8d7da;
    color: #721c24;
}

/* 响应式布局 */
@media (max-width: 600px) {
    .control-panel {
        flex-direction: column;
        gap: 15px;
    }

    .config-row {
        flex-direction: column;
        align-items: stretch;
    }

    .config-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .config-item input,
    .config-item select {
        width: 100%;
    }

    .folder-input {
        flex-direction: column;
        width: 100%;
    }

    .folder-input input {
        width: 100%;
    }

    .buttons {
        width: 100%;
    }

    .btn {
        flex: 1;
    }
}
