@charset "UTF-8";
/**
 * {sonist app style}
 * @authors yutent<yutent@doui.cc>
 * @date 2018/12/16 17:15:07
 */

@import './var.scss';

.app {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;

  .album-cover {
    overflow: hidden;
    position: absolute;
    z-index: -1;
    left: 0;
    top: 0;
    width: 100%;
    height: 394px;

    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      filter: blur(35px) opacity(0.8);
    }
  }

  // 标题栏样式
  .title-bar {
    position: relative;
    display: flex;
    align-items: center;
    z-index: 9;
    height: 26px;
    background: rgba(32, 32, 32, 0.5);
  }

  .main-body {
    overflow: hidden;
    flex: 1;
    display: flex;
    justify-content: space-between;
    background: rgba(32, 32, 32, 0.5);

    .aside {
      width: 180px;
      height: 100%;
      padding: 0 16px;
      line-height: 2;

      fieldset {
        border: 0;
        color: #ebebeb;
        font-size: 12px;

        legend {
          font-size: 18px;
          background: linear-gradient(to bottom, #58ffdf 50%, #459888);
          background-clip: text;
          color: transparent;
        }

        .item {
          padding-left: 12px;
          line-height: 1.75;
        }

        button {
          width: 42px;
          height: 16px;
          margin-left: 12px;
          font-size: 10px;
          border: 0;
          border-radius: 9px;
          background: nth($cb, 1);
          color: #fff;
        }
      }
    }

    .song-box {
      display: flex;
      flex-direction: column;
      width: 618px;

      .preview {
        position: relative;
        display: flex;
        align-items: center;
        width: 100%;
        height: 99px;
        padding-bottom: 16px;
        border-bottom: 1px solid rgba(200, 200, 200, 0.1);

        .album {
          width: 80px;
          height: 80px;
          img {
            width: 100%;
            height: 100%;
          }
        }

        .info {
          display: flex;
          flex-direction: column;
          justify-content: center;
          width: 320px;
          margin-left: 32px;

          strong {
            height: 36px;
            font-size: 18px;
            font-weight: normal;
          }

          cite {
            font-size: 12px;
            font-style: normal;
          }
          p {
            font-size: 12px;
            color: #bdbdbd;
          }
        }

        .total {
          position: absolute;
          right: 32px;
          bottom: 16px;
          font-size: 16px;
          font-weight: bold;
          font-family: Raleway;
        }
      }

      .scroll-box {
        overflow: hidden;
        flex: 1;
        width: 100%;
        padding: 16px 6px;
        border-top: 1px solid rgba(32, 32, 32, 0.1);
      }

      .list {
        height: 100%;
        font-size: 12px;

        .item {
          display: flex;
          align-items: center;
          height: 26px;
          padding: 0 12px;
          border-radius: 13px;

          .idx {
            position: relative;
            width: 64px;
            padding-left: 16px;
            font-size: 12px;
            font-family: Raleway;
          }

          .name {
            flex: 1;
          }
          .artist {
            width: 128px;
            margin-left: 12px;
          }
          .duration {
            width: 42px;
            margin-left: 12px;
          }

          &.on {
            color: #feac23;
            font-size: 14px;

            .idx::before {
              position: absolute;
              left: 0;
              top: 3px;
              font-size: 10px;
              content: '▶ ';
            }
          }

          &.active,
          &:hover {
            color: #58ffdf;
            background: rgba(29, 77, 68, 0.15);
          }
        }
      }
    }
  }

  .play-bar {
    height: 66px;
    width: 100%;
    background: rgba(24, 24, 24, 0.3);
    color: #fff;

    .stat-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      height: 20px;
      color: #ebebeb;

      .time {
        width: 42px;
        margin: 0 6px;
        text-align: center;
        font-size: 12px;
      }

      .progress {
        position: relative;
        flex: 1;
        display: flex;
        align-items: flex-start;
        height: 3px;
        background: #b2cfe3;

        input {
          position: absolute;
          left: 0;
          top: 0;
          display: block;
          width: 100%;
          height: 3px;
          opacity: 0;
        }
      }

      .thumb {
        // width: 0;
        height: 3px;
        background: #58ffdf;
      }
    }

    .ctrl-box {
      display: flex;
      align-items: center;
      height: 42px;

      .holder {
        flex: 1;
      }

      .info {
        display: flex;
        flex-direction: column;
        justify-content: center;
        width: 320px;
        height: 42px;
        padding-left: 12px;
        line-height: 1.25;

        strong {
          font-size: 14px;
          font-weight: 500;
        }

        cite {
          font-size: 12px;
          font-style: normal;
          color: #aeaeae;
        }
      }

      .play-btn {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 120px;
        height: 42px;
        margin-left: 32px;

        .item {
          width: 22px;
          height: 22px;
          background-repeat: no-repeat;
          background-size: cover;
          transition: background 0.1s ease-in-out;
          cursor: pointer;

          &.prev {
            background-image: url(/images/ctrl/prev.png);
            &:hover,
            &:active {
              background-image: url(/images/ctrl/prev_a.png);
            }
          }

          &.on,
          &.off {
            width: 42px;
            height: 42px;
          }

          &.on {
            background-image: url(/images/ctrl/play.png);
            animation: round 2s linear infinite;

            &:hover,
            &:active {
              background-image: url(/images/ctrl/play_a.png);
            }
          }

          &.off {
            background-image: url(/images/ctrl/pause.png);
            &:hover,
            &:active {
              background-image: url(/images/ctrl/pause_a.png);
            }
          }

          &.next {
            background-image: url(/images/ctrl/next.png);
            &:hover,
            &:active {
              background-image: url(/images/ctrl/next_a.png);
            }
          }
        }
      }

      .play-action {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 64px;
        height: 22px;
        margin-right: 16px;

        .item {
          width: 22px;
          height: 22px;
          background-repeat: no-repeat;
          background-size: cover;
          transition: background 0.1s ease-in-out;
          cursor: pointer;

          &.volume,
          &.mute {
            position: relative;

            a {
              display: block;
              width: 22px;
              height: 22px;
              background-repeat: no-repeat;
              background-size: cover;
              transition: background 0.1s ease-in-out;
            }
            .range {
              visibility: hidden;
              position: absolute;
              right: -5px;
              bottom: 20px;
              width: 32px;
              height: 128px;
              padding: 14px;
              border-radius: 3px;
              background: rgba(128, 128, 128, 0.8);

              input {
                display: block;
                width: 4px;
                height: 100px;
                border-radius: 3px;
                appearance: slider-vertical;
              }
            }

            &:hover {
              .range {
                visibility: visible;
              }
            }
          }

          &.volume a {
            background-image: url(/images/ctrl/volume.png);
            &:hover,
            &:active {
              background-image: url(/images/ctrl/volume_a.png);
            }
          }

          &.mute a {
            background-image: url(/images/ctrl/mute.png);
            &:hover,
            &:active {
              background-image: url(/images/ctrl/mute_a.png);
            }
          }

          &.single {
            background-image: url(/images/ctrl/single.png);
            &:hover,
            &:active {
              background-image: url(/images/ctrl/single_a.png);
            }
          }

          &.all {
            background-image: url(/images/ctrl/all.png);
            &:hover,
            &:active {
              background-image: url(/images/ctrl/all_a.png);
            }
          }

          &.rand {
            background-image: url(/images/ctrl/rand.png);
            &:hover,
            &:active {
              background-image: url(/images/ctrl/rand_a.png);
            }
          }
        }
      }
    }
  }
}

@keyframes round {
  from {
    transform: rotate(0);
  }
  to {
    transform: rotate(360deg);
  }
}
