/* 音频库专用样式，接在 style.css 之后加载 */

body.has-player { padding-bottom: 104px; }

/* ---------- 列表 ---------- */

.tracks {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.track {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: border-color .16s, background .16s, transform .16s;
}

.track:hover {
  border-color: #3d3355;
  transform: translateX(2px);
}

.track.on {
  border-color: var(--accent);
  background: rgba(157, 123, 255, .08);
}

.play {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  background: rgba(157, 123, 255, .14);
  color: var(--text);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .16s, transform .16s;
}

.track:hover .play { background: rgba(157, 123, 255, .26); }
.play:active { transform: scale(.94); }

.tinfo {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tinfo b {
  font-weight: 600;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tinfo small {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.dl {
  color: var(--muted);
  font-size: 12px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  white-space: nowrap;
}

.dl:hover {
  color: var(--accent-2);
  border-color: var(--accent-2);
  text-decoration: none;
}

/* ---------- 底部播放器 ---------- */

.player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px clamp(14px, 4vw, 48px);
  background: rgba(14, 15, 19, .94);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}

.pp {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 0;
  background: linear-gradient(135deg, #7d5cff, #9d7bff);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  transition: filter .16s, transform .16s;
}

.pp:hover { filter: brightness(1.1); }
.pp:active { transform: scale(.95); }

.pinfo {
  flex: 0 1 240px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pinfo b {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pinfo small { color: var(--muted); font-size: 11.5px; }

.pbar {
  flex: 1 1 auto;
  min-width: 80px;
  height: 6px;
  border-radius: 3px;
  background: var(--panel-2);
  cursor: pointer;
  position: relative;
  outline: none;
}

.pbar:focus-visible { box-shadow: 0 0 0 3px rgba(157, 123, 255, .3); }

.pfill {
  height: 100%;
  width: 0;
  border-radius: 3px;
  background: linear-gradient(90deg, #7d5cff, #4ff0d0);
  transition: width .08s linear;
}

.ptime {
  flex: none;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  min-width: 90px;
  text-align: right;
}

@media (max-width: 640px) {
  .track { grid-template-columns: 36px minmax(0, 1fr); padding: 9px 11px; gap: 10px; }
  .track .dl { display: none; }
  .play { width: 34px; height: 34px; font-size: 12px; }
  .player { gap: 10px; padding: 10px 14px; flex-wrap: wrap; }
  .pinfo { flex: 1 1 auto; }
  .ptime { display: none; }
  .pbar { order: 9; flex-basis: 100%; }
}
