﻿:root {
  --bg: #06090f;
  --panel: rgba(14, 18, 27, 0.72);
  --line: rgba(173, 202, 255, 0.18);
  --text: #eef4ff;
  --mute: #8ea0be;
  --accent: #4df1c6;
  --lyric-active-text: #ffffff;
  --lyric-fill-color: #5aa2ff;
  --lyric-font: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Trebuchet MS", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 10% -10%, #19345c 0%, #070b14 45%, #05070c 100%);
  overflow: hidden;
}
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  background-image: radial-gradient(rgba(255,255,255,.55) 0.4px, transparent 0.4px);
  background-size: 3px 3px;
}
.glow { position: fixed; width: 42vw; height: 42vw; border-radius: 50%; filter: blur(80px); pointer-events: none; }
.glow-a { left: -10vw; top: -14vw; background: rgba(60, 147, 255, 0.22); }
.glow-b { right: -12vw; bottom: -20vw; background: rgba(77, 241, 198, 0.22); }

.layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 320px 1fr 320px;
  grid-template-rows: 1fr 176px;
  gap: 14px;
  height: 100vh;
  padding: 14px;
}
.panel {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 38px rgba(0,0,0,.35);
}
.left { padding: 16px; display: grid; grid-template-rows: auto auto auto auto; gap: 10px; align-content: start; }
.brand { letter-spacing: 0.22em; font-size: 0.78rem; color: #9eb4d9; }
.cover { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); }
h1 { margin: 4px 0 0; font-size: 1.25rem; }
#artist { margin: 0; color: var(--mute); }
.side-controls { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 6px; }
.mini-timeline {
  grid-column: 1 / 5;
  display: grid;
  grid-template-columns: 46px 1fr 46px;
  align-items: center;
  gap: 8px;
  color: var(--mute);
  font-size: .78rem;
}
#mini-progress { width: 100%; accent-color: var(--accent); }

.center { position: relative; overflow: hidden; }
#btn-full { position: absolute; top: 12px; right: 12px; z-index: 9; }
.lyric-settings {
  position: absolute;
  top: calc(12px + 42px + 8px);
  right: 12px;
  z-index: 9;
}
#btn-lyric-settings {
  position: absolute !important;
  top: calc(12px + 42px + 8px) !important;
  right: 12px !important;
  left: auto !important;
  z-index: 10 !important;
}
.lyrics-mask {
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  mask-image: linear-gradient(to bottom, transparent 0%, #000 16%, #000 84%, transparent 100%);
}
#lyrics {
  width: min(900px, 92%);
  text-align: center;
  transition: transform .24s ease;
  font-family: var(--lyric-font);
}
#lyrics p {
  margin: 14px 0;
  opacity: .18;
  transform: scale(.92);
  transition: all .16s ease;
  font-size: clamp(1rem, 2.35vw, 1.6rem);
}
#lyrics p.active {
  opacity: 1;
  transform: scale(1.22);
  filter: drop-shadow(0 0 10px rgba(255,255,255,0.24));
}
.lyric-line { position: relative; display: inline-block; }
.base { color: #8fa4c5; }
#lyrics p.active .base { color: var(--lyric-active-text); }
.fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  overflow: hidden;
  white-space: nowrap;
  color: var(--lyric-fill-color);
  text-shadow: 0 0 16px color-mix(in srgb, var(--lyric-fill-color) 55%, transparent);
  transition: width .08s linear;
}

.right { padding: 14px; overflow: auto; }
.right-head { display: flex; justify-content: space-between; color: var(--mute); margin-bottom: 10px; }
#list { list-style: none; margin: 0; padding: 0; }
#list li {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 8px;
  cursor: pointer;
}
#list li:hover { background: rgba(255,255,255,.07); border-color: var(--line); }
#list li.active { background: rgba(77,241,198,.2); border-color: rgba(77,241,198,.45); color: #dcfff4; }

.bottom {
  grid-column: 1 / 4;
  width: 100%;
  justify-self: center;
  padding: 10px 14px;
}
#spectrum { width: 100%; opacity: .95; display: block; }
#volume { width: 100%; accent-color: var(--accent); }
.controls { display: grid; grid-template-columns: 1fr; gap: 8px; align-items: center; margin-top: 10px; }
.icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.07);
  color: var(--text);
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.icon.primary { background: rgba(77,241,198,.24); border-color: rgba(77,241,198,.5); }
.icon::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(9,12,19,.95);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 4px 8px;
  white-space: nowrap;
  font-size: .78rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease;
}
.icon:hover::after { opacity: 1; }
.vol { justify-self: end; color: var(--mute); display: flex; align-items: center; gap: 8px; }
#status { margin: 8px 0 0; color: var(--mute); font-size: .88rem; }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}
.modal.hidden { display: none; }
.modal-card {
  position: relative;
  width: min(320px, 90vw);
  background: rgba(12, 16, 24, 0.96);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}
.modal-card h3 { margin: 0 0 12px; font-size: 1rem; padding-right: 120px; }
.color-label {
  display: block;
  margin: 8px 0 4px;
  color: var(--mute);
  font-size: 0.86rem;
}
#lyric-text-color, #lyric-fill-color { width: 100%; height: 44px; border: 0; background: transparent; padding: 0; }
.modal-actions {
  position: absolute;
  top: 10px;
  right: 12px;
  display: flex;
  gap: 8px;
}
.text-btn { width: auto; padding: 0 14px; }

#lyrics-stage:fullscreen {
  background: radial-gradient(circle at 20% 0%, #15385d 0%, #0a111c 45%, #06090f 100%);
}
#lyrics-stage:fullscreen #lyrics { width: min(1220px, 94%); }
#lyrics-stage:fullscreen #btn-full {
  top: 12px !important;
  right: 12px !important;
}
#lyrics-stage:fullscreen #btn-lyric-settings {
  top: calc(12px + 42px + 8px) !important;
  right: 12px !important;
  left: auto !important;
}

@media (max-width: 1100px) {
  body { overflow-y: auto; }
  .layout {
    height: auto;
    min-height: 100vh;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
  }
  .bottom { grid-column: auto; width: 100%; }
  .vol { justify-self: start; }
}
