/* ===== 音乐应用 — Apple Music 风格 ===== */

#scene-music {
    background: #000;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

/* ── 导航栏 ── */
.music-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: calc(14px + var(--safe-top)) 16px 6px;
    flex-shrink: 0;
    position: relative;
}

.music-nav-back {
    width: 40px;
    height: 36px;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: absolute;
    left: 2px;
    top: calc(14px + var(--safe-top));
}

.music-nav-back:active { opacity: 0.5; }

.music-nav-back svg {
    width: 22px;
    height: 22px;
    stroke: rgba(255, 255, 255, 0.85);
    stroke-width: 2.5;
}

.music-nav-title {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
    margin-left: 4px;
    flex: 1;
    text-align: center;
}

.music-nav-actions {
    display: flex;
    gap: 4px;
}

.music-nav-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
}

.music-nav-btn:active { background: rgba(255,255,255,0.1); }

.music-nav-btn svg {
    width: 22px;
    height: 22px;
    stroke: rgba(255, 255, 255, 0.85);
    stroke-width: 1.8;
    fill: none;
}

/* ── 内容区域 ── */
.music-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 0 80px;
    background: #000;
}

.music-content::-webkit-scrollbar {
    display: none;
}

/* ── 分区标题 ── */
.music-section-header {
    padding: 20px 16px 6px;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.3px;
}

/* ── 歌曲列表 ── */
.music-song-list {
    padding: 0;
}

.music-song-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    position: relative;
}

.music-song-item:active {
    background: rgba(255, 255, 255, 0.05);
}

.music-song-index {
    width: 24px;
    text-align: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 400;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.music-song-cover {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #1a1a1a;
}

.music-song-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.music-song-info {
    flex: 1;
    min-width: 0;
}

.music-song-title {
    font-size: 16px;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-song-artist {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-song-duration {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.music-song-more {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    border-radius: 50%;
}

.music-song-more:active {
    background: rgba(255, 255, 255, 0.1);
}

.music-song-more svg {
    width: 18px;
    height: 18px;
    fill: rgba(255, 255, 255, 0.4);
}

/* ── 底部播放器 ── */
.music-player-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 16px calc(10px + var(--safe-bottom));
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.music-player-cover {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #1a1a1a;
}

.music-player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.music-player-info {
    flex: 1;
    min-width: 0;
}

.music-player-title {
    font-size: 15px;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-player-artist {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-player-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.music-player-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
}

.music-player-btn:active {
    background: rgba(255, 255, 255, 0.1);
}

.music-player-btn svg {
    width: 22px;
    height: 22px;
    fill: rgba(255, 255, 255, 0.85);
}

.music-player-btn-play svg {
    width: 28px;
    height: 28px;
    fill: #fff;
}

.music-player-btn-play svg polygon {
    fill: #000;
}

/* ── 进度条 ── */
.music-progress-bar {
    position: absolute;
    top: 0;
    left: 16px;
    right: 16px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1px;
    overflow: hidden;
}

.music-progress-fill {
    height: 100%;
    width: 33%;
    background: #fff;
    border-radius: 1px;
    transition: width 1s linear;
}
