@mixin aplayer-dark-theme {
  $aplayer-bg: #181f28;
  $aplayer-bg-elevated: #1f2731;
  $aplayer-bg-hover: #252f3a;
  $aplayer-bg-active: #2b3642;
  $aplayer-border: #313a45;
  $aplayer-text: #d1d7e0;
  $aplayer-text-secondary: #9aa5b1;
  $aplayer-text-muted: #838d98;
  $aplayer-shadow: #161b22;
  $aplayer-switcher-bg: #232d39;

  background: $aplayer-bg;

  &.aplayer-withlist {
    .aplayer-info {
      border-bottom-color: $aplayer-border;
    }
  }

  &.aplayer-fixed {
    .aplayer-list {
      border-color: $aplayer-border;
    }
  }

  .aplayer-body {
    background-color: $aplayer-bg;
  }

  .aplayer-info {
    border-top-color: $aplayer-border;
  }

  .aplayer-info {
    .aplayer-music {
      .aplayer-title {
        color: $aplayer-text;
      }

      .aplayer-author {
        color: $aplayer-text-secondary;
      }
    }

    .aplayer-controller {
      .aplayer-time {
        color: $aplayer-text-secondary;

        .aplayer-icon {
          path {
            fill: $aplayer-text-secondary;
          }
        }
      }
    }
  }

  .aplayer-list {
    background-color: $aplayer-bg;

    li {
      color: $aplayer-text;
      border-top-color: $aplayer-border;

      &:hover {
        background: $aplayer-bg-hover;
      }

      &.aplayer-list-light {
        background: $aplayer-bg-active;
      }

      .aplayer-list-index {
        color: $aplayer-text-muted;
      }

      .aplayer-list-author {
        color: $aplayer-text-secondary;
      }
    }
  }

  .aplayer-lrc {
    text-shadow: -1px -1px 0 $aplayer-shadow;

    &:before {
      background: -moz-linear-gradient(top, rgba(24,31,40,1) 0%, rgba(24,31,40,0) 100%);
      background: -webkit-linear-gradient(top, rgba(24,31,40,1) 0%, rgba(24,31,40,0) 100%);
      background: linear-gradient(to bottom, rgba(24,31,40,1) 0%, rgba(24,31,40,0) 100%);
      filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#181f28', endColorstr='#00181f28',GradientType=0 );
    }

    &:after {
      background: -moz-linear-gradient(top, rgba(24,31,40,0) 0%, rgba(24,31,40,0.9) 100%);
      background: -webkit-linear-gradient(top, rgba(24,31,40,0) 0%, rgba(24,31,40,0.9) 100%);
      background: linear-gradient(to bottom, rgba(24,31,40,0) 0%, rgba(24,31,40,0.9) 100%);
      filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00181f28', endColorstr='#e6181f28',GradientType=0 );
    }

    p {
      color: $aplayer-text;
    }
  }

  .aplayer-miniswitcher {
    background: $aplayer-switcher-bg;

    .aplayer-icon {
      path {
        fill: $aplayer-text-secondary;
      }
    }
  }
}

[data-theme-mode='dark'] .aplayer {
  @include aplayer-dark-theme;
}

@media (prefers-color-scheme: dark) {
  [data-theme-mode='auto'] .aplayer {
    @include aplayer-dark-theme;
  }
}
