/* AD语音预处理模块样式 - 统一现有风格 */

/* ========================================
   顶部状态提示栏
   ======================================== */
.audio-processor-status-bar {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.status-bar-header {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.status-bar-header:hover {
    background: rgba(59, 130, 246, 0.05);
}

.status-bar-title {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-right: 16px;
}

.status-bar-text {
    flex: 1;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.status-bar-icon {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    transition: transform 0.3s ease;
}

.status-bar-header.expanded .status-bar-icon {
    transform: rotate(180deg);
}

.status-bar-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 20px;
}

.status-bar-content.expanded {
    max-height: 200px;
    padding: 0 20px 20px 20px;
}

.progress-detail {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 16px;
}

.progress-text {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 12px;
}

.progress-bar-container {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    width: 0%;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.progress-stats {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    text-align: right;
}

/* ========================================
   页面头部与步骤指示器
   ======================================== */
#page-audio-processor .page-header {
    background: linear-gradient(135deg, rgba(15, 17, 23, 0.95) 0%, rgba(26, 31, 46, 0.9) 100%);
    backdrop-filter: blur(25px);
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid rgba(59, 130, 246, 0.15);
}

#page-audio-processor .page-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 16px 0;
}

.step-indicators {
    display: flex;
    gap: 8px;
    align-items: center;
}

.step-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.step-indicator.clickable {
    cursor: pointer;
}

.step-indicator.clickable:hover:not(.locked) {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(59, 130, 246, 0.3);
}

.step-indicator.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.step-indicator.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(139, 92, 246, 0.2));
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
    opacity: 1;
}

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
}

.step-indicator.active .step-num {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: #ffffff;
}

.step-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.step-indicator.active .step-label {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* ========================================
   步骤内容布局
   ======================================== */
.step-content {
    display: none;
}

.step-content.active {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 180px);
}

.step-layout {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex: 1;
    overflow: hidden;
}

.step-left {
    flex: 0 0 40%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: hidden;
}

.step-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: hidden;
}

/* ========================================
   功能介绍卡片
   ======================================== */
.feature-intro-card {
    background: linear-gradient(135deg, rgba(15, 17, 23, 0.95) 0%, rgba(26, 31, 46, 0.9) 100%);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 6px;
}

.feature-intro-header {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(59, 130, 246, 0.1);
}

/* 网格布局（步骤3、4） */
.feature-intro-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 16px;
}

.feature-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(59, 130, 246, 0.3);
}

.feature-item .feature-icon {
    font-size: 20px;
    margin-bottom: 4px;
}

.feature-item .feature-name {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.feature-item .feature-desc {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

.feature-note {
    padding: 12px 16px;
    background: rgba(59, 130, 246, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

/* 列表布局（步骤5） */
.feature-intro-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
}

.feature-list-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.feature-list-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(59, 130, 246, 0.3);
}

.feature-list-item .feature-icon {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.feature-list-item .feature-content {
    flex: 1;
}

.feature-list-item .feature-name {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 4px;
}

.feature-list-item .feature-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
}

/* ========================================
   上传按钮区域
   ======================================== */
.upload-section {
    background: linear-gradient(135deg, rgba(15, 17, 23, 0.95) 0%, rgba(26, 31, 46, 0.9) 100%);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 12px;
    padding: 20px;
}

.upload-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.1));
    border: 2px dashed rgba(59, 130, 246, 0.4);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-btn:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(139, 92, 246, 0.2));
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.upload-icon {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.5);
}

.upload-btn.uploaded .upload-icon {
    color: #10b981;
}

/* ========================================
   文件列表区域
   ======================================== */
.file-list-section {
    flex: 1;
    background: linear-gradient(135deg, rgba(15, 17, 23, 0.95) 0%, rgba(26, 31, 46, 0.9) 100%);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

/* 步骤3-5中的文件列表需要限制高度 */
#step3 .file-list-section{
    max-height: 135px;
    flex: 0 0 auto;
}
#step4 .file-list-section{
    max-height: 220px;
    flex: 0 0 auto;
}
#step5 .file-list-section {
    max-height: 180px;
    flex: 0 0 auto;
}

.section-header {
    padding: 16px 20px;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.file-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.file-list-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.file-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(59, 130, 246, 0.3);
}

.file-icon {
    font-size: 20px;
}

.file-info {
    flex: 1;
}

.file-name {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 4px;
    word-break: break-all;
}

.file-meta {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.file-status {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.file-status.pending {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

.file-status.converting {
    background: rgba(33, 150, 243, 0.2);
    color: #2196f3;
}

.file-status.completed {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.file-status.error {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
}

/* ========================================
   信息框与提示框
   ======================================== */
.info-box, .hint-box {
    background: linear-gradient(135deg, rgba(15, 17, 23, 0.95) 0%, rgba(26, 31, 46, 0.9) 100%);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 12px;
    overflow: hidden;
}

.info-header, .hint-header {
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(59, 130, 246, 0.1);
}

.info-content, .hint-content {
    padding: 16px;
    font-size: 13px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    flex: 1;
    overflow-y: auto;
    max-height: 500px;
}

/* 美化提示框滚动条 */
.info-content::-webkit-scrollbar,
.hint-content::-webkit-scrollbar {
    width: 6px;
}

.info-content::-webkit-scrollbar-track,
.hint-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.info-content::-webkit-scrollbar-thumb,
.hint-content::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.5);
    border-radius: 3px;
    transition: background 0.3s ease;
}

.info-content::-webkit-scrollbar-thumb:hover,
.hint-content::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.7);
}

.info-box {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.hint-box {
    min-height: 150px;
}

/* ========================================
   选项区域（步骤2-5）
   ======================================== */
.option-section {
    background: linear-gradient(135deg, rgba(15, 17, 23, 0.95) 0%, rgba(26, 31, 46, 0.9) 100%);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 8px;
}



.option-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.option-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #3b82f6;
}

/* 选项组样式（步骤5） */
.option-group {
    margin-bottom: 20px;
}

.option-group:last-child {
    margin-bottom: 0;
}

.option-desc {
    margin-left: 30px;
    margin-top: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

/* 单选按钮样式 */
.radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    margin-top: 8px;
    margin-left: 30px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.2s ease;
}

.radio-option:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(59, 130, 246, 0.3);
}

.radio-option input[type="radio"] {
    cursor: pointer;
    accent-color: #3b82f6;
}

.silence-mode {
    margin-top: 12px;
}

/* ========================================
   预览内容
   ======================================== */
.preview-content {
    min-height: 200px;
}

.preview-disabled {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
}

.preview-example {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    padding: 12px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
}

/* ========================================
   处理进度区域（步骤3）
   ======================================== */
.processing-section {
    flex: 1;
    background: linear-gradient(135deg, rgba(15, 17, 23, 0.95) 0%, rgba(26, 31, 46, 0.9) 100%);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.processing-tasks {
    flex: 1;
    margin: 16px 0;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 8px;
}

/* 滚动条美化 */
.processing-tasks::-webkit-scrollbar {
    width: 6px;
}

.processing-tasks::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.processing-tasks::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.5);
    border-radius: 3px;
    transition: background 0.3s ease;
}

.processing-tasks::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.7);
}

.task-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.task-icon {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.3);
}

.task-item.processing .task-icon {
    color: #2196f3;
    animation: pulse 1.5s ease-in-out infinite;
}

.task-item.completed .task-icon {
    color: #4caf50;
}

.task-item.error .task-icon {
    color: #f44336;
}

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

.processing-progress {
    margin: 20px 0;
}

.progress-bar-container-large {
    height: 16px;
    background: linear-gradient(135deg, rgba(15, 17, 23, 0.8), rgba(26, 31, 46, 0.8));
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
    background-size: 200% 100%;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.6), 0 0 40px rgba(139, 92, 246, 0.4);
    transition: width 0.5s ease;
    border-radius: 8px;
}

.progress-bar-fill:not(.completed) {
    animation: shimmer 2s linear infinite;
}

.progress-bar-fill.completed {
    background: linear-gradient(90deg, #10b981, #059669);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.6), 0 0 40px rgba(5, 150, 105, 0.4);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.progress-percent {
    text-align: right;
    font-size: 15px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

/* ========================================
   包预览区域
   ======================================== */
.package-preview {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.package-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 8px;
}

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

.package-name {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.package-structure {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    padding: 12px;
}

.structure-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.structure-item.indent {
    padding-left: 24px;
}

.structure-icon {
    font-size: 14px;
}

.package-info {
    background: rgba(59, 130, 246, 0.1);
    border-radius: 6px;
    padding: 12px;
}

.info-item {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 4px;
}

.info-item span {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

/* ========================================
   按钮样式
   ======================================== */
.step-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(15, 17, 23, 0.95) 0%, rgba(26, 31, 46, 0.9) 100%);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 12px;
}

.btn-primary, .btn-secondary, .btn-success {
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover:not(:disabled) {
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-success:hover:not(:disabled) {
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.5);
    transform: translateY(-2px);
}

.btn-large {
    width: 100%;
    padding: 14px 24px;
    font-size: 15px;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
   滚动条样式
   ======================================== */
.file-list-container::-webkit-scrollbar {
    width: 6px;
}

.file-list-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.file-list-container::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.3);
    border-radius: 3px;
}

.file-list-container::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.5);
}

/* ========================================
   右键菜单样式
   ======================================== */
.file-context-menu {
    position: fixed;
    z-index: 10000;
    background: linear-gradient(135deg, rgba(15, 17, 23, 0.98) 0%, rgba(26, 31, 46, 0.95) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    padding: 6px 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    min-width: 150px;
}

.context-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.context-menu-item:hover {
    background: rgba(244, 67, 54, 0.2);
}

.context-menu-icon {
    font-size: 16px;
}

.context-menu-text {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
}

.file-item {
    cursor: pointer;
    user-select: none;
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 1200px) {
    .step-layout {
        flex-direction: column;
    }
    
    .step-left, .step-right {
        flex: 1;
    }
    
    .step-indicators {
        flex-wrap: wrap;
    }
}
