* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root {
  --bg: #12141a; --card: #1c1f27; --card2: #232733; --line: #2d3240;
  --text: #eef0f4; --muted: #8a90a0; --accent: #6c8cff; --accent2: #8f6cff;
}
html, body { height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  overflow: hidden; user-select: none;
}
.app { display: flex; height: 100vh; }

/* 左侧列表 */
.sidebar {
  width: 380px; min-width: 320px; height: 100%;
  background: var(--card); border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
}
.side-head { padding: 22px 22px 10px; display: flex; align-items: baseline; gap: 10px; }
.side-head h1 { font-size: 22px; font-weight: 700; }
.count { color: var(--muted); font-size: 14px; }
.side-actions { padding: 0 22px 16px; }
.btn {
  border: 0; border-radius: 10px; padding: 12px 18px; font-size: 15px;
  background: var(--accent); color: #fff; font-weight: 600; cursor: pointer;
  width: 100%; transition: .15s;
}
.btn:active { transform: scale(.97); }
.song-list { flex: 1; overflow-y: auto; padding: 0 12px 20px; }
.song {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px; cursor: pointer; transition: .12s;
}
.song:hover { background: var(--card2); }
.song.active { background: linear-gradient(90deg, rgba(108,140,255,.18), transparent); }
.song.active .s-title { color: var(--accent); }
.song-cover {
  width: 46px; height: 46px; border-radius: 8px; background: var(--card2);
  flex: 0 0 auto; object-fit: cover;
}
.song-meta { flex: 1; min-width: 0; }
.s-title { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-artist { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-del {
  flex: 0 0 auto; border: 0; background: none; color: var(--muted);
  font-size: 18px; cursor: pointer; padding: 4px 6px; border-radius: 6px;
}
.s-del:hover { color: #ff6b6b; background: rgba(255,107,107,.1); }
.empty { text-align: center; color: var(--muted); padding: 60px 20px; font-size: 14px; }

/* 右侧播放器 */
.player {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 30px; min-width: 0;
}
.cover-wrap { width: min(46vh, 380px); aspect-ratio: 1; margin-bottom: 28px; }
.cover {
  width: 100%; height: 100%; border-radius: 20px; object-fit: cover;
  box-shadow: 0 20px 60px rgba(0,0,0,.5); background: var(--card2);
}
.now-info { text-align: center; margin-bottom: 24px; max-width: 90%; }
.now-title { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.now-artist { color: var(--muted); font-size: 16px; }
.controls { display: flex; align-items: center; gap: 32px; margin-bottom: 22px; }
.ctrl {
  border: 0; background: var(--card2); color: var(--text);
  width: 60px; height: 60px; border-radius: 50%; font-size: 24px; cursor: pointer;
  transition: .15s; display: flex; align-items: center; justify-content: center;
}
.ctrl:active { transform: scale(.92); }
.ctrl.play { width: 78px; height: 78px; font-size: 30px; background: var(--accent); }
.progress-wrap { display: flex; align-items: center; gap: 14px; width: min(100%, 500px); }
.time { font-size: 14px; color: var(--muted); min-width: 46px; text-align: center; font-variant-numeric: tabular-nums; }
.progress {
  flex: 1; height: 8px; background: var(--line); border-radius: 4px;
  cursor: pointer; position: relative; touch-action: none;
}
.progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 4px; position: relative; transition: width .1s linear; }
.progress-fill::after {
  content: ""; position: absolute; right: -8px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.4);
}
.volume-wrap { display: flex; align-items: center; gap: 12px; margin-top: 18px; width: min(100%, 460px); }
.vol-icon { font-size: 18px; }
.volume-wrap input[type=range] { flex: 1; accent-color: var(--accent); }
.vol-num { font-size: 13px; color: var(--muted); min-width: 30px; text-align: right; }
.toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
  background: var(--card2); color: var(--text); padding: 12px 22px;
  border-radius: 10px; font-size: 14px; opacity: 0; pointer-events: none; transition: .3s;
}
.toast.show { opacity: 1; }

/* 平板竖屏自适应 */
@media (max-width: 900px) {
  .app { flex-direction: column; }
  .sidebar { width: 100%; min-width: 0; height: 45vh; border-right: 0; border-bottom: 1px solid var(--line); }
  .player { padding: 20px; }
  .cover-wrap { width: min(40vh, 300px); margin-bottom: 18px; }
  .now-title { font-size: 20px; }
}

/* 上传进度条 */
.upload-progress { margin-top: 12px; }
.up-text { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.up-text #upName { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 75%; }
.up-track { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.up-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 3px; transition: width .2s; }
