html, body {
  overscroll-behavior: none;
}

/* Loader container */
.loader {
  position: fixed;
  inset: 0;
  
  width: 100vw;
  
  height: 100vh;
  height: 100svh; 
  height: 100vh; 
  
  background: white;
  
  display: flex;
  justify-content: center;
  align-items: center;
  
  z-index: 10000;
  opacity: 1;
  pointer-events: all;
  transition: opacity 1s ease;
}

.loader.hidden {
  opacity: 0;
  pointer-events: none; /* allow interaction after fade */
}

.loader.fade-out {
  opacity: 0;
  transition: opacity 1s ease;
}

/* Wrapper to center mixtape exactly */
#mixtape-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: inline-block;
  z-index: 2;
}

/* Loader animation behind */
#loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200%;
  max-width: 1200px;
  height: auto;
  z-index: 1;
}

/* Mixtape image */
#mixtape {
  display: block;
  width: 50vw; /* scale down relative to viewport */
  max-width: 400px;
  height: auto;
  position: relative;
  z-index: 2;
}

/* Index card behind mixtape */
#index-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 50vw; /* same width as mixtape */
  height: auto; /* maintain aspect ratio */
  max-width: 400px; /* don’t exceed wrapper */
  z-index: 1;
  transform: rotate(0deg);
  transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Hover effect */
#mixtape-wrapper:hover #index-card {
  left: 10%;
  top: 5%;
  transform: rotate(-5deg);
  z-index: 3;
}

/* Fade out animation */
@keyframes fadeOut {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-20px);
  }
}

/* Responsive */
@media (max-width: 1024px) {
  #mixtape {
    width: 60vw;
  }
  #index-card {
    width: 60vw; /* match mixtape */
  }
}
@media (max-width: 768px) {
  #mixtape {
    width: 70vw;
  }
  #index-card {
    width: 70vw; /* match mixtape */
  }
}
@media (max-width: 480px) {
  #mixtape {
    width: 90vw;
  }
  #index-card {
    width: 90vw; /* match mixtape */
  }
}
