﻿/* ============================================================
   Floating transparent player + Mineradio-style lyrics
   + right-edge track drawer + bottom carousel dock
   ============================================================ */

/* ---------- Player stage: no enclosing panel ---------- */
#view-music .player-stage-wrap {
  padding-top: 4px;
}

#view-music .player-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(26px, 4.5vw, 72px);
  align-items: center;
  min-height: 560px;
  padding: 8px 0 22px;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
  isolation: isolate;
}

#view-music .player-shell::before,
#view-music .player-shell::after {
  content: none !important;
  display: none !important;
}

#view-music .player-left {
  grid-column: 1 !important;
  grid-row: 1 !important;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 10px 0 0 !important;
  border: 0 !important;
  background: transparent !important;
  align-items: center;
}

#view-music .lyrics-stage {
  grid-column: 2;
  grid-row: 1;
}

#view-music .player-left .disc {
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.55));
}

#view-music .player-left .disc::after {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.16),
    0 0 38px rgba(232, 112, 42, 0.12);
}

#view-music .np-label,
#view-music .np-title,
#view-music .np-artist {
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.48);
}

#view-music .np-title {
  font-size: clamp(1.8rem, 2.8vw, 2.5rem);
}

/* Floating control islands */
#view-music .progress-row {
  width: 100%;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(10, 10, 12, 0.32);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 12px 30px -20px rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
}

#view-music .controls {
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 999px;
  background: rgba(10, 10, 12, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 18px 44px -26px rgba(0, 0, 0, 0.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.35);
  backdrop-filter: blur(20px) saturate(1.35);
}

#view-music .volume-row {
  padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(10, 10, 12, 0.24);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  backdrop-filter: blur(16px) saturate(1.25);
}

#view-music .player-left .controls .ctrl.play {
  box-shadow:
    0 8px 22px -10px rgba(232, 112, 42, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

/* ---------- Mineradio-style lyrics stage ---------- */
#view-music .lyrics-stage {
  position: relative;
  min-width: 0;
  height: clamp(460px, 66vh, 680px);
  padding: 0 6px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 13%, #000 84%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 13%, #000 84%, transparent 100%);
}

.lyrics-head {
  position: absolute;
  z-index: 3;
  top: 9px;
  left: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  opacity: 0.55;
}

.lyrics-head .eyebrow {
  margin: 0;
  font-size: 10px;
}

.lyrics-head-note {
  color: rgba(255, 255, 255, 0.36);
  font-family: var(--font-sans);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#view-music .lyrics {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  height: 100%;
  padding: 28% 8px 34%;
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;
  text-align: center;
  scroll-behavior: smooth;
  scrollbar-width: none;
  overscroll-behavior: contain;
}

#view-music .lyrics::-webkit-scrollbar {
  display: none;
}

#view-music .lyric-line {
  display: block;
  width: 100%;
  margin: 0;
  padding: 9px 6px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.28);
  font-family: var(--font-sans);
  font-size: clamp(18px, 2.15vw, 32px);
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -0.018em;
  text-align: center;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  opacity: 0.6;
  filter: blur(1.15px);
  transform: scale(0.96);
  transition:
    color 0.36s ease,
    opacity 0.36s ease,
    filter 0.4s ease,
    transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

#view-music .lyric-line:hover {
  color: rgba(255, 255, 255, 0.7);
  opacity: 0.85;
  filter: blur(0.4px);
}

#view-music .lyric-line.passed {
  color: rgba(255, 255, 255, 0.42);
  opacity: 0.46;
  filter: blur(0.65px);
  transform: scale(0.975);
}

#view-music .lyric-line.active {
  color: #fff;
  opacity: 1;
  filter: none;
  transform: scale(1.035);
  background: linear-gradient(
    90deg,
    #ffc08a 0%,
    #ffc08a var(--lyric-progress, 0%),
    #ffffff calc(var(--lyric-progress, 0%) + 7%),
    #ffffff 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow:
    0 0 2px rgba(255, 255, 255, 0.35),
    0 0 24px rgba(255, 255, 255, 0.2),
    0 0 54px rgba(232, 112, 42, 0.24);
  animation: lyric-rise 0.72s cubic-bezier(0.16, 0.84, 0.32, 1) both;
}

#view-music .lyric-line.active:hover {
  color: #fff;
}

@keyframes lyric-rise {
  0% {
    opacity: 0;
    transform: translate3d(0, 26px, 0) scale(0.9);
    filter: blur(10px);
  }
  62% {
    opacity: 1;
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: scale(1.035);
    filter: none;
  }
}

#view-music .lyrics-empty {
  margin: auto;
  color: rgba(255, 255, 255, 0.42);
  font-family: var(--font-serif);
  font-size: clamp(18px, 2vw, 26px);
  font-style: italic;
  text-align: center;
}

#view-music .lyrics-empty::after {
  content: "";
  display: block;
  width: 42px;
  height: 1px;
  margin: 16px auto 0;
  background: rgba(255, 255, 255, 0.18);
}

/* ---------- Right-side track drawer ---------- */
.track-drawer {
  position: fixed;
  z-index: 90;
  top: 78px;
  right: 0;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  width: min(438px, 92vw);
  padding: 22px 20px 18px 24px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-right: 0;
  border-radius: 28px 0 0 28px;
  background: rgba(9, 9, 12, 0.7);
  -webkit-backdrop-filter: blur(30px) saturate(1.35) brightness(1.05);
  backdrop-filter: blur(30px) saturate(1.35) brightness(1.05);
  box-shadow:
    -34px 0 90px -22px rgba(0, 0, 0, 0.78),
    inset 1px 0 0 rgba(255, 255, 255, 0.12);
  transform: translateX(104%);
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  transition:
    transform 0.52s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.32s ease;
}

body.drawer-open .track-drawer {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.track-drawer.lg-surface {
  position: fixed;
  background-color: rgba(9, 9, 12, 0.7) !important;
}

.track-drawer-head {
  display: flex;
  flex: none;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
}

.track-drawer-head .eyebrow {
  margin-bottom: 4px;
}

.track-drawer-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 34px;
  font-style: italic;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
}

.track-drawer-close {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.track-drawer-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(90deg);
}

.track-drawer-body {
  flex: 1;
  min-height: 0;
  padding-right: 4px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.track-drawer-body::-webkit-scrollbar {
  width: 5px;
}

.track-drawer-body::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.16);
}

.track-drawer .pl-tabs {
  margin-top: 4px;
  padding-bottom: 2px;
}

.track-drawer .pl-panel {
  padding-top: 8px;
}

.track-drawer .ne-playlist-swap {
  height: 218px;
  margin-top: 2px;
}

.track-drawer .ne-library {
  margin-bottom: 4px;
}

.track-drawer .ne-results {
  max-height: none;
}

.track-drawer .playlist {
  max-height: none;
}

/* Right edge hot zone + handle */
.track-drawer-hotzone {
  position: fixed;
  z-index: 80;
  top: 18%;
  right: 0;
  width: 26px;
  height: 58%;
  pointer-events: auto;
}

.track-drawer-handle {
  position: fixed;
  z-index: 92;
  right: 0;
  top: 43%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 128px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-right: 0;
  border-radius: 14px 0 0 14px;
  background: rgba(9, 9, 12, 0.58);
  color: rgba(255, 255, 255, 0.66);
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0.26em;
  writing-mode: vertical-rl;
  cursor: pointer;
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
  box-shadow:
    -10px 0 30px -14px rgba(0, 0, 0, 0.75),
    inset 1px 0 0 rgba(255, 255, 255, 0.14);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    background 0.2s ease;
}

.track-drawer-handle:hover {
  background: rgba(24, 20, 18, 0.78);
  color: #fff;
  transform: translateX(-3px);
}

body.drawer-open .track-drawer-handle {
  opacity: 0;
  pointer-events: none;
  transform: translateX(12px);
}

body.drawer-open .track-drawer-hotzone {
  pointer-events: none;
}

/* ---------- Bottom carousel dock ---------- */
#view-music .carousel-dock {
  position: fixed;
  z-index: 70;
  left: 50%;
  bottom: 16px;
  display: block;
  width: min(1100px, calc(100vw - 36px));
  height: 196px;
  margin: 0;
  padding: 7px 12px 2px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  background: rgba(10, 10, 12, 0.56);
  -webkit-backdrop-filter: blur(28px) saturate(1.38) brightness(1.08);
  backdrop-filter: blur(28px) saturate(1.38) brightness(1.08);
  box-shadow:
    0 30px 80px -26px rgba(0, 0, 0, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transform: translate(-50%, calc(100% - 35px));
  opacity: 0.96;
  overflow: hidden;
  transition:
    transform 0.46s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.3s ease;
}

#view-music .carousel-dock:hover,
#view-music .carousel-dock:focus-within,
#view-music .carousel-dock.expanded {
  transform: translate(-50%, 0);
  opacity: 1;
}

@media (hover: none) {
  #view-music .carousel-dock {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

#view-music .carousel-dock[hidden] {
  display: none !important;
}

.carousel-dock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 18px;
  padding: 0 4px;
  color: rgba(255, 255, 255, 0.42);
  font-family: var(--font-sans);
  font-size: 9px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.carousel-dock-head span:first-child {
  color: rgba(255, 255, 255, 0.7);
}

.carousel-dock-close {
  padding: 2px 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font-sans);
  font-size: 9px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.carousel-dock-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

#view-music .carousel-dock #neCarouselRoot {
  width: 100%;
  height: calc(100% - 20px);
}

#view-music .carousel-dock .ne-carousel {
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 0;
}

#view-music .carousel-dock .flex-carousel__caption {
  top: calc(50% + var(--flex-carousel-half) * 1 + 12px);
}

#view-music:has(#neCarousel:not([hidden])) {
  padding-bottom: 220px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  #view-music .player-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    min-height: 0;
    padding-bottom: 14px;
  }

  #view-music .player-left {
    grid-column: 1 !important;
    grid-row: 1 !important;
    max-width: 440px;
  }

  #view-music .lyrics-stage {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    height: 340px;
    padding: 0;
  }

  #view-music .lyrics {
    padding: 26% 2px 32%;
  }

  #view-music .lyric-line {
    font-size: clamp(17px, 4.8vw, 24px);
    padding: 7px 4px;
  }

  .track-drawer {
    top: 68px;
    bottom: 10px;
    width: min(400px, 92vw);
    padding: 18px 16px 14px 18px;
    border-radius: 24px 0 0 24px;
  }

  .track-drawer-head h2 {
    font-size: 28px;
  }

  .track-drawer .ne-playlist-swap {
    height: 198px;
  }

  #view-music .carousel-dock {
    width: calc(100vw - 20px);
    height: 170px;
    bottom: 10px;
    border-radius: 20px;
  }

  #view-music:has(#neCarousel:not([hidden])) {
    padding-bottom: 190px;
  }
}

@media (max-width: 520px) {
  .track-drawer {
    width: 94vw;
  }

  .track-drawer-handle {
    height: 112px;
  }

  #view-music .lyrics-stage {
    height: 300px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #view-music .lyric-line.active {
    animation: none;
  }

  .track-drawer,
  .track-drawer-handle {
    transition: none;
  }
}

/* ---------- Static / online portfolio mode ---------- */
.music-static-note {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin: 4px auto 20px;
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(12, 12, 14, 0.36);
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1.5;
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
}

.music-static-note strong {
  flex: none;
  color: var(--accent);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.music-static .music-search-wrap,
body.music-static .carousel-dock {
  display: none !important;
}

body.music-static .pl-tab[data-tab="netease"],
body.music-static #panel-netease {
  display: none !important;
}

body.music-static .player-left {
  justify-content: center;
}

body.music-static .np-title {
  margin-top: 8px;
}

body.music-static .lyrics-stage {
  height: clamp(380px, 56vh, 560px);
}

body.music-static .player-tip {
  text-align: center;
}

