/* ==========================================================================
   SPOTIFY DARK MODE MUSIC PLAYER
   Phone Screen Optimized Layout (100dvh), Fullscreen Dynamic Gradient,
   Vertical Stacked Library Songs (No Clipping), Docked Mini-Player, Gestures
   ========================================================================== */

:root {
  --bg-black: #121212;
  --bg-card: #181818;
  --bg-card-hover: #222222;
  --accent-white: #ffffff;
  --accent-white-hover: #e0e0e0;
  --text-white: #ffffff;
  --text-secondary: #b3b3b3;
  --text-muted: #727272;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --progress-bg: rgba(255, 255, 255, 0.24);
  --progress-fill: #ffffff;
  --font-family: -apple-system, BlinkMacSystemFont, "Circular Spotify Tx T", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius-album: 16px;
  --radius-card: 10px;
  --mini-player-height: 60px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background: transparent !important;
  color: inherit !important;
}

button, [role="button"], .row-drag-handle, .song-item-row {
  outline: none !important;
  -webkit-touch-callout: none;
}

button:focus, [role="button"]:focus, .row-drag-handle:focus, .song-item-row:focus,
button:focus-visible, [role="button"]:focus-visible, .row-drag-handle:focus-visible, .song-item-row:focus-visible {
  outline: none !important;
}

html, body {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: var(--bg-black);
  color: var(--text-white);
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Fullscreen Phone Container (Fits 100% of phone screen)
   ========================================================================== */
.app-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  z-index: 1;
  background-color: var(--bg-black);
}

/* Common Icons & Buttons */
.svg-icon {
  width: 24px;
  height: 24px;
  fill: currentColor;
  display: block;
}

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 50%;
  transition: color 0.15s ease, transform 0.12s ease;
}

.btn-icon:hover {
  color: var(--text-white);
}

.btn-icon:active {
  transform: scale(0.92);
}

/* ==========================================================================
   1. Fullscreen Now Playing View (Play Screen)
   Dynamic Gradient Fits Entire Phone Screen, No Bottom Bar
   ========================================================================== */
.now-playing-view {
  position: absolute;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 20;
  display: flex;
  flex-direction: column;
  padding: calc(var(--safe-top) + 10px) 24px calc(var(--safe-bottom) + 24px) 24px;
  transition: transform 0.38s cubic-bezier(0.2, 0.9, 0.3, 1);
  will-change: transform;
  touch-action: pan-y;
  background-color: var(--bg-black);
  overflow: hidden;
}

.now-playing-view.minimized {
  transform: translateY(100%);
  pointer-events: none;
}

.now-playing-view.dragging {
  transition: none !important;
}

/* Dynamic Gradient Layers (Fits the Entire Screen) */
.player-grad-bg {
  position: absolute;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.65s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity;
  pointer-events: none;
}

.player-grad-bg.active {
  opacity: 1;
}

/* Top Header */
.player-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 440px;
  margin: 0 auto 6px auto;
  cursor: grab;
  padding: 2px 0;
  flex-shrink: 0;
}

.header-btn {
  color: var(--text-white);
  padding: 6px;
}

.header-center-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.header-subtext {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: rgba(255, 255, 255, 0.7);
}

.header-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-white);
  margin-top: 1px;
}

.header-spacer {
  width: 36px;
}

/* Center Player Body */
.player-body {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  overflow: hidden;
}

.player-body-inner {
  width: 100%;
  max-width: 440px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-bottom: 72px;
  min-height: 0;
}

/* Clear Album Art (Top-Middle with Radius, scales to fit any phone screen) */
.cover-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 0 14px 0;
  min-height: 0;
  width: 100%;
}

.cover-inner {
  width: min(320px, 36vh, 78vw);
  height: min(320px, 36vh, 78vw);
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-album);
  overflow: hidden;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.75), 0 4px 14px rgba(0, 0, 0, 0.5);
  background-color: #242424;
  position: relative;
  transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1), box-shadow 0.35s ease;
}

.cover-inner.playing {
  animation: vinyl-pulse 6s ease-in-out infinite alternate;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 25px rgba(255, 255, 255, 0.15);
}

@keyframes vinyl-pulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.02); }
}

.player-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-album);
}

/* Track Metadata Row */
.track-metadata {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 14px;
  flex-shrink: 0;
}

.track-text {
  overflow: hidden;
  width: 100%;
}

.player-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-artist {
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Timeline Scrubber Bar */
.timeline-container {
  margin-bottom: 14px;
  flex-shrink: 0;
}

.progress-bar-wrap {
  position: relative;
  width: 100%;
  height: 28px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
}

.progress-bar-bg {
  position: relative;
  width: 100%;
  height: 4px;
  background-color: var(--progress-bg);
  border-radius: 2px;
  overflow: visible;
  transition: height 0.15s ease;
}

.progress-bar-wrap:hover .progress-bar-bg,
.progress-bar-wrap.scrubbing .progress-bar-bg {
  height: 6px;
}

.progress-buffered {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background-color: rgba(255, 255, 255, 0.35);
  border-radius: 2px;
}

.progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background-color: var(--progress-fill);
  border-radius: 2px;
  transition: background-color 0.15s ease;
}

.progress-bar-wrap:hover .progress-fill,
.progress-bar-wrap.scrubbing .progress-fill {
  background-color: #ffffff;
}

.progress-handle {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 13px;
  height: 13px;
  background-color: #ffffff;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7), 0 0 4px rgba(255, 255, 255, 0.5);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  pointer-events: none;
}

.progress-bar-wrap:hover .progress-handle,
.progress-bar-wrap:active .progress-handle,
.progress-bar-wrap.scrubbing .progress-handle {
  transform: translate(-50%, -50%) scale(1.35);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.85), 0 0 10px rgba(255, 255, 255, 0.95);
}

.seek-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.time-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  font-feature-settings: "tnum";
}

.time-duration-btn {
  cursor: pointer;
  transition: color 0.15s ease;
}

.time-duration-btn:hover {
  color: var(--text-white);
}

/* Primary Playback Controls Directly on Top of Album Color Gradient */
/* (NO BOTTOM THING BELOW THIS) */
.controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
  flex-shrink: 0;
}

.control-btn {
  color: var(--text-white);
  padding: 10px;
}

.control-btn .svg-icon {
  width: 32px;
  height: 32px;
}

.control-sub-btn {
  color: rgba(255, 255, 255, 0.6);
  position: relative;
  padding: 10px;
  transition: color 0.15s ease;
}

.control-sub-btn:hover {
  color: var(--text-white);
}

.control-sub-btn.active {
  color: #ffffff;
}

.control-sub-btn.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background-color: #ffffff;
  border-radius: 50%;
}

.repeat-badge {
  display: none;
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 9px;
  font-weight: 800;
  color: #ffffff;
}

.control-sub-btn.repeat-one .repeat-badge {
  display: block;
}

/* Big Circular Play/Pause Button */
.btn-play-pause {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background-color: #ffffff;
  color: #000000;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
  transition: transform 0.15s cubic-bezier(0.2, 0.9, 0.3, 1), background-color 0.15s ease;
}

.btn-play-pause:hover {
  transform: scale(1.05);
  background-color: #f7f7f7;
}

.btn-play-pause:active {
  transform: scale(0.96);
}

.btn-play-pause .svg-icon-play,
.btn-play-pause .svg-icon-pause {
  width: 30px;
  height: 30px;
  fill: #000000;
}

/* ==========================================================================
   2. Library View (Library Tab)
   Fits Phone Screen, Vertical Stacked Songs (No Clipping Out), Docked Mini-Player
   ========================================================================== */
.library-view {
  position: absolute;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-black);
  padding: calc(var(--safe-top) + 16px) 16px calc(var(--mini-player-height) + var(--safe-bottom) + 18px) 16px;
  overflow: hidden;
  z-index: 10;
}

.library-view.no-song-active {
  padding-bottom: calc(var(--safe-bottom) + 20px);
}

.library-header {
  margin-bottom: 18px;
  max-width: 380px;
  width: calc(100% - 24px);
  margin-left: auto;
  margin-right: auto;
  flex-shrink: 0;
  text-align: center;
}

.library-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.library-main-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-white);
  letter-spacing: -0.5px;
}

.library-count-pill {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
}

.library-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 3px;
  text-align: center;
}

.library-scroll-container {
  flex: 1;
  overflow: hidden;
  max-width: 440px;
  width: 100%;
  margin: 0 auto;
  padding: 0 4px;
  display: flex;
  flex-direction: column;
  position: relative;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.library-scroll-container.is-scrolling {
  cursor: grabbing;
}

/* Vertical Stacked Songs Grid/List (Centered in Library, exact same size) */
.library-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  margin-top: auto;
  margin-bottom: auto;
  padding: 10px 0;
  will-change: transform;
}

.library-grid.has-overflow {
  margin-top: 0;
  margin-bottom: 0;
  justify-content: flex-start;
}

/* Individual Vertical Stack Row (Every song is strictly the EXACT SAME SIZE) */
.song-item-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  width: calc(100% - 24px);
  max-width: 380px;
  height: 76px;
  min-height: 76px;
  max-height: 76px;
  box-sizing: border-box;
  margin: 0 auto;
  border-radius: var(--radius-card);
  background-color: var(--bg-card);
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}

.song-item-row:hover {
  background-color: var(--bg-card-hover);
}

/* Playing track in library (Clean aesthetic, matching all rows, zero persistent selection box) */
.song-item-row.selected {
  background-color: var(--bg-card);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.song-item-row.selected:hover {
  background-color: var(--bg-card-hover);
}

.song-item-row.selected .row-title {
  color: #ffffff;
  font-weight: 600;
}

.row-cover-wrap {
  width: 56px;
  height: 56px;
  min-width: 56px;
  min-height: 56px;
  max-width: 56px;
  max-height: 56px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background-color: #242424;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

.row-cover,
.row-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.row-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
}

.row-title,
.row-title-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.row-subtitle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.4;
  overflow: visible;
  min-width: 0;
}

.row-badge-pill {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  flex-shrink: 0;
  min-width: max-content;
  white-space: nowrap;
  line-height: 1.4;
  overflow: visible;
}

.row-badge-sep {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  color: var(--text-secondary);
  opacity: 0.6;
  flex-shrink: 0;
  user-select: none;
  line-height: 1.4;
}

.row-artist,
.row-artist-text {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
  flex: 1;
  min-width: 0;
}

.row-status {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 18px;
  min-width: 18px;
  height: 28px;
  margin-left: auto;
}

/* Compact Equalizer Bars on Selected Row (Strictly bounded height, pure white, no overflow) */
.equalizer-icon {
  display: none;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  width: 12px;
  height: 11px;
  max-height: 11px;
  overflow: hidden;
  box-sizing: border-box;
}

.song-item-row.selected .equalizer-icon {
  display: flex;
}

.eq-bar {
  width: 2px;
  background-color: #ffffff;
  border-radius: 1px;
  transform-origin: bottom;
  box-sizing: border-box;
}

.eq-bar:nth-child(1) {
  height: 8px;
  animation: eq-bar-1 0.75s ease-in-out infinite alternate;
}

.eq-bar:nth-child(2) {
  height: 11px;
  animation: eq-bar-2 0.65s ease-in-out infinite alternate 0.15s;
}

.eq-bar:nth-child(3) {
  height: 6px;
  animation: eq-bar-3 0.85s ease-in-out infinite alternate 0.3s;
}

@keyframes eq-bar-1 {
  0% { transform: scaleY(0.3); }
  100% { transform: scaleY(1); }
}

@keyframes eq-bar-2 {
  0% { transform: scaleY(0.35); }
  100% { transform: scaleY(1); }
}

@keyframes eq-bar-3 {
  0% { transform: scaleY(0.4); }
  100% { transform: scaleY(1); }
}

/* 3-Line Reorder Drag Handle Button */
.row-drag-handle {
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 36px;
  color: rgba(255, 255, 255, 0.4);
  cursor: grab;
  touch-action: none;
  border-radius: 6px;
  transition: color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
  user-select: none;
  -webkit-user-select: none;
  flex-shrink: 0;
  margin-left: 6px;
  padding: 0;
}

.row-drag-handle:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.08);
}

.row-drag-handle:active,
.song-item-row.is-dragging .row-drag-handle {
  cursor: grabbing;
  color: #ffffff;
  transform: scale(1.1);
}

.drag-handle-svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  display: block;
  pointer-events: none;
}

/* Hold State before dragging: smoothly expands slightly to signify readiness */
.song-item-row.is-holding {
  z-index: 100 !important;
  opacity: 0.98;
  background-color: #262626 !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.88), 0 0 0 1px rgba(255, 255, 255, 0.4) !important;
  transform: scale(1.05) !important;
  transition: transform 0.22s cubic-bezier(0.2, 0.9, 0.3, 1), box-shadow 0.2s ease, background-color 0.2s ease !important;
  cursor: grabbing !important;
}

/* Active Dragged Row (Elevated, smooth tracking) */
.song-item-row.is-dragging {
  z-index: 100 !important;
  opacity: 0.98;
  background-color: #262626 !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.88), 0 0 0 1px rgba(255, 255, 255, 0.4) !important;
  transition: none !important;
  cursor: grabbing !important;
}

/* Smooth Shifting for other rows while dragging */
.song-item-row.is-shifted {
  transition: transform 0.28s cubic-bezier(0.2, 0.9, 0.3, 1) !important;
}

/* Drop Animation into slot (Resizes smoothly back down to normal) */
.song-item-row.drop-animating {
  transition: transform 0.26s cubic-bezier(0.2, 0.9, 0.3, 1), box-shadow 0.26s ease, background-color 0.26s ease !important;
  z-index: 99 !important;
}

/* ==========================================================================
   3. Mini Player Tab (Music Docked at Bottom of Library)
   ========================================================================== */
.mini-player {
  position: absolute;
  left: 0;
  right: 0;
  width: calc(100% - 24px);
  max-width: 380px;
  margin: 0 auto;
  bottom: calc(var(--safe-bottom) + 12px);
  height: var(--mini-player-height);
  background: linear-gradient(135deg, #7c1923 0%, #400b11 100%);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 15;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.75), 0 0 18px rgba(210, 54, 68, 0.28);
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1), background 0.4s ease, box-shadow 0.4s ease, filter 0.2s ease;
}

.mini-player:hover {
  filter: brightness(1.12);
}

.mini-player.is-hidden {
  display: none !important;
}

.mini-progress-track {
  width: 100%;
  height: 2px;
  background-color: rgba(255, 255, 255, 0.15);
  position: relative;
}

.mini-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background-color: #ffffff;
}

.mini-player-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
}

.mini-left-content {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  flex: 1;
}

.mini-cover {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.mini-text-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mini-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-artist {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.mini-ctrl-btn {
  color: var(--text-white);
  padding: 8px;
}

.mini-play-btn .svg-icon {
  width: 24px;
  height: 24px;
}

/* ==========================================================================
   4. Horizontal Carousel Tabs (Song Tab <-> Synced Lyrics Tab)
   ========================================================================== */

/* Carousel Viewport & Separate Tab Pages (Never on screen together) */
.player-carousel-viewport {
  position: relative;
  z-index: 2;
  flex: 1;
  width: 100%;
  min-height: 0;
  overflow: hidden;
}

.player-carousel-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.player-tab-page {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1), opacity 0.28s ease, visibility 0.35s;
  will-change: transform, opacity;
}

/* Tab 1: Song Tab (Default Active, 100% full screen) */
.tab-page-song {
  align-items: center;
  justify-content: center;
  transform: translateX(0%);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 2;
}

.tab-page-song.is-exit-left {
  transform: translateX(-100%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 1;
}

/* Tab 2: Lyrics Tab (Offscreen to the right by default, 100% full screen) */
.tab-page-lyrics {
  transform: translateX(100%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 1;
}

.tab-page-lyrics.is-active-tab {
  transform: translateX(0%);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 2;
}

.lyrics-tab-inner {
  width: 100%;
  max-width: 440px;
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: 0 16px 60px 16px;
  min-height: 0;
  overflow: hidden;
}

/* Lyrics Tab Top Bar: Metadata & Play/Pause Button Only */
.lyrics-tab-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 4px 12px 4px;
  flex-shrink: 0;
}

.lyrics-tab-meta {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-right: 14px;
}

.lyrics-tab-title {
  font-size: 19px;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.3px;
}

.lyrics-tab-artist {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lyrics-play-pause-btn {
  width: 46px;
  height: 46px;
  min-width: 46px;
  min-height: 46px;
  border-radius: 50%;
  background-color: #ffffff;
  color: #000000;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.55);
}

.lyrics-play-pause-btn:hover {
  transform: scale(1.05);
  background-color: #f2f2f2;
}

.lyrics-play-pause-btn .svg-icon-play,
.lyrics-play-pause-btn .svg-icon-pause {
  width: 22px;
  height: 22px;
}

/* Lyrics Scroll Box on Tab (Starts right at top, drag-scroll with resistance & elastic rollback) */
.lyrics-scroll-box {
  flex: 1;
  overflow: hidden;
  position: relative;
  width: 100%;
  padding: 8px 12px 140px 12px;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  scrollbar-width: none;
}

.lyrics-scroll-box.is-scrolling {
  cursor: grabbing;
}

.lyrics-scroll-box::-webkit-scrollbar {
  display: none;
}

.lyrics-lines-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  transform: translateY(0px);
  will-change: transform;
}

/* Inactive Lyric Lines: Bold Solid Black */
.lyric-line {
  font-size: 26px;
  line-height: 1.38;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: #000000;
  cursor: pointer;
  transition: color 0.22s ease, transform 0.22s ease, opacity 0.22s ease, text-shadow 0.22s ease;
  transform-origin: left center;
  user-select: none;
  -webkit-user-select: none;
}

.lyric-line:hover {
  opacity: 0.9;
}

/* Active Lyric Line: Pure Crisp White with Smooth Scaling & Glow */
.lyric-line.active {
  color: #ffffff !important;
  font-weight: 800;
  transform: scale(1.02);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.85);
}

/* ==========================================================================
   Bottom Tabs Indicator (Dot over Song, Dot over Lyrics)
   Only applies to songs with lyrics
   ========================================================================== */
.player-bottom-tabs {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: fit-content;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 6px 18px 7px 18px;
  background: rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.player-bottom-tabs.is-hidden {
  display: none !important;
}

.player-tab-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0 4px;
  outline: none !important;
}

.tab-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  transition: background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.tab-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: rgba(255, 255, 255, 0.45);
  transition: color 0.25s ease;
}

/* Active Tab: Bright White Dot with Glow & Crisp White Label */
.player-tab-pill.active .tab-dot {
  background: #ffffff;
  transform: scale(1.3);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
}

.player-tab-pill.active .tab-label {
  color: #ffffff;
}

/* Lyrics Tab Timeline Scrubber */
.lyrics-timeline {
  width: 100%;
  margin-top: 4px;
  margin-bottom: 10px;
  flex-shrink: 0;
}

/* Songs without lyrics: completely hide tabs and lock to normal song page */
.no-lyrics-mode #tab-page-lyrics {
  display: none !important;
}

.no-lyrics-mode .player-carousel-track {
  width: 100% !important;
  transform: none !important;
}

.no-lyrics-mode .tab-page-song {
  width: 100% !important;
}

.no-lyrics-mode .player-bottom-tabs {
  display: none !important;
}

.no-lyrics-mode .player-body-inner {
  padding-bottom: 16px;
}



