/* ================= 设计变量（沿用参考页 new/index.html 的风格令牌） ================= */
:root {
    --bg: #FFF6EC;
    --ink: #2B2118;
    --muted: #7A6A5D;
    --primary: #E24A3A;
    --accent: #F8B400;
    --cream: #FFFDF9;
    --night: #241A12;
    --grad: linear-gradient(120deg, #FF6B35, #F8B400);
    --grad-soft: linear-gradient(120deg, rgba(255, 107, 53, 0.14), rgba(248, 180, 0, 0.14));
    --glass: rgba(255, 255, 255, 0.72);
    --radius-xl: 28px;
    --shadow-lg: 0 24px 60px rgba(43, 33, 24, 0.12);
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ================= 重置与基础 ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg);
    background-image: radial-gradient(rgba(43, 33, 24, 0.07) 1px, transparent 1px);
    background-size: 22px 22px;
    color: var(--ink);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
}

img {
    max-width: 100%;
    display: block;
}

::selection {
    background: var(--accent);
    color: var(--ink);
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.hidden {
    display: none !important;
}

/* ================= 背景装饰：漂浮光斑 ================= */
.bg-decor {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 14s ease-in-out infinite alternate;
}

.blob-1 {
    width: 420px;
    height: 420px;
    top: -120px;
    left: -100px;
    background: radial-gradient(circle, #FF6B35, transparent 70%);
}

.blob-2 {
    width: 380px;
    height: 380px;
    top: 30%;
    right: -140px;
    background: radial-gradient(circle, #F8B400, transparent 70%);
    animation-delay: -5s;
}

.blob-3 {
    width: 460px;
    height: 460px;
    bottom: -160px;
    left: 30%;
    background: radial-gradient(circle, #E24A3A, transparent 70%);
    animation-delay: -9s;
    opacity: 0.25;
}

@keyframes float {
    from { transform: translateY(-18px) scale(1); }
    to   { transform: translateY(18px) scale(1.08); }
}

/* ================= 吸顶玻璃导航 ================= */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--glass);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    backdrop-filter: blur(16px) saturate(1.4);
    border-bottom: 1px solid rgba(43, 33, 24, 0.07);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.85rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--ink);
}

.logo-dot {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    background: var(--grad-soft);
    border: 1px solid rgba(226, 74, 58, 0.16);
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* ================= 按钮 ================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.85rem 1.7rem;
    border-radius: 999px;
    border: 0;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.25s, box-shadow 0.25s, background-color 0.25s, color 0.25s, border-color 0.25s;
}

.btn:disabled {
    opacity: 0.45;
    cursor: default;
    transform: none;
}

.btn-primary {
    background: var(--grad);
    color: #fff;
    box-shadow: 0 12px 28px rgba(255, 107, 53, 0.35);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(255, 107, 53, 0.45);
}

.btn-ghost {
    border: 2px solid rgba(43, 33, 24, 0.16);
    background: transparent;
    color: var(--ink);
}

.btn-ghost:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.5rem 1.1rem;
    font-size: 0.88rem;
}

/* ================= Banner ================= */
.banner {
    position: relative;
    margin: 1.5rem 1.5rem 0;
    height: clamp(340px, 52vh, 520px);
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: linear-gradient(135deg, #2B2118, var(--primary));
    box-shadow: var(--shadow-lg);
}

.banner::before,
.banner::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    pointer-events: none;
}

.banner::before {
    width: 380px;
    height: 380px;
    top: -120px;
    right: -80px;
    background: radial-gradient(circle, rgba(248, 180, 0, 0.55), transparent 70%);
}

.banner::after {
    width: 420px;
    height: 420px;
    bottom: -160px;
    left: -100px;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.5), transparent 70%);
}

.banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.55));
}

.banner-content {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 0 2rem;
}

.chip {
    display: inline-block;
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    font-size: 0.82rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1.1rem;
}

.banner-content h1 {
    font-size: clamp(2.6rem, 7vw, 5rem);
    line-height: 1.06;
    font-weight: 800;
    letter-spacing: -1px;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.banner-content h1 em {
    font-style: italic;
    background: linear-gradient(120deg, #FFD166, #F8B400);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.banner-content p {
    margin-top: 0.9rem;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.banner-scroll {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 38px;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 14px;
    z-index: 1;
}

.banner-scroll::after {
    content: "";
    position: absolute;
    top: 7px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 8px;
    border-radius: 2px;
    background: #fff;
    animation: scrollDot 1.8s ease-in-out infinite;
}

@keyframes scrollDot {
    0%   { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, 12px); }
}

/* ================= 跑马灯 ================= */
.marquee {
    margin: 1.5rem 1.5rem 0;
    border-radius: 999px;
    background: var(--grad);
    overflow: hidden;
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 1px;
    box-shadow: 0 10px 26px rgba(255, 107, 53, 0.28);
}

.marquee-track {
    display: flex;
    align-items: center;
    gap: 2.2rem;
    width: max-content;
    padding: 0.65rem 1rem;
    animation: marquee 22s linear infinite;
}

.marquee-track span:nth-child(even) {
    color: rgba(255, 255, 255, 0.75);
}

@keyframes marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ================= 歌单 ================= */
.playlist {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 2rem 4rem;
}

.section-head {
    text-align: center;
    margin-bottom: 2rem;
}

.section-head .eyebrow {
    justify-content: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--primary);
}

.eyebrow::before {
    content: "";
    width: 30px;
    height: 3px;
    border-radius: 3px;
    background: var(--grad);
}

.section-title {
    margin-top: 0.8rem;
    font-size: clamp(2rem, 4.5vw, 2.8rem);
    letter-spacing: -1px;
}

.playlist-card {
    position: relative;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(43, 33, 24, 0.07);
    border-radius: 24px;
    padding: 1.4rem 1rem 1.2rem;
    box-shadow: 0 14px 36px rgba(43, 33, 24, 0.07);
    overflow: hidden;
}

.playlist-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 5px;
    background: var(--grad);
}

.playlist-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0 0.6rem 0.9rem;
}

.playlist-count {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
}

/* ---------- 歌曲列表 ---------- */
.song-list {
    list-style: none;
}

.song-item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.8rem 0.9rem;
    border-radius: 16px;
    cursor: pointer;
    border-bottom: 1px solid rgba(43, 33, 24, 0.05);
    transition: background-color 0.2s;
}

.song-item:last-child {
    border-bottom: 0;
}

.song-item:hover {
    background: rgba(43, 33, 24, 0.04);
}

.song-item.playing {
    background: var(--grad-soft);
}

.song-index {
    flex: none;
    width: 22px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.song-item.playing .song-index {
    display: none;
}

.eq {
    flex: none;
    display: none;
    align-items: flex-end;
    gap: 2px;
    height: 16px;
}

.song-item.playing .eq {
    display: inline-flex;
}

.eq span {
    width: 3px;
    height: 6px;
    border-radius: 2px;
    background: var(--primary);
    animation: eq-bounce 0.9s ease-in-out infinite;
}

.eq span:nth-child(2) { animation-delay: 0.15s; }
.eq span:nth-child(3) { animation-delay: 0.3s; }

@keyframes eq-bounce {
    0%, 100% { height: 5px; }
    50%      { height: 14px; }
}

.song-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.song-title {
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-item.playing .song-title {
    color: var(--primary);
}

.song-artist {
    font-size: 0.8rem;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-duration {
    flex: none;
    font-size: 0.8rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    min-width: 44px;
    text-align: right;
}

/* ---------- 空状态 ---------- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2.6rem 1rem 2.2rem;
}

.empty-icon {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: var(--grad-soft);
    display: grid;
    place-items: center;
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.15rem;
    margin-bottom: 0.4rem;
}

.empty-state p {
    color: var(--muted);
    font-size: 0.9rem;
}

.empty-state.loading .empty-icon {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.5; transform: scale(0.9); }
}

/* ================= 页脚 ================= */
footer {
    position: relative;
    background: var(--night);
    color: #F7EDE2;
    text-align: center;
    padding: 3.5rem 2rem 150px;
    overflow: hidden;
}

footer::before {
    content: "";
    position: absolute;
    top: -140px;
    left: 50%;
    transform: translateX(-50%);
    width: 520px;
    height: 280px;
    background: radial-gradient(ellipse, rgba(248, 180, 0, 0.22), transparent 70%);
    pointer-events: none;
}

footer .eyebrow {
    color: var(--accent);
    justify-content: center;
}

footer .eyebrow::before {
    background: var(--grad);
}

.footer-copy {
    margin-top: 1.2rem;
    font-size: 0.85rem;
    color: rgba(247, 237, 226, 0.45);
}

/* ================= 底部固定播放条 ================= */
.player-bar {
    position: fixed;
    left: 1.5rem;
    right: 1.5rem;
    bottom: 1.25rem;
    z-index: 900;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1.1rem;
    padding: 0.7rem 1.1rem;
    background: var(--glass);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    backdrop-filter: blur(18px) saturate(1.4);
    border: 1px solid rgba(43, 33, 24, 0.08);
    border-radius: 24px;
    box-shadow: 0 18px 50px rgba(43, 33, 24, 0.18);
}

.player-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 0;
}

.disc {
    flex: none;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--grad);
    color: #fff;
    font-size: 1.4rem;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.35);
}

.player-meta {
    min-width: 0;
}

.player-title {
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-artist {
    font-size: 0.8rem;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-center {
    width: min(520px, 44vw);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.ctrl-btn {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s, opacity 0.2s;
}

.ctrl-btn:hover:not(:disabled) {
    background: var(--grad-soft);
    transform: translateY(-1px);
}

.ctrl-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.ctrl-main {
    width: 54px;
    height: 54px;
    background: var(--grad);
    color: #fff;
    box-shadow: 0 10px 24px rgba(255, 107, 53, 0.35);
}

.ctrl-main:hover:not(:disabled) {
    background: var(--grad);
}

.icon-pause,
.icon-mute {
    display: none;
}

#play-btn.is-playing .icon-play { display: none; }
#play-btn.is-playing .icon-pause { display: block; }

#mute-btn.is-muted .icon-volume { display: none; }
#mute-btn.is-muted .icon-mute { display: block; }

.progress-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
}

.time {
    font-size: 0.75rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    min-width: 38px;
}

.time:last-child {
    text-align: right;
}

.player-side {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

.player-side .volume {
    width: 110px;
}

/* ---------- 滑杆 ---------- */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 20px;
    background: transparent;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(to right, #FF6B35 0%, var(--accent) var(--fill, 0%), rgba(43, 33, 24, 0.12) var(--fill, 0%));
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    margin-top: -4px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--primary);
    box-shadow: 0 2px 8px rgba(43, 33, 24, 0.28);
    transition: transform 0.15s;
}

input[type="range"]:active::-webkit-slider-thumb {
    transform: scale(1.25);
}

input[type="range"]::-moz-range-track {
    height: 6px;
    border-radius: 999px;
    background: rgba(43, 33, 24, 0.12);
}

input[type="range"]::-moz-range-progress {
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, #FF6B35, var(--accent));
}

input[type="range"]::-moz-range-thumb {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--primary);
}

input[type="range"]:disabled {
    opacity: 0.45;
    cursor: default;
}

/* ================= 轻提示 ================= */
.toast {
    position: fixed;
    top: 84px;
    left: 50%;
    transform: translate(-50%, -16px);
    z-index: 2000;
    background: var(--night);
    color: #F7EDE2;
    padding: 0.65rem 1.3rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    max-width: min(88vw, 480px);
    text-align: center;
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ================= 滚动入场 ================= */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

.reveal.d1 { transition-delay: 0.1s; }

/* ================= 响应式 ================= */
@media (max-width: 820px) {
    .player-bar {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
    }

    .player-info {
        grid-column: 1;
        grid-row: 1;
    }

    .player-side {
        grid-column: 2;
        grid-row: 1;
    }

    .player-side .volume {
        display: none;
    }

    .player-center {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
    }
}

@media (max-width: 560px) {
    .nav-container {
        padding: 0.75rem 1.25rem;
    }

    .banner {
        margin: 0.75rem 0.75rem 0;
        border-radius: 22px;
    }

    .marquee {
        margin: 0.75rem 0.75rem 0;
        font-size: 0.82rem;
    }

    .banner-content p {
        font-size: 0.95rem;
    }

    .playlist {
        padding: 2.2rem 1.25rem 3rem;
    }

    footer {
        padding: 3rem 1.25rem 150px;
    }

    .player-bar {
        left: 0.75rem;
        right: 0.75rem;
        bottom: 0.75rem;
        padding: 0.6rem 0.7rem;
        border-radius: 20px;
    }

    .disc {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }

    .player-title {
        font-size: 0.88rem;
    }

    .ctrl-btn {
        width: 38px;
        height: 38px;
    }

    .ctrl-main {
        width: 48px;
        height: 48px;
    }

    .song-item {
        padding: 0.7rem 0.6rem;
    }
}

/* 无障碍：减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}
