@font-face {
  font-family: "Hardpixel";
  src: url("https://db.onlinewebfonts.com/t/46ed1daa8d58529ffb76987f884f2b03.eot"); /* IE9*/
  src: url("https://db.onlinewebfonts.com/t/46ed1daa8d58529ffb76987f884f2b03.eot?#iefix")
      format("embedded-opentype"),
    /* IE6-IE8 */
      url("https://db.onlinewebfonts.com/t/46ed1daa8d58529ffb76987f884f2b03.woff2")
      format("woff2"),
    /* chrome firefox */
      url("https://db.onlinewebfonts.com/t/46ed1daa8d58529ffb76987f884f2b03.woff")
      format("woff"),
    /* chrome firefox */
      url("https://db.onlinewebfonts.com/t/46ed1daa8d58529ffb76987f884f2b03.ttf")
      format("truetype"),
    /* chrome firefox opera Safari, Android, iOS 4.2+*/
      url("https://db.onlinewebfonts.com/t/46ed1daa8d58529ffb76987f884f2b03.svg#Hardpixel")
      format("svg"); /* iOS 4.1- */
}

// ========================================================
// RESET
// ========================================================
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  list-style: none;
  outline: none;
  font-family: "Hardpixel", serif;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body {
  color: #fff;
  line-height: 1.5;
  overflow: hidden;
}

// ========================================================
// FOOTER LINK STYLES
// ========================================================
.links-wrapper {
  z-index: 1000;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
}
.links-container {
  display: flex;
}
.external-link {
  padding: 4px 6px;
  display: flex;
  align-items: center;
  cursor: pointer;
  &:hover {
    .external-link-text {
      color: #fff;
    }
    .external-link-icon {
      border: 3px solid #fff;
      border-top-color: transparent;
      border-right-color: transparent;
    }
    .external-link-icon-arrow {
      background: #fff;
    }
    .arrow-end {
      width: 8px;
      height: 8px;
      transform: translateX(95%) rotate(180deg);
      border: 4px solid transparent;
      border-right-color: #fff;
    }
  }
}
.external-link-text {
  margin-left: 10px;
  color: #d9d9d9;
  text-shadow: 1px 1px 0px rgba(30, 50, 40, 0.5);
  font-size: max(0.5vw, 14px);
}
.external-link-icon {
  width: 15px;
  height: 15px;
  border: 3px solid #d9d9d9;
  box-shadow: -1px 1px 0px rgba(30, 50, 40, 0.5);
  border-top-color: transparent;
  border-right-color: transparent;
  position: relative;
}
.external-link-icon-arrow {
  position: absolute;
  width: 100%;
  height: 3px;
  background: #d9d9d9;
  box-shadow: 1px 1px 0px rgba(30, 50, 40, 0.5);
  top: 50%;
  left: 0;
  transform: translate(25%, -130%) rotate(-45deg);
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
.arrow-end {
  width: 8px;
  height: 8px;
  transform: translateX(95%) rotate(180deg);
  border: 4px solid transparent;
  border-right-color: #d9d9d9;
}

// ========================================================
// TOP PLAYLIST CONTROL
// ========================================================
.playlist-wrapper {
  z-index: 1000;
  position: fixed;
  top: 0;
  left: 0;  
  align-items: center;
  min-width: 5em;
  max-width: 12em;
  display: grid;
  grid-template-areas: "select";
  margin: 1rem;
  padding: 0;
  box-shadow: 5px 5px 0 #020406;
  background: white;
}

.playlist-wrapper::after {
  width: 1em;
  background: #020406;
  content: "";
  -webkit-clip-path: polygon(0% 20%, 20% 20%, 20% 40%, 40% 40%, 40% 60%, 60% 60%, 60% 40%, 80% 40%, 80% 20%, 100% 20%, 100% 40%, 80% 40%, 80% 60%, 60% 60%, 60% 80%, 40% 80%, 40% 60%, 20% 60%, 20% 40%, 0% 40%);
  clip-path: polygon(0% 20%, 20% 20%, 20% 40%, 40% 40%, 40% 60%, 60% 60%, 60% 40%, 80% 40%, 80% 20%, 100% 20%, 100% 40%, 80% 40%, 80% 60%, 60% 60%, 60% 80%, 40% 80%, 40% 60%, 20% 60%, 20% 40%, 0% 40%);
  height: 1em;
  margin: auto;
  margin-right: 10px;
}

// A trick from this: https://moderncss.dev/custom-select-styles-with-pure-css/
.playlist-wrapper select, .playlist-wrapper::after {
  grid-area: select;
}

#playlist__id {
  border: none;
  padding: 3px;
  font-size: inherit;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

// ========================================================
// TOP LOADER
// ========================================================
.loader {
  z-index: 1000;
  position: fixed;
  top: 0%;
  left: 0%;
  height: 4px;
  width: 0%;
  background: #fff;

  &.loading {
    animation: loader 1s ease-in-out 0s infinite;
  }
  &.static {
    animation: none;
  }

  @keyframes loader {
    0% {
      width: 0%;
      left: 0%;
    }
    50% {
      width: 100%;
    }
    100% {
      width: 0%;
      left: 100%;
    }
  }
}

// ========================================================
// WRAPPER FOR GIF, IMAGE
// ========================================================

#main {
  width: 100%;
  height: 100vh;
  img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(50%);
  }
}

// ========================================================
// WRAPPER CLOCK, QUOTE AND CONTROLS
// ========================================================
#content {
  padding: 1rem;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  display: flex;
  flex-direction: column;
  align-items: center;

  * {
    text-align: center;
    user-select: none;
  }
}

// ========================================================
// TIMER, CLOCK STYLES
// ========================================================
#timer {
  width: max(30vw, 300px);
  letter-spacing: 5px;
  font-size: max(7vw, 60px);
  color: #f5f5f5;
  text-shadow: 5px 5px 0px #020406;
}

// ========================================================
// PHRASE, QUOTE STYLES
// ========================================================
#quote {
  letter-spacing: 2px;
  font-size: max(0.5vw, 14px);
  text-shadow: 1px 1px 0px rgba(30, 50, 40, 0.5);
  color: #d9d9d9;
}

// ========================================================
// HIDDE YOUTUBE IFRAME, TO KEEP ONLY SONG
// ========================================================
#player {
  display: none !important;
}

// ========================================================
// PIXELATED CONTROLS TO NEXT AND PREV
// ========================================================
#button-controls {
  width: 250px;
  display: flex;
  justify-content: space-between;
  margin: 0 auto;
}
.buttons-wrapper {
  margin: 1rem 0;
  display: flex;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  &:hover {
    .dot {
      background: #fff;
    }
  }
  &.left:hover {
    transform: translateX(-5px);
  }
  &.right:hover {
    transform: translateX(5px);
  }
}

.button-container {
  padding: 8px;
}

.dot {
  transition: all 0.2s ease-in-out;
  position: absolute;
  width: 5px;
  height: 5px;
  background: #d9d9d9;
  box-shadow: 1px 1px 0px rgba(30, 50, 40, 0.5);
}

.button {
  position: relative;
  width: 15px;
  height: 25px;
}
.button-left {
  .dot-1 {
    top: 0;
    left: 10px;
  }
  .dot-2 {
    top: 5px;
    left: 5px;
  }
  .dot-3 {
    top: 10px;
    left: 0px;
  }
  .dot-4 {
    top: 15px;
    left: 5px;
  }
  .dot-5 {
    top: 20px;
    left: 10px;
  }
}
.button-play {
  &.paused {
    .dot-1 {
      top: 0;
      left: 0;
      height: 20px;
    }
    .dot-2 {
      top: 5px;
      left: 5px;
      height: 10px;
    }
    .dot-3 {
      top: 10px;
      left: 10px;
    }
    .dot-4 {
      top: 15px;
      left: 5px;
    }
    .dot-5 {
      top: 20px;
      left: 0px;
    }
  }
  &.playing {
    .dot-1 {
      top: 0;
      left: 0;
      height: 20px;
    }
    .dot-2 {
      top: 0;
      left: 10px;
      height: 10px;
    }
    .dot-3 {
      top: 10px;
      left: 10px;
    }
    .dot-4 {
      top: 15px;
      left: 10px;
      height: 10px;
    }
    .dot-5 {
      top: 20px;
      left: 0px;
    }
  }
}
.button-right {
  .dot-1 {
    top: 0;
    left: 0;
  }
  .dot-2 {
    top: 5px;
    left: 5px;
  }
  .dot-3 {
    top: 10px;
    left: 10px;
  }
  .dot-4 {
    top: 15px;
    left: 5px;
  }
  .dot-5 {
    top: 20px;
    left: 0px;
  }
}

// ========================================================
// CUSTOM INPUT TYPE RANGE FOR VOLUME
// ========================================================
.button-vol {
  width: 100%;

  input[type="range"] {
    background: transparent;
    width: 100%;
    height: 28px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    outline: none;
    border: 0;
    padding: 0 8px;
    
    @mixin track {
      background: #fff; /*trackColor*/
      height: 4px; /*trackHeight*/
      border-radius: 4px; /*trackHeight*/
      transition: 0.3s;
    }
    
    @mixin thumb {
      -webkit-appearance: none;
      -moz-appearance: none;
      appearance: none;
      background: #fff;
      width: 15px;
      height: 15px;
      margin-top: -6px;
      cursor: pointer;
      transition: 0.3s;
      border: none;
      border-radius: 0;
      box-shadow: 5px 5px 0 #020406;
    }

    &::-webkit-slider-runnable-track {
      @include track;
    }
    &::-webkit-slider-thumb {
      @include thumb;
    }

    &::-moz-range-track {
      @include track;
    }
    &::-moz-range-thumb {
      @include thumb;
    }

    &::-ms-track {
      @include track;
    }
    &::-ms-thumb {
      @include thumb;
    }
  }
}
