/* Prism fullscreen player — full-bleed backdrop, a floating right-side lyrics
   panel, and a glassy bottom control bar (transport · now-playing pill · utils).
   Cover-derived accent drives the progress + active states via --dynamic-fs-accent. */

.fsp2-player {
  position: fixed;
  inset: 0;
  z-index: 9000;
  overflow: hidden;
  background: #05060a;
  animation: fsp2-fade-in 220ms ease;
}

@keyframes fsp2-fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ── Full-bleed backdrop + legibility tint ─────────────────────────────────── */
.fsp2-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
}
.fsp2-bg-tint {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 30% 20%, transparent 40%, rgba(5, 6, 10, 0.55) 100%),
    linear-gradient(to top, rgba(5, 6, 10, 0.82) 0%, rgba(5, 6, 10, 0.25) 26%, transparent 46%);
}

/* ── Right-side lyrics panel (glass) ───────────────────────────────────────── */
.fsp2-lyrics-panel {
  position: absolute;
  right: 3vw;
  top: 8vh;
  bottom: 12vh;
  width: min(46%, 720px);
  border-radius: 26px;
  overflow: hidden;
  background: rgba(10, 14, 18, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(28px) saturate(1.1);
  -webkit-backdrop-filter: blur(28px) saturate(1.1);
}
/* The reused FsLyricsApple container fills the panel; give it inner breathing room. */
.fsp2-lyrics-panel .fsa-lyrics-container {
  padding-left: 40px;
  padding-right: 40px;
}

/* Upcoming lines get a progressive blur (sharp active line → hazier ahead) via
   the per-line --fsa-dist (distance from the active line; past lines are ≤0). */
.fsp2-lyrics-panel .fsa-lyric-line {
  filter: blur(clamp(0px, calc(max(var(--fsa-dist, 0), 0) * 0.9px), 5px));
  transition: filter 320ms ease, color 320ms ease;
}
/* Active line takes on the cover accent — like the progress bar. */
.fsp2-lyrics-panel .fsa-lyric-line.fsal-active,
.fsp2-lyrics-panel .fsa-lyric-line.fsal-active .fsa-lyric-word.played,
.fsp2-lyrics-panel .fsa-lyric-line.fsal-active .fsa-lyric-word.active {
  color: var(--dynamic-fs-accent, var(--accent));
}

/* ── Bottom bar ────────────────────────────────────────────────────────────── */
/* Outer bar — a wide translucent glass strip holding the whole control row.
   Transport (left) and utilities (right) sit bare inside it; the now-playing
   element is a darker nested box (see .fsp2-pill). */
.fsp2-bar {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 22px;
  width: clamp(560px, 50%, 1040px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 8px 14px;
  border-radius: 20px;
  background: rgba(12, 15, 20, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(24px) saturate(1.1);
  -webkit-backdrop-filter: blur(24px) saturate(1.1);
}
/* Controls stay visible; only the cursor hides while idle. */
.fsp2-player[data-idle='true'] { cursor: none; }

.fsp2-bar-left,
.fsp2-bar-right {
  display: flex;
  align-items: center;
  gap: 6px;
}
.fsp2-bar-left { gap: 4px; }

.fsp2-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}
.fsp2-btn:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.fsp2-btn-play { color: #fff; }
.fsp2-btn-active {
  color: var(--dynamic-fs-accent, var(--accent));
  background: color-mix(in srgb, var(--dynamic-fs-accent, var(--accent)) 16%, transparent);
}

.fsp2-time {
  margin-left: 8px;
  padding-right: 6px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
}

/* ── Now-playing pill ──────────────────────────────────────────────────────── */
/* Centre now-playing pill — a darker box NESTED inside the outer bar. */
.fsp2-pill {
  position: relative;
  flex: 0 1 460px;
  min-width: 220px;
  padding: 6px 16px 10px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
.fsp2-pill-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
  text-align: center;
}
.fsp2-pill-title {
  max-width: 100%;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fsp2-pill-sub {
  max-width: 100%;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.58);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Integrated progress line at the pill's bottom edge; the range input is a
   transparent full-cover overlay so the whole pill scrubs. */
.fsp2-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; }
.fsp2-progress-played {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: var(--dynamic-fs-accent, var(--accent));
  box-shadow: 0 0 10px var(--dynamic-fs-accent, var(--accent));
}
.fsp2-progress input[type='range'] {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 16px; /* generous hit target above the visual line */
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

/* ── Volume ────────────────────────────────────────────────────────────────── */
.fsp2-volume { display: flex; align-items: center; gap: 2px; }
.fsp2-volume-slider {
  width: 0;
  opacity: 0;
  transition: width 160ms ease, opacity 160ms ease;
  accent-color: var(--dynamic-fs-accent, var(--accent));
  cursor: pointer;
}
.fsp2-volume:hover .fsp2-volume-slider,
.fsp2-volume:focus-within .fsp2-volume-slider { width: 84px; opacity: 1; }

@media (max-width: 900px) {
  .fsp2-lyrics-panel { left: 3vw; width: auto; }
  .fsp2-pill { display: none; }
}
