/* ========================================
   批量工具公共样式
   适用于：batch-compressor, batch-renamer, batch-converter
   ======================================== */

/* 上传区域 */
.upload-area {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 3px dashed rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    padding: 60px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 30px;
}

.upload-area:hover {
    border-color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.upload-area.dragover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    border-color: #fff;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 64px;
    color: #fff;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.upload-area h3 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.upload-area p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* 文件列表 */
.file-list {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
}

.file-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #dee2e6;
}

.file-list-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #495057;
}

.file-list-header span {
    color: #667eea;
    font-weight: 700;
}

.file-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.file-item {
    background: #fff;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
}

.file-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.file-thumbnail {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 8px;
}

.file-name {
    font-size: 0.85rem;
    color: #495057;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 4px;
}

.file-size {
    font-size: 0.75rem;
    color: #6c757d;
}

.file-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(220, 53, 69, 0.9);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
}

.file-remove:hover {
    background: #dc3545;
    transform: scale(1.1);
}

/* 设置面板 */
.settings-panel {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.settings-panel h3 {
    font-size: 1.4rem;
    color: #495057;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-panel h3 i {
    color: #667eea;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.setting-item {
    display: flex;
    flex-direction: column;
}

.setting-item label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-select, .form-input {
    padding: 10px 12px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #fff;
}

.form-select:focus, .form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-help {
    color: #6c757d;
    font-size: 0.85rem;
    margin-top: 5px;
}

.size-params, .advanced-options {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
}

.param-input {
    margin-bottom: 15px;
}

/* 质量滑块 */
.quality-slider-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #e9ecef;
    outline: none;
    transition: all 0.3s ease;
}

.slider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider::-webkit-slider-thumb:hover {
    background: #764ba2;
    transform: scale(1.2);
}

.slider-value {
    min-width: 40px;
    font-weight: 700;
    color: #667eea;
    font-size: 1.1rem;
}

/* 重命名模式选择器 */
.rename-mode-selector, .format-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.mode-card, .format-card {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mode-card:hover, .format-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mode-card.active, .format-card.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: #fff;
}

.mode-card i, .format-card i {
    font-size: 32px;
    margin-bottom: 10px;
    color: #667eea;
}

.mode-card.active i, .format-card.active i {
    color: #fff;
}

.mode-card h4, .format-card h4 {
    font-size: 1rem;
    margin-bottom: 5px;
    color: #495057;
}

.mode-card.active h4, .format-card.active h4 {
    color: #fff;
}

.mode-card p, .format-card p {
    font-size: 0.85rem;
    color: #6c757d;
    margin: 0;
}

.mode-card.active p, .format-card.active p {
    color: rgba(255, 255, 255, 0.9);
}

/* 预览面板 */
.preview-panel {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.preview-panel h4 {
    font-size: 1.1rem;
    color: #495057;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-list {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
}

.preview-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #e9ecef;
}

.preview-item:last-child {
    border-bottom: none;
}

.preview-item .original {
    color: #6c757d;
    flex: 1;
}

.preview-item .arrow {
    color: #667eea;
    margin: 0 15px;
}

.preview-item .new {
    color: #28a745;
    font-weight: 600;
    flex: 1;
    text-align: right;
}

/* 格式信息提示 */
.format-info {
    background: #e7f3ff;
    border-left: 4px solid #667eea;
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.format-info i {
    color: #667eea;
    font-size: 1.2rem;
}

.format-info span {
    color: #495057;
    font-size: 0.95rem;
}

/* 进度面板 */
.progress-panel {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.progress-panel h3 {
    font-size: 1.4rem;
    color: #495057;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.progress-panel h3 i {
    color: #667eea;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: #e9ecef;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    width: 0%;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
}

.progress-text {
    color: #6c757d;
    font-size: 1rem;
    margin: 0;
}

/* 结果面板 */
.result-panel {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.result-panel h3 {
    font-size: 1.4rem;
    color: #28a745;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.result-panel h3 i {
    color: #28a745;
}

.result-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    font-size: 1rem;
    color: #495057;
    line-height: 1.6;
}

/* 失败列表 */
.failed-list {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 8px;
    padding: 20px;
    margin: 25px 0;
    text-align: left;
}

.failed-list h4 {
    color: #856404;
    font-size: 1.1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.failed-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.failed-list li {
    padding: 10px;
    background: #fff;
    border-radius: 6px;
    margin-bottom: 8px;
    color: #856404;
    font-size: 0.9rem;
}

.failed-list li:last-child {
    margin-bottom: 0;
}

/* 按钮样式 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #fff;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-large {
    width: 100%;
    padding: 16px 32px;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 格式对比表格 */
.format-comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.format-comparison-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.format-comparison-table th,
.format-comparison-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.format-comparison-table tbody tr:hover {
    background: #f8f9fa;
}

.format-comparison-table tbody tr:last-child td {
    border-bottom: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .upload-area {
        padding: 40px 20px;
    }

    .upload-icon {
        font-size: 48px;
    }

    .upload-area h3 {
        font-size: 1.2rem;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .rename-mode-selector, .format-selector {
        grid-template-columns: repeat(2, 1fr);
    }

    .file-items {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .settings-panel, .progress-panel, .result-panel {
        padding: 20px;
    }

    .format-comparison-table {
        font-size: 0.85rem;
    }

    .format-comparison-table th,
    .format-comparison-table td {
        padding: 8px 10px;
    }
}

@media (max-width: 480px) {
    .rename-mode-selector, .format-selector {
        grid-template-columns: 1fr;
    }

    .file-items {
        grid-template-columns: 1fr;
    }
}
