/* APlayer 1.10.1: follow Butterfly's theme without recreating the player. */
.aplayer {
  --ap-accent: #ff80ac;
}

/* Keep both modes pink even when a player or track sets an inline theme. */
.aplayer .aplayer-played,
.aplayer .aplayer-thumb,
.aplayer .aplayer-volume,
.aplayer .aplayer-list-cur,
.aplayer .aplayer-pic {
  background-color: var(--ap-accent) !important;
}

:root:not([data-theme="dark"]) .aplayer .aplayer-list ol li:hover {
  background: #fff3f7;
}

:root:not([data-theme="dark"]) .aplayer .aplayer-list ol li.aplayer-list-light {
  background: #ffe4ee;
}

/* A deeper pink keeps small text legible against the light surface. */
:root:not([data-theme="dark"]) .aplayer .aplayer-list ol li.aplayer-list-light .aplayer-list-title,
:root:not([data-theme="dark"]) .aplayer .aplayer-lrc p.aplayer-lrc-current {
  color: #b83d69;
}

:root:not([data-theme="dark"]) .aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon:hover path,
:root:not([data-theme="dark"]) .aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon:focus-visible path,
:root:not([data-theme="dark"]) .aplayer .aplayer-miniswitcher .aplayer-icon:hover path {
  fill: #b83d69;
}

.aplayer .aplayer-icon:focus-visible {
  outline: 2px solid var(--ap-accent);
  outline-offset: 2px;
}

[data-theme="dark"] .aplayer {
  --ap-bg: #181b20;
  --ap-surface: #22262d;
  --ap-border: #353941;
  --ap-text: #e5e9ef;
  --ap-muted: #a8afb9;
  background: var(--ap-bg);
  color: var(--ap-text);
  color-scheme: dark;
  text-shadow: none;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .aplayer .aplayer-body,
[data-theme="dark"] .aplayer .aplayer-list {
  background: var(--ap-bg);
}

[data-theme="dark"] .aplayer.aplayer-withlist .aplayer-info,
[data-theme="dark"] .aplayer.aplayer-fixed .aplayer-info,
[data-theme="dark"] .aplayer.aplayer-fixed .aplayer-list,
[data-theme="dark"] .aplayer .aplayer-list ol li {
  border-color: var(--ap-border);
}

[data-theme="dark"] .aplayer .aplayer-info .aplayer-music .aplayer-title,
[data-theme="dark"] .aplayer .aplayer-list ol li .aplayer-list-title {
  color: var(--ap-text);
}

[data-theme="dark"] .aplayer .aplayer-info .aplayer-music .aplayer-author,
[data-theme="dark"] .aplayer .aplayer-info .aplayer-controller .aplayer-time,
[data-theme="dark"] .aplayer .aplayer-list ol li .aplayer-list-index,
[data-theme="dark"] .aplayer .aplayer-list ol li .aplayer-list-author {
  color: var(--ap-muted);
}

[data-theme="dark"] .aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon path,
[data-theme="dark"] .aplayer .aplayer-miniswitcher .aplayer-icon path {
  fill: var(--ap-muted);
}

[data-theme="dark"] .aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon:hover path,
[data-theme="dark"] .aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon:focus-visible path,
[data-theme="dark"] .aplayer .aplayer-miniswitcher .aplayer-icon:hover path {
  fill: var(--ap-accent);
}

[data-theme="dark"] .aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar,
[data-theme="dark"] .aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap .aplayer-volume-bar {
  background: var(--ap-border);
}

[data-theme="dark"] .aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-loaded {
  background: #626b79;
}

[data-theme="dark"] .aplayer .aplayer-list ol li:hover {
  background: #29242c;
}

[data-theme="dark"] .aplayer .aplayer-list ol li.aplayer-list-light {
  background: #382631;
}

[data-theme="dark"] .aplayer .aplayer-list ol li.aplayer-list-light .aplayer-list-title {
  color: var(--ap-accent);
}

[data-theme="dark"] .aplayer .aplayer-list ol {
  scrollbar-color: #a65776 var(--ap-bg);
}

[data-theme="dark"] .aplayer .aplayer-list ol::-webkit-scrollbar-thumb {
  background-color: #a65776;
}

[data-theme="dark"] .aplayer .aplayer-list ol::-webkit-scrollbar-thumb:hover {
  background-color: var(--ap-accent);
}

[data-theme="dark"] .aplayer .aplayer-lrc p {
  color: var(--ap-muted);
  opacity: 0.75;
}

[data-theme="dark"] .aplayer .aplayer-lrc p.aplayer-lrc-current {
  color: var(--ap-accent);
  opacity: 1;
}

[data-theme="dark"] .aplayer .aplayer-lrc:before {
  background: linear-gradient(180deg, var(--ap-bg), rgba(24, 27, 32, 0));
  filter: none;
}

[data-theme="dark"] .aplayer .aplayer-lrc:after {
  background: linear-gradient(180deg, rgba(24, 27, 32, 0), var(--ap-bg));
  filter: none;
}

/* Fixed lyrics float over the page, so replace the vendor's white outline. */
[data-theme="dark"] .aplayer.aplayer-fixed .aplayer-lrc {
  text-shadow: 0 1px 3px #000;
}

[data-theme="dark"] .aplayer .aplayer-miniswitcher,
[data-theme="dark"] .aplayer .aplayer-notice {
  background: var(--ap-surface);
  color: var(--ap-text);
}
