/* Fill the iframe so flex centering can work */

html, body {
  height: 100%;
  margin: 0;
}

* { box-sizing: border-box; }


/* ===== Music Player ===== */

.music-player-box {
  background: white;
  width: 100%;
  height: 100%;
  /* Adjusted padding to reduce bottom space */
  padding: 15px 10px 15px 10px; /* Top: 25px, Bottom: 15px */
  display: flex;
  flex-direction: column;
  /* Aligned content to the top to allow for manual spacing */
  justify-content: flex-start;
  align-items: center;
  /* Removed gap to use margins for specific spacing control */
  gap: 0;
}


/* ===== Song Info ===== */

.song-info {
  width: 100%;
  text-align: center;
  /* Reduced bottom margin to bring the progress bar closer */
  margin-bottom: 0px;
}


.song-title {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  font-weight: bold;
  font-size: 1.05em;
  color: #000;
  line-height: 1.2;
}


.song-title .title-text {
  display: inline-block;
  white-space: nowrap;
}


/* only applied when text is wider than the container */

@keyframes marquee {
  0%  { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

.song-title .title-text.marquee {
  animation: marquee 12s linear infinite;
}


.song-artist {
  font-size: 0.9em;
  color: #666;
  margin-top: 2px;
  line-height: 1.2;
}


/* ===== Progress Bar ===== */

.progress-container {
  width: 100%;
  /* Removed margin-bottom to rely on the controls' margin-top */
  margin-bottom: 0;
}


.progress-bar {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 5px;
  outline: none;
  cursor: pointer;
  margin: 0;
  background: #ddd;
  --progress: 0%;
}


/* Track styling for Chrome / Safari / Edge */

.progress-bar::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 5px;
  background: linear-gradient(to right, #222 var(--progress), #ddd var(--progress));
}


/* REMOVE thumb in Chrome / Safari / Edge */

.progress-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 0;
  height: 0;
  background: transparent;
  border: none;
}


/* Firefox support */

.progress-bar::-moz-range-progress {
  background-color: #222;
  height: 4px;
  border-radius: 5px;
}

.progress-bar::-moz-range-track {
  background: #ddd;
  height: 4px;
  border-radius: 5px;
}

/* REMOVE thumb in Firefox */
.progress-bar::-moz-range-thumb {
  width: 0;
  height: 0;
  background: transparent;
  border: none;
}


/* ===== Controls ===== */

.controls {
  display: flex;
  justify-content: center;
  align-items: center;
  /* Added top margin to space it from the progress bar */
  margin-top: 5px;
  gap: 15px;
  flex: 0 0 auto;
}


.controls button {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  color: #000;
  outline: none;
}


.controls button svg {
  width: 24px;
  height: 24px;
}


.controls .play-pause-btn svg {
  width: 32px;
  height: 32px;
}