/* Hide default audio controls */
audio {
  display: none;
}
.audio-player-container img.default-image {
  display: block;
}
.audio-player-container img.playing {
  display: none;
}
#PayOff {
  display: none;
 }
 #PayOn {
  display: block;
 }
 .LancasterFrame {
  border: solid 1px #ffffff;
  width: 32vw;
  height: calc(90dvh - 2px);
  overflow: hidden;
  position: relative;
  filter: blur(10px);
  pointer-events: none; /* disable interaction during animation */
  transition: filter .5s linear; /* smooth animation via JS trigger */
  border-top-left-radius: 20px;
  border-bottom-right-radius: 20px;
}
 .LancasterMusicPlayer {
  opacity: 1;
  width: 100%;
  height: 100%; /* Important */
  text-align: center;
  color: #d3d3d3;
  background-color: rgba(0, 0, 0, .4);
  background-image: url('');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
  transition-duration: 1s;
}
/*----Bars----*/
.PasswordBar {
  width: auto;
  height: 35px;
  line-height: 35px;
  margin: 0px;
  color: #000000;
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  overflow: hidden;
}
.UnlockerBand {
  position: relative;
  width: calc(100% - 2px);
  background-size: cover;
  left: 0px;
  border: solid 1px #ffffff;
  overflow: hidden;
  min-width: 300px;
}
.ListenStats {
  line-height: 10px;
  height: 40px;
  color: #ffffff;
  border: solid 1px #ffffff;
  border-bottom: none;
  width: calc(100% - 2px);
  overflow: hidden;
  position: relative;
  bottom: 0px;
  text-align: center;
  background-color: transparent;
  min-width: 300px;
}
/*----Bars----*/
.song-selection {
  padding: 5px;
  margin: 4px;
  border-radius: 0px;
  position: relative;
  border: solid 1px #ffffff;
  width: calc(100% - 20px);
  overflow-y: scroll;
  height: 500px;
  max-height: 30dvh;
  background-color: transparent;
  border-top-left-radius: 20px;
  border-bottom-right-radius: 20px;
}
.song-button:hover {
  width: calc(100% - 2px);
  background-color: #773900;
  }
.song-button {
  font-family: 'Gatsby';
  font-size: 22px;
  color: #ffffff;
  position: relative;
  width: calc(100% - 8px);
  overflow: hidden;
  min-width: 300px;
  height: 38px;
  line-height: 10px;
  margin: 1px;
  border: solid 1px #ffffff;
  background-color: transparent;
  background-image: linear-gradient(to top, rgba(255, 255, 255, .7), transparent, rgba(0, 0, 0, .4));
  background-size: cover;
  text-align: left;
  padding-left: 44px;
  transition-duration: .5s;
  border-top-left-radius: 20px;
  border-bottom-right-radius: 20px;
}
 .MusicHeader {
  text-align: left;
  height: 130px;
  min-width: 400px;
  overflow-y: visible;
  background-image: linear-gradient(to top, rgba(255, 255, 255, 1), transparent);
}
.OffMusicHeader {
  height: 130px; 
  max-width: 95%;
  display: flex; 
  align-items: center; 
  justify-content: center; 
  color: #000000; 
  font-size: 1.5em;
}
.BuyButtonIcon {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block; /* prevents inline spacing */
  object-fit: contain; /* preserves aspect ratio */
}
 .BuyButton {
  position: relative;
  width: calc(100% - 2px);
  height: calc((90dvh - 214px) / 3);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ffffff;
  background-color: rgba(255, 255, 255, 0.5);
  color: #000000;
  border-radius: 0px;
 }
 .BuyButton:hover {
  background-image: linear-gradient(to top, #000000, transparent);
 }
.audio-player {
  width: 100%;
  background-color: transparent;
  border: none;
}
.shuffle-btn {
  border: inline-block;
  cursor: pointer;
  height: 40px;
  width: 40px;
  margin-bottom: -13px;
}
.volume-btn {
  border: inline-block;
  cursor: pointer;
  height: 40px;
  width: 40px;
  margin-bottom: -13px;
}
#playBtn {
  position: relative;
  z-index: 2;
  left: 0px;
  cursor: pointer;
  height: 90px;
  width: 90px;
  margin: 5px;
  transition-duration: .3s;
  animation: Play 1s linear infinite;
}
/*----Bars----*/
.VolumeBar {
  position: relative;
  bottom: 80px;
  width: 200px;
  min-width: 200px;
  max-width: 20vw;
  text-align: right;
}
.SongProgressBar {
  position: relative;
  bottom: 75px;
  height: 40px;
}
#volume-control {
  position: relative;
  display: inline-block;
  height: 20px;
  color: #000000;
  width: 20vw;
  max-width: 200px;
  box-sizing: border-box;
  overflow: visible; /* Ensure child elements aren't clipped */
}
.volume-container {
  background: #ffffff;
  border: solid 1px #ffffff;
  border-radius: 10px;
  padding: 20px;
  width: 300px;
  text-align: center;
  overflow: visible;
}
.volume-container label {
  display: block;
  margin-bottom: 10px;
  font-size: 18px;
}
.AlbumThumbnail {
  height: 38px; /* Fill the height of the button */
  width: 38px; /* Maintain the aspect ratio */
  margin: 0px;
  padding: 0px;
  position: absolute;
  top: 0px;
  left: 0px;
  z-index: 0;
}
.progress-bar {
  width: 150px;
  height: 10px;
  background-color: rgba(255, 255, 255, .5);
  border-radius: 90px;
  border: solid 1px #000000;
  cursor: pointer;
  overflow: hidden;
}
.progress-bar span {
  display: block;
  height: 100%;
  background-color: #000000;
  width: 0;
}
.nextprev-btn {
  width: 30px;
  height: 30px;
  cursor: pointer;
  margin-bottom: -5px;
}
.listenCounter {
  font-size: 17px;
  line-height: 22px;
  background-color: #ffffff;
  color: #616161;
  border: solid 2px #000000;
  border-radius: 5px;
  font-family: Arial;
  width: auto;   /* set a fixed width */
  margin: 7px;
  min-width: 22px;
  height: 22px;  /* match height to width for a square */
  display: inline-block;  
  align-items: center;  
  justify-content: center;  /* centers text inside */
  text-align: center;
  transform-origin: center center;
}
.ListenBuyPassword {
  line-height: 40px;
  margin: 10px;
  padding: 2px;
  position: relative;
  width: auto;
  text-decoration: none;
  cursor: pointer;
  color: #000000;
  background-color: #cea0ff;
  border: solid 1px #000000;
  border-top-left-radius: 20px;
  border-bottom-right-radius: 20px;
  animation: Buy 1s linear infinite;
}
.ListenBuyPassword:hover {
  color: #ffffff;
  border: solid 1px #ffffff;
}
.PasswordLabel {
  margin: 0px;
  text-align: center;
  width: auto;
  height: 24px;
  line-height: 24px;
  padding: 5px;
  color: #000000;
  border: solid 1px #000000;
  border-right: none;
  border-top-left-radius: 20px;
  background-color: #ffffff;
}
.Password {
  line-height: auto;
  height: 36px;
  font-size: 25px;
  font-family: 'Gatsby';
  text-indent: 5px;
  max-width: 100%; /* prevent overflow */
  color: #000000;
  border: solid 1px #000000;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  flex-grow: 1; /* if in a flex container */
  min-width: 0; /* prevent overflow in flex */
  background-color: #ffffff;
}
.PasswordSubmit {
  margin: 0px;
  width: 110px;
  height: 14px;
  padding: 10px;
  line-height: 14px;
  color: #000000;
  background-color: #ffffff;
  text-align: center;
  cursor: pointer;
  user-select: none; /* prevent highlighting text */
  pointer-events: auto;
  border: solid 1px #000000;
  border-left: none;
  border-bottom-right-radius: 20px;
}
.Password::placeholder {
  line-height: auto;
  height: auto;
  color: #000000;
  opacity: .8;
}
.Password:hover {
  animation: none;
}
.PasswordSubmit:hover {
  filter: invert(1);
}
input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  -webkit-appearance: none;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  border-radius: 5px;
  cursor: pointer;
  background-color: #ffffff;
  border: solid 1px #000000;
}
/* Range input styling */
input[type="range"] {
  background-color: transparent;
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  border-radius: 5px;
  cursor: pointer;
  border: none;
}
input[type=range]::-webkit-slider-runnable-track {
  background-color: #ffffff;
  width: 100%;
  height: 5px;
  border: solid 1px #000000;
  border-radius: 5px;
  cursor: pointer;
}
input[type=range] {
  width: 100%;
  margin: 0; /* Prevent extra margin */
  padding: 0;
  overflow: visible;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -7px; /* Center thumb vertically */
  background: #ffffff;
  border: solid 1px #000000;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
}


@media (orientation: portrait) {
  .LancasterFrame {
    width: calc(100% - 2px);
  }
  .UnlockerBand {
    height: 35px;
    max-height: 35px;
    line-height: 35px;
    padding: 0;
    display: block;       /* takes up full width, removes inline gap */
  }
  .PasswordSubmit {
    width: 100px;
  }
}

@media screen and (max-height: 500px) and (orientation: landscape) {
  .LancasterFrame {
    width: 400px;
    max-width: calc(68vw - 2px);
    }
  .BuyButton {
    height: calc((90dvh - 214px) / 3);
    line-height: calc((90dvh - 214px) / 3);
    min-height: calc((90dvh - 214px) / 3);
    max-height: calc((90dvh - 214px) / 3);
  }
  }

@supports (-webkit-touch-callout: none) {
  .volume-btn {
    display: none;
  }
  #volumeControl {
    display: none;
  }
}

  @keyframes Play {
    0% {
      transform: scale(.8);
    }
    50% {
      transform: scale(1);
    }
    100% {
      transform: scale(.8);
    }
  }

  @keyframes Buy {
    0% {
      filter: brightness(1);
    }
    50% {
      filter: brightness(1.5);
    }
    100% {
      filter: brightness(1);
    }
  }

  @keyframes ClearPulse {
    0% {
      opacity: 1;
    }
    50% {
      opacity: .3;
    }
    100% {
      opacity: 1;
    }
  }
