@font-face {
  font-family: 'player';
  src: url('./fonts/player.woff?cxp7hr') format('woff'),
       url('./fonts/player.ttf?cxp7hr') format('truetype'),
       url('./fonts/player.svg?cxp7hr#player') format('svg');
  font-weight: normal;
  font-style: normal;
  font-display: block;
}

:root {
  color-scheme: dark;
  --bg: #090909;
  --surface: #171717;
  --surface-raised: #202020;
  --border: #383838;
  --text: #e6e6e6;
  --muted: #999999;
  --accent: #ffd629;
  --accent-dim: #a98d12;
  --player-height: 48px;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.page-shell {
  width: min(100% - 28px, 760px);
  margin: 0 auto;
  padding: 32px 0 96px;
}

.page-header { margin-bottom: 22px; }
.page-header h1 {
  margin: 0 0 7px;
  color: var(--accent);
  font-size: clamp(1.5rem, 5vw, 2rem);
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.page-header p { margin: 0; color: var(--muted); font-size: .95rem; }

.player-container { width: 100%; }
.audio { display: none; }
.controlBar {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  min-height: var(--player-height);
  padding: 6px 8px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
}

.buttonContainer {
  flex: 0 0 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.buttonContainer:hover, .buttonContainer:focus-visible {
  color: var(--accent);
  background: #2a2a2a;
  outline: none;
  border-color: #4b421c;
}
.icon {
  font-family: 'player' !important;
  font: normal normal normal 18px/1 player;
  speak: never;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.icon-play:before { content: "\ea1c"; }
.icon-pause:before { content: "\ea1d"; }
.icon-backward:before { content: "\ea1f"; }
.icon-forward:before { content: "\ea25"; }
.icon-volume-up:before { content: "\ea27"; }
.icon-volume-off:before { content: "\ea29"; }

.progress-wrap, .volume-wrap { min-width: 18px; }
.progress-wrap { flex: 1 1 auto; }
.volume-wrap { flex: 0 1 100px; }
.range-rail {
  position: relative;
  width: 100%;
  height: 8px;
  border-radius: 99px;
  background: #454545;
  cursor: pointer;
  touch-action: none;
  outline: none;
}
.range-rail:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
#progressBar, #volumeBar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  pointer-events: none;
}
#volumeBar { width: 100%; }
.currentTime, .totalTime {
  flex: 0 0 auto;
  color: var(--muted);
  font: 12px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.currentTime { color: var(--text); }
.mute-button { margin-left: 2px; }

.playlist {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 8px 8px;
}
.playlist-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  padding: 11px 13px;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid #292929;
  transition: background-color .12s ease, color .12s ease;
}
.playlist-item:last-child { border-bottom: 0; }
.playlist-item:hover { background: #242424; }
.playlist-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.playlist-item.active {
  color: var(--accent);
  background: #29250f;
  box-shadow: inset 3px 0 0 var(--accent);
}
.track-title { min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.track-artist {
  flex: 0 0 auto;
  max-width: 42%;
  overflow: hidden;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 400;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.playlist-item.active .track-artist { color: #b9ad6b; }

.track-details {
  padding: 13px 15px;
  background: #111;
  border: 1px solid var(--border);
  border-radius: 8px 8px 0 0;
  color: #bdbdbd;
  font-size: .9rem;
  line-height: 1.55;
}
.track-details p {
  display: grid;
  grid-template-columns: 7.5em minmax(0, 1fr);
  gap: 0 8px;
  margin: 3px 0;
  overflow-wrap: anywhere;
}
.track-details .track-detail-title {
  display: block;
  margin: 0 0 8px;
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.detail-label { color: var(--muted); }

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin-top: 28px;
  padding: 16px 2px 8px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .8rem;
}
.copyright { margin: 0; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  text-underline-offset: 3px;
}
.footer-links a:hover, .footer-links a:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}

.watermark {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 10;
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
  opacity: 0.8; /* 透明度：0.0 = 完全透明、1.0 = 不透明 */
  pointer-events: none;
}

@media (max-width: 540px) {
  .page-shell { width: min(100% - 20px, 760px); padding-top: 22px; }
  .controlBar { gap: 2px; padding: 5px; }
  .buttonContainer { flex-basis: 29px; width: 29px; height: 32px; }
  .icon { font-size: 16px; }
  .currentTime, .totalTime { font-size: 10px; }
  .volume-wrap { flex-basis: 48px; }
  .playlist-item { padding: 11px 10px; gap: 10px; }
  .track-artist { max-width: 38%; font-size: .76rem; }
  .track-details p { grid-template-columns: 7em minmax(0, 1fr); }
  .detail-label { min-width: 0; }
}

@media (max-width: 380px) {
  .volume-wrap { display: none; }
  .mute-button { margin-left: 0; }
  .currentTime, .totalTime { font-size: 9px; }
}
