:root { color-scheme: dark; --bg: #0c0f16; --glow: #202d48; --surface-rgb: 24, 34, 51; --footer-height: 94px; --panel: #ffffff0b; --selected: #ffffff24; --focus: #ffffff30; --text: #f7f8fa; --muted: #c2c5cc; --accent: #f1f4fa; font-family: system-ui, sans-serif; }
* { box-sizing: border-box; }
body { margin: 0; height: 100vh; display: flex; flex-direction: column; padding: 3vh 4vw 0; background: radial-gradient(ellipse at 85% 0%, var(--glow) 0%, transparent 75%), var(--bg); color: var(--text); overflow: hidden; font-size: 18px; }
button, input, select { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
button { -webkit-appearance: none; appearance: none; }
button { background: var(--panel); border: 2px solid #ffffff14; border-radius: 14px; padding: 12px 20px; cursor: pointer; min-height: 48px; transition: background .16s ease, border-color .16s ease, box-shadow .16s ease; }
button:focus, input:focus, select:focus { outline: none; background-color: var(--focus); box-shadow: 0 0 0 3px var(--accent), 0 0 0 7px #ffffff14; }
main:focus { outline: none; }
button:disabled { opacity: .5; cursor: default; }
.client-download { display: inline-block; font: inherit; color: inherit; background: var(--panel); border: 2px solid #ffffff14; border-radius: 14px; padding: 12px 20px; min-height: 48px; text-decoration: none; }
.client-download:focus { border-radius: 14px; background: var(--focus); }
header, nav, footer, .controls, .tools { display: flex; align-items: center; }
header { height: 82px; flex: 0 0 82px; justify-content: space-between; border-bottom: 1px solid #ffffff0d; }
header strong { font-size: 27px; letter-spacing: -.7px; white-space: nowrap; }
header strong span { display: inline-block; padding: 4px 8px; margin-left: 6px; border: 1px solid #ffffff28; border-radius: 6px; color: var(--accent); font-size: 12px; letter-spacing: 2px; vertical-align: middle; }
nav > button + button { margin-left: 6px; }
nav button { background: transparent; border-color: transparent; color: var(--muted); padding: 10px 18px; }
nav button[aria-current="page"] { color: var(--text); background: var(--selected); border-color: #ffffff70; border-radius: 14px; }
main { flex: 1; overflow: auto; padding: 18px 8px calc(var(--footer-height) + 3vh + 24px); scroll-padding-block: 12px calc(var(--footer-height) + 3vh + 24px); min-height: 0; scrollbar-width: thin; scrollbar-color: #ffffff40 transparent; }
h1 { font-size: 30px; margin: 10px 0 20px; letter-spacing: -.5px; line-height: 1.3; overflow-wrap: anywhere; }
small, .muted { color: var(--muted); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-head h1 { margin: 8px 0 0; }
.section-head small { font-size: 14px; white-space: nowrap; }
.eyebrow { color: var(--accent); font-size: 12px; letter-spacing: 3px; display: block; }
.tools { margin-bottom: 24px; flex-wrap: wrap; gap: 16px; }
input, select { border: 1px solid #ffffff20; border-radius: 12px; background: var(--panel); padding: 14px 18px; }
input::placeholder { color: var(--muted); opacity: 1; }
select option { background: var(--bg); color: var(--text); }
input { width: 44vw; max-width: 500px; }
.tools button { background: var(--panel); color: var(--text); font-weight: 600; }
.cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-gap: 22px; }
.card { text-align: left; padding: 10px; min-width: 0; background: #ffffff04; border: 2px solid #ffffff08; }
.card:focus { border-color: var(--accent); background: var(--focus); }
.art { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; border-radius: 10px; background: linear-gradient(135deg, #ffffff14, #ffffff05); color: var(--accent); font-size: 44px; overflow: hidden; }
.art::before { content: ""; padding-top: 100%; }
.art img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.card b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 17px; font-weight: 500; line-height: 1.45; margin: 12px 4px 4px; min-height: 2.9em; }
.card small { display: block; margin: 0 4px 4px; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.artist-card { text-align: center; }
.artist-card .art { position: relative; border-radius: 50%; width: 80%; margin: 8px auto; }
.artist-card .art img { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
.artist-card b { min-height: 0; -webkit-line-clamp: 1; }
.artist-filters button[aria-pressed="true"] { background: var(--selected); color: var(--text); border-color: #ffffff70; }
.artist-credits { margin: 24px 0; color: var(--muted); font-size: 14px; }
.artist-credits summary { padding: 12px; cursor: pointer; }
.artist-credits a { color: var(--accent); }
.tv-qr { width: 220px; height: 220px; margin: 0 auto; background: white; align-items: center; justify-content: center; }
.tv-qr canvas, .tv-qr img { width: 100%; height: 100%; object-fit: contain; }
#qrDialog { text-align: center; max-width: 650px; }
#qrDialog p { font-size: 16px; margin: 18px 0; }
#qrDialog h2 { margin: 0 0 16px; font-size: 24px; }
#qrDialog > div:last-child { justify-content: center; }
.login-platforms { margin-top: 30px; }
#followDialog { text-align: center; padding: 22px 30px; }
#followDialog h2 { margin: 0 0 16px; }
#followQR { display: block; margin: 0 auto; background: white; max-width: 100%; object-fit: contain; }
#followDialog p { margin: 16px 0; }
summary:focus, a:focus { outline: none; border-radius: 8px; box-shadow: 0 0 0 3px var(--accent), 0 0 0 7px #ffffff14; }
.song { width: 100%; text-align: left; display: flex; align-items: center; gap: 18px; margin-bottom: 10px; background: #ffffff04; padding: 16px 20px; }
.song .song-index { font-size: 15px; color: var(--muted); min-width: 26px; font-variant-numeric: tabular-nums; }
.song .song-copy { flex: 1; min-width: 0; }
.song .song-copy > b { font-weight: 500; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song small { display: block; margin-top: 5px; font-size: 14px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.song .song-source { padding: 5px 10px; border: 1px solid #ffffff14; border-radius: 6px; margin: 0; max-width: 25%; }
.song-status { font-size: 12px; color: var(--muted); white-space: nowrap; }
.song-status.vip { padding: 5px 9px; border-radius: 6px; color: #f6d69a; background: #c9953020; border: 1px solid #c9953055; }
.song.playing { border-color: var(--accent); }
footer { position: fixed; z-index: 2; bottom: 3vh; left: 50%; transform: translateX(-50%); height: var(--footer-height); display: grid; width: 92vw; max-width: 1120px; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) 16px; grid-column-gap: 16px; grid-row-gap: 4px; padding: 8px 18px; background: transparent; border: 1px solid #ffffff24; border-radius: 20px; box-shadow: 0 8px 28px #0005, inset 0 1px 0 #ffffff08; }
.footer-glass { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: -1; border-radius: inherit; overflow: hidden; pointer-events: none; background: rgba(var(--surface-rgb), .78); }
.footer-glass::before { content: ""; position: absolute; top: -30px; right: -30px; bottom: -30px; left: -30px; background-image: var(--frost-art, none); background-position: center; background-size: cover; -webkit-filter: blur(22px); filter: blur(22px); opacity: .24; }
.footer-glass::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: linear-gradient(135deg, #ffffff18, #00000020); box-shadow: inset 0 1px 0 #ffffff26; }
footer { transition: opacity .25s ease, visibility .25s ease; }
body.controls-hidden footer { opacity: 0; pointer-events: none; }
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  body:not(.no-backdrop) footer { background: linear-gradient(135deg, #ffffff0a, #ffffff02), rgba(var(--surface-rgb), .32); -webkit-backdrop-filter: blur(28px) saturate(150%); backdrop-filter: blur(28px) saturate(150%); }
  body:not(.no-backdrop) .footer-glass { display: none; }
}
#trackInfo { display: flex; align-items: center; gap: 14px; text-align: left; min-width: 0; background: transparent; padding: 4px 8px; }
#trackInfo .track-copy { min-width: 0; }
#trackTitle, #trackArtist { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#trackTitle { font-weight: 600; }
#trackCover { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex-shrink: 0; border-radius: 8px; overflow: hidden; background: #ffffff0c; }
#trackCover .art { width: 100%; height: 100%; border-radius: inherit; }
#trackCover img { width: 100%; height: 100%; object-fit: cover; }
#trackInfo small { margin-top: 6px; font-size: 14px; }
.controls { flex-shrink: 0; gap: 10px; }
.controls button { background: #ffffff06; font-size: 15px; }
button[data-action="toggle"] { background: var(--selected); color: var(--text); border-color: #ffffff45; font-weight: 700; min-width: 90px; }
.timeline { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; font-size: 12px; font-variant-numeric: tabular-nums; }
.timeline small { min-width: 38px; }
#duration { text-align: right; }
#progress { flex: 1; height: 4px; border-radius: 4px; overflow: hidden; background: #ffffff20; }
#progressFill { display: block; height: 100%; width: 0; border-radius: inherit; background: #edf2ff; }
.icon-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.controls .icon-control, .seek .icon-control { display: inline-flex; align-items: center; justify-content: center; position: relative; flex: 0 0 auto; width: 44px; height: 44px; min-height: 44px; min-width: 0; padding: 10px; border-radius: 50%; }
.icon-control svg { width: 24px; height: 24px; fill: currentColor; flex-shrink: 0; }
.controls .icon-control[data-action="toggle"], .seek .icon-control[data-action="toggle"] { width: 50px; height: 50px; }
.icon-control[data-action="toggle"] svg { width: 30px; height: 30px; }
.control-tip { display: none; position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 13px; font-weight: 400; background: rgba(var(--surface-rgb), .92); color: var(--text); border: 1px solid #ffffff24; padding: 6px 10px; border-radius: 7px; pointer-events: none; z-index: 3; }
.icon-control:focus .control-tip, .icon-control:hover .control-tip { display: block; }
.seek-seconds { position: absolute; font-size: 9px; bottom: 3px; color: var(--muted); }
.seek { align-items: center; }
.now { display: flex; align-items: center; height: calc(94vh - 82px - var(--footer-height) - 42px); min-height: 0; padding: 0 12px; overflow: hidden; }
.now > div:first-child { flex: 0 0 26%; margin-right: 6vw; }
.now > .lyric-column { flex: 1; }
.now > div { min-width: 0; }
.now .art { width: 29vh; height: 29vh; max-width: 300px; max-height: 300px; box-shadow: 0 16px 40px #0005; border: 1px solid #ffffff14; border-radius: 18px; }
.now .art::before, #trackCover .art::before { display: none; }
.now h1 { font-size: 30px; margin: 20px 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.now p.muted { margin: 0; }
.lyric-column { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.lyrics { position: relative; flex: 1; min-height: 0; overflow: hidden; mask-image: linear-gradient(transparent, #000 15%, #000 85%, transparent); -webkit-mask-image: linear-gradient(transparent, #000 15%, #000 85%, transparent); }
.lyrics::before, .lyrics::after { content: ""; display: block; height: 40vh; }
.lyrics.is-empty { display: flex; align-items: center; }
.lyrics.is-empty::before, .lyrics.is-empty::after { display: none; }
.lyrics p { margin: 0; padding: 14px 0; color: #ffffff80; font-size: 30px; font-weight: 500; line-height: 1.5; overflow-wrap: break-word; transition: color .3s ease; }
.lyrics p.past { color: #ffffff66; }
.lyrics p.near { color: #ffffffb3; }
.lyrics p.current { color: #fff; font-size: 36px; font-weight: 700; text-shadow: 0 2px 24px #ffffff18; }
.lyrics .empty-lyrics { color: var(--muted); }
.remote-hint { font-size: 12px; color: var(--muted); margin: 10px 0 0; flex-shrink: 0; }
.seek { display: flex; gap: 12px; flex-wrap: wrap; }
.seek button { font-size: 15px; padding: 12px 14px; }
#toast { position: fixed; z-index: 5; bottom: calc(var(--footer-height) + 3vh + 20px); left: 50%; transform: translateX(-50%); background: rgba(var(--surface-rgb), .92); border: 1px solid #ffffff22; padding: 16px 28px; border-radius: 12px; max-width: 80vw; box-shadow: 0 8px 32px #0006; }
dialog { color: var(--text); background: rgba(var(--surface-rgb), .92); border: 1px solid #ffffff24; border-radius: 20px; padding: 36px; box-shadow: 0 24px 80px #0008; max-width: 80vw; max-height: 90vh; overflow: auto; }
dialog:not([open]) { display: none; }
dialog[data-fallback][open] { display: block; position: fixed; z-index: 11; top: 50%; left: 50%; transform: translate(-50%, -50%); margin: 0; width: auto; min-width: 320px; }
body.modal-fallback::after { content: ""; position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: #0009; z-index: 10; }
dialog, #toast, .control-tip { -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); }
dialog::backdrop { background: #0009; }
dialog p { color: var(--muted); margin-bottom: 28px; }
dialog div { display: flex; gap: 20px; }
.state { padding: 40px 0; color: var(--muted); line-height: 1.6; }
nav button:focus, .tools button:focus, .controls button:focus, #trackInfo:focus { background: var(--focus); color: var(--text); }
button:focus small, button:focus .song-index, button:focus .song-status:not(.vip), input:focus::placeholder { color: var(--text); }
.song:focus .song-status.vip { color: #fff3db; background: #6b430880; }
@media (max-width: 1050px) {
  body { font-size: 16px; }
  nav > button + button { margin-left: 2px; }
  nav button { padding: 10px 9px; }
  .cards { grid-gap: 16px; }
  footer { grid-column-gap: 10px; padding: 8px 14px; }
  .controls button { padding: 10px 14px; }
}
@media (max-height: 600px) {
  body { --footer-height: 88px; }
  header { height: 64px; flex-basis: 64px; }
  .now { height: calc(94vh - 64px - var(--footer-height) - 36px); }
  button { padding: 8px 14px; }
  main { padding-top: 12px; }
  .section-head { margin-bottom: 16px; }
  h1 { font-size: 26px; }
  .now .art { width: 27vh; height: 27vh; }
  .now h1 { margin-top: 12px; }
  .lyrics p { font-size: 22px; padding: 10px 0; }
  .lyrics p.current { font-size: 28px; }
  #trackCover { width: 40px; height: 40px; }
  .controls .icon-control { width: 44px; height: 44px; padding: 10px; }
  .controls .icon-control[data-action="toggle"] { width: 50px; height: 50px; }
  .seek { gap: 10px; }
  .seek button { padding: 10px 12px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { body, button, footer, .lyrics p { transition: none; } }
.tools { gap: 0; }
.tools > * { margin-right: 16px; margin-bottom: 8px; }
.controls { gap: 0; }
.controls > button + button { margin-left: 10px; }
#trackInfo { gap: 0; }
#trackCover { margin-right: 14px; }
.timeline { gap: 0; }
#progress { margin: 0 14px; }
.song { gap: 0; }
.song > * + * { margin-left: 18px; }
.section-head { gap: 0; }
.section-head > small { margin-left: 16px; }
dialog div { gap: 0; }
dialog div > button + button { margin-left: 20px; }
.seek { gap: 0; }
.seek > button + button { margin-left: 12px; }
header > nav { margin-left: 24px; }
@media (min-height: 900px) {
  .lyrics p { font-size: 36px; padding: 18px 0; }
  .lyrics p.current { font-size: 44px; }
}
