/* ═══════════════════════════════════════════════
   LyricsFlow — Player Page
   Ported from ContentBox.css + default.css
   ═══════════════════════════════════════════════ */

/* ── Desktop PC Top-Right Controls (AirPlay & Volume Slider) ── */
.pc-top-right-bar {
  display: none;
}

.pc-top-left-bar {
  display: none;
}

.pc-bottom-right-bar {
  display: none;
}

@media (min-width: 769px) {

  /* Top-Left Window Controls (macOS Traffic Lights) */
  .pc-top-left-bar {
    display: flex;
    align-items: center;
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 100000;
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    padding: 6px 10px;
    border-radius: 999px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  }

  .pc-top-left-bar .electron-window-controls {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .pc-top-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
  }

  .pc-top-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.08);
  }

  .pc-top-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.3);
  }

  /* ── Liquid Glass Top-Left / Top-Right Volume Capsule (Zero Jank Compositor-Only) ── */
  .pc-top-volume-bar {
    display: flex;
    align-items: center;
    position: fixed;
    top: 14px;
    right: 18px;
    z-index: 100000;
    pointer-events: auto;
    isolation: isolate;
  }

  .pc-volume-capsule {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.22);
    padding: 6px 14px;
    border-radius: 999px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    contain: paint;
    will-change: transform;
    transform: translateZ(0);
  }

  .pc-airplay-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    border-radius: 50%;
    will-change: transform;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease;
  }

  .pc-airplay-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    transform: scale3d(1.1, 1.1, 1);
  }

  .pc-volume-slider-box {
    display: flex;
    align-items: center;
    width: 130px;
  }

  /* AeroUI large slider styling */
  .pc-aero-vol-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    outline: none;
    cursor: pointer;
    margin: 0;
    padding: 0;
    will-change: transform;
    transition: background 0.2s ease;
  }

  .pc-aero-vol-slider::-webkit-slider-runnable-track {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 999px;
    background: transparent;
    border: none;
  }

  /* Pill-shaped volume slider head matching macOS/iOS control center */
  .pc-aero-vol-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 12px;
    border-radius: 999px;
    background: #ffffff;
    margin-top: -3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
    cursor: pointer;
    border: none;
    will-change: transform;
    transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.15s ease;
  }

  .pc-aero-vol-slider::-webkit-slider-thumb:hover {
    transform: scale3d(1.12, 1.15, 1);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.55);
  }

  .pc-vol-speaker-icon {
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* ── Apple Music Sing (Vocal Controller) Button & Liquid Capsule ── */
  .pc-sing-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    margin-left: 10px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  }

  .pc-sing-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.24);
    transform: scale(1.08);
  }

  .pc-sing-btn.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.32);
    border-color: rgba(255, 255, 255, 0.45);
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.35);
  }

  .pc-sing-slider-capsule {
    position: absolute;
    top: 50px;
    right: 0px;
    width: 48px;
    height: 165px;
    background: rgba(30, 30, 35, 0.55);
    backdrop-filter: blur(35px) saturate(190%);
    -webkit-backdrop-filter: blur(35px) saturate(190%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.95);
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s;
    user-select: none;
    touch-action: none;
  }

  .pc-sing-slider-capsule.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
  }

  .pc-sing-slider-track {
    position: relative;
    width: 36px;
    height: 148px;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    cursor: pointer;
    overflow: hidden;
  }

  .pc-sing-slider-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 999px;
    transition: height 0.05s ease-out;
  }

  .pc-sing-slider-thumb {
    position: absolute;
    bottom: 0%;
    left: 50%;
    transform: translate(-50%, 50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a1a1a;
    pointer-events: none;
    z-index: 2;
    transition: bottom 0.05s ease-out;
  }

  .pc-sing-slider-thumb svg {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
  }

  /* ── PC Bottom-Right Liquid Glass Capsule Switcher (Zero-Jank 120 FPS) ── */
  .pc-bottom-right-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    position: fixed;
    bottom: 16px;
    right: 18px;
    z-index: 100000;
    pointer-events: auto;
    isolation: isolate;
  }

  .pc-dock-glass-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.24);
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    contain: paint;
    will-change: transform, background, color;
    transform: translateZ(0);
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), background 0.22s ease, color 0.22s ease;
  }

  .pc-dock-glass-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: scale3d(1.08, 1.08, 1);
  }

  /* Active illuminated state (e.g. Translation / Pronunciation enabled) */
  .pc-dock-glass-btn.active {
    background: #ffffff !important;
    color: #1a1a1c !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  }

  .pc-dock-glass-btn.active svg path {
    fill: #1a1a1c !important;
  }

  /* ── Apple Music Sing Widget & Vertical Liquid Glass Capsule ── */
  .pc-sing-widget {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .pc-sing-btn {
    position: relative;
  }

  .pc-sing-icon {
    width: 22px;
    height: 22px;
    display: block;
    filter: brightness(0) invert(1);
    transition: filter 0.22s ease, transform 0.22s ease;
  }

  .pc-sing-btn.active .pc-sing-icon {
    filter: brightness(0);
    /* Black icon on white active button */
  }

  /* Minimized by default vertical liquid glass capsule popover */
  .pc-sing-capsule {
    position: absolute;
    bottom: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%) translateY(14px) scale(0.9);
    width: 52px;
    height: 196px;
    background: rgba(30, 30, 34, 0.45);
    backdrop-filter: blur(40px) saturate(210%);
    -webkit-backdrop-filter: blur(40px) saturate(210%);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    padding: 6px;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
      transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
      visibility 0.3s;
    z-index: 100001;
  }

  .pc-sing-capsule.active {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transform: translateX(-50%) translateY(0) scale(1);
  }

  /* Vertical slider track */
  .pc-sing-slider-track {
    position: relative;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    overflow: hidden;
    cursor: pointer;
    touch-action: none;
  }

  /* Bottom-up fill with pure Apple white glow */
  .pc-sing-slider-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.95), #ffffff);
    border-radius: 999px;
    box-shadow: 0 -2px 14px rgba(255, 255, 255, 0.4);
    transition: height 0.05s ease-out;
  }

  /* Thumb with micro vocal icon that rides with the fill */
  .pc-sing-slider-thumb {
    position: absolute;
    bottom: 0%;
    left: 50%;
    transform: translate(-50%, 50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: bottom 0.05s ease-out;
  }

  .pc-sing-thumb-icon {
    width: 18px;
    height: 18px;
    display: block;
    filter: brightness(0);
  }

  /* Apple Music Liquid Capsule Switcher */
  .pc-capsule-toggle {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(32px) saturate(190%);
    -webkit-backdrop-filter: blur(32px) saturate(190%);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    padding: 3px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
    contain: paint;
    will-change: transform;
    transform: translateZ(0);
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
  }

  /* Sliding & Draggable pill thumb indicator */
  .pc-capsule-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 44px;
    height: 44px;
    background: #ffffff;
    border-radius: 999px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
    cursor: grab;
    z-index: 1;
    will-change: transform, box-shadow, opacity;
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
    transition: transform 0.32s cubic-bezier(0.2, 0.9, 0.3, 1), opacity 0.2s ease, box-shadow 0.2s ease;
  }

  .pc-capsule-thumb:active,
  .pc-capsule-toggle.is-dragging .pc-capsule-thumb {
    cursor: grabbing;
  }

  /* When neither view is open, pill thumb fades and shrinks smoothly */
  .pc-capsule-toggle.none-active .pc-capsule-thumb {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.65);
    pointer-events: none;
  }

  .pc-capsule-toggle.queue-active .pc-capsule-thumb {
    transform: translate3d(44px, 0, 0) scale(1);
  }

  /* Popping up elevated bubble while dragging (matching Apple TV / iOS liquid glass pill) */
  .pc-capsule-toggle.is-dragging .pc-capsule-thumb {
    transition: none !important;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1.5px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.3);
  }

  .pc-capsule-item {
    position: relative;
    z-index: 2;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.85);
    will-change: transform, color;
    transition: color 0.25s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .pc-capsule-item img {
    pointer-events: none;
    transition: filter 0.25s ease;
  }

  .pc-capsule-item svg {
    pointer-events: none;
    transition: color 0.25s ease, fill 0.25s ease;
  }

  /* When lyrics is active over the white thumb pill, invert to dark */
  .pc-capsule-toggle:not(.none-active) .pc-capsule-item#pc-btn-lyrics.active img {
    filter: brightness(0) invert(0) !important;
  }

  /* When queue is active over the white thumb pill, invert to dark */
  .pc-capsule-toggle:not(.none-active) .pc-capsule-item#pc-btn-queue.active {
    color: #1a1a1c !important;
  }

  .pc-capsule-toggle.none-active .pc-capsule-item img {
    filter: brightness(0) invert(1) !important;
  }

  .pc-capsule-toggle.none-active .pc-capsule-item {
    color: rgba(255, 255, 255, 0.85) !important;
  }

  .pc-capsule-item:hover {
    transform: scale3d(1.06, 1.06, 1);
  }

  /* Hide the mobile BottomBar completely on Tablets & Desktop */
  .BottomBar {
    display: none !important;
  }
}

/* ── Tablet Specific Optimizations (769px to 1024px) ── */
@media (min-width: 769px) and (max-width: 1024px) {

  /* On tablets, avoid top header collisions: hide top volume bar */
  .pc-top-volume-bar {
    display: none !important;
  }

  /* Display clean inline volume slider inside NowBar */
  #LyricsflowPage .ContentBox .NowBar .VolumeArea {
    display: flex !important;
  }

  /* Optimize NowBar width on tablets for ample lyrics space */
  #LyricsflowPage .ContentBox .NowBar {
    width: clamp(320px, 40cqw, 420px) !important;
  }

  /* Hide electron window controls on tablets */
  .electron-window-controls,
  #player-window-controls {
    display: none !important;
  }
}

/* ── Desktop PC Specific (1025px and up) ── */
@media (min-width: 1025px) {
  .pc-top-volume-bar {
    display: flex !important;
  }

  /* Hide the NowBar's duplicate volume slider on PC so it's exclusively in top right */
  #LyricsflowPage .ContentBox .NowBar .VolumeArea {
    display: none !important;
  }
}

/* ── Platform & Environment Scoping (Web vs Electron) ── */
/* Default: Hide native electron window controls */
.electron-window-controls,
#player-window-controls {
  display: none !important;
}

/* Strictly enable window controls on desktop Electron only */
@media (min-width: 1025px) {

  html.is-electron:not(.is-web) .electron-window-controls,
  html.is-electron:not(.is-web) #player-window-controls {
    display: flex !important;
  }

  html.is-electron:not(.is-web) .pc-top-left-bar {
    display: flex !important;
  }
}

/* When embedded in an iframe (e.g. drawer or editor), show sleek drawer-close button only */
html.is-iframe .pc-top-left-bar,
body.is-iframe .pc-top-left-bar {
  display: flex !important;
  top: 14px !important;
  left: 14px !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

html.is-iframe .electron-window-controls,
body.is-iframe .electron-window-controls,
html.is-iframe #player-window-controls,
body.is-iframe #player-window-controls,
html.is-iframe #pc-btn-mini,
body.is-iframe #pc-btn-mini {
  display: none !important;
}

/* Standalone Web mode: No broken window controls */
html.is-web:not(.is-iframe) .pc-top-left-bar,
body.is-web:not(.is-iframe) .pc-top-left-bar {
  display: none !important;
}

.top-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.top-volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.top-volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  border: none;
}



.lyrics-button {
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 8px;
  transition: background 0.2s, transform 0.2s;
}

.lyrics-button:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

.lyrics-button.active {
  background: rgba(255, 255, 255, 0.2);
}

.lyrics-button img {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}


/* ── Page Container ── */
#LyricsflowPage {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  container-type: size;
  position: relative;
  left: 0;
  top: 0;
  font-weight: 700;
  user-select: none;
  -webkit-user-drag: none;
  opacity: 1;
  font-family: var(--lyricsflow-font-family);
  --ArtworkGlowColor: 255, 255, 255;
}

/* Hide desktop-only controls on mobile */


/* ── Content Box ── */
#LyricsflowPage .ContentBox {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  --default-font-size: clamp(0.5rem, calc(1cqw * 3), 2.4rem);
  --Compact_NowBarHeight: 15cqh;
  transition: opacity 0.34s;
}

/* ── NowBar ── */
#LyricsflowPage .ContentBox .NowBar {
  scale: 0.8;
  --NowBarVPadding: 4cqh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: absolute;
  left: var(--NowBarLeftSpacing);
  top: 0;
  height: 100cqh;
  z-index: 10;
  container-type: size;
  width: var(--NowBarWidth);
  flex-shrink: 0;
  padding: var(--NowBarVPadding) 0;
}

.Grabber {
  display: none !important;
}

#LyricsflowPage .ContentBox .NowBar .Header {
  width: 100%;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: center;
}




/* ── MediaBox (Album Art) ── */
#LyricsflowPage .ContentBox .NowBar .Header .MediaBox {
  --ArtworkBrightness: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin-bottom: 2.5cqh;
}

#LyricsflowPage .ContentBox .NowBar .Header .MediaBox .MediaImageContainer {
  border-radius: 1.5cqh;
  width: 100%;
  height: 100%;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-color: rgba(255, 255, 255, 0.05);
  overflow: hidden;
  position: relative;
  transition: transform 0.3s ease;
}

.animated-art-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.5s cubic-bezier(0.25, 1, 0.2, 1);
  z-index: 2;
  pointer-events: none;
}

.animated-art-video.loaded {
  opacity: 1;
}

/* ── Metadata Row ── */
.MetadataRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 1.5cqh;
  gap: 15px;
}

.MetadataActions {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.MetadataActions .favorite-button,
.MetadataActions .options-button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}



.MetadataActions .favorite-button svg {
  width: 35px;
  height: 36px;
}

.MetadataActions .options-button svg {
  width: 25px;
  height: 25px;
  fill: #ffffff !important;
  color: #ffffff !important;
  display: block;
}

.MetadataActions .options-button svg circle {
  fill: #ffffff !important;
  opacity: 1 !important;
}

#LyricsflowPage .ContentBox .NowBar .Header .Metadata {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

#LyricsflowPage .ContentBox .NowBar .Header .Metadata .SongName {
  font-weight: 700;
  font-size: 1.25rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  container-type: inline-size;
  width: 100%;
}

#LyricsflowPage .ContentBox .NowBar .Header .Metadata .SongName span {
  display: inline-block;
  white-space: nowrap;
  animation: Marquee_SongName 8s ease-in-out infinite alternate;
}

#LyricsflowPage .ContentBox .NowBar .Header .Metadata .SongName.rtl {
  font-weight: 900 !important;
}

#LyricsflowPage .ContentBox .NowBar .Header .Metadata .Artists {
  font-weight: 500;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#LyricsflowPage .ContentBox .NowBar .Header .Metadata .Artists.rtl {
  font-weight: 900 !important;
}

@media (max-width: 768px) {
  #btn-queue {
    width: 52px;
    height: 32px;
  }

  .pc-top-volume-bar {
    display: none !important;
  }
}

.favorite-button,
.options-button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
}

.favorite-button:hover,
.options-button:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  transform: scale(1.06);
}

.favorite-button:active,
.options-button:active {
  transform: scale(0.94);
}

.favorite-button.active {
  background: rgba(255, 255, 255, 0.22) !important;
}

.favorite-button .favorite-icon,
.favorite-button svg {
  width: 22px;
  height: 22px;
  display: block;
}

.options-button svg {
  width: 18px;
  height: 18px;
  opacity: 0.95;
  fill: #ffffff;
}

.options-button img {
  width: 20px;
  height: 20px;
  opacity: 0.95;
}

/* ── Queue Panel (Apple Music Style) ── */
.QueuePanel {
  position: fixed;
  right: -420px;
  top: 0;
  width: 390px;
  height: 100%;
  background: rgba(28, 28, 30, 0.88);
  backdrop-filter: blur(48px) saturate(190%);
  -webkit-backdrop-filter: blur(48px) saturate(190%);
  z-index: 1000;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -12px 0 48px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.QueuePanel.active {
  transform: translateX(-420px);
}

/* AutoPlay & AutoMix segmented header bar */
.QueuePillHeader {
  padding: 24px 20px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.QueuePillBar {
  display: flex;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 3px;
  flex: 1;
  gap: 4px;
}

.queue-mode-pill {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.15s ease;
}

.queue-mode-pill img {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
}

.queue-mode-pill.active {
  background: rgba(255, 255, 255, 0.95);
  color: #111;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.queue-mode-pill.active img {
  filter: brightness(0);
}

.queue-filter-btn {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  width: 
  
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.15s ease;
}

.queue-filter-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.05);
}

.queue-filter-btn img {
  width: 45px;
  height: 17px;
  filter: brightness(0) invert(1);
}

.queue-filter-popup {
  position: absolute;
  top: 54px;
  right: 18px;
  z-index: 100;
  background: rgba(38, 38, 42, 0.88);
  backdrop-filter: blur(40px) saturate(190%);
  -webkit-backdrop-filter: blur(40px) saturate(190%);
  border: 0.5px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 0 0.5px rgba(0, 0, 0, 0.3);
  padding: 6px;
  display: flex;
  flex-direction: column;
  min-width: 180px;
  user-select: none;
  animation: amMenuPop 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.queue-filter-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 500;
  transition: background 0.15s ease;
}

.queue-filter-item:hover {
  background: rgba(255, 255, 255, 0.15);
}

.queue-filter-item.active {
  color: #ff375f;
  font-weight: 600;
}

.QueueSectionHeader {
  padding: 14px 20px 6px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.QueueSectionTitle {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.QueueSectionSubtitle {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 2px;
}

.queue-clear-btn {
  background: transparent;
  border: none;
  color: #fa586a;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.queue-clear-btn:hover {
  opacity: 0.75;
}

.QueueList {
  flex: 1;
  overflow-y: auto;
  padding: 4px 14px 40px;
  scrollbar-width: none;
}

.QueueList::-webkit-scrollbar {
  display: none;
}

.player-queue-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
}

.player-queue-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.player-queue-item.active {
  background: rgba(255, 255, 255, 0.12);
}

.player-queue-item .item-options-btn {
  margin-left: auto;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.1rem;
  padding: 4px 8px;
  cursor: pointer;
  border-radius: 50%;
}

.player-queue-item .item-options-btn:hover {
  color: #fff;
}

.player-queue-item .drag-handle {
  cursor: grab;
  user-select: none;
}

.player-queue-item .drag-handle:active {
  cursor: grabbing;
}

.pq-art {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  background-size: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.pq-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
}

.pq-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pq-artist {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Drop Zone Overlay ── */
.drop-zone-overlay {
  position: fixed;
  inset: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 3px dashed rgba(255, 255, 255, 0.5);
  border-radius: 30px;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.drop-zone-overlay.active {
  opacity: 1;
}

.drop-zone-content {
  text-align: center;
  color: #fff;
}

.drop-zone-content svg {
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  fill: #ffffff;
}

/* ── Mobile Responsive (Queue Bottom Sheet) ── */
@media (max-width: 768px) {
  .QueuePanel {
    right: 0;
    top: auto;
    bottom: -80%;
    width: 100%;
    height: 80%;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 30px 30px 0 0;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .QueuePanel.active {
    transform: translateY(-100%);
  }
}

/* ── Progress Bar ── */
.NowBarProgress {
  width: 100%;
  margin-bottom: 1.2cqh;
}

.progress-bar-wrapper {
  width: 100%;
  height: 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
  position: relative;
  margin-bottom: 8px;
  transition: height 0.2s, transform 0.2s;
}

.progress-bar-wrapper:hover {
  height: 10px;
  transform: scaleX(1.02);
}

.progress-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.4);
  width: 0%;
  position: relative;
}

.progress-bar-fill::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%) scale(0);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.progress-bar-wrapper:hover .progress-bar-fill::after {
  transform: translateY(-50%) scale(1);
}

.progress-times {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.progress-time {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ── Progress Bar: AeroUI elastic slider (song duration scrubber) ──
   Growth + stretch disabled: on drag ONLY the track height changes
   (7px rest → 12px active). No widening, no fill recolor, no label shift. */
.NowBarProgress .aero-elastic {
  --elastic-inactive-h: 7px;
  --elastic-active-h: 12px;
  --elastic-growth: 0px;
  --elastic-stretch: 0px;
  --elastic-narrow: 0px;
  --elastic-track: rgba(255, 255, 255, 0.15);
  --elastic-fill-idle: rgba(255, 255, 255, 0.4);
  --elastic-fill-active: rgba(255, 255, 255, 0.4);
  width: 100%;
}

.NowBarProgress .aero-elastic-hit {
  min-height: 28px;
}

.NowBarProgress .aero-elastic-labels {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

/* Quality badge embedded inside the scrubber time-labels row (all UIs) */
#LyricsflowPage .ContentBox .NowBar .Header .NowBarBottomWrapper .NowBarProgress .aero-elastic-labels .quality-badge-container {
  position: static !important;
  top: auto !important;
  bottom: auto !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
  width: auto !important;
  margin: 0 !important;
  display: inline-flex !important;
  justify-content: flex-start !important;
  z-index: auto !important;
}

.aero-elastic-labels .quality-badge {
  background: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  gap: 4px !important;
}

.NowBarProgress .aero-elastic-label.progress-time {
  transform: none;
}

/* Touched (hold or drag): fill goes fully opaque (opacity 1.0), relaxes back on release */
.NowBarProgress .aero-elastic--active {
  --elastic-fill-active: #fff;
}

/* ── Transport Buttons: AeroUI player-button (prev / play-pause / next) ──
   Frame is an invisible touch target; only the icon shows. Skip buttons keep
   the existing PNG glyphs (old sizing rules still apply to their <img>),
   the play/pause glyph is AeroUI vector swapped via setPlayerIcon. */
.NowBarControls .aero-player {
  --player-size: 60px;
  --player-label: #fff;
  background: transparent;
  border: none;
}

.NowBarControls #btn-play-pause {
  --player-icon: 42px;
}

/* AeroUI skip-label glyphs inside the prev/next buttons */
.NowBarControls #btn-backward .aero-skip,
.NowBarControls #skip-forward .aero-skip {
  --skip-size: 40px;
  color: #fff;
}

@media (max-width: 768px) {

  .NowBarControls #btn-backward .aero-skip,
  .NowBarControls #skip-forward .aero-skip {
    --skip-size: 34px;
  }
}

/* ── Quality Badge ── */
.quality-badge-container {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 2cqh;
}

.quality-badge-container.hidden {
  display: none !important;
}

.quality-badge {
  background: rgba(255, 255, 255, 0.12);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  letter-spacing: 0.05em;
  font-family: 'Inter', sans-serif;
  font-weight: 300;
}

/* ── Controls Area ── */
.NowBarControls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(40px, 2.5cqw, 34px);
  width: 100%;
  margin-bottom: 3cqh;
}

/* Shuffle pinned left, repeat pinned right; transport buttons stay close in the middle */
.NowBarControls .playback-control.shuffle {
  margin-right: auto;
}

.NowBarControls .playback-control.repeat {
  margin-left: auto;
}

.playback-control {
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.playback-control:hover {
  transform: scale(1.1);
}

.playback-control:active {
  transform: scale(0.9);
}

.playback-control img {
  width: 48px;
  height: 48px;
  filter: brightness(0) invert(1);
  opacity: 0.8;
}

.playback-control.skip-back img,
.playback-control.skip-forward img {
  width: 62px;
  height: 62px;
}

.playback-control.play-pause img {
  width: 46px;
  height: 50px;
  opacity: 1;
}

.playback-control.shuffle img {
  width: 42px;
  height: 39px;
  opacity: 0.6;
}

.playback-control.repeat img {
  width: 48px;
  height: 39px;
  opacity: 0.6;
}

.playback-control.active img {
  opacity: 1;
}

/* ── Volume Area ── */
.VolumeArea {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.volume-side-icon {
  width: 38px;
  height: 38px;
  filter: brightness(0) invert(1);
  opacity: 0.5;
}

.volume-slider-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
}

.volume-slider {
  width: 100%;
  height: 5px;
  appearance: none;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.8) 100%, rgba(255, 255, 255, 0.15) 100%);
  border-radius: 10px;
  outline: none;
  transition: height 0.2s, transform 0.2s;
}

.volume-slider:hover {
  height: 9px;
  transform: scaleX(1.02);
}

.volume-slider::-webkit-slider-thumb {
  appearance: none;
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
  transform: scale(0);
  transition: transform 0.2s;
}

.volume-slider:hover::-webkit-slider-thumb {
  transform: scale(1);
}

/* ── Loader ── */
.LyricsflowLoader {
  --bg-color: #000;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: z-index 0.34s;
  background-color: var(--bg-color);
  animation: LyricsflowLoader_FadeOut 0.34s forwards;
  z-index: -1;
}

.LyricsflowLoader.active {
  z-index: 105;
  animation: LyricsflowLoader_FadeIn 0.34s forwards;
}

/* Authentic AeroUI Loading Spinner */
.aero-spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  color: #ffffff;
}

.aero-spinner svg {
  width: 100%;
  height: 100%;
}

.aero-spinner rect {
  animation: aero-spinner-fade 1s ease-in-out infinite;
}

.aero-spinner rect:nth-child(1) {
  animation-delay: 0s;
}

.aero-spinner rect:nth-child(2) {
  animation-delay: -0.875s;
}

.aero-spinner rect:nth-child(3) {
  animation-delay: -0.75s;
}

.aero-spinner rect:nth-child(4) {
  animation-delay: -0.625s;
}

.aero-spinner rect:nth-child(5) {
  animation-delay: -0.5s;
}

.aero-spinner rect:nth-child(6) {
  animation-delay: -0.375s;
}

.aero-spinner rect:nth-child(7) {
  animation-delay: -0.25s;
}

.aero-spinner rect:nth-child(8) {
  animation-delay: -0.125s;
}

@keyframes aero-spinner-fade {

  0%,
  100% {
    opacity: 0.15;
  }

  12.5% {
    opacity: 0.95;
  }
}

#btn-play-pause .aero-spinner {
  width: 38px;
  height: 38px;
  display: inline-block;
}

.LyricsflowLoader .aero-spinner {
  width: 52px;
  height: 52px;
  display: inline-block;
}

@media (max-width: 768px) {
  #btn-play-pause .aero-spinner {
    width: 44px;
    height: 44px;
  }
}

/* ── Back button ── */
.back-button {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 200;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(21, 22, 23, 0.72);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 1;
  /* Make visible by default or keep hover effect */
  transition: opacity 0.3s, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  background: none;
  backdrop-filter: none;
}

.back-button img {
  width: 10px;
  height: auto;
}

.back-button svg {
  width: 18px;
  height: 18px;
  fill: rgba(255, 255, 255, 0.7);
}

#LyricsflowPage:hover .back-button {
  opacity: 0.6;
}

.back-button:hover {
  opacity: 1 !important;
  transform: scale(1.1);
  background: rgba(21, 22, 23, 0.88);
}

/* ── Lyrics Loading Indicator ── */
.lyrics-loading-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  z-index: 20;
  opacity: 0;
  transition: opacity 0.3s;
}

.lyrics-loading-indicator.active {
  opacity: 1;
}

.lyrics-loading-indicator .loading-spinner,
.LyricsflowLoader .loading-spinner {
  display: none;
  /* Hide old spinner */
}

/* ── Bounce Loader (Reference Port) ── */
.SlBounceLoader {
  width: 40px;
  aspect-ratio: 1;
  --c: no-repeat linear-gradient(rgba(255, 255, 255, 0.7) 0 0);
  background:
    var(--c) 0 0,
    var(--c) 0 100%,
    var(--c) 50% 0,
    var(--c) 50% 100%,
    var(--c) 100% 0,
    var(--c) 100% 100%;
  background-size: 8px 50%;
  animation: LF_bounce_bars 1s infinite;
  position: relative;
  overflow: hidden;
}

.SlBounceLoader:before {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffffff;
  top: calc(50% - 4px);
  left: -8px;
  animation: inherit;
  animation-name: LF_bounce_ball;
}

@keyframes LF_bounce_bars {
  16.67% {
    background-size: 8px 30%, 8px 30%, 8px 50%, 8px 50%, 8px 50%, 8px 50%;
  }

  33.33% {
    background-size: 8px 30%, 8px 30%, 8px 30%, 8px 30%, 8px 50%, 8px 50%;
  }

  50% {
    background-size: 8px 30%, 8px 30%, 8px 30%, 8px 30%, 8px 30%, 8px 30%;
  }

  66.67% {
    background-size: 8px 50%, 8px 50%, 8px 30%, 8px 30%, 8px 30%, 8px 30%;
  }

  83.33% {
    background-size: 8px 50%, 8px 50%, 8px 50%, 8px 50%, 8px 30%, 8px 30%;
  }
}

@keyframes LF_bounce_ball {
  20% {
    left: 0px;
  }

  40% {
    left: calc(50% - 4px);
  }

  60% {
    left: calc(100% - 8px);
  }

  80%,
  100% {
    left: 100%;
  }
}

@keyframes LF_spin {
  to {
    transform: rotate(360deg);
  }
}

/* Rendering State: Hide interactive clutter for picture-perfect export */
body.is-rendering .back-button,
body.is-rendering .MetadataActions,
body.is-rendering .VolumeArea,
body.is-rendering .NowBarControls,
body.is-rendering .playback-control.shuffle,
body.is-rendering .playback-control.repeat {
  display: none !important;
}

body.is-rendering,
body.is-rendering * {
  cursor: none !important;
}

body.is-rendering .NowBar {
  padding-bottom: 20px;
  /* Reduced since controls are gone */
}

.lyrics-loading-indicator .loading-text {
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.02em;
}

/* ── macOS Golden Gate Liquid Glass Settings Modal ── */
.LyricsflowSettingsOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.LyricsflowSettingsOverlay.active {
  opacity: 1;
  pointer-events: auto;
}

.LyricsflowSettingsContainer {
  background: rgba(20, 20, 26, 0.68);
  backdrop-filter: blur(52px) saturate(220%);
  -webkit-backdrop-filter: blur(52px) saturate(220%);
  width: 90%;
  max-width: 860px;
  height: 620px;
  max-height: 85vh;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 40px 100px -10px rgba(0, 0, 0, 0.75),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.95) translateY(12px);
  transition: transform 0.35s cubic-bezier(0.34, 1.35, 0.64, 1), opacity 0.3s ease;
  will-change: transform, opacity;
}

.LyricsflowSettingsContainer.active {
  transform: scale(1) translateY(0);
}

.LyricsflowSettingsHeader {
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.LyricsflowSettingsHeader span {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.LyricsflowSettingsHeaderClose {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.LyricsflowSettingsHeaderClose:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  transform: scale(1.06);
}

.LyricsflowSettingsMainBody {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Sidebar Styling */
.LyricsflowSettingsSidebar {
  width: 215px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.02);
  scrollbar-width: none;
}

.LyricsflowSettingsSidebar::-webkit-scrollbar {
  display: none;
}

.lf-sidebar-tab {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.65);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  text-align: left;
}

.lf-sidebar-tab svg {
  flex-shrink: 0;
  opacity: 0.8;
  transition: transform 0.2s ease;
}

.lf-sidebar-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transform: translateX(2px);
}

.lf-sidebar-tab:hover svg {
  transform: scale(1.05);
}

.lf-sidebar-tab.active {
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 4px 12px rgba(0, 0, 0, 0.2);
  color: #fff;
  font-weight: 600;
}

/* Content Area Styling */
.LyricsflowSettingsContent {
  flex: 1;
  padding: 24px 28px;
  overflow-y: auto;
  scrollbar-width: none;
}

.LyricsflowSettingsContent::-webkit-scrollbar {
  display: none;
}

.LyricsflowSettingsPanel {
  animation: slFadeIn 0.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes slFadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.lf-settings-group {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.45);
  margin: 18px 0 8px 4px;
  font-weight: 600;
}

.lf-settings-group:first-of-type {
  margin-top: 4px;
}

.lf-settings-card {
  background: rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 24px rgba(0, 0, 0, 0.2);
  border-radius: 16px;
  margin-bottom: 20px;
  overflow: hidden;
}

.lf-settings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  gap: 20px;
}

.lf-settings-row:last-child {
  border-bottom: none;
}

.lf-settings-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.lf-settings-label {
  font-size: 0.92rem;
  color: #fff;
  font-weight: 500;
}

.lf-settings-description {
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.35;
}

/* Cupertino / Golden Gate toggle styling */
.aero-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
  cursor: pointer;
}

.aero-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.aero-toggle-track {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 9999px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.aero-toggle-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s cubic-bezier(0.34, 1.45, 0.64, 1);
}

.aero-toggle input:checked+.aero-toggle-track {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.4);
}

.aero-toggle input:checked+.aero-toggle-track::after {
  transform: translateX(20px);
  background: #111116;
}

/* ── UI Components ── */
.lf-toggle {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 25px;
  flex-shrink: 0;
}

.lf-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.lf-toggle span {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.08);
  transition: background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 25px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.lf-toggle span:before {
  position: absolute;
  content: "";
  height: 19px;
  width: 19px;
  left: 2px;
  bottom: 2px;
  background-color: #fff;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
}

.lf-toggle input:checked+span {
  background-color: #ffffff;
}

.lf-toggle input:checked+span:before {
  background-color: #1c1c1e;
}

.lf-toggle input:checked+span:before {
  transform: translateX(21px);
}

.lf-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  color: #fff;
  padding: 8px 30px 8px 12px;
  font-size: 0.88rem;
  outline: none;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 13px;
}

.lf-select:focus {
  border-color: rgba(255, 255, 255, 0.2);
  background-color: rgba(255, 255, 255, 0.08);
}

.lf-select option {
  background: #1c1c1e;
  color: #fff;
}

.lf-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  color: #fff;
  padding: 8px 12px;
  font-size: 0.88rem;
  outline: none;
  font-family: inherit;
  width: 170px;
  max-width: 100%;
  transition: all 0.2s ease;
}

.lf-input:focus {
  border-color: rgba(255, 255, 255, 0.2);
  background-color: rgba(255, 255, 255, 0.08);
}

.lf-slider-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 170px;
}

.lf-slider-value {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.6);
  min-width: 32px;
  text-align: right;
  font-weight: 500;
  font-family: monospace;
}

.lf-range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 120px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.15);
  outline: none;
  cursor: pointer;
}

.lf-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  transition: transform 0.15s ease;
}

.lf-range-slider::-webkit-slider-thumb:active {
  transform: scale(1.25);
}

.lf-range-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: none;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  transition: transform 0.15s ease;
}

.lf-range-slider::-moz-range-thumb:active {
  transform: scale(1.25);
}

.lf-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: #fff;
  padding: 8px 14px;
  font-size: 0.86rem;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

.lf-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.15);
}

.lf-btn:active {
  transform: scale(0.97);
}

.lf-btn-accent {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.lf-btn-accent:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.35);
}

/* Inline Equalizer Styling */
.lf-eq-preset-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.lf-eq-preset-label {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}

.lf-eq-sliders-container {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  height: 170px;
  gap: 6px;
  padding: 22px 18px 14px;
  background: rgba(0, 0, 0, 0.15);
}

.lf-eq-band-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  height: 100%;
}

.lf-eq-val-label {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.45);
  min-height: 12px;
  font-family: monospace;
}

.lf-eq-freq-label {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 500;
}

.lf-eq-slider {
  height: 100px;
  width: 5px;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  outline: none;
  margin: 6px 0;
  cursor: ns-resize;
}

.lf-eq-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: transform 0.1s ease;
}

.lf-eq-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

/* Alignment Support */
.lf-right-aligned #lyrics-container {
  text-align: right;
}

.lf-simple-mode .line {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.3ch;
  margin: 1.2cqw 0 !important;
  padding: 12px 0 !important;
  text-align: left !important;
  width: 100% !important;
  transform-origin: center;
  transition: transform 0.2s ease-out;
}

.lf-simple-mode .word {
  display: inline-block !important;
  opacity: 0.35;
  color: #fff;
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  -webkit-text-fill-color: #fff !important;
  text-shadow: none;
  font-size: inherit !important;
  transition: opacity 0.3s ease, text-shadow 0.3s ease;
}

.lf-simple-mode .word.Active {
  opacity: 1;
  font-weight: 700;
}

.lf-simple-mode .letter {
  display: inline-block !important;
  opacity: 0.35;
  color: #fff;
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  -webkit-text-fill-color: #fff !important;
  text-shadow: none;
  font-size: inherit !important;
  margin: 0 !important;
  padding: 0 !important;
}

.lf-simple-mode .letter.Active {
  opacity: 1;
}

.lf-simple-mode .letterGroup {
  display: inline-block !important;
  white-space: normal !important;
}

.lf-simple-mode .line.Active {
  opacity: 1;
}

.lf-simple-mode .line.Sung,
.lf-simple-mode .line.NotSung {
  opacity: 0.5;
}

.lf-simple-mode .word-group {
  display: inline-block !important;
  white-space: normal !important;
}

/* --- Provider Manager --- */
.lf-btn-small {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  padding: 4px 8px;
  min-width: 28px;
  font-family: inherit;
  font-size: 12px;
  transition: all 0.15s ease;
}

.lf-btn-small:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.1);
}

.lf-btn-small:disabled {
  opacity: 0.25;
  cursor: default;
}

.lf-btn-small.off {
  background: rgba(255, 50, 50, 0.15);
  color: #ff9999;
}

/* ── Romanization / Translation Toggles ── */
.romanization-toggle,
.translation-toggle {
  position: fixed;
  bottom: 50px;
  right: 24px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.6);
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  z-index: 100;
}

.translation-toggle {
  bottom: 86px;
}

.romanization-toggle:hover,
.translation-toggle:hover {
  color: white;
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.romanization-toggle.active,
.translation-toggle.active {
  background: rgba(255, 255, 255, 0.9);
  color: black;
  border-color: transparent;
}

/* ── Lyrics Source Badge ── */
.lyrics-source-badge {
  position: fixed;
  top: 29px;
  right: 24px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  z-index: 100;
  pointer-events: none;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ═══════════════════════════════════════════════
   Mobile Responsive Adjustments
   ═══════════════════════════════════════════════ */

@media (max-width: 768px) {

  /* Settings Mobile Revamp Overrides */
  .LyricsflowSettingsContainer {
    width: 100% !important;
    height: 100% !important;
    max-height: 100dvh !important;
    max-width: 100% !important;
    border-radius: 0 !important;
    border: none !important;
  }

  .LyricsflowSettingsMainBody {
    flex-direction: column !important;
  }

  .LyricsflowSettingsSidebar {
    width: 100% !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 10px 16px !important;
    gap: 8px !important;
    white-space: nowrap !important;
    scrollbar-width: none !important;
  }

  .LyricsflowSettingsSidebar::-webkit-scrollbar {
    display: none !important;
  }

  .lf-sidebar-tab {
    padding: 8px 14px !important;
    border-radius: 8px !important;
    font-size: 0.85rem !important;
    flex-shrink: 0 !important;
  }

  .LyricsflowSettingsContent {
    padding: 16px 20px !important;
  }

  .lf-settings-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }

  .lf-input {
    width: 100% !important;
    max-width: 100% !important;
  }

  .lf-select {
    width: 100% !important;
    max-width: 100% !important;
  }

  .lf-slider-wrap {
    width: 100% !important;
    min-width: 0 !important;
  }

  .lf-range-slider {
    flex: 1 !important;
    width: auto !important;
  }

  #LyricsflowPage {
    height: 100dvh;
    overflow: hidden;
    position: relative;
  }

  #LyricsflowPage .ContentBox {
    display: block;
    height: 100%;
    width: 100%;
    position: relative;
  }

  /* 1. Header (NowBar top section) & Back button */
  .back-button {
    position: absolute !important;
    top: env(safe-area-inset-top, 12px) !important;
    left: 24px !important;
    z-index: 200 !important;
    width: 40px !important;
    height: 40px !important;
    margin: 0 !important;
    opacity: 0.8 !important;
  }

  .lyrics-source-badge {
    position: absolute !important;
    top: calc(env(safe-area-inset-top, 12px) + 13px) !important;
    right: 24px !important;
  }

  #LyricsflowPage .ContentBox .NowBar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    scale: 1 !important;
    z-index: 100;
    background: transparent;
    display: block !important;
    pointer-events: none;
  }

  .Grabber {
    display: none !important;
  }

  #LyricsflowPage .ContentBox .NowBar .Header {
    position: absolute !important;
    inset: 0 !important;
    height: 100% !important;
    width: 100% !important;
    display: block !important;
    pointer-events: none !important;
  }

  #LyricsflowPage .ContentBox .NowBar .Header .NowBarBottomWrapper {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    pointer-events: none !important;
    transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1) !important;
  }

  /* Album Art in Header */
  #LyricsflowPage .ContentBox .NowBar .Header .MediaBox {
    position: absolute !important;
    top: calc(67px + env(safe-area-inset-top, 12px)) !important;
    left: 24px !important;
    width: 48px !important;
    height: 48px !important;
    margin-bottom: 0 !important;
    pointer-events: auto !important;
  }

  #LyricsflowPage .ContentBox .NowBar .Header .MediaBox .MediaImageContainer {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  }

  /* Metadata next to art */
  .MetadataRow {
    position: absolute !important;
    top: calc(67px + env(safe-area-inset-top, 12px)) !important;
    left: 86px !important;
    width: calc(100% - 110px) !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: 48px !important;
    pointer-events: auto !important;
  }

  #LyricsflowPage .ContentBox .NowBar .Header .Metadata {
    align-items: flex-start;
    text-align: left;
    gap: 0px;
  }

  #LyricsflowPage .ContentBox .NowBar .Header .Metadata .SongName {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.2;
  }

  #LyricsflowPage .ContentBox .NowBar .Header .Metadata .Artists {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.2;
    max-width: 180px;
  }

  .MetadataActions {
    gap: 6px;
  }

  .favorite-button {
    display: none !important;
    /* Hide favorite button on mobile to place settings button at the complete right */
  }

  .options-button img {
    width: 28px !important;
    height: 28px !important;
  }

  body.lyrics-mode-active #LyricsflowPage .ContentBox .NowBar:not(.centered) .Header .NowBarBottomWrapper .MetadataRow {
    display: flex !important;
  }

  /* Touch-blocking backdrop: prevents taps from passing through lyrics to player controls behind */
  #LyricsflowPage .LyricsContainer:not(.hidden)::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    background: transparent;
  }

  /* 2. Lyrics Container in Middle */
  #LyricsflowPage .LyricsContainer {
    position: absolute !important;
    display: block !important;
    top: calc(112px + env(safe-area-inset-top, 12px)) !important;
    bottom: 32vh !important;
    bottom: 32dvh !important;
    left: 0 !important;
    width: 100% !important;
    height: calc(100vh - (112px + env(safe-area-inset-top, 12px) + 32vh)) !important;
    height: calc(100dvh - (112px + env(safe-area-inset-top, 12px) + 32dvh)) !important;
    padding: 0 !important;
    margin: 0 !important;
    z-index: 50 !important;
    pointer-events: auto !important;
    overflow: hidden !important;
    mask-image: linear-gradient(to bottom, transparent 0%, black 5%, black 88%, transparent 100%) !important;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 5%, black 88%, transparent 100%) !important;
    transition: bottom 0.5s cubic-bezier(0.25, 1, 0.5, 1), height 0.5s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s cubic-bezier(0.39, 0.575, 0.565, 1), transform 0.3s cubic-bezier(0.39, 0.575, 0.565, 1) !important;
  }

  /* Apple Immersive Lyrics Layout Mode overrides */
  #LyricsflowPage .LyricsContainer.lyrics-immersive {
    bottom: calc(4dvh + env(safe-area-inset-bottom, 12px)) !important;
    height: calc(91dvh - (111px + env(safe-area-inset-top, 12px) + 4dvh + env(safe-area-inset-bottom, 12px))) !important;
  }

  /* Immersive Layout: Only fade out progress, quality badge, and playback center controls */
  #LyricsflowPage:has(.LyricsContainer.lyrics-immersive) .NowBarProgress,
  #LyricsflowPage:has(.LyricsContainer.lyrics-immersive) .quality-badge-container,
  #LyricsflowPage:has(.LyricsContainer.lyrics-immersive) .NowBarControls .playback-control.skip-back,
  #LyricsflowPage:has(.LyricsContainer.lyrics-immersive) .NowBarControls .playback-control.play-pause,
  #LyricsflowPage:has(.LyricsContainer.lyrics-immersive) .NowBarControls .playback-control.skip-forward {
    opacity: 0 !important;
    pointer-events: none !important;
  }

  #LyricsflowPage .LyricsContainer .LyricsContent {
    position: absolute !important;
    display: block !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 100% !important;
    width: 100% !important;
    overflow-x: hidden !important;
    overflow-y: scroll !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    container-type: normal !important;
    pointer-events: auto !important;
    transform: translateZ(0) !important;
    will-change: transform, scroll-position !important;
    padding: 0 28px !important;
    text-align: left !important;
  }

  #LyricsflowPage .LyricsContainer .LyricsContent .LyricsflowScrollContainer {
    container-type: normal !important;
    margin-top: 0vh !important;
    padding-top: 6dvh !important;
    padding-bottom: 25dvh !important;
  }

  #LyricsflowPage .LyricsContainer .LyricsContent .line {
    font-size: 1.85rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.03em !important;
    padding: 14px 0 !important;
    line-height: 1.25 !important;
    opacity: 0.28;
    transition: opacity 0.4s ease;
  }

  #LyricsflowPage .LyricsContainer .LyricsContent .line.Active {
    opacity: 1 !important;
  }

  /* 3. Scrubber / Progress Bar Row */
  .NowBarProgress {
    position: absolute !important;
    bottom: 26dvh !important;
    left: 28px !important;
    width: calc(100% - 56px) !important;
    z-index: 100 !important;
    margin: 0 !important;
    pointer-events: auto !important;
  }

  .progress-bar-wrapper {
    height: 4px !important;
    background: rgba(255, 255, 255, 0.2) !important;
    margin-bottom: 6px !important;
  }

  .progress-bar-fill {
    background: rgba(255, 255, 255, 0.75) !important;
  }

  .progress-bar-fill::after {
    transform: translateY(-50%) scale(1) !important;
    width: 10px !important;
    height: 10px !important;
  }

  .progress-times {
    margin-top: 4px !important;
  }

  .progress-time {
    font-size: 0.75rem !important;
    color: rgba(255, 255, 255, 0.5) !important;
    font-weight: 600 !important;
  }

  .NowBarProgress .aero-elastic {
    --elastic-inactive-h: 7px;
    --elastic-active-h: 12px;
    --elastic-growth: 0px;
    --elastic-track: rgba(255, 255, 255, 0.2);
    --elastic-fill-idle: rgba(255, 255, 255, 0.75);
    --elastic-fill-active: rgba(255, 255, 255, 0.75);
  }

  .NowBarProgress .aero-elastic-labels {
    margin-top: 6px !important;
  }

  /* Dolby Atmos / Lossless Badge Centered Under Playback Bar */
  .quality-badge-container {
    display: flex !important;
    position: absolute !important;
    bottom: 27dvh !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 100 !important;
    margin: 0 !important;
    pointer-events: none !important;
    width: auto !important;
  }

  .quality-badge {
    background: none !important;
    padding: 0 !important;
  }

  /* 4. Playback Controls Row */
  .NowBarControls {
    position: absolute !important;
    bottom: 15dvh !important;
    left: 0 !important;
    width: 100% !important;
    padding: 0 34px !important;
    z-index: 100 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    pointer-events: auto !important;
  }

  .playback-control img {
    width: 28px !important;
    height: 28px !important;
    opacity: 0.85 !important;
  }

  .playback-control.skip-back img,
  .playback-control.skip-forward img {
    width: 42px !important;
    height: 42px !important;
  }

  .playback-control.play-pause img {
    width: 48px !important;
    height: 48px !important;
    opacity: 1 !important;
  }

  /* Mobile Style for Shuffle and Repeat Buttons */
  #LyricsflowPage .ContentBox .NowBar:not(.centered) .Header .MetadataActions {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
  }

  #LyricsflowPage .ContentBox .NowBar:not(.centered) .Header .MetadataActions .playback-control.shuffle,
  #LyricsflowPage .ContentBox .NowBar:not(.centered) .Header .MetadataActions .playback-control.repeat {
    display: flex !important;
    width: 32px !important;
    height: 32px !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    pointer-events: auto !important;
  }

  #LyricsflowPage .ContentBox .NowBar:not(.centered) .Header .MetadataActions .playback-control.shuffle img,
  #LyricsflowPage .ContentBox .NowBar:not(.centered) .Header .MetadataActions .playback-control.repeat img {
    width: 22px !important;
    height: 22px !important;
    opacity: 0.65 !important;
  }

  #LyricsflowPage .ContentBox .NowBar.centered .Header .NowBarControls {
    display: flex !important;
    justify-content: center !important;
    gap: 28px !important;
    padding: 0 18px !important;
    bottom: 15dvh !important;
    top: auto !important;
  }

  #LyricsflowPage .ContentBox .NowBar.centered .Header .NowBarControls .playback-control.shuffle,
  #LyricsflowPage .ContentBox .NowBar.centered .Header .NowBarControls .playback-control.repeat {
    display: none !important;
  }

  /* 5. Volume Slider Row — flows inside flex wrapper */
  #LyricsflowPage .ContentBox .NowBar.centered .VolumeArea {
    display: flex !important;
    position: relative !important;
    align-items: center !important;
    justify-content: space-between !important;
    z-index: 100 !important;
    margin: 0 !important;
    pointer-events: auto !important;
  }

  #LyricsflowPage .ContentBox .NowBar:not(.centered) .VolumeArea {
    display: none !important;
  }

  .volume-side-icon {
    width: 28px !important;
    height: 28px !important;
    opacity: 0.55 !important;
  }

  .volume-slider {
    height: 4px !important;
  }

  .volume-slider::-webkit-slider-thumb {
    transform: scale(0) !important;
  }

  .volume-slider::-moz-range-thumb {
    transform: scale(0) !important;
  }

  /* 6. Bottom Bar */
  .BottomBar {
    height: 106px;
    position: absolute !important;
    bottom: calc(-10px + env(safe-area-inset-bottom, 14px)) !important;
    left: 0 !important;
    width: 100% !important;
    padding: 0 24px !important;
    z-index: 100 !important;
    background: transparent !important;
    display: flex !important;
    justify-content: center !important;
    align-items: start !important;
  }

  /* Auto-sized icon row pinned to the top; icons vertically centered inside it */
  .bottom-bar-icons {
    display: flex !important;
    width: auto !important;
    height: auto !important;
    align-items: center !important;
    justify-content: center !important;
    gap: clamp(76px, 10vw, 72px) !important;
    box-sizing: border-box !important;
  }

  /* Invisible touch shield — eats all touch events in the bottom area */
  .touch-shield {
    display: none;
  }

  @media (max-width: 768px) {
    .touch-shield {
      display: block !important;
      position: fixed !important;
      bottom: 0 !important;
      left: 0 !important;
      width: 100% !important;
      height: 200px !important;
      background: transparent !important;
      pointer-events: auto !important;
      z-index: 99 !important;
      /* below BottomBar (z:100) so buttons still work */
      -webkit-tap-highlight-color: transparent !important;
    }
  }

  /* Touch-blocking backdrop behind BottomBar — prevents accidental lyric seeks */
  .BottomBar::after {
    content: '' !important;
    position: absolute !important;
    bottom: -env(safe-area-inset-bottom, 40px) !important;
    left: 0 !important;
    width: 100% !important;
    height: calc(107px + env(safe-area-inset-bottom, 40px)) !important;
    pointer-events: auto !important;
    z-index: -1 !important;
    border-radius: 0 !important;
  }

  .bottom-bar-left,
  .bottom-bar-right {
    display: contents !important;
  }

  /* Symmetrical Ordering & Styling */
  #btn-lyrics {
    order: 1 !important;
  }

  #btn-airplay {
    order: 2 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 4px !important;
    gap: 2px !important;
    min-width: 60px !important;
  }

  #btn-airplay .device-name {
    font-size: 0.65rem !important;
    font-weight: 500 !important;
    color: rgba(255, 255, 255, 0.6) !important;
    margin-top: 1px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 120px !important;
    text-align: center !important;
    display: block !important;
    line-height: 1.2 !important;
  }

  #btn-queue {
    order: 3 !important;
  }

  .BottomBar button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: none !important;
    border: none !important;
    padding: 12px !important;
    cursor: pointer !important;
  }

  .BottomBar button img,
  .BottomBar button svg {
    width: 35px !important;
    height: 35px !important;
    opacity: 0.65 !important;
  }

  .BottomBar button:hover svg,
  .BottomBar button.active img,
  .BottomBar button.active svg {
    opacity: 1 !important;
  }

  .BottomBar button,
  .BottomBar button:hover,
  .BottomBar button:active {
    transform: none !important;
    transition: none !important;
  }

  .BottomBar button#btn-airplay img {
    width: 22px !important;
    height: 22px !important;
  }

  /* 7. Symmetrical Transition and Full-Screen Layout when Lyrics are Hidden */
  #LyricsflowPage .ContentBox .NowBar.centered {
    left: 0 !important;
    width: 100% !important;
  }

  #LyricsflowPage .ContentBox .NowBar .Header .MediaBox,
  #LyricsflowPage .ContentBox .NowBar .Header .MediaBox .MediaImageContainer {
    will-change: transform;
  }

  .MetadataRow {
    will-change: transform;
  }

  .NowBarProgress,
  .NowBarControls,
  .VolumeArea,
  .quality-badge-container {
    transition: opacity 0.5s cubic-bezier(0.32, 0.72, 0, 1),
      transform 0.55s cubic-bezier(0.32, 0.72, 0, 1),
      bottom 0.55s cubic-bezier(0.32, 0.72, 0, 1) !important;
    will-change: transform, opacity, bottom;
  }

  /* Shield to prevent clicking on lyrics behind the bottom controls area when lyrics are active */
  #LyricsflowPage .ContentBox .NowBar:not(.centered) .Header .NowBarBottomWrapper::before {
    content: "" !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 32dvh !important;
    background: transparent !important;
    pointer-events: auto !important;
    z-index: 1 !important;
  }

  /* Make sure the control elements themselves sit above the shield so they remain clickable */
  #LyricsflowPage .ContentBox .NowBar:not(.centered) .Header .NowBarBottomWrapper .NowBarProgress,
  #LyricsflowPage .ContentBox .NowBar:not(.centered) .Header .NowBarBottomWrapper .NowBarControls,
  #LyricsflowPage .ContentBox .NowBar:not(.centered) .Header .NowBarBottomWrapper .MetadataRow,
  #LyricsflowPage .ContentBox .NowBar:not(.centered) .Header .NowBarBottomWrapper .quality-badge-container {
    z-index: 2 !important;
  }

  /* ── Centered Mode: Header becomes the master flex column ── */
  #LyricsflowPage .ContentBox .NowBar.centered .Header {
    display: flex !important;
    flex-direction: column !important;
    position: absolute !important;
    inset: 0 !important;
    height: 100% !important;
    width: 100% !important;
    padding: calc(48px + env(safe-area-inset-top, 12px)) 28px calc(72px + env(safe-area-inset-bottom, 14px)) !important;
    pointer-events: none !important;
    box-sizing: border-box !important;
  }

  /* Cover Art — flex:1.2 fills the top portion, art is centered inside */
  #LyricsflowPage .ContentBox .NowBar.centered .Header .MediaBox {
    position: relative !important;
    flex: 1.2 1 0 !important;
    min-height: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: auto !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    margin: 0 0 6px 0 !important;
    aspect-ratio: auto !important;
    pointer-events: auto !important;
    container-type: size !important;
  }

  /* Square cover art — uses container query units for a perfect square */
  #LyricsflowPage .ContentBox .NowBar.centered .Header .MediaBox .MediaImageContainer {
    width: min(100cqw, 100cqh) !important;
    height: min(100cqw, 100cqh) !important;
    max-width: none !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    border-radius: 10px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45) !important;
  }

  /* Bottom Wrapper — flex:1, takes the bottom half, distributes items dynamically */
  #LyricsflowPage .ContentBox .NowBar.centered .Header .NowBarBottomWrapper {
    position: relative !important;
    flex: 1 1 0 !important;
    min-height: 0 !important;
    width: 100% !important;
    height: 100% !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    inset: auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0 !important;
    pointer-events: none !important;
    padding: 0 !important;
  }

  /* Explicit per-element resets — override non-centered absolute positioning */
  #LyricsflowPage .ContentBox .NowBar.centered .Header .NowBarBottomWrapper .MetadataRow {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: translateY(35px) !important;
    transition: none !important;
    pointer-events: auto !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  #LyricsflowPage .ContentBox .NowBar.centered .Header .NowBarBottomWrapper .NowBarProgress {
    position: relative !important;
    width: 100% !important;
    left: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
    pointer-events: auto !important;
    z-index: 100 !important;
    margin: -8px 0 0 0 !important;
  }

  #LyricsflowPage .ContentBox .NowBar.centered .Header .NowBarBottomWrapper .quality-badge-container {
    position: relative !important;
    width: auto !important;
    left: auto !important;
    top: -62px !important;
    bottom: auto !important;
    transform: none !important;
    pointer-events: auto !important;
    display: flex !important;
    justify-content: center !important;
    z-index: 100 !important;
    margin: -8px 0 !important;
  }

  #LyricsflowPage .ContentBox .NowBar.centered .Header .NowBarBottomWrapper .NowBarControls {
    position: relative !important;
    width: 100% !important;
    left: auto !important;
    top: -20px !important;
    bottom: auto !important;
    transform: none !important;
    pointer-events: auto !important;
    z-index: 100 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 40px !important;
    margin: -8px 0 0 0 !important;
  }

  #LyricsflowPage .ContentBox .NowBar.centered .Header .NowBarBottomWrapper .VolumeArea {
    position: relative !important;
    width: 100% !important;
    left: auto !important;
    top: -40px !important;
    bottom: auto !important;
    transform: none !important;
    pointer-events: auto !important;
    margin: -3px 0 0 0 !important;
  }

  #LyricsflowPage .ContentBox .NowBar.centered .Header .Metadata {
    align-items: flex-start !important;
    text-align: left !important;
  }

  #LyricsflowPage .ContentBox .NowBar.centered .Header .Metadata .SongName {
    font-size: 1.55rem !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
  }

  #LyricsflowPage .ContentBox .NowBar.centered .Header .Metadata .Artists {
    font-size: 1.15rem !important;
    font-weight: 500 !important;
    color: rgba(255, 255, 255, 0.6) !important;
    line-height: 1.25 !important;
    max-width: 250px !important;
  }

  #LyricsflowPage .ContentBox .NowBar.centered .Header .favorite-button {
    display: flex !important;
  }

  #LyricsflowPage .ContentBox .NowBar.centered .NowBarControls .playback-control img {
    width: 32px !important;
    height: 32px !important;
  }

  #LyricsflowPage .ContentBox .NowBar.centered .NowBarControls .playback-control.skip-back img,
  #LyricsflowPage .ContentBox .NowBar.centered .NowBarControls .playback-control.skip-forward img {
    width: 46px !important;
    height: 46px !important;
  }

  #LyricsflowPage .ContentBox .NowBar.centered .NowBarControls .playback-control.play-pause img {
    width: 43px !important;
    height: 43px !important;
  }

  /* Full-Bleed Top-Half Layout with Gradient Fade for Animated Artwork on Mobile */
  #LyricsflowPage .ContentBox .NowBar.centered .Header .MediaBox:has(.animated-art-video.loaded) {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 52dvh !important;
    aspect-ratio: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    max-width: none !important;
    z-index: 1 !important;
  }

  #LyricsflowPage .ContentBox .NowBar.centered .Header .MediaBox:has(.animated-art-video.loaded) .MediaImageContainer {
    width: 100% !important;
    height: 100% !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    mask-image: linear-gradient(to bottom, black 0%, black 65%, transparent 100%) !important;
    -webkit-mask-image: linear-gradient(to bottom, black 0%, black 65%, transparent 100%) !important;
  }

  #LyricsflowPage .ContentBox .NowBar.centered .Header .MediaBox:has(.animated-art-video.loaded) .animated-art-video {
    width: 100% !important;
    height: 100% !important;
    border-radius: 0 !important;
    object-fit: cover !important;
  }

  /* Restrict bottom wrapper height when animated cover art takes up the top half to prevent spacing blowouts */
  #LyricsflowPage .ContentBox .NowBar.centered .Header:has(.animated-art-video.loaded) .NowBarBottomWrapper {
    height: 42dvh !important;
    margin-top: auto !important;
    flex: none !important;
  }

  #LyricsflowPage .ContentBox .NowBar.centered .Header:has(.animated-art-video.loaded) .NowBarBottomWrapper .MetadataRow {
    bottom: -26px !important;
  }

  #LyricsflowPage .ContentBox .NowBar.centered~.LyricsContainer {
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
  }

  #LyricsflowPage .ContentBox .NowBar.centered~.BottomBar {
    bottom: calc(0.5dvh + env(safe-area-inset-bottom, 8px)) !important;
  }

  #LyricsflowPage .ContentBox .NowBar.centered~.BottomBar button img,
  #LyricsflowPage .ContentBox .NowBar.centered~.BottomBar button svg {
    width: 30px !important;
    height: 30px !important;
  }



  /* ── Mobile Performance: Reduce expensive backdrop-filters ── */
  .QueuePanel {
    backdrop-filter: blur(20px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(150%) !important;
  }

  .LyricsflowToast {
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
  }

  .romanization-toggle,
  .translation-toggle {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(255, 255, 255, 0.15) !important;
  }

  .drop-zone-overlay {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(255, 255, 255, 0.2) !important;
  }

  .popup-overlay {
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
  }
}

/* ── Apple Style Dynamic Toast ── */
.LyricsflowToast {
  position: fixed;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(45, 45, 45, 0.88);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  padding: 12px 24px;
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 5000;
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: top 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.LyricsflowToast.active {
  top: 24px;
}

.lf-simple-mode .word.past {
  opacity: 1 !important;
  color: #fff !important;
}

/* ── Bottom Bar ── */
.BottomBar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 20px 40px;
  position: absolute;
  bottom: 0;
  left: 0;
  background: transparent;
  backdrop-filter: none;
  border-top: none;
  z-index: 100;
}

/* Neutral wrapper — keeps desktop layout untouched; acts as the mobile icon row */
.bottom-bar-icons {
  display: contents;
}

.bottom-bar-left,
.bottom-bar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.airplay-button,
.lyrics-button,
.queue-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, opacity 0.2s;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  /* Mild shadow */
}

/* ── Dolby Atmos Icon ── */
#quality-badge-icon {
  width: 82px;
  height: 18px;
  object-fit: contain;
}

.airplay-button:hover,
.lyrics-button:hover,
.queue-button:hover {
  transform: scale(1.1);
}

.airplay-button img,
.lyrics-button img {
  width: 22px;
  height: 22px;
  filter: brightness(0) invert(1);
  opacity: 0.8;
}

.airplay-button:hover img,
.lyrics-button:hover img {
  opacity: 1;
}

.queue-button svg {
  width: 22px;
  height: 22px;
  fill: #fff;
  opacity: 0.8;
}

.queue-button:hover svg {
  opacity: 1;
}

/* ── Popup ── */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  backdrop-filter: blur(10px);
}

.popup-content {
  background: rgba(30, 30, 30, 0.9);
  padding: 30px;
  border-radius: 16px;
  text-align: center;
  max-width: 350px;
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.popup-content p {
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 20px;
}

.popup-close {
  background: #ffffff;
  border: none;
  color: #000;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  transition: background 0.2s;
}

.popup-close:hover {
  background: #e5e5e5;
}

/* ── Lyrics Container Hidden State (Sine-Out Scale + Fade) ── */
.LyricsContainer {
  transition: opacity 0.3s cubic-bezier(0.39, 0.575, 0.565, 1), transform 0.3s cubic-bezier(0.39, 0.575, 0.565, 1);
  transform: scale(1);
}


#LyricsflowPage .LyricsContainer.hidden {
  display: flex !important;
  pointer-events: none !important;
  opacity: 0 !important;
  transform: scale(0.95);
}

/* ── NowBar Animations ── */
#LyricsflowPage .ContentBox .NowBar {
  transition: left 0.55s cubic-bezier(0.32, 0.72, 0, 1);
}

#LyricsflowPage .ContentBox .NowBar.centered {
  left: calc(50% - var(--NowBarWidth) / 2);
}



/* ── Cover Art Pause Scale Animation (Lyrics Mode Off) ── */
#LyricsflowPage .ContentBox .NowBar.centered .Header .MediaBox:not(:has(.animated-art-video.loaded)) .MediaImageContainer {
  cursor: pointer;
  transition: transform 0.6s cubic-bezier(0.25, 1.1, 0.2, 1.05), box-shadow 0.6s ease !important;
  will-change: transform;
}

#LyricsflowPage .ContentBox .NowBar.centered .Header .MediaBox:not(:has(.animated-art-video.loaded)) .MediaImageContainer.paused {
  transform: scale(0.85) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
}

/* ── Cover Art Pause Scale Animation (Desktop Lyrics Mode) ── */
@media (min-width: 769px) {
  #LyricsflowPage .ContentBox .NowBar:not(.centered) .Header .MediaBox .MediaImageContainer {
    cursor: pointer;
    transition: transform 0.6s cubic-bezier(0.25, 1.1, 0.2, 1.05), box-shadow 0.6s ease !important;
    will-change: transform;
  }

  #LyricsflowPage .ContentBox .NowBar:not(.centered) .Header .MediaBox .MediaImageContainer.paused {
    transform: scale(0.85) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
  }
}

/* ── Queue Panel Layout Integration (Desktop & Mobile) ── */

@media (min-width: 769px) {
  #LyricsflowPage .ContentBox .QueuePanel {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-left: none;
    box-shadow: none;
    z-index: 4;
    padding-left: var(--LyricsLeftSidePadding);
    padding-right: var(--LyricsRightSidePadding);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transform: translateX(40px);
    transition: opacity 0.45s cubic-bezier(0.32, 0.72, 0, 1),
      transform 0.55s cubic-bezier(0.32, 0.72, 0, 1),
      visibility 0.45s;
  }

  #LyricsflowPage .ContentBox .QueuePanel.active {
    top: 71px;

    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transform: translateX(0);
  }

  #LyricsflowPage .ContentBox .NowBar.centered~.QueuePanel {
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
  }

  #LyricsflowPage .ContentBox .QueuePanel .QueueHeader {
    padding: 60px 0 20px 0 !important;
  }

  #LyricsflowPage .ContentBox .QueuePanel .QueueList {
    padding: 0 0 80px 0 !important;
  }
}

@media (max-width: 768px) {
  #LyricsflowPage .ContentBox .QueuePanel {
    position: absolute !important;
    display: flex !important;
    flex-direction: column !important;
    top: calc(112px + env(safe-area-inset-top, 12px)) !important;
    bottom: 32dvh !important;
    left: 0 !important;
    width: 100% !important;
    height: calc(100dvh - (112px + env(safe-area-inset-top, 12px) + 32dvh)) !important;
    padding: 0 24px !important;
    margin: 0 !important;
    z-index: 150 !important;
    pointer-events: auto !important;
    overflow: hidden !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-left: none !important;
    border-top: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
    transform: translateY(32px) !important;
    transition: opacity 0.45s cubic-bezier(0.32, 0.72, 0, 1),
      transform 0.55s cubic-bezier(0.32, 0.72, 0, 1),
      bottom 0.55s cubic-bezier(0.32, 0.72, 0, 1),
      height 0.55s cubic-bezier(0.32, 0.72, 0, 1),
      visibility 0.45s !important;
  }

  #LyricsflowPage .ContentBox .QueuePanel.active {
    opacity: 1 !important;
    pointer-events: auto !important;
    visibility: visible !important;
    transform: translateY(0) !important;
  }

  #LyricsflowPage .ContentBox .QueuePanel.queue-immersive {
    bottom: calc(4dvh + env(safe-area-inset-bottom, 12px)) !important;
    height: calc(100dvh - (112px + env(safe-area-inset-top, 12px) + 4dvh + env(safe-area-inset-bottom, 12px))) !important;
  }

  #LyricsflowPage .ContentBox .QueuePanel .QueueHeader {
    padding: 10px 0 !important;
  }

  #LyricsflowPage .ContentBox .QueuePanel .QueueList {
    padding: 0 0 40px 0 !important;
  }
}

/* Immersive layout support for Queue Panel */
#LyricsflowPage:has(.QueuePanel.queue-immersive) .NowBarProgress,
#LyricsflowPage:has(.QueuePanel.queue-immersive) .quality-badge-container,
#LyricsflowPage:has(.QueuePanel.queue-immersive) .NowBarControls .playback-control.skip-back,
#LyricsflowPage:has(.QueuePanel.queue-immersive) .NowBarControls .playback-control.play-pause,
#LyricsflowPage:has(.QueuePanel.queue-immersive) .NowBarControls .playback-control.skip-forward {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ══════════════════════════════════════════════════
   SPICY LYRICS ANIMATION ENGINE STYLES
   Direct visual styles from spicy-lyrics/src/css/Lyrics/Mixed.css
   ══════════════════════════════════════════════════ */
body.is-spicy-lyrics #LyricsflowPage .LyricsContainer .LyricsContent .line {
  transform: none !important;
  /* Disable AMLL per-line --ty shifting */
  transition: opacity 0.2s cubic-bezier(0.61, 1, 0.88, 1);
}

body.is-spicy-lyrics .line .word,
body.is-spicy-lyrics .line .letter {
  cursor: pointer;
  font-weight: 700 !important;
  -webkit-text-fill-color: transparent !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  position: relative;
  display: inline-block;
  transform-origin: center center;
  will-change: transform, opacity, scale;
}

/* ── Apple Music "LISTEN ON" Card & Device Selector ── */
.apple-listen-on-card {
  background: rgba(36, 36, 42, 0.78);
  backdrop-filter: blur(45px) saturate(210%);
  -webkit-backdrop-filter: blur(45px) saturate(210%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  width: 320px;
  max-width: 90vw;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  padding: 18px 16px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  user-select: none;
  animation: appleListenOnPop 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes appleListenOnPop {
  0% {
    opacity: 0;
    transform: scale(0.92) translateY(10px);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.listen-on-header {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #8e8e93;
  padding: 0 4px;
}

.listen-on-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.listen-on-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 14px;
  cursor: pointer;
  background: transparent;
  transition: background 0.15s ease, transform 0.1s cubic-bezier(0.16, 1, 0.3, 1);
}

.listen-on-item:hover {
  background: rgba(255, 255, 255, 0.09);
}

.listen-on-item:active {
  transform: scale(0.98);
  background: rgba(255, 255, 255, 0.14);
}

.listen-on-item.active {
  background: rgba(255, 255, 255, 0.12);
}

.listen-on-item .device-icon {
  color: #ffffff;
  flex-shrink: 0;
}

.listen-on-item.active .device-icon {
  color: #fc576b;
}

.device-meta {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.device-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.device-subtitle {
  font-size: 0.76rem;
  color: #8e8e93;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.listen-on-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 4px 6px;
}

.listen-on-close {
  margin-top: 4px;
  height: 38px;
  border-radius: 980px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.listen-on-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.listen-on-close:active {
  transform: scale(0.97);
}

body.is-spicy-lyrics .line.NotSung {
  opacity: 0.51 !important;
  text-shadow: 0 0 var(--BlurAmount, 0px) rgba(255, 255, 255, 0.4) !important;
}

body.is-spicy-lyrics .line.Sung {
  opacity: 0.497 !important;
  --gradient-position: 100% !important;
  text-shadow: 0 0 var(--BlurAmount, 0px) rgba(255, 255, 255, 0.6) !important;
}

body.is-spicy-lyrics .line.NotSung .word,
body.is-spicy-lyrics .line.NotSung .letter {
  --gradient-position: -20% !important;
  --text-shadow-opacity: 0% !important;
  --text-shadow-blur-radius: 4px !important;
}

body.is-spicy-lyrics .line.Sung .word,
body.is-spicy-lyrics .line.Sung .letter {
  --gradient-position: 100% !important;
}

/* ══════════════════════════════════════════════════
   PROGRESS BAR TIME DIGIT RUFFLE / SCRAMBLE
   ══════════════════════════════════════════════════ */
.progress-time {
  display: inline-flex !important;
  align-items: center;
  user-select: none;
  font-variant-numeric: tabular-nums;
}

.digit-ruffle-slot {
  display: inline-block;
  position: relative;
  overflow: hidden;
  height: 1.15em;
  vertical-align: middle;
}

.digit-ruffle-slot span {
  display: inline-block;
  will-change: transform, opacity;
}

.digit-ruffle-slot.sliding-down span {
  animation: digitSlideDown 0.18s cubic-bezier(0.2, 0.9, 0.3, 1) forwards;
}

@keyframes digitSlideDown {
  0% {
    transform: translateY(-40%);
    opacity: 0.3;
  }

  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ══════════════════════════════════════════════════
   LYRIC SHARE CARD MODAL (Apple Music / LyricsBlossom)
   ══════════════════════════════════════════════════ */
.lyric-share-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 20px;
  box-sizing: border-box;
}

.lyric-share-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.lyric-share-card-container {
  width: 480px;
  max-width: 94vw;
  max-height: 88vh;
  background: rgba(28, 28, 30, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.75);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.92);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.lyric-share-modal.active .lyric-share-card-container {
  transform: scale(1);
}

.lyric-share-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.lyric-share-header h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.lyric-share-close-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  transition: background 0.15s ease;
}

.lyric-share-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lyric-share-lines-list {
  flex: 1;
  overflow-y: auto;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 38vh;
}

.lyric-share-line-item {
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lyric-share-line-item.selected {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

/* Generated Image Card Preview */
.lyric-share-preview-wrap {
  padding: 12px 18px;
  display: flex;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
}

.lyric-share-card-canvas {
  width: 260px;
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  background: #111;
}

.lyric-share-actions {
  display: flex;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.lyric-share-btn {
  flex: 1;
  height: 40px;
  border-radius: 12px;
  border: none;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.lyric-share-btn.primary {
  background: #fff;
  color: #000;
}

.lyric-share-btn.secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.lyric-share-btn:hover {
  transform: scale(1.02);
}

.lyric-share-btn:active {
  transform: scale(0.97);
}