:root {
    --bg-dark: #050a14;
    --accent: #258ec5;
    --text: rgba(255, 255, 255, 0.9);
    --text-dim: rgba(255, 255, 255, 0.5);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

body {
    background-color: var(--bg-dark);
    font-family: "微软雅黑", "Oswald", sans-serif;
    color: var(--text);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.glass-bg {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 50% 30%, #112244 0%, var(--bg-dark) 80%);
    z-index: -1;
}

.back-home {
    position: absolute; top: 20px; left: 20px;
    text-decoration: none; color: var(--text);
    font-size: 24px; opacity: 0.5; transition: 0.3s;
}
.back-home:hover { opacity: 1; }

.player-container { width: 90%; max-width: 400px; text-align: center; position: relative; z-index: 10; }

/* 封面直接作为旋转圆盘 */
.vinyl-wrapper {
    position: relative; 
    width: 65vw; height: 65vw;
    max-width: 280px; max-height: 280px; 
    margin: 0 auto 2.5rem;
    display: flex; justify-content: center; align-items: center;
    border-radius: 50%;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    background: #0a0a0a; /* 图片加载前的底色 */
}

#album-cover {
    width: 100%; height: 100%;
    border-radius: 50%;
    object-fit: cover; 
    border: 8px solid #1a1a1a; /* 模拟唱片边缘厚重感 */
    animation: rotate 20s linear infinite;
    animation-play-state: paused;
}

#album-cover.playing { 
    animation-play-state: running; 
}

@keyframes rotate { 
    from { transform: rotate(0deg); } 
    to { transform: rotate(360deg); } 
}

/* 控件排版 */
.info h1 { font-size: 1.8rem; margin-bottom: 0.5rem; letter-spacing: 1px; }
.info p { color: var(--text-dim); font-size: 0.9rem; text-transform: uppercase; }

.progress-container { background: rgba(255,255,255,0.1); height: 4px; border-radius: 2px; margin: 2rem 0; position: relative; cursor: pointer; }
.progress { background: var(--accent); height: 100%; width: 0%; border-radius: 2px; transition: width 0.1s linear; }
.time-info { display: flex; justify-content: space-between; font-size: 0.7rem; color: var(--text-dim); margin-top: 8px; }

.controls { display: flex; justify-content: space-around; align-items: center; }
.btn-main { background: var(--text); color: black; border: none; width: 65px; height: 65px; border-radius: 50%; font-size: 1.5rem; cursor: pointer; transition: 0.2s; display: flex; justify-content: center; align-items: center; }
.btn-main:active { transform: scale(0.9); }
.btn-icon { background: none; border: none; color: white; font-size: 1.4rem; opacity: 0.6; cursor: pointer; transition: 0.2s; }
.btn-icon:hover { opacity: 1; }

/* 侧边栏及遮罩 */
.playlist-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4); backdrop-filter: blur(4px);
    opacity: 0; pointer-events: none; transition: 0.4s; z-index: 99;
}
.playlist-overlay.show { opacity: 1; pointer-events: auto; }

.playlist-sidebar {
    position: fixed; top: 0; right: -320px;
    width: 300px; height: 100%;
    background: rgba(5, 10, 20, 0.85); backdrop-filter: blur(25px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100; padding: 30px 20px;
    display: flex; flex-direction: column;
}
.playlist-sidebar.open { right: 0; }

.sidebar-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 25px; border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 15px; font-family: 'Oswald', sans-serif;
    font-size: 1.2rem; font-weight: bold;
}

#close-list { background: none; border: none; color: white; font-size: 20px; cursor: pointer; opacity: 0.5; transition: 0.2s; }
#close-list:hover { opacity: 1; }

#playlist-items { list-style: none; overflow-y: auto; flex-grow: 1; }
#playlist-items::-webkit-scrollbar { width: 4px; }
#playlist-items::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }

#playlist-items li {
    padding: 12px 15px; margin-bottom: 8px; border-radius: 8px;
    cursor: pointer; transition: 0.3s; font-size: 0.9rem;
    border: 1px solid transparent; color: rgba(255,255,255,0.7);
}
#playlist-items li:hover { background: rgba(255,255,255,0.05); color: white; }
#playlist-items li.active {
    background: rgba(37, 142, 197, 0.15);
    border: 1px solid var(--accent);
    color: var(--accent);
    font-weight: bold;
}