/* ========== 播放器容器 ========== */
.GC-NCM-global-float-music {
    position: fixed;
    left: calc(max(18px, env(safe-area-inset-left)) + var(--global-offset-x, 0px));
    bottom: calc(max(18px, env(safe-area-inset-bottom)) + var(--global-offset-y, 0px));
    z-index: 9999;
    width: var(--global-record-width, 58px);
    height: var(--global-record-width, 58px);
    max-width: calc(100vw - 32px);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    color: var(--global-text, #fff);
    line-height: normal;
    contain: layout style;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate3d(0, 0, 0) scale(1);
    transform-origin: left bottom;
    transition: width .52s cubic-bezier(.18, .92, .2, 1), filter .28s ease, opacity .3s ease, transform .46s cubic-bezier(.16, 1, .3, 1), visibility 0s linear 0s;
    --global-offset-x: 0px;
    --global-offset-y: 0px;
    --global-theme: #dd001b;
    --global-theme-light: #ff6b6b;
    --global-theme-deep: #7a0012;
    --global-dark: #001e26;
    --global-text: #fff;
    --global-muted: rgba(255, 255, 255, .62);
    --global-control-bg: rgba(255, 255, 255, .16);
    --global-control-border: rgba(255, 255, 255, .24);
    --global-icon-filter: brightness(0) invert(1);
    --global-record-width: 58px;
    --global-title-width: 240px;
    --global-expanded-width: calc(var(--global-record-width) + var(--global-title-width));
    font-size: 14px;
}

/* ========== 胶囊容器 ========== */
.GC-NCM-global-float-music__capsule {
    position: relative;
    display: grid;
    grid-template-columns: var(--global-record-width) var(--global-title-width);
    gap: 0;
    align-items: center;
    isolation: isolate;
    box-sizing: border-box;
    width: 100%;
    height: 58px;
    overflow: hidden;
    border: thin solid rgba(100, 100, 100, .08);
    border-radius: 999px;
    background: rgba(255, 255, 255, .52);
    contain: layout paint style;
    box-shadow: 0 .2rem 1rem 0 rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 30, 38, .08), 0 0 0 1px rgba(255, 255, 255, .18) inset;
    backdrop-filter: blur(2em) saturate(1.5);
    -webkit-backdrop-filter: blur(2em) saturate(1.5);
    transform: translateZ(0);
    transition: width .52s cubic-bezier(.18, .92, .2, 1), box-shadow .52s cubic-bezier(.18, .92, .2, 1), border-color .52s cubic-bezier(.18, .92, .2, 1), background-color .52s cubic-bezier(.18, .92, .2, 1), background .52s cubic-bezier(.18, .92, .2, 1), clip-path .52s cubic-bezier(.18, .92, .2, 1);
}

/* ========== 皮肤层（展开时渐显） ========== */
.GC-NCM-global-float-music__skin {
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    background: radial-gradient(circle at 18% 10%, color-mix(in srgb, var(--global-theme-light) 52%, rgba(255, 255, 255, .24)) 0%, transparent 44%),
        linear-gradient(135deg, color-mix(in srgb, var(--global-theme) 88%, var(--global-theme-light)), color-mix(in srgb, var(--global-theme-deep) 78%, var(--global-dark)));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--global-theme-light) 48%, rgba(255, 255, 255, .2)) inset, 0 0 0 2px rgba(255, 255, 255, .14) inset;
    opacity: 0;
    transition: opacity .52s cubic-bezier(.18, .92, .2, 1);
    pointer-events: none;
}

/* ========== 状态类名 ========== */
.GC-NCM-global-float-music.is-expanded,
.GC-NCM-global-float-music.is-list-open {
    width: min(var(--global-expanded-width), calc(100vw - 32px));
}
.GC-NCM-global-float-music.is-expanded .GC-NCM-global-float-music__skin,
.GC-NCM-global-float-music.is-list-open .GC-NCM-global-float-music__skin { opacity: 1; }

.GC-NCM-global-float-music.is-expanded .GC-NCM-global-float-music__capsule,
.GC-NCM-global-float-music.is-list-open .GC-NCM-global-float-music__capsule {
    border-color: color-mix(in srgb, var(--global-theme) 72%, rgba(255, 255, 255, .2));
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .22) inset,
        0 1px 0 rgba(255, 255, 255, .18) inset,
        0 -1px 0 color-mix(in srgb, var(--global-theme-deep) 58%, rgba(0, 0, 0, .34)) inset,
        0 5px 14px rgba(0, 0, 0, .12),
        0 0 14px color-mix(in srgb, var(--global-theme) 24%, transparent),
        0 0 24px color-mix(in srgb, var(--global-theme-light) 10%, transparent);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    cursor: pointer;
}
.GC-NCM-global-float-music.is-expanded .GC-NCM-global-float-music__skin,
.GC-NCM-global-float-music.is-list-open .GC-NCM-global-float-music__skin {
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--global-theme-light) 34%, rgba(255, 255, 255, .14)) inset,
        0 0 12px color-mix(in srgb, var(--global-theme) 16%, transparent) inset;
}

/* 收起状态：圆形唱片 */
.GC-NCM-global-float-music:not(.is-expanded):not(.is-list-open) .GC-NCM-global-float-music__capsule {
    border-color: transparent;
    background: linear-gradient(to bottom, rgba(255, 255, 255, .88), rgba(255, 255, 255, .58));
    box-shadow: rgba(255, 255, 255, .95) 1.4px 2.8px .8px -1.4px inset,
        rgba(255, 255, 255, .72) -1.2px -2.8px .8px -1.4px inset,
        rgba(255, 255, 255, .16) 0 0 0 1px inset,
        rgba(0, 30, 38, .08) 2px 3px 2px 0 inset,
        0 8px 18px rgba(0, 30, 38, .12);
    clip-path: circle(50% at 50% 50%);
}

/* ========== 进度条遮罩 ========== */
.GC-NCM-global-float-music__capsule::before {
    content: "";
    position: absolute;
    left: var(--global-record-width);
    right: 1px;
    top: 1px;
    bottom: 1px;
    z-index: 1;
    border-radius: 0 999px 999px 0;
    background: linear-gradient(90deg, transparent 0,
        color-mix(in srgb, var(--global-theme-light) 24%, rgba(255, 255, 255, .08)) 14%,
        color-mix(in srgb, var(--global-theme-light) 28%, rgba(255, 255, 255, .08)) 26%,
        color-mix(in srgb, var(--global-theme) 26%, rgba(255, 255, 255, .05)) 58%,
        color-mix(in srgb, var(--global-theme-deep) 34%, rgba(0, 30, 38, .14)));
    clip-path: inset(0 var(--progress-cut, 100%) 0 0 round 0 999px 999px 0);
    opacity: 0;
    transition: clip-path .18s linear, opacity .36s ease;
    pointer-events: none;
}
.GC-NCM-global-float-music.is-playing .GC-NCM-global-float-music__capsule::before { opacity: .38; }

/* ========== 主按钮区域（唱片） ========== */
.GC-NCM-global-float-music__main {
    position: relative;
    z-index: 3;
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    justify-self: center;
    display: block;
    width: var(--global-record-width);
    height: var(--global-record-width);
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.GC-NCM-global-float-music__record {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
}
.GC-NCM-global-float-music__record-disc {
    position: absolute;
    left: 50%;
    top: 50%;
    display: block;
    overflow: hidden;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    filter: drop-shadow(0 0 10px rgba(0, 30, 38, .18));
    transform: translate3d(-50%, -50%, 0);
}
.GC-NCM-global-float-music__record-disc>img {
    position: absolute;
    left: 48%;
    top: 48%;
    display: block;
    border-radius: 50%;
    object-fit: cover;
    user-select: none;
    -webkit-user-drag: none;
    transform: translate3d(-50%, -50%, 0);
}
.GC-NCM-global-float-music__vinyl {
    z-index: 1;
    width: 44px;
    height: 44px;
    object-fit: contain;
}
.GC-NCM-global-float-music__cover {
    z-index: 2;
    width: 28px;
    height: 28px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .35), 0 0 10px rgba(0, 30, 38, .16);
    animation: GC-NCM-global-cover-spin 7s linear infinite;
    animation-play-state: paused;
}
.GC-NCM-global-float-music.is-playing .GC-NCM-global-float-music__cover {
    animation-play-state: running;
    will-change: transform;
}

/* 收起态 hover 显示播放/暂停按钮 */
.GC-NCM-global-float-music:not(.is-expanded):not(.is-list-open):hover .GC-NCM-global-float-music__record { opacity: 0; filter: blur(.6px); }
.GC-NCM-global-float-music__hover-play {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    border: 0;
    opacity: 0;
    transform: scale(.68);
    transition: opacity .32s ease .04s, transform .44s cubic-bezier(.16, 1, .3, 1) .04s;
    pointer-events: none;
}
.GC-NCM-global-float-music__hover-play::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 35px;
    height: 35px;
    border: 1px solid rgba(0, 30, 38, .08);
    border-radius: 50%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, .88), rgba(255, 255, 255, .58));
    box-shadow: rgba(255, 255, 255, .98) 1.4px 2.8px .8px -1.4px inset,
        rgba(255, 255, 255, .78) -1.2px -2.8px .8px -1.4px inset,
        rgba(255, 255, 255, .16) 0 0 0 1px inset,
        rgba(0, 30, 38, .08) 2px 3px 2px 0 inset,
        0 8px 18px rgba(0, 30, 38, .12);
    transform: translate3d(-50%, -50%, 0);
}
.GC-NCM-global-float-music:not(.is-expanded):not(.is-list-open):hover .GC-NCM-global-float-music__hover-play {
    opacity: 1;
    transform: scale(1);
}
.GC-NCM-global-float-music__hover-play img {
    position: relative;
    z-index: 1;
    display: block;
    width: 20px;
    height: 20px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 30, 38, .18));
    transform: translateX(1px);
}

/* ========== 歌曲标题区域 ========== */
.GC-NCM-global-float-music__info {
    position: relative;
    z-index: 3;
    grid-column: 2;
    display: flex;
    align-items: center;
    min-width: 0;
    height: 100%;
    padding-right: 12px;
    opacity: 0;
    transform: translate3d(-8px, 0, 0);
    transition: opacity .28s ease, transform .36s cubic-bezier(.18, .92, .2, 1);
    pointer-events: none;
}
.GC-NCM-global-float-music__title {
    display: block;
    overflow: hidden;
    min-width: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--global-text, #fff);
    font-size: 16px;
    font-weight: 900;
}
.GC-NCM-global-float-music.is-expanded .GC-NCM-global-float-music__info,
.GC-NCM-global-float-music.is-list-open .GC-NCM-global-float-music__info {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    pointer-events: auto;
}

/* ========== 控制按钮组 ========== */
.GC-NCM-global-float-music__controls {
    position: absolute;
    right: 8px;
    top: 50%;
    z-index: 4;
    display: inline-flex;
    gap: 6px;
    align-items: center;
    opacity: 0;
    transform: translate3d(12px, -50%, 0);
    transition: opacity .22s ease, transform .32s cubic-bezier(.18, .92, .2, 1);
    pointer-events: none;
}
.GC-NCM-global-float-music.is-expanded:hover .GC-NCM-global-float-music__controls,
.GC-NCM-global-float-music.is-list-open .GC-NCM-global-float-music__controls {
    opacity: 1;
    transform: translate3d(0, -50%, 0);
    pointer-events: auto;
}
.GC-NCM-global-float-music__control {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--global-control-border);
    border-radius: 50%;
    background: var(--global-control-bg);
    box-shadow: inset 0 1px color-mix(in srgb, var(--global-theme-light) 32%, rgba(255, 255, 255, .16));
    cursor: pointer;
    transition: transform .18s ease, background .18s ease;
}
.GC-NCM-global-float-music__control:hover { background: color-mix(in srgb, var(--global-theme-light) 26%, var(--global-control-bg)); transform: scale(1.08); }
.GC-NCM-global-float-music__control:active { transform: scale(.94); }
.GC-NCM-global-float-music__control img {
    display: block;
    width: 17px;
    height: 17px;
    object-fit: contain;
    filter: var(--global-icon-filter);
}

/* ========== 播放列表 ========== */
.GC-NCM-global-float-music__list {
    position: absolute;
    left: 0;
    bottom: 68px;
    width: 340px;
    max-width: calc(100vw - 32px);
    max-height: 0;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--global-theme-light) 28%, rgba(255, 255, 255, .14));
    border-radius: 18px;
    background: linear-gradient(145deg,
        color-mix(in srgb, var(--global-theme-deep) 78%, rgba(0, 30, 38, .9)),
        color-mix(in srgb, var(--global-theme) 42%, rgba(0, 30, 38, .88)));
    box-shadow: 0 18px 42px color-mix(in srgb, var(--global-theme-deep) 34%, rgba(0, 30, 38, .28));
    opacity: 0;
    transform: translate3d(0, 12px, 0) scale(.98);
    transform-origin: left bottom;
    transition: max-height .38s cubic-bezier(.18, .92, .2, 1), opacity .24s ease, transform .36s cubic-bezier(.18, .92, .2, 1);
    backdrop-filter: blur(22px) saturate(150%);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
}
.GC-NCM-global-float-music.is-list-open .GC-NCM-global-float-music__list {
    max-height: 360px;
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}
.GC-NCM-global-float-music__list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    font-size: 13px;
    font-weight: 850;
    color: var(--global-text);
}
.GC-NCM-global-float-music__list-count {
    color: var(--global-muted);
    font-size: 12px;
}
.GC-NCM-global-float-music__list-body {
    display: grid;
    gap: 7px;
    max-height: 298px;
    padding: 9px;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .64) rgba(255, 255, 255, .12);
}
.GC-NCM-global-float-music__list-body::-webkit-scrollbar { width: 8px; }
.GC-NCM-global-float-music__list-body::-webkit-scrollbar-track {
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
}
.GC-NCM-global-float-music__list-body::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: rgba(255, 255, 255, .68);
    background-clip: content-box;
}
.GC-NCM-global-float-music__list-item {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    width: 100%;
    min-height: 54px;
    padding: 7px;
    border: 1px solid color-mix(in srgb, var(--global-theme-light) 18%, rgba(255, 255, 255, .1));
    border-radius: 12px;
    background: color-mix(in srgb, var(--global-theme-light) 10%, rgba(255, 255, 255, .06));
    color: var(--global-text);
    text-align: left;
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.GC-NCM-global-float-music__list-item:hover,
.GC-NCM-global-float-music__list-item.is-active {
    border-color: color-mix(in srgb, var(--global-theme-light) 36%, rgba(255, 255, 255, .18));
    background: color-mix(in srgb, var(--global-theme-light) 18%, rgba(255, 255, 255, .12));
    transform: translate3d(0, -1px, 0);
}
.GC-NCM-global-float-music__list-item img {
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 9px;
    object-fit: cover;
}
.GC-NCM-global-float-music__list-item strong,
.GC-NCM-global-float-music__list-item small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.GC-NCM-global-float-music__list-item strong { font-size: 13px; font-weight: 850; }
.GC-NCM-global-float-music__list-item small {
    margin-top: 3px;
    color: var(--global-muted);
    font-size: 12px;
    font-weight: 650;
}

/* ========== 动画 ========== */
@keyframes GC-NCM-global-cover-spin {
    to { transform: translate3d(-50%, -50%, 0) rotate(360deg); }
}

/* ========== 响应式：移动端隐藏 ========== */
@media (max-width: 768px) {
    .GC-NCM-global-float-music {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
}
