/* Universal box-sizing for consistency */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Marquee animation for long text */
@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.marquee-wrapper {
  overflow: hidden;
  position: relative;
  width: 100%;
}

.marquee-content {
  display: inline-block;
  white-space: nowrap;
}

.marquee-content.scrolling {
  animation: marquee 10s linear infinite;
  padding-right: 2rem;
}

/* Duplicate text for seamless loop */
.marquee-content.scrolling::after {
  content: attr(data-text);
  padding-left: 2rem;
}

:root {
  --lrc-text-color: #666; /* muted text for inactive lines */
  --lrc-bg-color: rgba(0, 0, 0, 0.05);
  --lrc-active-color: #000; /* bold black for active */
  --lrc-active-shadow: 0 1px 2px rgba(0, 0, 0, 0.15); /* subtle shadow in light mode */
  --lrc-hover-color: #005fcc; /* darker blue hover */
}

[data-theme="dark"] {
  --lrc-text-color: #ccc; /* original gray */
  --lrc-bg-color: rgba(255, 255, 255, 0.02);
  --lrc-active-color: #fff; /* bright white for active */
  --lrc-active-shadow: 0 0 4px rgba(212, 175, 55, 0.6); /* gold glow */
  --lrc-hover-color: #4fa2ff; /* original blue hover */
}

body {
  font-family: sans-serif;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  min-width: 100vw;
  min-height: 100vh;
  /* background: linear-gradient(-45deg, #FFCDD2 50%, #B2EBF2 50%); */
}

/* Container for the player and album cover */
.music-container {
  width: 800px;          /* fixed desktop width */
  max-width: 90vw;       /* prevent overflow on smaller screens */
  height: auto !important;
  margin: 0 auto 120px auto; /* increased bottom margin */
  overflow-x: visible;    /* allow horizontal overflow if needed */
  overflow-y: hidden;
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  padding: 1rem;
  box-shadow: 1px 1px 5px 0 rgba(0, 0, 0, 0.3);
}

/* Header - hidden on desktop (shown inline in music-player), visible on mobile */
.music-container > .music-player__header {
  display: none;
}

/* Album cover section */
.album-cover {
  aspect-ratio: 1 / 1;       
  width: 100%;
  max-width: 30%;
  height: auto;
}

.album-cover > img {
  width: 100%;
  height: 100%;
  object-fit: cover;        
}


.album-cover > img:hover {
  opacity: 0.7;
}

/* Player info and controls */
.music-player {
  flex: 1 1 70%;           /* Take remaining ~70% */
  max-width: 70%;
  width: auto;
  height: auto !important;            /* Match container height */
  padding: 1em;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: inherit;
  box-sizing: border-box;
  min-width: 0;            /* Fix flex overflow */
  flex-shrink: 0;          /* Prevent shrinking that hides content */
}

/* Text styling */
.music-player__title {
  color: inherit;
  font-size: 0.9rem;
  margin: 0 0 0.1em 0;
}

.music-player__header {
  color: inherit;
  font-size: 1rem;
  margin: 1 0 0.1em 0;
}

.music-player__author {
  color: inherit;
  font-size: 0.9rem;
  margin: 0 0 0.5em 0;
}

.music-player__genre {
  color: inherit;
  font-size: 0.9rem;
  margin: 0 0 0.5em 0;
}

.music-player__genre:before {
  font-weight: bold;
  content: "Genre: ";
}

.station-tabs {
  padding-top: 6%;
  padding-bottom: 4%;
}

.music-player__album {
  font-style: italic;
  text-align: center;
  font-size: 0.85rem;
  padding-bottom: 5px;
}

/* Music bar and progress */
/* .music-bar {
  background: #efefef;
  stroke-width: 1;
  height: 8px;
  width: 100%;
  cursor: pointer;
}

.music-bar #length {
  width: 0%;
  background: #2196F3;
  height: 100%;
  transition: width linear 200ms;
} */

/* Time display */
.music-time {
  display: flex;
  flex-flow: row wrap;
}

.music-time__last {
  margin-left: auto;
}

/* Playback order icons */
.music-order {
  display: flex;
  flex-flow: row wrap;
}

.music-order__shuffle,
.music-order__loop {
  width: 1.2em;
  height: 1.2em;
  opacity: 0.2;
  margin: 0.3em 0;
}

.music-order__shuffle.is-loop,
.music-order__loop.is-loop,
.music-order__shuffle.is-loop-one,
.music-order__loop.is-loop-one {
  opacity: 1 !important;
}

.music-order__shuffle {
  margin-left: auto;
}

/* Controls container */
.music-control {
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  align-items: center;
  height: 2em;
}

.music-control__play {
  width: 3em;
  height: 3em;
  margin: 0 1em;
  padding-top: 5px;
  padding-bottom: 5px;
  margin-bottom: 5px;
}

.music-control__backward,
.music-control__forward {
  width: 1.5em;
  height: 1.5em;
}


/* Mobile override */
@media all and (max-width: 960px) {
  .music-container {
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin-bottom: 50px !important;
    overflow: visible !important;
    padding: 1rem !important;
    gap: 0 !important;
  }

  /* Show header on mobile - it's first in DOM order */
  .music-container > .music-player__header {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    font-size: 1.25rem !important;
    margin-bottom: 0.5rem !important;
  }

  /* Album cover below header */
  .album-cover {
    flex: 0 0 auto !important;
    aspect-ratio: unset !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 auto !important;
    min-width: 0 !important;
    padding: 0 1rem !important;
    box-sizing: border-box !important;
  }

  .album-cover > img {
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
    width: 60% !important;
    max-width: 220px !important;
    border-radius: 0.75rem !important;
    display: block !important;
    margin: 0 auto !important;
    object-fit: cover !important;
  }

  .music-player__album {
    font-size: 0.75rem !important;
    margin-bottom: 0.25rem !important;
    text-align: center !important;
    padding: 0 !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
  }

  /* Player info below album */
  .music-player {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    padding: 0 1rem !important;
    min-width: 0 !important;
    text-align: center !important;
    margin-top: 0.25rem !important;
  }

  /* Hide header inside music-player on mobile (using the one outside) */
  .music-player .music-player__header {
    display: none !important;
  }

  .music-player__title {
    font-size: 1rem !important;
    margin-bottom: 0.15rem !important;
    padding: 0 1rem !important;
  }

  .music-player__author {
    font-size: 0.85rem !important;
    margin-bottom: 0.35rem !important;
    padding: 0 1rem !important;
  }

  .music-player__genre {
    font-size: 0.8rem !important;
    margin-bottom: 0.35rem !important;
    padding: 0 1rem !important;
  }

  .music-player__album {
    padding: 0 1rem !important;
  }

  .music-time {
    margin-top: 0.35rem !important;
    font-size: 0.8rem !important;
  }

  .music-control {
    margin-top: 0.5rem !important;
  }

  .music-control__play {
    width: 2.5rem !important;
    height: 2.5rem !important;
  }

  /* Lyrics section */
  .lrc-text {
    max-height: 150px !important;
    margin-top: 0.5rem !important;
    padding: 0.5rem !important;
    font-size: 0.75rem !important;
  }

  .lrc-line {
    font-size: 0.75rem !important;
  }

  .lrc-line.active {
    font-size: 0.85rem !important;
  }

  /* DJ controls */
  .dj-controls {
    min-width: 0 !important;
    width: 100% !important;
    margin-top: 0.75rem !important;
  }

  .dj-controls .flex-col {
    min-width: 0 !important;
    width: 100% !important;
  }

  .dj-controls .typeahead-input input,
  .dj-controls .p-autocomplete-input {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .dj-controls .p-autocomplete {
    width: 100% !important;
  }

  .dj-controls .flex-row {
    min-width: 0 !important;
    width: 100% !important;
    justify-content: center !important;
  }

  .station-tabs {
    padding-top: 2% !important;
    padding-bottom: 2% !important;
  }

  /* Next track styling for mobile */
  .next-track {
    font-size: 0.7rem !important;
    padding: 0.25rem 0.5rem !important;
    margin-top: 0.25rem !important;
  }
}

/* Extra small screens */
@media all and (max-width: 400px) {
  .album-cover {
    width: 70% !important;
    max-width: 200px !important;
  }

  .station-tabs button {
    padding: 0.35rem 0.6rem !important;
    font-size: 0.8rem !important;
  }
}
.progress-bar-container {
  position: relative;
  margin: 0.5rem 0;
  height: 0.5rem; /* Ensure visible height */
  background-color: #e5e7eb; /* fallback light gray */
  border-radius: 9999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  transition: width 0.2s linear;
  border-radius: 9999px;
}

.lrc-text {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.3s ease;
  max-height: 220px;
  max-width: 100%;
  overflow-y: auto;
  margin-top: 1rem;
  padding: 0 1rem 1rem;
  text-align: center;
  font-family: sans-serif;
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--lrc-text-color);
  user-select: none;
  background-color: var(--lrc-bg-color);
  border-radius: 0.375rem;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.8);
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: #999 transparent;
  scroll-padding-bottom: 1rem;
  overscroll-behavior: contain;
  touch-action: pan-y;
  scroll-behavior: smooth;
}

.lrc-text.empty {
  opacity: 0;
  pointer-events: none;
}

.lrc-line {
  margin: 0.1rem 0;
  white-space: normal;
  word-wrap: break-word;
  line-height: 1.4;
  transition: color 0.3s ease, font-weight 0.3s ease, text-shadow 0.3s ease;
  color: inherit;
  cursor: default;
  font-size: 0.85rem;
}

.lrc-line.active {
  color: var(--lrc-active-color);
  font-weight: 700;
  font-size: 0.95rem;
  text-shadow: var(--lrc-active-shadow);
  transform: scale(1.02);
}

.lrc-line:hover {
  color: var(--lrc-hover-color);
  text-decoration: dotted underline;
}

.lrc-line:last-child {
  margin-bottom: 0.5rem;
}

.lrc-text::-webkit-scrollbar {
  width: 6px;
}

.lrc-text::-webkit-scrollbar-track {
  background: transparent;
}

.lrc-text::-webkit-scrollbar-thumb {
  background-color: #999;
  border-radius: 3px;
}