/**
 * Music Control Button Styles
 * Circular button with animated audio visualizer
 */

/* Music Toggle Button */
.music-toggle-btn {
    position: fixed;
    left: 30px;
    bottom: 90px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.01);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(224, 192, 128, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 150;
    transition: opacity 0.5s ease, transform 0.3s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    padding: 0;
    opacity: 0;
}

.music-toggle-btn.visible {
    opacity: 1;
}

.music-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(224, 192, 128, 0.4);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(224, 192, 128, 0.2);
}

.music-toggle-btn:active {
    transform: scale(0.95);
}

/* Audio Visualizer */
.audio-visualizer {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    height: 20px;
    width: 30px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Music Icon */
.music-icon {
    position: absolute;
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* Show visualizer when playing, hide icon */
.music-toggle-btn.playing .audio-visualizer {
    opacity: 1;
}

.music-toggle-btn.playing .music-icon {
    opacity: 0;
}

/* Show icon when paused, hide visualizer */
.music-toggle-btn.paused .audio-visualizer {
    opacity: 0;
}

.music-toggle-btn.paused .music-icon {
    opacity: 1;
}

.audio-visualizer .bar {
    width: 1px;
    background: linear-gradient(to top, #e0c080, #c9a868);
    border-radius: 1.5px;
    transition: height 0.3s ease;
    transform-origin: bottom;
}

/* Animated state - visualizer bars */
.music-toggle-btn.playing .bar {
    animation: pulse 0.6s ease-in-out infinite;
}

.music-toggle-btn.playing .bar1 {
    height: 7px;
    animation-delay: 0s;
}

.music-toggle-btn.playing .bar2 {
    height: 13px;
    animation-delay: 0.1s;
}

.music-toggle-btn.playing .bar3 {
    height: 16px;
    animation-delay: 0.2s;
}

.music-toggle-btn.playing .bar4 {
    height: 11px;
    animation-delay: 0.3s;
}

.music-toggle-btn.playing .bar5 {
    height: 8px;
    animation-delay: 0.4s;
}

.music-toggle-btn.playing .bar6 {
    height: 14px;
    animation-delay: 0.5s;
}

/* Paused state - all bars flat */
.music-toggle-btn.paused .bar {
    height: 2px;
    animation: none;
}

@keyframes pulse {
    0%, 100% {
        transform: scaleY(0.8);
    }
    50% {
        transform: scaleY(1.3);
    }
}
