:root {
  color-scheme: light;
  font-family: "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  color: #171a1f;
  background: #f5f7f8;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px)); background: #f5f7f8; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(260px, 720px) auto auto;
  align-items: center;
  gap: 24px;
  min-height: 84px;
  padding: 10px clamp(18px, 3vw, 48px);
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid #e1e5e8;
  box-shadow: 0 7px 20px rgba(20,27,31,.06);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; color: inherit; text-decoration: none; font-weight: 750; }
.brand img { width: 340px; height: 72px; object-fit: contain; object-position: left center; }
.brand span { white-space: nowrap; }
.search { display: grid; grid-template-columns: 1fr auto; min-width: 0; }
.search input { min-width: 0; height: 42px; padding: 0 14px; border: 1px solid #ccd3d8; border-right: 0; border-radius: 6px 0 0 6px; background: #fff; outline: none; }
.search input:focus { border-color: #008aa4; box-shadow: 0 0 0 3px rgba(0,138,164,.12); }
.search button { border: 0; border-radius: 0 6px 6px 0; padding: 0 22px; color: #fff; background: #e7352b; cursor: pointer; font-weight: 700; }
nav { display: flex; align-items: center; justify-content: flex-end; gap: 24px; white-space: nowrap; }
nav a { color: #343a40; text-decoration: none; font-weight: 650; }
nav a.active { color: #e7352b; }
.language-switch { display: inline-flex; align-items: center; justify-self: end; width: max-content; max-width: 100%; padding: 3px; border: 1px solid #d4dade; border-radius: 6px; background: #f3f5f6; }
.language-switch button { width: 38px; height: 30px; border: 0; border-radius: 4px; background: transparent; color: #59646a; cursor: pointer; font-size: 12px; font-weight: 750; }
.language-switch button.active { background: #e7352b; color: #fff; }

main { width: min(1440px, calc(100% - 40px)); margin: 0 auto; padding: 22px 0 44px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.play-options { display: flex; align-items: center; gap: 18px; flex: 0 0 auto; }
.mode-control { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.mode-control select { min-width: 112px; }
.quality-control { display: flex; align-items: center; gap: 8px; color: #515b62; font-size: 14px; white-space: nowrap; }
.quality-control select { height: 36px; padding: 0 30px 0 10px; border: 1px solid #d4dade; border-radius: 6px; background: #fff; color: #343a40; }
.continuous-toggle { display: flex; align-items: center; gap: 8px; color: #515b62; font-size: 14px; white-space: nowrap; }
.continuous-toggle input { width: 18px; height: 18px; accent-color: #e7352b; }
.categories { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: thin; }
.categories button { flex: 0 0 auto; min-height: 38px; padding: 0 16px; border: 1px solid #d4dade; border-radius: 6px; background: #fff; color: #3b4349; cursor: pointer; }
.categories button.active { border-color: #008aa4; color: #fff; background: #008aa4; }
.wake-toggle { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; color: #515b62; font-size: 14px; }
.wake-toggle input { width: 18px; height: 18px; accent-color: #008aa4; }

.now-playing { display: grid; grid-template-columns: 216px minmax(220px, 1fr) minmax(300px, 440px); align-items: center; gap: clamp(22px, 3vw, 46px); min-height: 300px; padding: 26px clamp(24px, 3vw, 46px); overflow: hidden; background: #121719; color: #fff; border-radius: 8px; }
.artwork-wrap { position: relative; width: 216px; aspect-ratio: 1; }
.artwork-wrap img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 6px; background: #252c2f; }
.playing-indicator { position: absolute; left: 10px; bottom: 10px; padding: 5px 9px; border-radius: 4px; background: rgba(0,0,0,.72); font-size: 12px; }
.now-copy { min-width: 0; }
.now-copy p { margin: 0; color: #aab7bc; }
.now-copy h1 { margin: 9px 0 14px; max-width: 760px; font-size: clamp(24px, 3vw, 42px); line-height: 1.18; letter-spacing: 0; overflow-wrap: anywhere; }
#now-kicker { color: #6ce0d7; font-size: 13px; font-weight: 800; letter-spacing: 0; }
#media { display: none; }
.queue-panel { align-self: stretch; min-width: 0; max-height: 252px; overflow: hidden; border-left: 1px solid #354044; padding-left: 22px; }
.queue-head { display: flex; align-items: center; justify-content: space-between; height: 38px; color: #fff; }
.queue-head span { color: #91a0a6; font-size: 12px; }
.queue-list { height: calc(100% - 38px); overflow-y: auto; scrollbar-color: #556267 transparent; }
.queue-item { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 9px; width: 100%; min-height: 42px; border: 0; border-bottom: 1px solid #293236; padding: 5px 3px; background: transparent; color: #cbd3d6; text-align: left; cursor: pointer; }
.queue-item .queue-number { color: #76858b; font-variant-numeric: tabular-nums; }
.queue-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.queue-item small { color: #829198; font-size: 11px; }
.queue-item.playing { color: #6ce0d7; }
.queue-item.playing .queue-number { color: #6ce0d7; }

.content-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 28px 0 14px; }
.content-head h2 { margin: 3px 0 0; font-size: 24px; letter-spacing: 0; }
.library-tabs { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border: 1px solid #313131; border-radius: 6px; background: #171717; }
.library-tabs button { height: 34px; border: 0; border-radius: 4px; padding: 0 14px; background: transparent; color: #aaa; cursor: pointer; font-weight: 650; }
.library-tabs button:hover { color: #fff; }
.library-tabs button.active { background: #fff; color: #111; }
.eyebrow { margin: 0; color: #008aa4; font-size: 12px; font-weight: 800; }
#result-count { color: #69747b; font-size: 14px; }
.list-controls { display: flex; align-items: center; gap: 18px; }
.list-controls label { display: flex; align-items: center; gap: 8px; color: #59646a; font-size: 14px; white-space: nowrap; }
.list-controls select { height: 36px; min-width: 70px; padding: 0 28px 0 10px; border: 1px solid #ccd3d8; border-radius: 5px; background: #fff; color: #283035; }
.status { min-height: 180px; display: grid; place-items: center; color: #69747b; }
.status.error { color: #b42318; }
.track-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); column-gap: 16px; row-gap: 28px; align-items: start; }
.track-card { position: relative; min-width: 0; }
.track { display: grid; grid-template-rows: auto 21px 18px; align-content: start; min-width: 0; height: auto; border: 0; padding: 0; overflow: visible; background: transparent; text-align: left; cursor: pointer; color: inherit; }
.track-favorite { position: absolute; z-index: 2; top: 8px; left: 8px; width: 34px; height: 34px; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; background: rgba(0,0,0,.72); color: #fff; cursor: pointer; font-size: 19px; line-height: 1; }
.track-favorite:hover { background: #fff; color: #111; }
.track-favorite.active { border-color: #ff0033; background: #ff0033; color: #fff; }
.track-cover { position: relative; display: block; width: 100%; aspect-ratio: 16/9; overflow: hidden; border-radius: 6px; background: #dfe5e8; }
.track-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .18s ease; }
.track:hover .track-cover img { transform: scale(1.025); }
.track-cover span { position: absolute; right: 7px; bottom: 7px; padding: 3px 6px; border-radius: 3px; background: rgba(0,0,0,.76); color: #fff; font-size: 12px; }
.track.playing .track-cover::after { content: "NOW PLAYING"; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,138,164,.8); color: #fff; font-weight: 800; }
.track strong { display: block; min-width: 0; height: 21px; margin-top: 7px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 15px; line-height: 21px; }
.track small { display: block; min-width: 0; height: 18px; margin-top: 5px; overflow: hidden; color: #6c767c; line-height: 18px; text-overflow: ellipsis; white-space: nowrap; }
.load-more-wrap { display: flex; justify-content: center; padding: 30px 0 4px; }
.load-more-wrap button { min-width: 150px; height: 42px; border: 1px solid #008aa4; border-radius: 6px; background: #fff; color: #00768c; cursor: pointer; font-weight: 700; }
.load-more-wrap button:hover { color: #fff; background: #008aa4; }
.load-more-wrap button:disabled { cursor: wait; opacity: .65; }
footer { padding: 26px 20px; text-align: center; color: #7a858b; border-top: 1px solid #e1e5e8; background: #fff; }

.player-bar { position: fixed; z-index: 100; inset-inline: 0; bottom: 0; width: 100%; max-width: none; min-width: 0; display: grid; grid-template-columns: 54px minmax(140px, 22vw) auto 42px minmax(140px, 1fr) 42px minmax(100px, 11vw); align-items: center; gap: clamp(7px, 1vw, 14px); min-height: calc(82px + env(safe-area-inset-bottom, 0px)); margin: 0; padding: 10px clamp(12px, 3vw, 44px) max(10px, env(safe-area-inset-bottom, 0px)); overflow: hidden; background: rgba(255,255,255,.98); border: 1px solid #d9dfe2; border-radius: 0; box-shadow: 0 -8px 24px rgba(20,27,31,.12); transform: translateZ(0); }
.player-bar > img { width: 54px; height: 54px; object-fit: cover; border-radius: 5px; background: #e1e7e9; }
.bar-title { display: flex; min-width: 0; flex-direction: column; }
.bar-title strong, .bar-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-title span { margin-top: 3px; color: #707a80; font-size: 12px; }
.transport { display: flex; align-items: center; gap: 4px; }
.transport button { width: 38px; height: 38px; border: 0; border-radius: 50%; background: transparent; cursor: pointer; color: #283035; font-size: 20px; }
.transport .play-btn { width: 44px; height: 44px; color: #fff; background: #e7352b; font-size: 17px; }
.time { color: #69747b; font-size: 12px; font-variant-numeric: tabular-nums; }
.progress, .volume input { accent-color: #e7352b; }
.progress { width: 100%; }
.volume { display: flex; align-items: center; gap: 7px; }
.volume input { width: 100%; }

@media (max-width: 1100px) {
  .site-header { grid-template-columns: auto 1fr; }
  .site-header nav { display: none; }
  .language-switch { grid-column: 2; grid-row: 1; justify-self: end; }
  .track-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .now-playing { grid-template-columns: 180px 1fr; }
  .artwork-wrap { width: 180px; }
  .queue-panel { grid-column: 1 / -1; max-height: 220px; border-left: 0; border-top: 1px solid #354044; padding: 12px 0 0; }
  .player-bar { grid-template-columns: 48px minmax(120px, 1fr) auto 38px minmax(100px, 1fr) 38px; }
  .volume { display: none; }
}

@media (max-width: 720px) {
  body { padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)); }
  .site-header { position: static; grid-template-columns: 1fr; gap: 8px; padding: 8px 14px 12px; }
  .brand { grid-column: 1; grid-row: 1; justify-self: center; width: min(92vw, 390px); justify-content: center; }
  .brand img { width: 100%; height: 74px; object-position: center; }
  .brand span { display: none; }
  .search { grid-column: 1; grid-row: 2; width: 100%; }
  .language-switch { grid-column: 1; grid-row: 3; justify-self: center; }
  .site-header nav { display: flex; grid-column: 1; grid-row: 4; justify-self: center; gap: 8px; padding-top: 2px; }
  .site-header nav a { min-width: 64px; padding: 8px 10px; border-radius: 5px; background: #202020; text-align: center; font-size: 13px; }
  .site-header nav a.active { background: #f1f1f1; color: #0f0f0f; }
  .search input { height: 40px; }
  .search button { padding: 0 18px; }
  main { width: calc(100% - 24px); padding-top: 14px; }
  .toolbar { display: block; }
  .play-options { justify-content: space-between; gap: 12px; margin-top: 4px; }
  .play-options { flex-wrap: wrap; }
  .continuous-toggle { order: 3; width: 100%; }
  .wake-toggle { margin-top: 4px; }
  .now-playing { grid-template-columns: 94px minmax(0, 1fr); min-height: 132px; gap: 16px; padding: 18px; }
  .artwork-wrap { width: 94px; }
  .playing-indicator { left: 5px; bottom: 5px; padding: 3px 5px; }
  .now-copy h1 { margin: 5px 0 8px; font-size: 20px; }
  .now-copy p { font-size: 12px; }
  #now-artist { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .queue-panel { max-height: 190px; }
  .track-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 11px; }
  .content-head { margin-top: 22px; }
  .content-head h2 { font-size: 21px; }
  .content-head { align-items: flex-start; flex-wrap: wrap; }
  .library-tabs { order: 3; width: 100%; overflow-x: auto; }
  .library-tabs button { flex: 0 0 auto; }
  .list-controls { flex-direction: column; align-items: flex-end; gap: 7px; }
  .player-bar { grid-template-columns: 44px minmax(0, 1fr) auto; min-height: calc(70px + env(safe-area-inset-bottom, 0px)); gap: 9px; padding: 8px 12px max(8px, env(safe-area-inset-bottom, 0px)); }
  .player-bar > img { width: 44px; height: 44px; }
  .transport button { width: 34px; height: 34px; }
  .transport .play-btn { width: 40px; height: 40px; }
  .player-bar > .time, .player-bar > .progress, .volume { display: none; }
  footer { padding-bottom: 26px; }
}

/* Dark music-player presentation, aligned with familiar streaming controls. */
:root { color-scheme: dark; color: #f1f1f1; background: #0f0f0f; }
body { background: #0f0f0f; color: #f1f1f1; }
.site-header { position: sticky; top: 0; z-index: 100; }
main, footer { position: relative; }
.player-bar { z-index: 20; }
main, footer { z-index: 1; }
.music-ambient {
  position: fixed;
  z-index: 0;
  top: 94px;
  right: 4vw;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 230px;
  height: 160px;
  opacity: .075;
  pointer-events: none;
  transform: rotate(-7deg);
}
.music-ambient span {
  width: 18px;
  border: 1px solid #ff4e45;
  background: #ff4e45;
}
.music-ambient span:nth-child(1), .music-ambient span:nth-child(7) { height: 42px; }
.music-ambient span:nth-child(2), .music-ambient span:nth-child(6) { height: 78px; }
.music-ambient span:nth-child(3), .music-ambient span:nth-child(5) { height: 118px; }
.music-ambient span:nth-child(4) { height: 154px; }
.music-pulse {
  position: fixed;
  z-index: 0;
  left: 2vw;
  top: 62%;
  display: flex;
  align-items: center;
  gap: 7px;
  height: 70px;
  opacity: .055;
  pointer-events: none;
}
.music-pulse i { display: block; width: 3px; background: #51d8cf; }
.music-pulse i:nth-child(1), .music-pulse i:nth-child(9) { height: 12px; }
.music-pulse i:nth-child(2), .music-pulse i:nth-child(8) { height: 24px; }
.music-pulse i:nth-child(3), .music-pulse i:nth-child(7) { height: 40px; }
.music-pulse i:nth-child(4), .music-pulse i:nth-child(6) { height: 60px; }
.music-pulse i:nth-child(5) { height: 34px; }
.site-header { min-height: 64px; background: rgba(15,15,15,.97); border-bottom-color: #2a2a2a; box-shadow: none; }
.brand { color: #f1f1f1; }
.brand img { filter: brightness(1.12); }
.search input { border-color: #303030; background: #121212; color: #f1f1f1; }
.search input:focus { border-color: #1c62b9; box-shadow: inset 0 0 0 1px #1c62b9; }
.search button { border: 1px solid #303030; background: #222; color: #f1f1f1; }
nav a { color: #aaa; }
nav a.active { color: #fff; }
.language-switch { border-color: #3a3a3a; background: #202020; }
.language-switch button { color: #aaa; }
.language-switch button.active { background: #f1f1f1; color: #0f0f0f; }
main { width: min(1500px, calc(100% - 36px)); }
.toolbar { margin-top: 2px; }
.categories button { border: 0; border-radius: 8px; background: #272727; color: #f1f1f1; font-weight: 650; }
.categories button:hover { background: #3a3a3a; }
.categories button.active { color: #0f0f0f; background: #f1f1f1; }
.wake-toggle { color: #aaa; }
.wake-toggle input { accent-color: #f00; }
.quality-control { color: #aaa; }
.quality-control select { border-color: #3a3a3a; background: #272727; color: #f1f1f1; }
.now-playing { background: #181818; border-radius: 8px; box-shadow: inset 0 0 0 1px #292929; }
.artwork-wrap img { border-radius: 4px; background: #252525; }
.playing-indicator { background: rgba(0,0,0,.82); }
#now-kicker { color: #ff4e45; }
.now-copy p { color: #aaa; }
.queue-panel { border-left-color: #343434; }
.queue-item { border-bottom-color: #2b2b2b; color: #ddd; }
.queue-item:hover { background: #272727; }
.queue-item.playing, .queue-item.playing .queue-number { color: #ff4e45; }
.eyebrow { color: #ff4e45; }
#result-count, .list-controls label { color: #aaa; }
.list-controls select { border-color: #3a3a3a; background: #212121; color: #f1f1f1; }
.status { color: #aaa; }
.track { color: #f1f1f1; }
.track-cover { border-radius: 8px; background: #252525; }
.track strong { font-weight: 650; }
.track small { color: #aaa; }
.track.playing .track-cover::after { background: rgba(255,0,0,.78); }
.load-more-wrap button { border-color: #3f3f3f; background: #272727; color: #f1f1f1; }
.load-more-wrap button:hover { background: #3a3a3a; }
footer { color: #777; border-top-color: #292929; background: #0f0f0f; }
.player-bar { background: rgba(24,24,24,.98); border-top-color: #343434; box-shadow: none; }
.bar-title span, .time { color: #aaa; }
.transport button { color: #f1f1f1; }
.transport .play-btn { color: #fff; background: #f00; }
.progress, .volume input { accent-color: #f00; }

@media (max-width: 720px) {
  .site-header { background: #0f0f0f; }
  .search button { background: #272727; }
  .now-playing { background: #181818; }
  .queue-panel { border-top-color: #343434; }
  .music-ambient { top: 138px; right: -42px; transform: scale(.64) rotate(-7deg); }
  .music-pulse { display: none; }
}
