/* ========== 音乐页 - 页面容器 ========== */
#page:has(#anMusic-page) {
    border: 0;
    box-shadow: none !important;
    padding: 0 !important;
    background: transparent !important;
}

/* ========== 动态模糊背景 ========== */
#an_music_bg {
    display: none;
    filter: blur(63px) saturate(1.2);
    opacity: 0.4;
    position: fixed;
    z-index: -999;
    background-attachment: local;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    transform: rotate(0deg);
    animation: bgRotate 60s linear infinite;
}

@keyframes bgRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

body:has(#anMusic-page) #an_music_bg {
    display: block;
}

body:has(#anMusic-page) {
    background: transparent;
}

/* ========== 播放器主体 - flex 布局 ========== */
#anMusic-page > .aplayer,
#anMusic-page .aplayer {
    display: flex !important;
    flex-direction: row-reverse !important;
    flex-wrap: nowrap !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    gap: 20px;
    min-height: 75vh;
}

#anMusic-page {
    position: relative;
    z-index: 1;
}

/* ========== 左侧封面 + 歌词区 ========== */
#anMusic-page .aplayer-body {
    flex: 0 0 38% !important;
    max-width: 38%;
    width: 38%;
    height: 75vh;
    box-sizing: border-box;
}

/* 封面图 */
#anMusic-page .aplayer-pic {
    float: none;
    width: 200px;
    height: 200px;
    border-radius: 16px;
    margin: 0 auto;
    left: 0;
    right: 0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

#anMusic-page .aplayer-pic:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

/* 歌曲信息 */
#anMusic-page .aplayer-info {
    margin: 0 20px;
    border-bottom: none;
}

#anMusic-page .aplayer-info .aplayer-music {
    text-align: center;
    height: auto;
    margin: 12px 15px;
}

#anMusic-page .aplayer-info .aplayer-music .aplayer-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

#anMusic-page .aplayer-info .aplayer-music .aplayer-author {
    font-size: 1rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.75);
}

/* 歌词 */
#anMusic-page .aplayer-info .aplayer-lrc {
    height: 800%;
    margin-top: 50px;
    mask-image: linear-gradient(to bottom, #000 0%, #000 70%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 70%, transparent 100%);
}

#anMusic-page .aplayer-info .aplayer-lrc p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    transition: color 0.3s, transform 0.3s;
}

#anMusic-page .aplayer-info .aplayer-lrc p.aplayer-lrc-current {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    transform: scale(1.05);
}

#anMusic-page .aplayer .aplayer-lrc:after,
#anMusic-page .aplayer .aplayer-lrc:before {
    display: none;
}

/* ========== 底部控制器 ========== */
#anMusic-page .aplayer-info .aplayer-controller {
    position: fixed;
    max-width: 1500px;
    margin: auto;
    left: 0;
    right: 0;
    bottom: 50px;
}

#anMusic-page .aplayer-info .aplayer-controller .aplayer-bar-wrap {
    margin: 0 160px 0 150px;
}

#anMusic-page .aplayer-info .aplayer-controller .aplayer-played {
    background: var(--anzhiyu-white) !important;
}

#anMusic-page .aplayer-info .aplayer-controller .aplayer-thumb {
    -webkit-transform: none;
    transform: none;
    background: #fff !important;
}

#anMusic-page .aplayer-info .aplayer-time .aplayer-icon-back,
#anMusic-page .aplayer-info .aplayer-time .aplayer-icon-forward,
#anMusic-page .aplayer-info .aplayer-time .aplayer-icon-play {
    display: inline;
    position: fixed;
}

#anMusic-page .aplayer-info .aplayer-time {
    position: absolute;
    width: 100%;
    bottom: 21px;
    height: 0;
    display: flex;
    justify-content: flex-end;
}

#anMusic-page .aplayer-info .aplayer-time .aplayer-time-inner {
    margin-right: 18px;
    margin-top: -8px;
}

#anMusic-page .aplayer-info .aplayer-time .aplayer-icon-back {
    position: absolute;
    left: 0;
}

#anMusic-page .aplayer-info .aplayer-time .aplayer-icon-play {
    position: absolute;
    left: 40px;
}

#anMusic-page .aplayer-info .aplayer-time .aplayer-icon-forward {
    position: absolute;
    left: 80px;
}

#anMusic-page .aplayer-info .aplayer-time .aplayer-icon {
    width: 2rem;
    height: 2rem;
    margin-left: 15px;
}

#anMusic-page .aplayer-info .aplayer-time .aplayer-icon-menu {
    display: none;
}

#anMusic-page .aplayer-info .aplayer-time .aplayer-icon path {
    fill: var(--anzhiyu-white);
    opacity: 0.8;
}

/* ========== 右侧歌单列表（毛玻璃卡片） ========== */
#anMusic-page .aplayer-list {
    flex: 1 1 0% !important;
    max-width: calc(62% - 20px);
    width: auto;
    max-height: none !important;
    height: 75vh;
    display: block !important;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    overflow: hidden;
    box-sizing: border-box;
}

#anMusic-page ol {
    max-height: 75vh !important;
    padding: 4px 12px 4px 8px;
}

#anMusic-page ol > li {
    border-top: 1px solid transparent;
    font-size: 14px;
    padding: 6px 12px;
    margin: 1px 0;
    border-radius: 8px;
    transition: background 0.25s ease, transform 0.2s ease;
}

#anMusic-page ol > li:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(4px);
}

#anMusic-page ol > li.aplayer-list-light {
    background: rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

#anMusic-page ol > li span {
    color: var(--anzhiyu-white);
}

#anMusic-page ol > li.aplayer-list-light .aplayer-list-cur {
    display: none;
}

#anMusic-page ol > li span.aplayer-list-author {
    opacity: 0.55;
}

/* ========== 导航栏透明 ========== */
.page:has(#anMusic-page) #nav {
    backdrop-filter: none !important;
    background: 0 0 !important;
    border-bottom: none !important;
}

.page:has(#anMusic-page) #page-header.not-top-img #nav a,
.page:has(#anMusic-page) #page-header #nav .back-home-button {
    color: var(--anzhiyu-white);
}

body:has(#anMusic-page) .s-sticker div {
    color: var(--anzhiyu-white) !important;
}

body:has(#anMusic-page) .aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon.aplayer-icon-loop {
    margin-right: 15px;
}

[data-theme="dark"] .page:has(#anMusic-page) #page-header:before {
    background-color: transparent;
}

/* ========== 移动端样式 ========== */
@media screen and (max-width: 768px) {
    body:has(#anMusic-page) #rightside {
        display: none;
    }

    body:has(#anMusic-page) #content-inner,
    body:has(#anMusic-page) #page {
        z-index: auto;
    }

    /* 移动端取消 flex 布局 */
    #anMusic-page > .aplayer,
    #anMusic-page .aplayer {
        display: flex !important;
        flex-direction: column !important;
        gap: 0;
        min-height: auto;
    }

    /* 歌曲列表 */
    #anMusic-page .aplayer-list {
        flex: none !important;
        max-width: 100%;
        width: 100%;
        position: fixed;
        z-index: 1002;
        width: 100%;
        bottom: -76%;
        left: 0;
        background: var(--sidebar-bg);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        height: auto;
        border-radius: 15px 15px 0 0;
        padding: 15px 0;
        border: none;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    }

    #anMusic-page .aplayer-list.aplayer-list-hide {
        bottom: 0% !important;
    }

    #anMusic-page ol {
        max-height: 60vh !important;
        padding-right: 0;
    }

    #anMusic-page ol > li {
        display: flex;
        margin: 0 10px;
        transform: none;
    }

    #anMusic-page ol > li:hover {
        transform: none;
    }

    #anMusic-page ol > li span {
        color: var(--font-color);
    }

    #anMusic-page ol > li span.aplayer-list-title {
        max-width: 55%;
        width: auto;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        overflow: hidden;
        -webkit-box-orient: vertical;
    }

    #anMusic-page ol > li.aplayer-list-light {
        background: #33a673;
        padding: 5px 20px;
        border-radius: 10px;
        box-shadow: none;
    }

    #anMusic-page ol > li.aplayer-list-light span {
        color: #fff;
    }

    #anMusic-page ol > li span.aplayer-list-author {
        position: absolute;
        right: 10px;
        width: auto;
        max-width: 35%;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        overflow: hidden;
        -webkit-box-orient: vertical;
    }

    #anMusic-page ol > li.aplayer-list-light span.aplayer-list-author {
        right: 15px;
    }

    /* 歌词信息 */
    #anMusic-page .aplayer-body {
        flex: none !important;
        max-width: 100%;
        width: 100%;
        position: fixed;
        margin: auto;
        left: 0;
        right: 0;
        top: 100px;
    }

    #anMusic-page .aplayer-pic {
        width: 160px;
        height: 160px;
    }

    #anMusic-page .aplayer-info .aplayer-lrc {
        margin-top: 40px;
        height: auto;
        max-height: 200%;
        min-height: 100%;
        mask-image: linear-gradient(to bottom, #000, #000, #000, #000, #0000, #0000);
        -webkit-mask-image: linear-gradient(to bottom, #000, #000, #000, #000, #0000, #0000);
    }

    #anMusic-page .aplayer-info .aplayer-lrc p.aplayer-lrc-current {
        color: #33a673;
    }

    /* 控制按键和进度条 */
    #anMusic-page .aplayer-info .aplayer-controller {
        width: 100%;
        bottom: 100px;
    }

    #anMusic-page .aplayer-info .aplayer-controller .aplayer-bar-wrap {
        margin: 0 30px;
    }

    #anMusic-page .aplayer-info .aplayer-time {
        bottom: -40px;
    }

    #anMusic-page .aplayer-info .aplayer-time .aplayer-time-inner {
        position: absolute;
        width: 100%;
        margin-right: 0;
        margin-top: -33px;
    }

    #anMusic-page .aplayer-info .aplayer-time .aplayer-time-inner .aplayer-dtime {
        position: absolute;
        right: 30px;
    }

    #anMusic-page .aplayer-info .aplayer-time .aplayer-time-inner .aplayer-ptime {
        position: absolute;
        left: 35px;
    }

    #anMusic-page .aplayer-info .aplayer-time .aplayer-icon-back {
        margin: auto;
        right: 110px;
    }

    #anMusic-page .aplayer-info .aplayer-time .aplayer-icon-play {
        margin: auto;
        right: 0;
        left: 0;
    }

    #anMusic-page .aplayer-info .aplayer-time .aplayer-icon-forward {
        margin: auto;
        left: 110px;
        right: 0;
    }

    #anMusic-page .aplayer-info .aplayer-time .aplayer-icon-order {
        position: absolute;
        left: 22px;
    }

    #anMusic-page .aplayer-info .aplayer-time .aplayer-icon-loop {
        position: absolute;
        right: 25px;
    }

    #anMusic-page .aplayer-info .aplayer-time .aplayer-icon-menu {
        display: inline;
        position: absolute;
        right: 25px;
        top: -90px;
    }

    #anMusic-page .aplayer-volume-bar-wrap {
        bottom: 0;
        right: 7px;
    }

    #anMusic-page .aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap {
        left: -66px;
    }
}