/* ============================================================
   网易云风格 · 浅色干净
   ============================================================ */
:root {
    --bg: #ffffff;
    --bg-soft: #fafafa;
    --text: #1a1a1a;
    --text-sub: #999999;
    --text-mute: #bbbbbb;
    --line: #f0f0f0;
    --line-strong: #e6e6e6;
    --red: #c62f2f;
    --red-hover: #a82323;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

/* ============================================================
   页面容器
   ============================================================ */
.page {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: clamp(16px, 3vw, 32px) clamp(14px, 3vw, 28px) 100px;
}

/* ============================================================
   专辑头部
   ============================================================ */
.album-hero {
    display: flex;
    gap: clamp(14px, 3vw, 26px);
    margin-bottom: clamp(18px, 3vw, 30px);
}

.hero-cover {
    position: relative;
    flex-shrink: 0;
    width: clamp(120px, 26vw, 200px);
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #f5f5f5;
}

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

.hero-year {
    position: absolute;
    left: 8px;
    bottom: 8px;
    padding: 2px 8px;
    font-size: 11px;
    color: #fff;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 999px;
    backdrop-filter: blur(4px);
}

.hero-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

.hero-tag {
    display: inline-block;
    align-self: flex-start;
    padding: 2px 8px;
    font-size: 11px;
    color: var(--red);
    border: 1px solid var(--red);
    border-radius: 3px;
    line-height: 1.4;
}

.hero-title {
    font-size: clamp(18px, 3.4vw, 26px);
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
    word-break: break-word;
}

.hero-sub {
    font-size: clamp(12px, 2.4vw, 13px);
    color: var(--text-sub);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.hero-sub .dot { color: var(--text-mute); }

.hero-info {
    margin-top: 6px;
    font-size: clamp(12px, 2.4vw, 13px);
    color: #666;
    line-height: 1.7;
    max-height: 4.5em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* ============================================================
   歌曲面板
   ============================================================ */
.song-panel {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.panel-head {
    display: grid;
    grid-template-columns: 48px 1fr 120px 48px;
    align-items: center;
    padding: 0 clamp(10px, 2vw, 16px);
    height: 40px;
    font-size: 12px;
    color: var(--text-sub);
    border-bottom: 1px solid var(--line);
    background: var(--bg-soft);
}

.song-list {
    list-style: none;
}

.song-list li {
    display: grid;
    grid-template-columns: 48px 1fr 120px 48px;
    align-items: center;
    padding: 0 clamp(10px, 2vw, 16px);
    height: 52px;
    font-size: 14px;
    border-bottom: 1px solid var(--line);
    cursor: pointer;
    transition: background 0.15s ease;
}

.song-list li:last-child { border-bottom: none; }

.song-list li:hover { background: #f7f7f7; }

.col-index {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--text-mute);
    font-variant-numeric: tabular-nums;
    position: relative;
}

.idx-num { display: block; }
.idx-play { display: none; width: 16px; height: 16px; color: var(--red); }

.song-list li:hover .idx-num { display: none; }
.song-list li:hover .idx-play { display: block; }

.col-title {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.song-name {
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.song-badge {
    flex-shrink: 0;
    font-size: 10px;
    color: var(--text-sub);
    border: 1px solid var(--line-strong);
    border-radius: 3px;
    padding: 0 5px;
    line-height: 16px;
}

.col-artist {
    font-size: 13px;
    color: var(--text-sub);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.col-action {
    display: flex;
    justify-content: center;
    color: var(--text-mute);
    opacity: 0;
    transition: opacity 0.15s ease, color 0.15s ease;
}

.song-list li:hover .col-action {
    opacity: 1;
    color: var(--red);
}

/* ============================================================
   播放器（白底卡片）
   ============================================================ */
.player-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: overlay-in 0.2s ease;
}

@keyframes overlay-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.player-container {
    width: 100%;
    max-width: 400px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
    padding: clamp(18px, 3.4vw, 24px);
    display: flex;
    flex-direction: column;
    gap: clamp(14px, 3vw, 18px);
    animation: player-in 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes player-in {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0)   scale(1);    }
}

/* 头部 */
.player-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ph-cover {
    width: clamp(48px, 13vw, 56px);
    height: clamp(48px, 13vw, 56px);
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #f5f5f5;
}
.ph-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

.ph-meta { flex: 1; min-width: 0; }

.ph-name {
    font-size: clamp(14px, 3.4vw, 15px);
    font-weight: 600;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ph-artist {
    font-size: 12.5px;
    color: var(--text-sub);
    margin-top: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ph-close {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: var(--text-sub);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
}
.ph-close:hover { background: #f2f2f2; color: var(--text); }

/* 音频条 */
#audioPlayer {
    width: 100%;
    outline: none;
}

/* 控制按钮 */
.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
}

.controls button {
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

#prevButton,
#nextButton {
    width: clamp(40px, 11vw, 44px);
    height: clamp(40px, 11vw, 44px);
    border-radius: 50%;
    background: #f5f5f5;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
}
#prevButton:hover,
#nextButton:hover { background: #ececec; color: #111; }
#prevButton:active,
#nextButton:active { transform: scale(0.94); }

#playButton {
    min-width: clamp(84px, 22vw, 100px);
    height: clamp(40px, 11vw, 44px);
    padding: 0 clamp(18px, 4vw, 24px);
    border-radius: 999px;
    background: var(--red);
    color: #fff;
    font-size: clamp(14px, 3.4vw, 15px);
    font-weight: 500;
    letter-spacing: 0.5px;
}
#playButton:hover { background: var(--red-hover); }
#playButton:active { transform: scale(0.96); }

/* 歌词 */
.lyrics-container {
    max-height: clamp(160px, 38vh, 280px);
    overflow-y: auto;
    background: var(--bg-soft);
    border-radius: var(--radius-md);
    padding: clamp(12px, 3vw, 16px);
    scrollbar-width: thin;
    scrollbar-color: #dcdcdc transparent;
}
.lyrics-container::-webkit-scrollbar { width: 6px; }
.lyrics-container::-webkit-scrollbar-thumb {
    background: #dcdcdc;
    border-radius: 3px;
}

.lyrics-text {
    font-family: inherit;
    font-size: clamp(12.5px, 3.2vw, 13.5px);
    line-height: 2;
    color: #666;
    white-space: pre-wrap;
    word-break: break-word;
    text-align: center;
}

/* ============================================================
   移动端
   ============================================================ */
@media (max-width: 560px) {
    .page {
        padding: 16px 14px 90px;
    }

    .album-hero {
        gap: 12px;
        margin-bottom: 18px;
    }

    .hero-cover {
        width: 110px;
    }

    .hero-info {
        -webkit-line-clamp: 2;
    }

    .panel-head {
        display: none;
    }

    .song-list li {
        grid-template-columns: 36px 1fr 40px;
        height: 56px;
        padding: 0 10px;
    }

    .col-artist {
        display: none;
    }

    .col-action {
        opacity: 1;
        color: var(--text-mute);
    }

    .player-overlay {
        padding: 0;
        align-items: stretch;
    }

    .player-container {
        max-width: 100%;
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
        padding: calc(env(safe-area-inset-top, 0px) + 20px) 18px
                 calc(var(--safe-bottom) + 16px);
        gap: 16px;
    }

    .player-header {
        gap: 12px;
    }

    .ph-cover {
        width: 52px;
        height: 52px;
    }

    .lyrics-container {
        flex: 1;
        max-height: none;
    }
}