/* 音频降噪与增强工具专属样式 (anr-前缀) */

/* 上传区域 */
.anr-upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 20px;
    background: #f8f9fa;
}
.anr-upload-area:hover {
    border-color: #2196F3;
    background: rgba(33, 150, 243, 0.05);
}
.anr-upload-area.anr-dragover {
    border-color: #2196F3;
    background: rgba(33, 150, 243, 0.1);
}
.anr-upload-area.anr-file-loaded {
    display: none;
}
.anr-upload-icon {
    font-size: 48px;
    color: #2196F3;
    margin-bottom: 10px;
}
.anr-upload-text {
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}
.anr-upload-hint {
    font-size: 13px;
    color: #666;
}
.anr-upload-area input[type="file"] {
    display: none;
}

/* 音频信息卡片 */
.anr-audio-info-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    color: #fff;
    display: none;
    align-items: center;
    gap: 20px;
    position: relative;
}
.anr-audio-info-card.anr-visible {
    display: flex;
}
.anr-audio-info-icon {
    font-size: 48px;
    flex-shrink: 0;
}
.anr-audio-info-details {
    flex: 1;
    min-width: 0;
}
.anr-audio-info-name {
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 5px;
}
.anr-audio-info-meta {
    font-size: 13px;
    opacity: 0.9;
}
.anr-audio-info-replace {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.anr-audio-info-replace:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 音频详细信息网格 */
.anr-info-grid {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
    display: none;
}
.anr-info-grid.anr-visible {
    display: block;
}
.anr-info-grid h4 {
    font-size: 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.anr-info-grid h4 i {
    color: #2196F3;
}
.anr-info-grid-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}
.anr-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.anr-info-label {
    font-size: 12px;
    color: #666;
}
.anr-info-value {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

/* 波形容器 */
.anr-waveform-container {
    position: relative;
    background: #263238;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    display: none;
}
.anr-waveform-container.anr-visible {
    display: block;
}
.anr-waveform-canvas-wrapper {
    background: #1a2328;
    height: 160px;
    position: relative;
}
.anr-waveform-canvas-wrapper canvas {
    width: 100%;
    height: 100%;
    display: block;
}
.anr-waveform-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #555;
    font-size: 16px;
    text-align: center;
    pointer-events: none;
}

/* 播放器控制区域 */
.anr-player-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #222;
}
.anr-player-controls button {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 22px;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.anr-player-controls button:hover {
    background: rgba(255,255,255,0.15);
}
.anr-time-display {
    color: #ccc;
    font-size: 13px;
    font-family: monospace;
    white-space: nowrap;
    min-width: 100px;
    text-align: center;
}
.anr-progress-track {
    flex: 1;
    height: 6px;
    background: #555;
    border-radius: 3px;
    position: relative;
    cursor: pointer;
}
.anr-progress-fill {
    height: 100%;
    background: #2196F3;
    border-radius: 3px;
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    pointer-events: none;
}
.anr-volume-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
}
.anr-volume-slider {
    width: 70px;
    height: 4px;
    accent-color: #2196F3;
}

/* 双播放器标签切换 */
.anr-player-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 0;
}
.anr-player-tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    background: #37474f;
    color: #aaa;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}
.anr-player-tab.anr-active {
    background: #263238;
    color: #fff;
    font-weight: 600;
}
.anr-player-tab:hover:not(.anr-active) {
    background: #455a64;
}

/* 对比切换按钮 */
.anr-compare-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    display: none;
}
.anr-compare-toggle.anr-visible {
    display: flex;
}
.anr-compare-btn {
    flex: 1;
    padding: 10px;
    border: 2px solid #dee2e6;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    font-size: 14px;
}
.anr-compare-btn.anr-active {
    border-color: #2196F3;
    background: rgba(33, 150, 243, 0.05);
    color: #2196F3;
    font-weight: 600;
}
.anr-compare-btn:hover:not(.anr-active) {
    border-color: #2196F3;
}

/* 功能选项卡 */
.anr-feature-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #dee2e6;
    display: none;
}
.anr-feature-tabs.anr-visible {
    display: flex;
}
.anr-feature-tab {
    flex: 1;
    padding: 12px 8px;
    text-align: center;
    background: #f8f9fa;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    border-right: 1px solid #dee2e6;
}
.anr-feature-tab:last-child {
    border-right: none;
}
.anr-feature-tab.anr-active {
    background: #2196F3;
    color: #fff;
    font-weight: 600;
}
.anr-feature-tab:hover:not(.anr-active) {
    background: #e9ecef;
}

/* 处理面板 */
.anr-processing-panel {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
    display: none;
}
.anr-processing-panel.anr-visible {
    display: block;
}
.anr-processing-panel h4 {
    font-size: 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.anr-processing-panel h4 i {
    color: #2196F3;
}

/* 降噪强度选择 */
.anr-noise-intensity-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}
.anr-noise-intensity-btn {
    flex: 1;
    padding: 10px;
    border: 2px solid #dee2e6;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}
.anr-noise-intensity-btn.anr-active {
    border-color: #2196F3;
    background: rgba(33, 150, 243, 0.05);
}
.anr-noise-intensity-btn:hover:not(.anr-active) {
    border-color: #2196F3;
}
.anr-noise-intensity-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}
.anr-noise-intensity-desc {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

/* 人声增强开关 */
.anr-toggle-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}
.anr-toggle-label {
    font-size: 14px;
    color: #333;
}
.anr-toggle-switch input[type="checkbox"] {
    width: 50px;
    height: 26px;
    -webkit-appearance: none;
    appearance: none;
    background: #dee2e6;
    border-radius: 13px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
}
.anr-toggle-switch input[type="checkbox"]::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    background: #fff;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.anr-toggle-switch input[type="checkbox"]:checked {
    background: #2196F3;
}
.anr-toggle-switch input[type="checkbox"]:checked::after {
    transform: translateX(24px);
}

/* 均衡器滑块组 */
.anr-eq-slider-group {
    margin-bottom: 15px;
}
.anr-eq-band {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.anr-eq-value-display {
    font-size: 14px;
    font-weight: 600;
    color: #2196F3;
    min-width: 50px;
    text-align: center;
}
.anr-eq-slider-vertical {
    writing-mode: bt-lr;
    -webkit-appearance: slider-vertical;
    width: 8px;
    height: 120px;
    accent-color: #2196F3;
}
.anr-eq-band-label {
    font-size: 12px;
    color: #666;
    text-align: center;
}
.anr-eq-band-freq {
    font-size: 11px;
    color: #999;
}

/* 均衡器预设按钮 */
.anr-eq-presets {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 15px;
}
.anr-eq-preset-btn {
    padding: 6px 14px;
    border: 1px solid #dee2e6;
    background: #fff;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 13px;
}
.anr-eq-preset-btn.anr-active {
    border-color: #2196F3;
    background: #2196F3;
    color: #fff;
}
.anr-eq-preset-btn:hover:not(.anr-active) {
    border-color: #2196F3;
    color: #2196F3;
}

/* 音量标准化面板 */
.anr-volume-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}
.anr-volume-stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    border: 1px solid #dee2e6;
}
.anr-volume-stat-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}
.anr-volume-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}
.anr-volume-stat-unit {
    font-size: 12px;
    color: #999;
}

/* 进度条区域 */
.anr-progress-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
    border: 1px solid #dee2e6;
}
.anr-progress-section.anr-visible {
    display: block;
}
.anr-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.anr-progress-title {
    font-size: 14px;
    font-weight: 500;
}
.anr-progress-percent {
    font-size: 14px;
    color: #2196F3;
    font-weight: 500;
}
.anr-progress-bar {
    width: 100%;
    height: 10px;
    background: #dee2e6;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}
.anr-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #2196F3, #2ecc71);
    border-radius: 5px;
    transition: width 0.3s;
    width: 0%;
}
.anr-progress-info {
    font-size: 13px;
    color: #666;
}

/* 导出区域 */
.anr-download-section {
    border: 2px solid #2196F3;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    margin-bottom: 20px;
    display: none;
    background: #f8f9fa;
}
.anr-download-section.anr-visible {
    display: block;
}
.anr-download-section h4 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #2196F3;
}
.anr-result-info {
    font-size: 14px;
    margin-bottom: 15px;
    color: #333;
}
.anr-btn-download {
    padding: 12px 35px;
    background: #2196F3;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.anr-btn-download:hover {
    background: #1976D2;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* 滑块组通用样式 */
.anr-slider-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.anr-slider-label {
    min-width: 80px;
    font-size: 13px;
    color: #666;
}
.anr-slider-input {
    flex: 1;
    height: 6px;
    accent-color: #2196F3;
}
.anr-slider-value {
    min-width: 45px;
    font-size: 13px;
    font-weight: 500;
    color: #2196F3;
    text-align: right;
}

.anr-hidden {
    display: none !important;
}

html {
    scroll-behavior: smooth;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .anr-noise-intensity-group {
        flex-wrap: wrap;
    }
    .anr-noise-intensity-btn {
        min-width: calc(33% - 10px);
    }
}

@media (max-width: 768px) {
    .anr-audio-info-card {
        flex-direction: column;
        text-align: center;
    }
    .anr-audio-info-replace {
        position: static;
        transform: none;
        margin-top: 10px;
        justify-content: center;
    }
    .anr-info-grid-inner {
        grid-template-columns: repeat(2, 1fr);
    }
    .anr-feature-tabs {
        flex-wrap: wrap;
    }
    .anr-feature-tab {
        min-width: calc(50% - 1px);
    }
    .anr-volume-stats {
        grid-template-columns: 1fr;
    }
    .anr-player-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .anr-info-grid-inner {
        grid-template-columns: 1fr;
    }
    .anr-slider-row {
        flex-wrap: wrap;
    }
    .anr-slider-input {
        width: calc(100% - 130px);
    }
    .anr-eq-presets {
        justify-content: center;
    }
}
