/* ===== 封面 ===== */
.now-playing {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 18px;
}

.disc {
  position: relative;
  flex: 0 0 auto;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  padding: 5px;
  background: conic-gradient(from 0deg, rgba(255,255,255,0.7), rgba(255,255,255,0.15) 40%, rgba(255,255,255,0.7));
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
}
/* 唱片转动动画 */
.disc {
  animation: disc-spin 8s linear infinite;
  animation-play-state: paused;
}
.disc.playing {
  animation-play-state: running;
}
@keyframes disc-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.disc img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 3px solid rgba(15, 15, 30, 0.95);
  /* 默认封面：好看的渐变 */
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}
/* 黑胶纹理 */
.disc-vinyl {
  position: absolute;
  inset: 50%;
  width: 22%;
  height: 22%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent, #7cc6ff) 0 28%, rgba(20,20,30,0.95) 29% 100%);
  box-shadow: inset 0 0 6px rgba(0,0,0,0.5);
}

.track { min-width: 0; flex: 1 1 auto; }
.track-name {
  margin: 0 0 4px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track-artist {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== 歌词 =====
 * 使用原生 overflow 滚动 + scrollTop 定位
 * 不依赖 transform，不触发 layout
 */
.lyrics {
  height: 156px;
  overflow-y: auto;
  text-align: center;
  margin: 0 -8px 16px;
  padding: 60px 8px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.lyrics::-webkit-scrollbar { display: none; }
.lyrics-hint {
  color: var(--muted-2);
  font-size: 14px;
  padding: 40px 0;
}
.lyric-line {
  padding: 7px 10px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--muted-2);
  cursor: default;
  opacity: 0.55;
  transition: color 0.35s ease, opacity 0.35s ease;
}
.lyric-line.active {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  opacity: 1;
}

/* ===== 进度条 ===== */
.progress {
  position: relative;
  height: 20px;
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-bottom: 6px;
  touch-action: none;
}
.progress-track {
  position: absolute;
  left: 0; right: 0;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
}
.progress-buffer {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 0%;
  background: rgba(255, 255, 255, 0.30);
  border-radius: 999px;
}
.progress-fill {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 999px;
}
.progress-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.progress:hover .progress-thumb,
.progress.dragging .progress-thumb { transform: translate(-50%, -50%) scale(1); }

.time {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
  margin-bottom: 16px;
}

/* ===== 胶囊控件 ===== */
.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
}
.ctrl {
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: var(--glass-strong);
  color: var(--text);
  cursor: pointer;
  transition: background 0.22s ease;
  -webkit-tap-highlight-color: transparent;
}
.ctrl:active { transform: scale(0.9); }
.ctrl:hover { background: rgba(255, 255, 255, 0.26); }

.ctrl-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
}
.ctrl-icon.active {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(124, 198, 255, 0.16);
}

/* 播放键 */
.ctrl-play {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: linear-gradient(140deg, rgba(255,255,255,0.30), rgba(255,255,255,0.10));
  box-shadow:
    inset 0 2px 4px rgba(255,255,255,0.5),
    0 10px 26px rgba(0, 0, 0, 0.35);
}
.ctrl-play:hover { background: linear-gradient(140deg, rgba(255,255,255,0.40), rgba(255,255,255,0.14)); }
.ctrl-play .ic-pause { display: none; }
.ctrl-play.playing .ic-play  { display: none; }
.ctrl-play.playing .ic-pause { display: block; }

.state {
  text-align: center;
  font-size: 12px;
  color: var(--muted-2);
  margin-bottom: 14px;
  min-height: 16px;
}

/* ===== 搜索 ===== */
.search {
  display: flex;
  gap: 8px;
}
.search input {
  flex: 1 1 auto;
  min-width: 0;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--glass-strong);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.search input::placeholder { color: var(--muted-2); }
.search input:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.20);
}
.search-result {
  margin-top: 10px;
  max-height: 200px;
  overflow-y: auto;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.20);
  border: 1px solid var(--border);
}
.search-result[hidden] { display: none; }
.search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.18s ease;
}
.search-item + .search-item { border-top: 1px solid rgba(255,255,255,0.08); }
.search-item:hover { background: rgba(255,255,255,0.10); }
.search-item img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex: 0 0 auto; }
.search-item .search-meta { min-width: 0; flex: 1 1 auto; }
.search-item .search-meta b {
  display: block;
  font-size: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.search-item .search-meta span {
  font-size: 12px;
  color: var(--muted-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.search-add {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--border);
  color: var(--muted);
}

/* ===== 错误提示 ===== */
.error-tip {
  text-align: center;
  font-size: 12px;
  color: #ff9f68;
  margin-bottom: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 120, 80, 0.12);
  border: 1px solid rgba(255, 120, 80, 0.3);
}
