/* ===== 唱片方块卡片播放器 ===== */

/* ===== 歌词专属显示（播放器上方） ===== */
.player-lyrics {
    position: fixed;
    bottom: 80px;
    left: 0;
    z-index: 9998;
    max-width: 260px;
    width: auto;
    text-align: left;
    pointer-events: none;
    padding: 6px 14px 4px;
}
.lyrics-inner {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: .5px;
    transition: color .3s;
    display: inline;
}
.lyrics-scan {
    animation: scanShine 2.5s ease-in-out infinite;
}
@keyframes scanShine {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@media (max-width: 480px) {
    .player-lyrics {
        bottom: 68px;
        max-width: 220px;
        padding: 4px 12px 2px;
    }
    .lyrics-inner {
        font-size: 12px;
    }
}

/* 折叠小方块 */
.music-player-tab {
    position: fixed;
    bottom: 24px;
    left: 0;
    z-index: 10000;
    width: 40px;
    height: 40px;
    background: var(--cardBg, #fff);
    border: 2px solid #2c2c2c;
    border-left: none;
    border-radius: 0 8px 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 2px 2px 0 #2c2c2c;
    transition: box-shadow .2s;
    font-size: 16px;
    color: #2c2c2c;
    user-select: none;
}
.music-player-tab:hover {
    box-shadow: 3px 3px 0 #2c2c2c;
}

/* 展开卡片 */
.music-player-card {
    position: fixed;
    bottom: 24px;
    left: 0;
    z-index: 9999;
    width: 270px;
    background: var(--cardBg, #fff);
    border: 2px solid #2c2c2c;
    border-left: none;
    border-radius: 0 12px 12px 0;
    box-shadow: 4px 4px 0 #2c2c2c;
    overflow: hidden;
    transition: transform .3s cubic-bezier(.4,0,.2,1), opacity .25s ease;
    transform: translateX(-110%);
    opacity: 0;
    pointer-events: none;
}
.music-player-card.is-open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

/* 唱片区域：左信息 | 唱片 | 右信息 */
.player-record-area {
    display: flex;
    align-items: center;
    padding: 16px 10px 12px;
    gap: 8px;
}

.player-info-left {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: right;
    align-items: flex-end;
}
.player-info-right {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 64px;
}

/* 圆形唱片 */
.player-record {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    position: relative;
    cursor: pointer;
}
.record-disc {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #2c2c2c;
    overflow: hidden;
    animation: spinRecord 4s linear infinite;
    animation-play-state: paused;
    box-shadow: 2px 2px 0 rgba(0,0,0,.15);
}
.record-disc img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.record-disc.is-spinning {
    animation-play-state: running;
}

/* 唱片中心小圆点 */
.record-center-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255,255,255,.85);
    border: 2px solid #2c2c2c;
    pointer-events: none;
    box-shadow: 1px 1px 0 rgba(0,0,0,.1);
}
.record-center-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #2c2c2c;
}

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

/* 左侧信息（歌名、歌手） */
.player-info-left .player-title {
    font-size: 12px;
    font-weight: 700;
    color: #2c2c2c;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.player-info-left .player-artist {
    font-size: 11px;
    color: #888;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* 右侧信息（时间、随机） */
.player-time {
    font-size: 10px;
    color: #aaa;
    letter-spacing: .3px;
    font-family: monospace;
    white-space: nowrap;
}

.player-btn-shuffle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: 1px solid #d0d0d0;
    border-radius: 14px;
    padding: 3px 10px;
    font-size: 11px;
    color: #999;
    cursor: pointer;
    font-family: inherit;
    transition: .2s;
    line-height: 1;
    white-space: nowrap;
}
.player-btn-shuffle:hover {
    border-color: #2c2c2c;
    color: #2c2c2c;
    background: #f5f5f5;
}
.player-btn-shuffle .p-icon {
    flex-shrink: 0;
}

/* 底部区域 */
.player-footer {
    padding: 0 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

/* 进度条 */
.player-bar {
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
    border: 1px solid #2c2c2c;
}
.player-bar .bar-progress {
    height: 100%;
    width: 0;
    background: #2c2c2c;
    transition: width .3s linear;
    border-radius: 1px;
}

/* 控制按钮行 */
.player-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}
.player-actions-left {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 圆形图标按钮（快退/上一曲/播放/下一曲/快进） */
.p-btn-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid #d0d0d0;
    border-radius: 50%;
    cursor: pointer;
    color: #999;
    transition: .2s;
    font-family: inherit;
    padding: 0;
    flex-shrink: 0;
}
.p-btn-icon:hover {
    border-color: #2c2c2c;
    color: #2c2c2c;
    background: #f5f5f5;
}
.p-btn-play {
    width: 34px;
    height: 34px;
    border-color: #bbb;
    color: #888;
}
.p-btn-play:hover {
    border-color: #2c2c2c;
    color: #2c2c2c;
}
.p-btn-lyrics {
    width: 28px;
    height: 28px;
    font-size: 14px;
    font-weight: 700;
    color: #bbb;
}
.p-btn-lyrics.is-active {
    color: #2c2c2c;
    border-color: #2c2c2c;
    background: #f0f0f0;
}

/* 关闭按钮 */
.player-btn-close {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: 1px solid #d0d0d0;
    border-radius: 14px;
    cursor: pointer;
    font-size: 11px;
    color: #999;
    padding: 4px 10px;
    line-height: 1;
    transition: .2s;
    font-family: inherit;
    flex-shrink: 0;
    opacity: .7;
}
.player-btn-close:hover {
    border-color: #2c2c2c;
    color: #2c2c2c;
    background: #f5f5f5;
    opacity: 1;
}

@media (max-width: 768px) {
    .music-player-card { bottom: 76px; }
    .music-player-tab { bottom: 76px; }
    .player-lyrics { bottom: 130px; }
}

@media (max-width: 480px) {
    .music-player-card {
        width: 230px;
        bottom: 72px;
    }
    .music-player-tab {
        width: 36px;
        height: 36px;
        font-size: 14px;
        bottom: 72px;
    }
    .player-lyrics { bottom: 124px; }
    .player-record-area {
        padding: 12px 10px 10px;
        gap: 8px;
    }
    .player-record {
        width: 64px;
        height: 64px;
    }
    .record-center-dot {
        width: 14px;
        height: 14px;
    }
    .record-center-dot::after {
        width: 5px;
        height: 5px;
    }
    .player-info-left .player-title { font-size: 11px; }
    .player-info-left .player-artist { font-size: 10px; }
    .player-footer { padding: 0 10px 8px; gap: 6px; }
    .player-actions { flex-wrap: wrap; justify-content: center; gap: 4px; }
    .player-actions-left { gap: 3px; }
    .p-btn-icon { width: 26px; height: 26px; }
    .p-btn-icon svg { width: 12px !important; height: 12px !important; }
    .p-btn-play { width: 30px; height: 30px; }
    .p-btn-play svg { width: 14px !important; height: 14px !important; }
    .p-btn-lyrics { width: 26px; height: 26px; font-size: 12px; }
    .player-btn-close { padding: 3px 8px; font-size: 10px; }
}
