/* 音频可视化器样式 */
.audio-visualizer {
    width: 100%;
    height: 60px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
    margin-top: 5px;
    margin-bottom: 10px;
    padding: 0 10px;
    background-color: rgba(8, 8, 25, 0.4);
    border-radius: 30px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.visualizer-bar {
    --bar-index: 0;
    width: 4px;
    height: 3px; /* 默认高度 */
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 2px;
    transition: height 0.05s ease;
    position: relative;
    z-index: 1;
    animation-delay: calc(var(--bar-index) * 20ms);
    will-change: height, background-color;
}

/* 当没有播放时的装饰性动画 */
@keyframes idle-bar-dance {
    0%, 100% {
        height: 5px;
    }
    50% {
        height: 15px;
    }
}

.audio-visualizer:not(.active) .visualizer-bar {
    animation: idle-bar-dance 2s infinite ease-in-out;
    animation-delay: calc(var(--bar-index) * 50ms);
    background: linear-gradient(to top, rgba(255, 0, 0, 0.5), rgba(0, 255, 255, 0.5));
    opacity: 0.3;
}

/* 为可视化器添加渐变遮罩，营造发光效果 */
.audio-visualizer::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center bottom, rgba(255, 255, 255, 0.2), transparent 70%);
    pointer-events: none;
}

/* 响应式调整 */
@media (max-width: 767px) {
    .audio-visualizer {
        height: 40px;
    }
    
    .visualizer-bar {
        width: 3px;
    }
}
