html,
body {
  height: fit-content;
}

body {
  color: #ffffffa0;
  background-color: #8a60be;
  background-blend-mode: soft-light;
  background-size: cover;
  background-position: 50% 50%;
  background-attachment: fixed;
  backdrop-filter: blur(8px);
}

header {
  background-color: #300c5c;
}
header nav a {
  color: #ffffffc0;
}
header nav a:hover {
  background: none;
  color: #fff;
}

h1 {
  color: #ffffff;
}

@keyframes wiggle {
  0% {
    transform: rotate(12deg);
  }
  80% {
    transform: rotate(12deg);
  }
  84% {
    transform: rotate(8deg);
  }
  88% {
    transform: rotate(16deg);
  }
  92% {
    transform: rotate(8deg);
  }
  96% {
    transform: rotate(16deg);
  }
  100% {
    transform: rotate(12deg);
  }
}

h1::after {
  content: 'BETA';
  font-size: small;
  background-color: #de461c;
  box-shadow: 0 1px 0 #a73819;
  color: #ffffff;
  text-shadow: 0 -1px 0 #a73819;
  padding: 2px 8px;
  border-radius: 32px;
  transform: rotate(12deg);
  position: absolute;
  margin-top: -16px;
  margin-left: -8px;
  animation: wiggle 5200ms infinite;
}

h2 {
  margin-top: 4px;
  margin-bottom: 16px;
  font-weight: normal;
}

h2 a {
  color: #ffffffc0;
  text-decoration: none;
}
h2 a:hover {
  color: #ffffff;
  text-decoration: underline;
}

section {
  max-width: 400px;
  padding: 0 8px;
}

footer {
  color: #ffffff60;
}
footer a {
  color: #ffffff80;
}
footer a:hover {
  color: #ffffffa0;
}

section#dropzone {
  max-width: 400px;
  margin: 32px auto;
  border: 4px dashed #312f2880;
  padding: 4px;
  border-radius: 16px;
  background-color: #0000001a;
  text-align: center;
  cursor: pointer;
  aspect-ratio: auto 200/120;
}
section#dropzone:hover {
  border: 4px dashed #312f28d0;
}

section#dropzone input {
  opacity: 0;
  pointer-events: none;
  position: absolute;
  left: 0;
}
section#dropzone h3 {
  text-align: center;
  position: relative;
  margin-top: 27%;
  color: #312f2880;
}
section#dropzone:hover h3 {
  color: #312f28d0;
}
h3.error {
  color: #be2d08 !important;
}

canvas#card-view {
  background-color: #312f28;
  aspect-ratio: auto 200/120;
  width: 100%;
  image-rendering: pixelated;
  mix-blend-mode: hard-light;
  display: none;
}

section#dropzone.loaded {
  background-color: #7300ff;
  box-shadow: 0 8px 16px #00000060;
  padding: 0;
  border: 0;
  border-radius: 0;
}
section#dropzone.loaded h3 {
  display: none;
}
section#dropzone.loaded canvas#card-view {
  display: block;
}

section.hidden {
  display: none;
}

section#controls {
  margin: 0 auto;
}

section#controls h3 {
  color: #ffffff;
  margin-bottom: 0;
}

section#controls h4 {
  color: #ffffffa0;
  margin-top: 0;
}

section#controls a {
  border-radius: 64px;
  width: 64px;
  height: 64px;
  font-size: 24px;
  line-height: 66px;
  color: #ffffffa0;
  border: 4px solid #ffffffa0;
  text-decoration: none;
  cursor: pointer;
  display: inline-block;
  vertical-align: middle;
  margin: 0 8px 32px;
}

section#controls a#btn-play {
  background-color: #ffffffa0;
  border: 0;
  color: #6b4c92;
}
section#controls a#btn-play:hover {
  background-color: #ffffff;
}

section#controls a#btn-prev,
section#controls a#btn-next {
  width: 36px;
  height: 36px;
  font-size: 18px;
  line-height: 37px;
}

section#controls a:hover {
  color: #ffffff;
  border-color: #ffffff;
}
section#controls a:active {
  border-color: #ffffffa0;
}

section#controls #progress-wrap {
  max-width: 400px;
  margin: 0 auto 32px;
  color: #ffffff80;
}
section#controls #progress-wrap small#time-now {
  float: left;
  margin: 4px 4px;
}
section#controls #progress-wrap small#time-max {
  float: right;
  margin: 4px -2px;
}
section#controls #progress-bar {
  background-color: #ffffff60;
  width: 100%;
  height: 8px;
  margin: 14px 2px 0;
  box-sizing: border-box;
}
section#controls #progress-fill {
  height: 100%;
  background-color: #e8d0ff;
  margin: 0;
  max-width: 100%;
}

section#playlist {
  margin: 0 auto;
}

section#playlist a {
  color: #ffffffa0;
  text-decoration: none;
  display: block;
  padding: 16px 16px;
  border-radius: 64px;
  margin: 0 -8px 8px;
  position: relative;
}
section#playlist a:hover {
  color: #ffffff;
  background-color: #00000020;
}
section#playlist a:active {
  background-color: #00000030;
}
section#playlist a.playing {
  background-color: #ffffffa0;
  color: #2c0352;
  pointer-events: none;
}

section#playlist a small {
  position: absolute;
  right: 16px;
  top: 18px;
  opacity: 0.8;
}
