/* Music Toggle Button */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;0,500;0,700;0,900;1,300;1,400;1,500;1,700;1,900&display=swap');

.music-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 4px 15px rgba(102, 126, 234, 0.4),
        0 8px 25px rgba(118, 75, 162, 0.3);
    transition: all 0.3s ease;
    animation: musicPulse 2s ease-in-out infinite;
}

.music-toggle:hover {
    transform: scale(1.1);
    box-shadow:
        0 6px 20px rgba(102, 126, 234, 0.5),
        0 10px 35px rgba(118, 75, 162, 0.4);
}

.music-toggle:active {
    transform: scale(0.95);
}

.music-icon {
    font-size: 1.8rem;
    display: block;
    transition: transform 0.3s ease;
}

.music-toggle:hover .music-icon {
    transform: rotate(15deg);
}

/* Muted state */
.music-toggle.muted {
    background: linear-gradient(135deg, #bdc3c7 0%, #95a5a6 100%);
    animation: none;
}

.music-toggle.muted .music-icon::after {
    content: '🔇';
    position: absolute;
    font-size: 1.8rem;
}

.music-toggle.muted .music-icon {
    opacity: 0;
}

/* Pulse animation */
@keyframes musicPulse {

    0%,
    100% {
        box-shadow:
            0 4px 15px rgba(102, 126, 234, 0.4),
            0 8px 25px rgba(118, 75, 162, 0.3);
    }

    50% {
        box-shadow:
            0 4px 20px rgba(102, 126, 234, 0.6),
            0 8px 35px rgba(118, 75, 162, 0.5),
            0 0 0 10px rgba(102, 126, 234, 0.1);
    }
}

/* Sound waves animation */
.music-toggle::before,
.music-toggle::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(102, 126, 234, 0.4);
    width: 100%;
    height: 100%;
    opacity: 0;
    animation: soundWave 2s ease-out infinite;
}

.music-toggle::after {
    animation-delay: 1s;
}

@keyframes soundWave {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

.music-toggle.muted::before,
.music-toggle.muted::after {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .music-toggle {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }

    .music-icon {
        font-size: 1.5rem;
    }

    .music-toggle.muted .music-icon::after {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .music-toggle {
        width: 45px;
        height: 45px;
        bottom: 15px;
        right: 15px;
    }

    .music-icon {
        font-size: 1.3rem;
    }

    .music-toggle.muted .music-icon::after {
        font-size: 1.3rem;
    }
}

/* Loading state */
.music-toggle.loading {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}