#fp-wrapper {
  --fp-width-collapsed: 72px;
  --fp-width-expanded: 404px;
  --fp-height: 72px;
  --fp-radius: 10px;
  --fp-bg: rgba(255, 255, 255, 0.72);
  --fp-blue: #3B82F6;
  --fp-title: #1F2937;
  --fp-artist: #6B7280;
  --fp-btn-hover: #EFF6FF;
  --fp-btn-active: #DBEAFE;
  --fp-border: rgba(255, 255, 255, 0.56);
  --fp-shadow: 0 12px 36px rgba(59, 130, 246, 0.18);
  --fp-ease: cubic-bezier(0.4, 0, 0, 0.2);
  position: fixed;
  left: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  width: 404px;
  z-index: 10020;
  font-family: apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
}

#fp-wrapper,
#fp-wrapper *,
#fp-wrapper *::before,
#fp-wrapper *::after {
  box-sizing: border-box;
}

#fp-wrapper .fp-native-root,
#fp-wrapper .aplayer,
body > .aplayer.aplayer-fixed {
  opacity: 0 !important;
  pointer-events: none !important;
}

#fp-wrapper .fp-native-root {
  position: fixed !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

#fp-wrapper .fp-shell {
  position: relative;
  width: var(--fp-width-collapsed);
  height: var(--fp-height);
  border-radius: var(--fp-radius);
  overflow: visible;
  transition:
    width 0.3s var(--fp-ease),
    opacity 0.3s var(--fp-ease),
    transform 0.3s var(--fp-ease);
  opacity: 0.82;
  transform: translateZ(0);
}

#fp-wrapper .fp-shell.fp-expanded {
  width: var(--fp-width-expanded);
  opacity: 1;
}

#fp-wrapper .fp-glass {
  position: absolute;
  inset: 0;
  border-radius: var(--fp-radius);
  background: var(--fp-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--fp-border);
  box-shadow: var(--fp-shadow);
  opacity: 0;
  transition: opacity 0.3s var(--fp-ease);
}

#fp-wrapper .fp-shell.fp-expanded .fp-glass {
  opacity: 1;
}

#fp-wrapper .fp-cover {
  position: absolute;
  left: 0;
  top: 0;
  width: 72px;
  height: 72px;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--fp-shadow);
  z-index: 3;
  cursor: pointer;
}

#fp-wrapper .fp-cover-image {
  width: 72px;
  height: 72px;
  display: block;
  object-fit: cover;
  transition: opacity 0.3s var(--fp-ease), transform 0.3s var(--fp-ease);
}

#fp-wrapper .fp-shell.fp-track-changing .fp-cover-image,
#fp-wrapper .fp-shell.fp-track-changing .fp-title,
#fp-wrapper .fp-shell.fp-track-changing .fp-artist,
#fp-wrapper .fp-shell.fp-track-changing .fp-lyric {
  animation: fpFadeSwap 0.3s var(--fp-ease);
}

#fp-wrapper .fp-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.06);
  opacity: 0;
  transition: opacity 0.2s ease;
}

#fp-wrapper .fp-shell.fp-hover .fp-cover::after {
  opacity: 1;
}

#fp-wrapper .fp-cover-toggle,
#fp-wrapper .fp-expand-hotspot,
#fp-wrapper .fp-btn,
#fp-wrapper .fp-collapse-btn,
#fp-wrapper .fp-playlist-item {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  outline: none;
  cursor: pointer;
  font: inherit;
}

#fp-wrapper .fp-cover-toggle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--fp-title);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
  z-index: 4;
}

#fp-wrapper .fp-shell.fp-hover .fp-cover-toggle,
#fp-wrapper .fp-cover:focus-within .fp-cover-toggle {
  opacity: 1;
  transform: scale(1);
}

#fp-wrapper .fp-shell.fp-expanded .fp-cover-toggle {
  opacity: 0;
  pointer-events: none;
}

#fp-wrapper .fp-expand-hotspot {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--fp-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  z-index: 5;
  box-shadow: 0 6px 18px rgba(59, 130, 246, 0.18);
}

#fp-wrapper .fp-shell.fp-hover .fp-expand-hotspot,
#fp-wrapper .fp-cover:hover .fp-expand-hotspot,
#fp-wrapper .fp-cover:focus-within .fp-expand-hotspot {
  opacity: 1;
  transform: scale(1);
}

#fp-wrapper .fp-shell.fp-expanded .fp-expand-hotspot {
  opacity: 0;
  pointer-events: none;
}

#fp-wrapper .fp-cover-toggle:hover,
#fp-wrapper .fp-expand-hotspot:hover,
#fp-wrapper .fp-btn:hover,
#fp-wrapper .fp-collapse-btn:hover,
#fp-wrapper .fp-playlist-item:hover {
  background: var(--fp-btn-hover);
}

#fp-wrapper .fp-cover-toggle:active,
#fp-wrapper .fp-expand-hotspot:active,
#fp-wrapper .fp-btn:active,
#fp-wrapper .fp-collapse-btn:active,
#fp-wrapper .fp-playlist-item:active {
  background: var(--fp-btn-active);
}

#fp-wrapper .fp-expanded-ui {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: stretch;
  padding: 8px 9px 7px;
  padding-left: 81px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--fp-ease);
}

#fp-wrapper .fp-shell.fp-expanded .fp-expanded-ui {
  opacity: 1;
  pointer-events: auto;
}

#fp-wrapper .fp-main {
  width: 100%;
  height: 57px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

#fp-wrapper .fp-meta {
  position: relative;
  min-width: 0;
  width: 214px;
  height: 57px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 0;
}

#fp-wrapper .fp-title,
#fp-wrapper .fp-artist,
#fp-wrapper .fp-lyric {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#fp-wrapper .fp-title {
  font-size: 16px;
  line-height: 1.08;
  font-weight: 700;
  color: var(--fp-title);
}

#fp-wrapper .fp-artist {
  font-size: 11px;
  line-height: 1.05;
  font-weight: 400;
  color: var(--fp-artist);
  margin-top: 1px;
}

#fp-wrapper .fp-lyric {
  font-size: 11px;
  line-height: 1.05;
  font-weight: 400;
  color: var(--fp-blue);
  margin-top: 1px;
  padding-right: 8px;
}

#fp-wrapper .fp-progress-row {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

#fp-wrapper .fp-controls {
  width: 142px;
  min-width: 142px;
  height: 57px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-right: 28px;
  padding-top: 5px;
}

#fp-wrapper .fp-btn,
#fp-wrapper .fp-collapse-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--fp-title);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, transform 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 6px 22px rgba(59, 130, 246, 0.14);
}

#fp-wrapper .fp-btn-play:hover,
#fp-wrapper .fp-cover-toggle:hover {
  transform: scale(1.05);
}

#fp-wrapper .fp-btn svg,
#fp-wrapper .fp-collapse-btn svg,
#fp-wrapper .fp-cover-toggle svg,
#fp-wrapper .fp-expand-hotspot svg {
  width: 18px;
  height: 18px;
  display: block;
}

#fp-wrapper .fp-cover-toggle svg {
  width: 12px;
  height: 12px;
}

#fp-wrapper .fp-expand-hotspot svg {
  width: 12px;
  height: 12px;
}

#fp-wrapper .fp-icon-pause {
  display: none;
}

#fp-wrapper [data-state="pause"] .fp-icon-play {
  display: none;
}

#fp-wrapper [data-state="pause"] .fp-icon-pause {
  display: inline-flex;
}

#fp-wrapper .fp-collapse-btn {
  position: absolute;
  top: 9px;
  right: 9px;
  opacity: 0;
  pointer-events: none;
}

#fp-wrapper .fp-shell.fp-expanded .fp-collapse-btn {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

#fp-wrapper .fp-shell.fp-playlist-open .fp-btn-list {
  background: rgba(219, 234, 254, 0.95);
  color: var(--fp-blue);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.20);
}

#fp-wrapper .fp-playlist-panel {
  position: absolute;
  left: 0;
  bottom: 82px;
  width: 404px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 48px rgba(59, 130, 246, 0.22);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.98);
  transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

#fp-wrapper .fp-playlist-panel.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

#fp-wrapper .fp-playlist-header {
  height: 44px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--fp-title);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.92), rgba(255, 255, 255, 0.72));
  border-bottom: 1px solid rgba(59, 130, 246, 0.12);
}

#fp-wrapper .fp-playlist-body {
  max-height: 320px;
  overflow: auto;
  padding: 10px;
}

#fp-wrapper .fp-playlist-body::-webkit-scrollbar {
  width: 6px;
}

#fp-wrapper .fp-playlist-body::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.28);
  border-radius: 999px;
}

#fp-wrapper .fp-playlist-item {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--fp-title);
  text-align: left;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

#fp-wrapper .fp-playlist-item.is-active {
  background: rgba(59, 130, 246, 0.14);
}

#fp-wrapper .fp-playlist-item-title,
#fp-wrapper .fp-playlist-item-artist {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#fp-wrapper .fp-playlist-item-title {
  flex: 1 1 auto;
  font-size: 14px;
  color: var(--fp-title);
}

#fp-wrapper .fp-playlist-item-artist {
  flex: 0 0 108px;
  font-size: 12px;
  color: var(--fp-artist);
  text-align: right;
}

#fp-wrapper .fp-playlist-panel .playlist-container {
  position: static !important;
  inset: auto !important;
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  width: 100% !important;
  max-height: 320px !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

#fp-wrapper .fp-playlist-panel .playlist-items,
#fp-wrapper .fp-playlist-panel .playlist-list,
#fp-wrapper .fp-playlist-panel ul {
  max-height: 320px !important;
}

#fp-wrapper .fp-time {
  font-size: 9px;
  line-height: 1;
  color: var(--fp-artist);
  flex: 0 0 26px;
  width: 26px;
}

#fp-wrapper .fp-current-time {
  text-align: left;
}

#fp-wrapper .fp-total-time {
  text-align: right;
}

#fp-wrapper .fp-progress-track {
  position: relative;
  flex: 1 1 auto;
  height: 20px;
  border-radius: 999px;
  background: transparent;
  overflow: visible;
  cursor: pointer;
  touch-action: none;
}

#fp-wrapper .fp-progress-track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 5px;
  border-radius: 999px;
  background: #E5E7EB;
  transform: translateY(-50%);
}

#fp-wrapper .fp-progress-track:hover::before {
  background: #DCE7F8;
}

#fp-wrapper .fp-progress-fill {
  position: absolute;
  left: 0;
  top: 50%;
  height: 5px;
  width: 0;
  border-radius: 999px;
  background: var(--fp-blue);
  transform: translateY(-50%);
}

#fp-wrapper .fp-progress-fill::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--fp-blue);
  transform: translateY(-50%);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.94);
}

@keyframes fpFadeSwap {
  0% { opacity: 0.12; }
  100% { opacity: 1; }
}

@media (max-width: 420px) {
  #fp-wrapper {
    left: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    width: 404px;
    max-width: calc(100vw - 24px);
  }
}
