:root {
  --cold-white: #d8ecff;
  --mist-blue: #8da9bd;
  --glow: rgba(157, 210, 255, 0.85);

  --panel-blur: 15px;
  --glass-alpha: 0.42;
  --rain-opacity: 0.55;
  --reflection-opacity: 0.32;
  --reflection-blur: 8px;
  --bg-dim: 0.48;

  --ui-width: 1380px;
  --ui-height: 660px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: #02040a;
  color: rgba(229, 243, 255, 0.92);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Microsoft YaHei",
    sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.scene {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #02040a;
}

.bg {
  position: absolute;
  inset: -4%;
  background-image: url("./assets/bg.jpg");
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  filter: brightness(0.76) saturate(0.82) contrast(1.08);
  animation: bgBreath 12s ease-in-out infinite alternate;
}

@keyframes bgBreath {
  from {
    transform: scale(1.05) translate3d(0, 0, 0);
  }

  to {
    transform: scale(1.08) translate3d(-0.4%, -0.3%, 0);
  }
}

.shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(1, 4, 8, calc(var(--bg-dim) + 0.16)),
      rgba(1, 4, 8, calc(var(--bg-dim) - 0.18)) 42%,
      rgba(1, 4, 8, calc(var(--bg-dim) + 0.18))
    ),
    radial-gradient(circle at 52% 52%, transparent 0 30%, rgba(0, 0, 0, 0.58) 86%);
}

.noise {
  position: absolute;
  inset: 0;
  opacity: 0.12;
  mix-blend-mode: screen;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.8) 0 1px, transparent 1.5px),
    radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.5) 0 1px, transparent 1.5px);
  background-size: 41px 41px, 59px 59px;
}

.rain-layer {
  position: absolute;
  inset: -10%;
  pointer-events: none;
  opacity: var(--rain-opacity);
  background-image:
    linear-gradient(180deg, transparent 0 15%, rgba(220, 242, 255, 0.38) 16%, transparent 24%),
    linear-gradient(180deg, transparent 0 30%, rgba(180, 220, 255, 0.28) 31%, transparent 44%),
    linear-gradient(180deg, transparent 0 20%, rgba(230, 245, 255, 0.18) 21%, transparent 28%);
  background-size: 120px 520px, 190px 690px, 80px 430px;
  filter: blur(0.4px);
  transform: rotate(6deg);
  animation: rainFall 4.5s linear infinite;
}

.rain-layer-b {
  opacity: calc(var(--rain-opacity) * 0.52);
  filter: blur(1.2px);
  transform: rotate(3deg) scale(1.2);
  animation-duration: 7s;
  animation-direction: reverse;
}

@keyframes rainFall {
  from {
    background-position: 0 -400px, 30px -520px, 80px -300px;
  }

  to {
    background-position: 0 400px, 30px 520px, 80px 300px;
  }
}

/* 悬浮播放器外壳 */
.player-shell {
  position: absolute;
  z-index: 3;
  width: var(--ui-width);
  height: var(--ui-height);
  transform-origin: top left;
  user-select: none;
  touch-action: none;
}

.glass-player {
  position: relative;
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) 285px;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 1px solid rgba(220, 240, 255, 0.26);
  border-radius: 32px;
  overflow: hidden;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.015) 42%, rgba(255, 255, 255, 0.055)),
    rgba(13, 23, 34, var(--glass-alpha));
  backdrop-filter: blur(var(--panel-blur)) saturate(1.1);
  -webkit-backdrop-filter: blur(var(--panel-blur)) saturate(1.1);
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 0 60px rgba(127, 184, 225, 0.08);
}

.glass-player::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(202, 231, 255, 0.12), transparent),
    radial-gradient(circle at 30% 10%, rgba(183, 223, 255, 0.12), transparent 36%),
    radial-gradient(circle at 72% 32%, rgba(183, 223, 255, 0.06), transparent 32%);
  opacity: 0.85;
}

.glass-player::after {
  content: "";
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(221, 242, 255, 0.65), transparent);
  opacity: 0.9;
}

/* 顶部拖动条 */
.drag-handle {
  position: absolute;
  z-index: 20;
  top: 10px;
  left: 18px;
  right: 18px;
  height: 34px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border-radius: 999px;
  color: rgba(226, 243, 255, 0.55);
  background: rgba(230, 245, 255, 0.035);
  border: 1px solid rgba(220, 240, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.is-unlocked .drag-handle {
  cursor: grab;
  color: rgba(240, 250, 255, 0.86);
  border-color: rgba(220, 240, 255, 0.2);
  background: rgba(230, 245, 255, 0.065);
}

.is-dragging .drag-handle {
  cursor: grabbing;
}

.drag-grip {
  width: 34px;
  height: 10px;
  opacity: 0.72;
  background:
    radial-gradient(circle, currentColor 0 1.2px, transparent 1.5px) 0 0 / 8px 5px,
    radial-gradient(circle, currentColor 0 1.2px, transparent 1.5px) 4px 5px / 8px 5px;
}

.drag-title {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pin-label {
  margin-left: auto;
  font-size: 12px;
  color: rgba(221, 239, 250, 0.5);
}

/* 左侧导航 */
.side-nav {
  position: relative;
  z-index: 2;
  padding: 62px 0 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  border-right: 1px solid rgba(219, 242, 255, 0.08);
  background: linear-gradient(180deg, rgba(2, 6, 12, 0.34), rgba(2, 6, 12, 0.16));
}

.logo {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--cold-white);
}

.logo-wave {
  position: relative;
  width: 30px;
  height: 18px;
  display: block;
}

.logo-wave::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg,
      transparent 0 8%,
      currentColor 8% 13%,
      transparent 13% 23%,
      currentColor 23% 29%,
      transparent 29% 39%,
      currentColor 39% 46%,
      transparent 46% 56%,
      currentColor 56% 63%,
      transparent 63% 73%,
      currentColor 73% 78%,
      transparent 78%);
  mask-image: radial-gradient(ellipse at center, black 0 60%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 0 60%, transparent 72%);
  filter: drop-shadow(0 0 8px rgba(200, 230, 255, 0.7));
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.nav-item {
  position: relative;
  width: 100%;
  border: 0;
  background: transparent;
  color: rgba(218, 238, 250, 0.55);
  display: grid;
  place-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 6px 0;
  transition: color 0.25s ease, transform 0.25s ease;
}

.nav-item:hover,
.nav-item.active {
  color: rgba(232, 246, 255, 0.95);
  transform: translateY(-1px);
}

.nav-item.active::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 20%;
  width: 3px;
  height: 60%;
  border-radius: 999px;
  background: var(--cold-white);
  box-shadow: 0 0 16px var(--glow);
}

.nav-icon {
  font-size: 25px;
  line-height: 1;
}

.nav-item span:last-child {
  font-size: 12px;
}

.user-btn {
  margin-top: auto;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(220, 240, 255, 0.36);
  background: rgba(220, 240, 255, 0.06);
  color: rgba(235, 248, 255, 0.9);
}

/* 中间区域 */
.main-area {
  position: relative;
  z-index: 2;
  padding: 62px 52px 38px;
  min-width: 0;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 32px;
}

.weather {
  display: flex;
  align-items: center;
  gap: 18px;
  color: rgba(221, 239, 250, 0.5);
  font-size: 14px;
}

.divider {
  width: 1px;
  height: 24px;
  background: rgba(221, 239, 250, 0.24);
}

.song-info {
  margin-top: clamp(36px, 8vh, 74px);
}

.song-info h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 4.4vw, 64px);
  font-weight: 400;
  letter-spacing: 0.02em;
  color: rgba(231, 243, 255, 0.94);
  text-shadow:
    0 0 18px rgba(174, 215, 255, 0.38),
    0 0 42px rgba(70, 140, 210, 0.2);
}

.song-info p {
  margin: 10px 0 12px;
  font-size: 23px;
  color: rgba(210, 228, 240, 0.72);
}

.heart-btn {
  border: 0;
  background: transparent;
  font-size: 25px;
  color: rgba(130, 195, 255, 0.95);
  padding: 0;
  text-shadow: 0 0 16px rgba(113, 183, 255, 0.9);
}

.city-visualizer {
  margin-top: clamp(22px, 4vh, 36px);
  height: clamp(52px, 8vh, 80px);
  max-width: 560px;
  display: flex;
  align-items: flex-end;
  gap: 5px;
  opacity: 0.95;
  filter: drop-shadow(0 0 8px rgba(185, 223, 255, 0.36));
}

.city-visualizer span {
  width: 4px;
  height: var(--h);
  min-height: 4px;
  border-radius: 999px 999px 0 0;
  background:
    linear-gradient(180deg, rgba(240, 250, 255, 0.95), rgba(130, 190, 255, 0.45));
  opacity: 0.75;
  animation: fakeBars 1.2s ease-in-out infinite alternate;
  animation-delay: calc(var(--delay) * -1s);
}

@keyframes fakeBars {
  from {
    transform: scaleY(0.45);
    opacity: 0.28;
  }

  to {
    transform: scaleY(1);
    opacity: 0.95;
  }
}

.progress-row {
  margin-top: 15px;
  max-width: 600px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  color: rgba(220, 240, 255, 0.58);
  font-size: 14px;
}

.progress-track {
  position: relative;
  height: 4px;
  border-radius: 999px;
  background: rgba(10, 17, 25, 0.62);
  overflow: hidden;
  box-shadow:
    inset 0 0 10px rgba(0, 0, 0, 0.6),
    0 0 12px rgba(173, 217, 255, 0.12);
}

.progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 48%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(142, 197, 255, 0.5), rgba(232, 248, 255, 0.94));
  box-shadow: 0 0 18px rgba(150, 206, 255, 0.85);
}

.light-runner {
  position: absolute;
  top: 50%;
  left: 47%;
  width: 120px;
  height: 12px;
  transform: translateY(-50%);
  background: radial-gradient(ellipse at center, rgba(235, 248, 255, 0.95), rgba(116, 180, 255, 0.4) 35%, transparent 70%);
  filter: blur(2px);
  animation: runnerBreath 2.4s ease-in-out infinite;
}

@keyframes runnerBreath {
  0%,
  100% {
    opacity: 0.55;
    transform: translateY(-50%) scaleX(0.7);
  }

  50% {
    opacity: 1;
    transform: translateY(-50%) scaleX(1.1);
  }
}

.fog-lyrics {
  margin-top: clamp(24px, 5vh, 42px);
  color: rgba(216, 236, 255, 0.62);
  text-shadow:
    0 0 12px rgba(210, 235, 255, 0.45),
    0 0 24px rgba(150, 205, 255, 0.25);
}

.fog-lyrics p {
  margin: 0;
}

.lyric-main {
  font-family: "Comic Sans MS", "Segoe Print", "KaiTi", cursive;
  font-size: clamp(26px, 3vw, 42px);
  letter-spacing: 0.08em;
  line-height: 1.16;
  opacity: 0.7;
  animation: fogPulse 5s ease-in-out infinite alternate;
}

.lyric-sub {
  margin-top: 11px !important;
  font-family: "Segoe Print", "KaiTi", cursive;
  font-size: 17px;
  letter-spacing: 0.08em;
  color: rgba(215, 235, 255, 0.35);
}

@keyframes fogPulse {
  from {
    opacity: 0.45;
    filter: blur(0.8px);
  }

  to {
    opacity: 0.78;
    filter: blur(0.15px);
  }
}

.controls {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 42px;
}

.controls button {
  border: 0;
  background: transparent;
  color: rgba(229, 243, 255, 0.75);
  font-size: 23px;
  text-shadow: 0 0 14px rgba(180, 220, 255, 0.45);
  transition: transform 0.22s ease, color 0.22s ease;
}

.controls button:hover {
  color: rgba(246, 252, 255, 0.98);
  transform: translateY(-2px);
}

.controls .play-btn {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(226, 245, 255, 0.64);
  background: rgba(210, 235, 255, 0.06);
  box-shadow:
    0 0 24px rgba(180, 220, 255, 0.24),
    inset 0 0 18px rgba(220, 244, 255, 0.08);
  font-size: 31px;
}

/* 右侧列表 */
.playlist {
  position: relative;
  z-index: 2;
  padding: 265px 30px 34px 0;
  color: rgba(225, 242, 252, 0.72);
}

.now-card h2,
.up-next h2 {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 400;
  color: rgba(232, 246, 255, 0.84);
}

.track {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 14px;
  align-items: center;
  min-width: 0;
  padding: 8px 0;
}

.cover {
  width: 52px;
  height: 52px;
  border-radius: 9px;
  background-image:
    linear-gradient(180deg, rgba(10, 16, 25, 0.18), rgba(10, 16, 25, 0.42)),
    url("./assets/touxiang.jpg");
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.cover.small {
  width: 44px;
  height: 44px;
}

.track h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 400;
  color: rgba(236, 248, 255, 0.86);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track p {
  margin: 5px 0 0;
  color: rgba(205, 225, 238, 0.48);
  font-size: 13px;
}

.track time {
  font-size: 13px;
  color: rgba(216, 236, 250, 0.5);
}

.mini-bars {
  display: flex;
  align-items: end;
  gap: 3px;
  height: 18px;
}

.mini-bars i {
  width: 3px;
  height: 60%;
  border-radius: 999px;
  background: rgba(111, 184, 255, 0.95);
  animation: miniBars 0.8s ease-in-out infinite alternate;
}

.mini-bars i:nth-child(2) {
  animation-delay: -0.25s;
}

.mini-bars i:nth-child(3) {
  animation-delay: -0.45s;
}

@keyframes miniBars {
  from {
    height: 25%;
    opacity: 0.4;
  }

  to {
    height: 100%;
    opacity: 1;
  }
}

.up-next {
  margin-top: 30px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title span {
  color: rgba(220, 240, 255, 0.6);
  letter-spacing: 0.25em;
}

.playlist-btn {
  width: 100%;
  margin-top: 14px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(220, 240, 255, 0.16);
  background: rgba(220, 240, 255, 0.03);
  color: rgba(225, 242, 252, 0.48);
}

/* 倒影 */
.reflection {
  position: absolute;
  left: 3%;
  right: 3%;
  top: calc(100% + 9px);
  height: 105px;
  opacity: var(--reflection-opacity);
  filter: blur(var(--reflection-blur));
  pointer-events: none;
  transform: perspective(600px) rotateX(10deg) scaleY(-1);
  transform-origin: top;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.78), transparent 85%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.78), transparent 85%);
}

.reflection::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 28px;
  border: 1px solid rgba(220, 240, 255, 0.18);
  background:
    linear-gradient(90deg, transparent, rgba(220, 245, 255, 0.08), transparent),
    rgba(190, 220, 255, 0.03);
}

.reflection-line {
  position: absolute;
  left: 15%;
  right: 15%;
  top: 30px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(235, 249, 255, 0.78), transparent);
  box-shadow: 0 0 22px rgba(160, 215, 255, 0.65);
}

.reflection-play {
  position: absolute;
  left: 50%;
  top: 48px;
  width: 68px;
  height: 68px;
  border-radius: 999px;
  transform: translateX(-50%);
  border: 1px solid rgba(235, 248, 255, 0.35);
  background: radial-gradient(circle, rgba(230, 248, 255, 0.26), transparent 70%);
}

.reflection-bars {
  position: absolute;
  left: 18%;
  top: 10px;
  width: 34%;
  height: 38px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(218, 240, 255, 0.42) 0 2px,
      transparent 2px 9px
    );
  mask-image: linear-gradient(to top, black, transparent);
  -webkit-mask-image: linear-gradient(to top, black, transparent);
  opacity: 0.5;
}

/* 调试面板 */
.control-dock {
  position: fixed;
  z-index: 10;
  top: 18px;
  right: 18px;
  width: 270px;
  border-radius: 20px;
  border: 1px solid rgba(220, 240, 255, 0.18);
  background: rgba(7, 12, 19, 0.62);
  color: rgba(230, 246, 255, 0.9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.38);
  overflow: hidden;
}

.dock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 15px 10px;
  border-bottom: 1px solid rgba(220, 240, 255, 0.08);
}

.dock-header h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
}

.dock-header p {
  margin: 4px 0 0;
  font-size: 12px;
  color: rgba(210, 230, 245, 0.48);
}

.collapse-btn {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(220, 240, 255, 0.14);
  background: rgba(220, 240, 255, 0.05);
  color: rgba(230, 246, 255, 0.85);
}

.dock-body {
  display: grid;
  gap: 12px;
  padding: 13px 15px 16px;
}

.control-dock.is-collapsed .dock-body {
  display: none;
}

/* 收起后：只保留一个小按钮栏 */
.control-dock.is-collapsed {
  width: 54px;
  height: 54px;
  border-radius: 999px;
}

.control-dock.is-collapsed .dock-header {
  height: 54px;
  padding: 0;
  border-bottom: 0;
  justify-content: center;
}

.control-dock.is-collapsed .dock-header > div {
  display: none;
}

.control-dock.is-collapsed .collapse-btn {
  width: 38px;
  height: 38px;
}

.lock-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  color: rgba(230, 246, 255, 0.82);
}

.lock-row input {
  width: 17px;
  height: 17px;
  accent-color: #c8e9ff;
}

.center-btn {
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(220, 240, 255, 0.16);
  background: rgba(220, 240, 255, 0.055);
  color: rgba(230, 246, 255, 0.82);
}

.range-row {
  display: grid;
  gap: 5px;
  font-size: 12px;
  color: rgba(210, 230, 245, 0.66);
}

.range-row span {
  display: flex;
  justify-content: space-between;
}

.range-row output {
  color: rgba(235, 249, 255, 0.9);
}

.range-row input {
  width: 100%;
  accent-color: #c8e9ff;
}

@media (max-width: 1080px) {
  .glass-player {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .playlist {
    display: none;
  }

  .main-area {
    padding-right: 42px;
  }
}

@media (max-width: 760px) {
  .glass-player {
    grid-template-columns: 1fr;
  }

  .side-nav,
  .playlist,
  .weather {
    display: none;
  }

  .main-area {
    padding: 60px 24px 38px;
  }

  .song-info {
    margin-top: 48px;
  }

  .controls {
    gap: 24px;
  }

  .control-dock {
    left: 12px;
    right: 12px;
    top: auto;
    bottom: 12px;
    width: auto;
  }
}