/*
 * 高频交互只使用合成层属性，避免面板开合和播放进度触发布局重排。
 * 静态定位仍由各响应式布局决定，动画只改变 transform / opacity。
 */

#search-area {
  --search-visible-top: 24px;
  top: var(--search-visible-top);
  transform: translate3d(calc(-50% + var(--search-offset)), -112px, 0);
  transition: transform .2s ease-out, opacity .18s ease-out;
}
#search-area.peek {
  top: var(--search-visible-top);
  transform: translate3d(calc(-50% + var(--search-offset)), 0, 0);
}
#search-area.stage-mode { --search-visible-top: 18px; }
body.desktop-shell #search-area { --search-visible-top: 34px; top: var(--search-visible-top); }
body.desktop-shell #search-area.stage-mode { --search-visible-top: 32px; }
body.desktop-shell.desktop-fullscreen #search-area { --search-visible-top: 24px; }
body.simple-mode #search-area {
  transform: translate3d(-50%, -112px, 0);
}
body.simple-mode #search-area.peek {
  transform: translate3d(-50%, 0, 0);
}

body.user-capsule-auto-hide #top-right {
  right: 18px;
  transform: translate3d(116px, 0, 0);
  transition: transform .18s ease-out, opacity .18s ease-out, visibility 0s linear .18s;
}
body.user-capsule-auto-hide #top-right:hover,
body.user-capsule-auto-hide.user-capsule-peek #top-right {
  right: 18px;
  transform: translate3d(0, 0, 0);
  transition: transform .18s ease-out, opacity .16s ease-out;
}

#fx-panel {
  right: 24px;
  transform: translate3d(calc(100% + 56px), 18px, 0) scale(.97);
  transition: transform .2s ease-out, opacity .18s ease-out;
}
#fx-panel.show,
#fx-panel.peek {
  right: 24px;
  transform: translate3d(0, 0, 0) scale(1);
}
#fx-panel.show,
#fx-panel.closing { animation: none; }
#fx-panel.closing {
  opacity: 0;
  transform: translate3d(calc(100% + 56px), 12px, 0) scale(.97);
}

#playlist-panel {
  left: 32px;
  transform: translate3d(calc(-100% - 64px), 0, 0);
  transition: transform .2s ease-out, opacity .18s ease-out;
}
#playlist-panel.show,
#playlist-panel.peek {
  left: 32px;
  transform: translate3d(0, 0, 0);
}

#fx-fab {
  transition: transform .18s ease-out, opacity .18s ease-out, background .18s ease-out, border-color .18s ease-out, color .18s ease-out, box-shadow .18s ease-out;
}
#fx-fab-hide-btn {
  transition: transform .18s ease-out, opacity .18s ease-out, background .18s ease-out, color .18s ease-out, border-color .18s ease-out;
}
body.fx-fab-auto-hide #fx-fab {
  right: 24px;
  transform: translate3d(110px, 0, 0);
  transition: transform .18s ease-out, opacity .18s ease-out, visibility 0s linear .18s;
}
body.fx-fab-auto-hide.fx-fab-peek #fx-fab {
  right: 24px;
  transform: translate3d(0, 0, 0);
  transition: transform .18s ease-out, opacity .16s ease-out;
}
body.fx-fab-auto-hide #fx-fab-hide-btn {
  right: 84px;
  transform: translate3d(110px, 0, 0) scale(.92);
  transition: transform .18s ease-out, opacity .18s ease-out, visibility 0s linear .18s;
}
body.fx-fab-auto-hide.fx-fab-peek #fx-fab-hide-btn {
  right: 84px;
  transform: translate3d(0, 0, 0) scale(1);
  transition: transform .18s ease-out, opacity .16s ease-out;
}

#bottom-bar {
  transition: transform .2s ease-out, opacity .18s ease-out;
}
#progress-fill {
  width: 100%;
  transform: scaleX(var(--progress-ratio, 0));
  transform-origin: left center;
  transition: transform .12s linear;
}
.home-wave-track span {
  height: 18px;
  transform: scaleY(var(--home-wave-scale, .22));
  transform-origin: center bottom;
  transition: transform .08s linear, opacity .08s linear;
}
.gesture-meter span {
  width: 100%;
  transform: scaleX(var(--gesture-progress, 0));
  transform-origin: left center;
  transition: transform .08s linear;
}

body:not(.empty-home-active) .home-disc,
body:not(.empty-home-active) .home-eq span,
body:not(.empty-home-active) .home-card,
body:not(.empty-home-active) .home-visual,
body:not(.empty-home-active) .home-skeleton::before {
  animation-play-state: paused;
}

/* 启动页信号点用位移代替 left 百分比动画。 */
.splash-signal-line::after { left: 50%; }
@keyframes splash-signal-blip {
  0%, 42% {
    opacity: 0;
    transform: translate3d(calc(-50% - min(30vw, 150px)), -50%, 0) scale(.24);
  }
  62% { opacity: .94; transform: translate3d(-50%, -50%, 0) scale(1); }
  76% { opacity: 1; transform: translate3d(-50%, -50%, 0) scale(1.45); }
  100% {
    opacity: .16;
    transform: translate3d(calc(-50% + min(30vw, 150px)), -50%, 0) scale(.46);
  }
}
body.controls-visible #bottom-handle span { width: 164px; }

@media (max-width: 980px) {
  body.desktop-shell.diy-mode #fx-panel,
  body.desktop-shell.diy-mode #fx-panel.show,
  body.desktop-shell.diy-mode #fx-panel.peek { right: 18px; }
}

@media (max-width: 720px) {
  body.desktop-shell #search-area { --search-visible-top: 58px; }
  body.desktop-shell.desktop-fullscreen #search-area { --search-visible-top: 24px; }
  #fx-panel {
    left: 12px;
    right: 12px;
    transform: translate3d(0, 24px, 0) scale(.97);
  }
  #fx-panel.show,
  #fx-panel.peek {
    left: 12px;
    right: 12px;
    transform: translate3d(0, 0, 0) scale(1);
  }
  #playlist-panel {
    left: 12px;
    right: 12px;
    transform: translate3d(-24px, 0, 0);
  }
  #playlist-panel.show,
  #playlist-panel.peek {
    left: 12px;
    right: 12px;
    transform: translate3d(0, 0, 0);
  }
}

html.is-reduced-motion #search-area,
html.is-reduced-motion #top-right,
html.is-reduced-motion #fx-panel,
html.is-reduced-motion #playlist-panel,
html.is-reduced-motion #fx-fab,
html.is-reduced-motion #fx-fab-hide-btn,
html.is-reduced-motion #bottom-bar,
html.is-reduced-motion #progress-fill,
html.is-reduced-motion .home-wave-track span,
html.is-reduced-motion .gesture-meter span {
  transition-duration: .01ms;
}
html.is-reduced-motion .home-disc,
html.is-reduced-motion .home-eq span,
html.is-reduced-motion .home-card,
html.is-reduced-motion .home-visual,
html.is-reduced-motion .home-skeleton::before {
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  #search-area,
  #top-right,
  #fx-panel,
  #playlist-panel,
  #fx-fab,
  #fx-fab-hide-btn,
  #bottom-bar,
  #progress-fill,
  .home-wave-track span,
  .gesture-meter span {
    transition-duration: .01ms;
  }
}
