/* =====================
   CD PLAYER FULLSCREEN MODAL
===================== */

/* Modal overlay */
#cdPlayerView {
  font-family: 'Courier New', monospace;
  display: none;
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, rgba(20,20,30,0.9) 0%, rgba(0,0,0,0.95) 100%);
  backdrop-filter: blur(8px);
  color: #fff;
  z-index: 2000;
  overflow: hidden;
}

/* Show modal */
#cdPlayerView.show {
  display: block;
}

/* =====================
   Content wrapper with CD left, track info right
===================== */
.player-content-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: flex-start; /* CD left, text right */
  gap: 120px; /* more space between CD and text */
  max-width: 95%;
  width: 1000px; /* wider to accommodate long track names */
}

/* =====================
   CD spinning wrapper
===================== */
.player-cd-wrapper {
  position: relative;
  width: 380px;  /* slightly bigger CD */
  height: 380px;
  flex-shrink: 0; /* prevent CD from shrinking */
  display: flex;
  justify-content: center;
  align-items: center;
  animation: spin 12s linear infinite;
}

/* CD image itself */
#playerCD {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 50%;
  box-shadow: 0 10px 50px rgba(0,0,0,0.6), inset 0 0 30px rgba(0,0,0,0.3);
}

/* =====================
   Track info panel
===================== */
.player-track-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 450px; /* slightly wider for long track names */
  flex-shrink: 1;   /* allow text to scale but not push CD */
  overflow: hidden;
}

.player-track-title {
  font-family: 'Courier New', monospace;
  font-size: 26px;
  font-weight: 500;
  text-shadow: 0 0 10px rgba(255,255,255,0.4);
  margin: 0 0 15px 0;
  opacity: 0;
  animation: fadeIn 0.6s forwards;
}

.player-cd-title {
  font-family: 'Courier New', monospace;
  font-size: 22px;
  color: #ccc;
  margin-bottom: 15px;
  opacity: 0;
  animation: fadeIn 0.6s forwards;
  word-wrap: break-word;
}

/* Optional extra info below track */
.player-extra-info {
  font-family: 'Courier New', monospace;
  font-size: 16px;
  color: #aaa;
  opacity: 0;
  animation: fadeIn 0.6s forwards;
  word-wrap: break-word;
}

/* =====================
   Animations
===================== */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =====================
   Close Button Wrapper
===================== */
.player-close-wrapper {
  position: fixed; 
  top: 18px;
  right: 10px;
  z-index: 3000;
}

.player-close-btn {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 30px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  opacity: 0.9;
  transition: color 0.15s ease, opacity 0.15s ease;
}

.player-close-btn:hover {
  color: #ff3b3b;
  opacity: 1;
}


/* CD title (already exists) */
.player-cd-title {
  font-family: 'Arial', sans-serif;
  font-size: 22px;
  color: #ccc;
  margin-bottom: 5px;
  opacity: 0;
  animation: fadeIn 0.6s forwards;
  word-wrap: break-word;
}

/* Artist name */
.player-artist-name {
  font-family: 'Arial', sans-serif;
  font-size: 18px;
  color: #aaa;
  margin-bottom: 15px;
  opacity: 0;
  animation: fadeIn 0.6s forwards;
  word-wrap: break-word;
}

/* Genre label */
.player-genre {
  font-family: 'Arial', sans-serif;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 18px;
  opacity: 0;
  animation: fadeIn 0.6s forwards;

  color: color-mix(
    in srgb,
    var(--cd-accent),
    #aaa 60%
  );
}


/* Track title */
.player-track-text {
  font-family: 'Courier New', monospace;
  font-size: 20px;
  text-align: left;
  text-shadow: 0 0 10px rgba(255,255,255,0.4);
  margin-bottom: 0;
  opacity: 0;
  animation: fadeIn 0.6s forwards;
}





/* =====================
   PLAYER PROGRESS BAR
===================== */

.player-progress-wrapper {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  max-width: 900px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  color: #ccc;
}

#playerProgressBar {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.15);
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
}

#playerProgressFill {
  width: 0%;
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--cd-accent),
    color-mix(in srgb, var(--cd-accent), white 25%)
  );
  transition: width 0.1s linear;
}





#simpleVisualizer {
  position: fixed;
  left: 0px;
  bottom: 0px; /* same vertical zone as progress bar */
  width: 100vw;
  height: 60px;

  z-index: 0;
  opacity: 0.35;
  pointer-events: none;
}


