/* ====== 视频调整音量 专属样式（布局/按钮等通用样式由 common.css 提供） ====== */

/* 禁用态置灰，有内容时启用态（紫色）才高亮 */
.btn-purple:disabled {
    background: #e8e8e8;
    color: #999;
    opacity: 1;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-purple:not(:disabled) {
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.setting-item.disabled {
    opacity: 0.6;
}

.header-count {
    font-size: 13px;
    color: #8b5cf6;
    background: #f5f3ff;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 500;
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

/* 读取中提示（参考图片工具 uploading-tip） */
.uploading-tip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
    padding: 14px 16px;
    border-radius: 10px;
    background: #f5f3ff;
    border: 1px solid #ddd6fe;
    color: #6d28d9;
    font-size: 14px;
    font-weight: 500;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #ddd6fe;
    border-top-color: #8b5cf6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.preview-body {
    min-height: 120px;
}

.preview-container {
    position: relative;
    width: 100%;
    height: 220px;
    border-radius: 8px;
    overflow: hidden;
    background: #111;
    border: 2px solid #e5e7eb;
}

.preview-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.18s ease;
}

.preview-video.preview-ready {
    opacity: 1;
}

.preview-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 13px;
    background: #1f2937;
}

.preview-info {
    margin-top: 8px;
    font-size: 12px;
    color: #6b7280;
    text-align: center;
}

.preview-note {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: #b45309;
    line-height: 1.4;
}

.format-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.format-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.format-btn:hover:not(:disabled) {
    border-color: #c4b5fd;
    background: #faf5ff;
}

.format-btn.active:hover:not(:disabled) {
    border-color: #7c3aed;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(139, 92, 246, 0.3);
}

.format-btn.active {
    border-color: #8b5cf6;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.format-btn.active .format-name,
.format-btn.active .format-desc {
    color: white;
}

.format-btn.active .format-icon {
    filter: brightness(0) invert(1);
}

.format-icon {
    font-size: 24px;
}

.format-name {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    min-width: 60px;
}

.format-desc {
    font-size: 12px;
    color: #9ca3af;
}

/* 视频列表：网格卡片式，参考图片工具 image-card 风格 */
.video-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 12px;
    max-height: 550px;
    overflow-y: auto;
}

.video-card {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s;
}

.video-card:hover {
    border-color: #a78bfa;
    box-shadow: 0 2px 12px rgba(139, 92, 246, 0.12);
}

.video-card.active {
    border-color: #8b5cf6;
    background: #f5f3ff;
}

.video-card.converting {
    opacity: 0.6;
}

.video-preview {
    position: relative;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    padding: 12px;
}

.video-preview video {
    max-width: 100%;
    max-height: 160px;
    border-radius: 6px;
    display: block;
}

.converted-badge,
.converting-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 10px;
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
}

.converted-badge {
    background: #8b5cf6;
}

.converting-badge {
    background: #f59e0b;
}

.error-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 10px;
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    background: #ef4444;
    z-index: 2;
}

.video-info {
    padding: 12px;
}

.video-name {
    font-size: 13px;
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    margin-bottom: 6px;
}

.meta-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}

.meta-badge.original {
    background: #dbeafe;
    color: #1d4ed8;
}

.meta-badge.target {
    background: #dcfce7;
    color: #16a34a;
}

.meta-arrow {
    color: #9ca3af;
}

.video-size {
    font-size: 11px;
    margin-bottom: 4px;
}

.size-item {
    color: #6b7280;
}

.video-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.convert-progress {
    margin-top: 10px;
}

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

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #7c3aed);
    transition: width 0.3s ease;
}

/* 继续添加占位卡片（参考图片工具 add-more-card） */
.add-more-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 44px 20px;
    border: 3px dashed #d1d5db;
    border-radius: 12px;
    background: #f9fafb;
    cursor: pointer;
    transition: all 0.2s;
}

.add-more-card:hover {
    border-color: #8b5cf6;
    background: #f5f3ff;
}

.add-more-icon {
    font-size: 40px;
}

.add-more-text {
    font-size: 15px;
    font-weight: 600;
    color: #374151;
}

.add-more-hint {
    font-size: 11px;
    color: #9ca3af;
}

.empty-preview {
    min-height: 350px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed #d1d5db;
    border-radius: 10px;
    background: #fafafa;
}

.empty-preview.upload-zone {
    cursor: pointer;
    transition: all 0.2s;
}

.empty-preview.upload-zone:hover,
.empty-preview.upload-zone.drag-over {
    border-color: #8b5cf6;
    background: #f5f3ff;
}

.upload-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.upload-text {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.upload-hint {
    font-size: 12px;
    color: #9ca3af;
}

/* 处理进度卡片（计时与状态） */
.compress-status-card {
    border: 1px solid #e9d5ff;
    background: #faf5ff;
    border-radius: 10px;
    padding: 16px;
    margin-top: 12px;
}

.compress-timer {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}

.timer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.timer-label {
    color: #6b7280;
}

.timer-value {
    font-weight: 600;
    color: #6d28d9;
    font-variant-numeric: tabular-nums;
}

.compress-patience {
    font-size: 12px;
    color: #8b5cf6;
    background: #f3e8ff;
    padding: 8px 12px;
    border-radius: 6px;
    text-align: center;
    line-height: 1.5;
}

.info-box strong {
    color: #374151;
}

/* ====== 音量滑块 专属样式 ====== */
.volume-slider-container {
    width: 100%;
}

.volume-slider {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg, #8b5cf6, #7c3aed);
    outline: none;
    margin: 10px 0 6px;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #8b5cf6;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(139, 92, 246, 0.4);
}

.volume-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #8b5cf6;
    cursor: pointer;
}

.volume-slider:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.volume-marks {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #9ca3af;
}
