/* 音频调整音量 - 工具特有补充样式（基础样式复用 common.css，卡片样式与 yinpinbiansu 完全一致） */

/* 设置项提示（与 yinpinbiansu 一致） */
.setting-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #9ca3af;
}

/* 卡片头部居中数量统计（与 yinpinbiansu 一致） */
.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
}

.header-count {
    font-size: 13px;
    color: #8b5cf6;
    background: #f5f3ff;
    padding: 3px 12px;
    border-radius: 12px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 上传区域（与 yinpinbiansu 一致） */
.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;
}

/* ====== 空状态（上传占位卡片） ====== */
.empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.empty-title {
    font-size: 15px;
    color: #374151;
    font-weight: 500;
}

.empty-hint {
    font-size: 13px;
    color: #9ca3af;
    margin-top: 6px;
}

/* ====== 音频队列列表（与 yinpinbiansu 一致） ====== */
.recording-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 16px;
}

.recording-card {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.recording-card:hover {
    border-color: #8b5cf6;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.12);
}

.card-processing {
    border-color: #fbbf24;
}
.card-processing:hover {
    border-color: #d97706;
    box-shadow: 0 4px 16px rgba(217, 119, 6, 0.1);
}

.card-error {
    border-color: #fca5a5;
}
.card-error:hover {
    border-color: #dc2626;
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.1);
}

/* 卡片头部（音频封面区） */
.recording-card-header {
    position: relative;
    width: 100%;
    height: 140px;
    background: #fff;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

/* 上传占位卡片 */
.upload-card {
    cursor: pointer;
    border-style: dashed;
    border-color: #d1d5db;
    background: #fafafa;
}

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

.upload-card-header {
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-card-body {
    text-align: center;
}

.audio-cover {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #f3e8ff;
    color: #7c3aed;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
}

.audio-cover:hover {
    background: #ede9fe;
}

.audio-cover.playing {
    background: #8b5cf6;
    color: #fff;
}

.recording-card-duration {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 1;
}

/* header 右上角状态标签 */
.recording-status-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 10px;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 3px;
    letter-spacing: 0.3px;
    white-space: nowrap;
    z-index: 1;
}

.status-pending {
    background: rgba(156, 163, 175, 0.85);
    color: #fff;
}

.status-processing {
    background: rgba(217, 119, 6, 0.9);
    color: #fff;
    animation: pulse 1.2s ease-in-out infinite;
}

.status-done {
    background: rgba(5, 150, 105, 0.9);
    color: #fff;
}

.status-error {
    background: rgba(220, 38, 38, 0.9);
    color: #fff;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.65; }
}

/* 卡片内容 */
.recording-card-body {
    padding: 14px;
}

/* 播放进度条 */
.recording-progress-bar {
    padding: 0;
    line-height: 0;
}

.progress-track {
    position: relative;
    height: 3px;
    background: #e5e7eb;
    cursor: pointer;
}

.progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: #8b5cf6;
    transition: width 0.1s linear;
}

.progress-thumb {
    position: absolute;
    top: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #8b5cf6;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 3px rgba(139, 92, 246, 0.4);
    opacity: 0;
    transition: opacity 0.15s;
}

.progress-track:hover .progress-thumb {
    opacity: 1;
}

.recording-card-filename {
    margin-bottom: 10px;
}

.recording-file-name {
    font-size: 13px;
    color: #374151;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-all;
}

/* Meta 标签行 */
.recording-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.recording-card-format {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 4px;
}

.recording-card-format::before {
    content: '源 ';
    opacity: 0.7;
    font-weight: 500;
}

.recording-card-convert {
    font-size: 11px;
    font-weight: 600;
    color: #7c3aed;
    background: #ede9fe;
    padding: 2px 8px;
    border-radius: 4px;
}

.recording-card-size {
    font-size: 13px;
    color: #6b7280;
}

.recording-status-error { color: #dc2626; font-size: 12px; }

/* 操作按钮 */
.recording-card-actions {
    display: flex;
    gap: 8px;
}

.recording-card-btn {
    flex: 1;
    padding: 7px 0;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: background 0.15s;
}

.recording-card-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.recording-card-btn-download {
    background: #8b5cf6;
    color: #fff;
}

.recording-card-btn-download:hover:not(:disabled) {
    background: #7c3aed;
}

/* 顶部「重新处理」幽灵按钮 */
.btn-ghost {
    background: transparent;
    color: #7c3aed;
    border: 1px solid #d6bcfa;
}
.btn-ghost:hover:not(:disabled) {
    background: #f5f3ff;
}
.btn-ghost:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 卡片内重新处理按钮 */
.recording-card-btn-reprocess {
    background: #e0e7ff;
    color: #4338ca;
}
.recording-card-btn-reprocess:hover:not(:disabled) {
    background: #c7d2fe;
}

.recording-card-btn-cancel {
    background: #f3f4f6;
    color: #4b5563;
}
.recording-card-btn-cancel:hover {
    background: #e5e7eb;
}

.recording-card-btn-delete {
    background: #fee2e2;
    color: #dc2626;
}
.recording-card-btn-delete:hover:not(:disabled) {
    background: #fecaca;
}

/* 响应式 */
@media (max-width: 992px) {
    .recording-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .recording-list {
        grid-template-columns: 1fr;
    }
}

/* ====== 音量调节（与 yinpinbiansu 速度倍率样式一致） ====== */
.speed-control {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.speed-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.speed-value {
    font-size: 16px;
    font-weight: 600;
    color: #8b5cf6;
}

.speed-control input[type="range"] {
    width: 100%;
    accent-color: #8b5cf6;
    cursor: pointer;
}

.speed-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.speed-preset {
    flex: 1;
    min-width: 44px;
    padding: 6px 4px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    background: #f3f4f6;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.speed-preset:hover:not(:disabled) {
    background: #ddd6fe;
}

.speed-preset.active {
    background: #8b5cf6;
    color: #fff;
    border-color: #7c3aed;
}

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

/* ====== 暗色模式适配 ====== */
body.dark .speed-value {
    color: #c4b5fd;
}

body.dark .speed-preset {
    background: #374151;
    color: #e0e0e0;
}

body.dark .speed-preset:hover:not(:disabled) {
    background: #5b5f6a;
}

body.dark .speed-preset.active {
    background: #8b5cf6;
    color: #fff;
    border-color: #7c3aed;
}

body.dark .recording-card {
    background: #212529;
    border-color: #495057;
}

body.dark .recording-card:hover {
    border-color: #8b5cf6;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.25);
}

body.dark .card-processing { border-color: #d97706; }
body.dark .card-processing:hover { border-color: #f59e0b; }

body.dark .card-error { border-color: #dc2626; }
body.dark .card-error:hover { border-color: #ef4444; }

body.dark .recording-card-header { background: #2d3032; }
body.dark .recording-file-name { color: #e0e0e0; }
body.dark .recording-card-format { background: #374151; color: #9ca3af; }
body.dark .recording-card-convert { background: #4b5563; color: #c4b5fd; }
body.dark .recording-card-size { color: #9ca3af; }

body.dark .progress-track { background: #495057; }

body.dark .recording-card-btn-download { background: #8b5cf6; }
body.dark .recording-card-btn-download:hover:not(:disabled) { background: #7c3aed; }

body.dark .recording-card-btn-reprocess { background: #374151; color: #a78bfa; }
body.dark .recording-card-btn-reprocess:hover:not(:disabled) { background: #4b5563; }

body.dark .recording-card-btn-cancel { background: #495057; color: #9ca3af; }
body.dark .recording-card-btn-cancel:hover { background: #6c757d; }

body.dark .recording-card-btn-delete { background: #7f1d1d; color: #fca5a5; }
body.dark .recording-card-btn-delete:hover:not(:disabled) { background: #991b1b; }

body.dark .upload-card { background: #1a1d20; border-color: #495057; }
body.dark .upload-card:hover { border-color: #8b5cf6; background: #2d3032; }

body.dark .audio-cover { background: #4b5563; color: #c4b5fd; }
body.dark .audio-cover:hover { background: #6b7280; }
body.dark .audio-cover.playing { background: #8b5cf6; color: #fff; }

