

/* =========================================================
   RETRO PLAYER
========================================================= */

.retro-player {

  width: 50%;

  background: #000;

  border: 2px solid #111;

  font-family: "Courier New", monospace;

  overflow: hidden;

  box-shadow:
    5px 5px 0 rgba(0, 0, 0, 0.7);

}



/* =========================================================
   PINK HEADER
========================================================= */

.player-header {

  width: 100%;

  height: 9em;

  display: flex;

  align-items: flex-end;

  padding: 0 12px 8px 12px;

  background: #e746a5;

  color: #000;

  font-family: "Courier New", monospace;

  font-size: 13px;

  font-weight: bold;

  text-transform: uppercase;

}



/* =========================================================
   PLAYER SCREEN
========================================================= */

.player-screen {

  display: flex;

  align-items: center;

  gap: 10px;

  width: 100%;

  height: 6em;

  padding: 4px;

  background:
    linear-gradient(
      #eeeeee,
      #bdbdbd
    );

  border-bottom: 2px solid #777;

}



/* =========================================================
   ALBUM COVER
========================================================= */

.album-cover {

  flex: 0 0 75px;

  width: 12%;

  background: #000;

  border: 2px inset #555;

  overflow: hidden;

}


.album-cover img {

  display: block;

  width: 100%;

  height: 100%;

  object-fit: cover;

}



/* =========================================================
   TRACK INFORMATION
========================================================= */

.track-info {

  flex: 1;

  min-width: 0;

  height: 5em;

  display: flex;

  flex-direction: column;

  justify-content: center;

  padding: 3px 7px;

  background: #111;

  border: 2px inset #555;

  overflow: hidden;

  white-space: nowrap;

}



/* Now Playing */

.track-status {

  display: block;

  color: #0f0;

  font-size: 0.8em;

  line-height: 1;

}



/* Current song */

.track-title {

  display: block;

  margin-top: 2px;

  color: #0f0;

  font-size: 1em;

  font-weight: bold;

  line-height: 1.1;

  overflow: hidden;

  text-overflow: ellipsis;

}

.track-title {
  display: inline-block;
  white-space: nowrap;
  max-width: 100%;
}

/* Container that clips the scrolling text */
.track-title-wrapper {
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
}

/* Horizontal scrolling animation */
.track-title.scroll {
  animation: scrollTrack 10s linear infinite alternate;
}

@keyframes scrollTrack {
  0% {
    transform: translateX(0);
  }
  10% {
    transform: translateX(0);
  }
  90% {
    transform: translateX(var(--scroll-distance));
  }
  100% {
    transform: translateX(var(--scroll-distance));
  }
}



/* Song time */

.song-time {

  display: block;

  margin-top: 2px;

  color: #0f0;

  font-size: 13px;

}



/* =========================================================
   VISUALIZER
========================================================= */

.visualizer {

  flex: 0 0 30px;

  display: flex;

  align-items: flex-end;

  justify-content: center;

  gap: 3px;

  height: 30px;

}



/* Bars */

.bar {

  width: 4px;

  height: 8px;

  background: #00ff00;

}



/* Only animate when playing */

.retro-player.playing .bar {

  animation:
    bounce 0.5s infinite alternate;

}



.retro-player.playing .bar:nth-child(2) {

  animation-duration: 0.3s;

}



.retro-player.playing .bar:nth-child(3) {

  animation-duration: 0.7s;

}



/* Visualizer animation */

@keyframes bounce {

  from {
    height: 4px;
  }

  to {
    height: 25px;
  }

}



/* =========================================================
   CONTROLS
========================================================= */

.player-controls {

  width: 100%;

  height: 55px;

  display: flex;

  align-items: center;

  justify-content: center;

  gap: 35px;

  background:
    linear-gradient(
      #eeeeee,
      #bdbdbd
    );

  border-bottom: 2px solid #777;

}



/* Buttons */

.player-button {

  width: 55px;

  height: 40px;

  border: 0;

  background: transparent;

  color: #000;

  font-family: "Courier New", monospace;

  font-size: 25px;

  font-weight: bold;

  cursor: pointer;

  padding: 0;

}



/* Play button */

.play-button {

  font-size: 29px;

}



/* Button hover */

.player-button:hover {

  transform: scale(1.1);

}



/* Button click */

.player-button:active {

  transform: scale(0.9);

}



/* =========================================================
   SONG DIRECTORY
========================================================= */

.song-directory {

  width: 100%;

  background: #000;

}



/* Directory header */

.directory-title {

  padding: 7px 10px;

  color: #0f0;

  background: #050505;

  border-bottom: 1px solid #222;

  font-size: 11px;

  font-weight: bold;

  text-transform: uppercase;

}



/* =========================================================
   SONG LIST
========================================================= */

.song-list {

  width: 100%;

  padding: 5px 0 8px 0;

}



/* Individual song */

.song-item {

  display: flex;

  align-items: center;

  width: 100%;

  min-height: 25px;

  padding: 3px 10px;

  color: #fff;

  background: #000;

  font-family: "Courier New", monospace;

  font-size: 13px;

  line-height: 1.2;

  cursor: pointer;

}



/* Song number */

.song-number {

  flex: 0 0 22px;

  color: #0f0;

}



/* Song name */

.song-name {

  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;

}



/* Hover */

.song-item:hover {

  background: #151515;

  color: #0f0;

}



/* Active song */

.song-item.active {

  color: #0f0;

}



/* Active arrow */

.song-item.active .song-number::after {

  content: " >";

}





/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

 .retro-player {
 width: auto;  
 }
 
  .player-header {

    height: 70px;

  }


  .player-screen {

    height: auto;

  }


  .album-cover {

    flex-basis: 68px;

    width: 65px;

    height: 65px;

  }
  
  .track-info {
    height: auto;
  }


  .track-status {

    font-size: 9px;

  }


  .track-title {

    font-size: 10px;

  }


  .song-time {

    font-size: 8px;

  }


  .player-controls {

    height: 50px;

    gap: 25px;

  }


  .player-button {

    width: 45px;

    font-size: 22px;

  }


  .song-item {

    font-size: 11px;

  }

}