:root {
    --music-shell: rgba(8, 19, 33, 0.84);
    --music-border: rgba(191, 219, 254, 0.24);
    --music-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
    --music-blue-start: #2563eb;
    --music-blue-end: #1d4ed8;
    --music-green-start: #16a34a;
    --music-green-end: #22c55e;
    --music-label: rgba(226, 232, 240, 0.86);
}

.music-widget {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 300;
    width: 48px;
    height: 48px;
    padding: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    border-radius: 999px;
    border: 1px solid var(--music-border);
    background: var(--music-shell);
    backdrop-filter: blur(16px);
    box-shadow: var(--music-shadow);
    transition: width 0.3s ease, padding 0.3s ease, border-color 0.2s ease;
}

.music-widget:hover {
    width: 228px;
    padding: 6px 12px 6px 6px;
    border-color: rgba(191, 219, 254, 0.34);
}

.music-fab {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(145deg, var(--music-blue-start), var(--music-blue-end));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 18px rgba(37, 99, 235, 0.26);
    transition: transform 0.2s ease, filter 0.2s ease;
}

.music-fab:hover,
.music-fab:focus-visible {
    transform: translateY(-1px);
    filter: brightness(1.04);
}

.music-fab.is-playing {
    background: linear-gradient(145deg, var(--music-green-start), var(--music-green-end));
    box-shadow: 0 10px 18px rgba(34, 197, 94, 0.24);
}

.music-fab svg {
    stroke: currentColor;
}

.music-lbl {
    overflow: hidden;
    white-space: nowrap;
    flex: 1;
    max-width: 0;
    opacity: 0;
    transition: max-width 0.3s ease, opacity 0.3s ease;
}

.music-widget:hover .music-lbl {
    max-width: 170px;
    opacity: 1;
}

.music-lbl span {
    display: inline-block;
    min-width: max-content;
    padding-left: 100%;
    color: var(--music-label);
    font-family: "Montserrat", sans-serif;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    animation: music-marquee 14s linear infinite;
}

@keyframes music-marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}

@media (max-width: 600px) {
    .music-widget {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        padding: 5px;
        z-index: 650;
    }

    .music-widget:hover {
        width: 40px;
        padding: 5px;
    }

    .music-widget.is-open-mobile {
        width: 176px;
        padding: 5px 8px 5px 5px;
    }

    .music-fab {
        width: 30px;
        height: 30px;
        flex: 0 0 30px;
    }

    .music-lbl {
        display: block;
        max-width: 0;
        opacity: 0;
    }

    .music-widget.is-open-mobile .music-lbl {
        max-width: 124px;
        opacity: 1;
    }

    .music-lbl span {
        padding-left: 0;
        animation: none;
        font-size: 0.5rem;
        letter-spacing: 0.12em;
    }
}
