@font-face {
  font-family: "Albertsthal Typewriter";
  src: url("../font/AlbertsthalTypewriter.woff2") format("woff2"),
    url("font/AlbertsthalTypewriter.woff") format("woff");
  font-weight: normal;
  font-style: italic;
  font-display: swap;
}

body {
  margin: 0;
  padding: 0;
  height: 100vh;
  background: url("../img/bg.png") center/cover fixed;
  overflow: hidden;
  font-family: Arial, sans-serif;
}

.image-container {
  position: relative;
  width: 360px;
  height: auto;
  margin: -50px;
  overflow: visible;
  transition: transform 0.2s ease-out;
  will-change: transform;
}

.top-left {
  position: absolute;
  top: 0;
  left: 0;
  -webkit-filter: grayscale(100%); /* Safari 6.0 - 9.0 */
  filter: grayscale(100%);
}

.bottom-left {
  position: absolute;
  bottom: -10px;
  left: -10px;
  -webkit-filter: grayscale(100%); /* Safari 6.0 - 9.0 */
  filter: grayscale(100%);
}

.top-right {
  position: absolute;
  top: 0;
  right: 0;
}

.hover-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 24px;
  opacity: 0;
  transition: opacity 0.3s;
  text-align: center;
  pointer-events: none;
}

.image-container:hover .hover-text {
  opacity: 1;
  background: rgba(0, 0, 0, 0.7);
  padding: 0px;
  border-radius: 0px;
}

.vinyl-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.vinyl {
  width: 300px;
  height: 300px;
  position: relative;
  transform: rotate(0deg);
  -webkit-filter: grayscale(100%); /* Safari 6.0 - 9.0 */
  filter: grayscale(100%);
}

.vinyl::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
}

.vinyl.spinning {
  animation: spin 2s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.logo {
  width: 500px;
  height: auto;
  position: relative;
  z-index: 9999;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.needle {
  width: 200px;
  height: auto;
  position: absolute;
  top: 35%;
  right: -50px;
  transform-origin: right center;
  cursor: grab;
  transition: transform 0.5s ease-out;
  -webkit-filter: grayscale(100%); /* Safari 6.0 - 9.0 */
  filter: grayscale(100%);
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

.needle img {
  transform: rotate(-35deg);
}

.needle-holder {
  width: 70px;
  height: auto;
  position: absolute;
  top: 45%;
  right: -100px;
  z-index: 99;
  -webkit-filter: grayscale(100%); /* Safari 6.0 - 9.0 */
  filter: grayscale(100%);
}

.needle.dragging {
  transition: none;
  cursor: grabbing;
}

.needle.wiggling {
  animation: wiggle 2s ease-in-out infinite;
}

@keyframes wiggle {
  0% {
    transform: rotate(-19deg);
  }
  25% {
    transform: rotate(-20deg);
  }
  50% {
    transform: rotate(-21deg);
  }
  75% {
    transform: rotate(-20deg);
  }
  100% {
    transform: rotate(-19deg);
  }
}

img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.track-info {
  position: absolute;
  width: 100%;
  height: 100px;
  margin-top: 30px;
  color: white;
  text-align: center;
  font-size: 18px;
  text-align: center;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 9;
}

.track-info.visible {
  opacity: 1;
}

.track-info .title {
  font-family: "Albertsthal Typewriter";
  font-size: 18px;
  margin-bottom: 5px;
}

@media screen and (max-width: 624px) {
  .top-left img {
    position: fixed;
    width: 250px;
    height: auto;
    left: 30px;
    top: 50px;
  }

  .bottom-left img {
    position: fixed;
    width: 250px;
    height: auto;
    left: 50px;
    bottom: 50px;
  }

  .top-right img {
    position: fixed;
    width: 250px;
    height: auto;
    right: 50px;
  }
}

@media screen and (max-width: 430px) {
  .top-left img {
    position: fixed;
    width: 150px;
    height: auto;
    left: 30px;
    top: 50px;
  }

  .bottom-left img {
    position: fixed;
    width: 150px;
    height: auto;
    left: 50px;
    bottom: -10px;
  }

  .top-right img {
    position: fixed;
    width: 150px;
    height: auto;
    right: 30px;
  }

  .vinyl {
    width: 200px;
    height: 200px;
  }

  .needle {
    width: 150px;
    height: auto;
    top: 25%;
    right: -50px;
    transform-origin: right center;
  }

  .needle-holder {
    width: 40px;
    height: auto;
    top: 45%;
    right: -70px;
  }

  .logo {
    width: 300px;
    height: auto;
    position: relative;
    z-index: 9999;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
}
