/* ===== 底部播放器（票据06） ===== */
.player-background {
    position: fixed;
    inset: 0;
    z-index: -2;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}
.player-background.visible {
    opacity: 1;
}
/* 有背景时给正文加可读性遮罩底：90% 不透明白，
   隐约透出音乐背景图，再叠毛玻璃模糊保证文字可读。
   用字面量而非 var(--card-bg)，避免变量缺失时退化为全透明 */
body.has-player-bg .article-list,
body.has-player-bg .article-detail {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
/* 播放时音乐背景图位于最底层（z-index:-2），hero 封面让位淡出 */
body.has-player-bg .hero {
    background-image: none !important;
    transition: background-image 0s;
}
body.has-player-bg .hero::after {
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}

.player-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 56px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
    background: rgba(20, 20, 24, 0.92);
    color: #f5f5f7;
    z-index: 100;
    backdrop-filter: blur(8px);
}
.player-btn {
    background: none;
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 50%;
    width: 34px;
    height: 34px;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
}
.player-btn:hover { background: rgba(255,255,255,0.15); }
.player-info {
    display: flex;
    flex-direction: column;
    font-size: 12px;
    min-width: 180px;
    white-space: nowrap;
    overflow: hidden;
}
#player-title { font-weight: 600; }
#player-progress-text { opacity: 0.7; font-size: 11px; }
.player-progress {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    overflow: hidden;
}
#player-progress-bar {
    height: 100%;
    width: 0;
    background: var(--accent);
    transition: width 0.3s linear;
}
.player-error {
    font-size: 12px;
    color: #ff9f9f;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== 移动端播放器 ===== */
@media (max-width: 768px) {
    .player-bar {
        gap: 8px;
        padding: 0 10px;
    }
    .player-info { min-width: 0; flex: 1; }
    #player-title,
    #player-progress-text {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .player-progress { min-width: 40px; }
}
/* 底部有播放器时页面留白（移动端小屏双行时由媒体查询覆盖） */
:root { --player-height: 56px; }
body.has-player { padding-bottom: var(--player-height); }

/* 播放器占住底部一栏时，首屏 hero 底部（↓ 向下滚动区域）避开播放器，
   避免固定定位的播放栏遮住滚动提示 */
body.has-player .hero { height: calc(100vh - var(--player-height)); }
