body {
  margin: 0;
  background: #121212;
  color: white;
  font-family: sans-serif;
  user-select: none;
}

.app {
  max-width: 600px;
  margin: 40px auto;
  padding: 20px;
  text-align: center;
}

/* 标题 */
h1 {
  margin-bottom: 20px;
}

/* 控制区 */
.control-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 按钮 */
.btn, .mode-btn {
  width: 52px;
  height: 52px;
  background: #2a2a2a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.btn img, .mode-btn img {
  width: 22px;
  height: 22px;
  pointer-events: none;
}

/* 播放滑块 */
.switch {
  flex: 1;
  height: 52px;
  background: #2a2a2a;
  border-radius: 999px;
  position: relative;
  cursor: pointer;
}

.knob {
  width: 46px;
  height: 34px;
  background: #1db954;
  border-radius: 999px;
  position: absolute;
  top: 9px;
  left: 6px;
  transition: 0.3s;
}

.switch.active .knob {
  left: calc(100% - 52px);
}

.label {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.label.left { left: 20px; }
.label.right { right: 20px; }

/* 进度条 */
.controls {
  margin: 20px 0;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: #222;
  border-radius: 3px;
  position: relative;
}

.buffer {
  position: absolute;
  height: 100%;
  background: #444;
  width: 0%;
}

.progress {
  position: absolute;
  height: 100%;
  background: #1db954;
  width: 0%;
}

.tooltip {
  position: absolute;
  top: -28px;
  transform: translateX(-50%);
  background: black;
  padding: 2px 6px;
  font-size: 12px;
  border-radius: 4px;
  opacity: 0;
}

/* 时间 */
.time {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

/* 歌单 */
.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.song {
  padding: 12px;
  background: #1e1e1e;
  border-radius: 10px;
  cursor: pointer;
}

.song.active {
  background: #333;
  border-left: 4px solid #1db954;
}

/* 📱 手机适配（稳定版） */
@media (max-width: 600px) {

  .app {
    margin: 16px;
    padding: 16px;
  }

  h1 {
    font-size: 20px;
  }

  .control-row {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  /* 滑块占整行 */
  .switch {
    order: 1;
    width: 100%;
    flex: none;
  }

  #prevBtn { order: 2; }
  #nextBtn { order: 3; }
  #modeBtn { order: 4; }

  /* 按钮变大 */
  .btn, .mode-btn {
    width: 60px;
    height: 60px;
  }

  .btn img, .mode-btn img {
    width: 26px;
    height: 26px;
  }

  /* 进度条更粗 */
  .progress-bar {
    height: 10px;
  }

  .time {
    font-size: 12px;
  }

  .song {
    padding: 14px;
    font-size: 14px;
  }
}