:root {
  --bg-page: #f8fafc;
  --bg-panel: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-hover: #f8fafc;
  --bg-active: #fff1f2;
  --border-light: rgba(15, 23, 42, 0.07);
  --border-strong: rgba(15, 23, 42, 0.13);
  --text-main: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --brand-primary: #e11d48;
  --brand-primary-soft: #ffe4e6;
  --brand-indigo: #4f46e5;
  --brand-indigo-soft: #e0e7ff;
  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.04), 0 8px 24px -6px rgba(15, 23, 42, 0.05);
  --shadow-float: 0 12px 36px -8px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(15, 23, 42, 0.04);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --player-h: 88px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  background: var(--bg-page);
  color: var(--text-main);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

button, input, select, textarea {
  font-family: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* ==================== App Shell ==================== */
.app-shell {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr) 336px;
  height: calc(100vh - var(--player-h));
  background:
    radial-gradient(circle at 12% 0%, rgba(251, 113, 133, 0.07), transparent 36%),
    radial-gradient(circle at 88% 8%, rgba(99, 102, 241, 0.07), transparent 38%),
    var(--bg-page);
}

/* ==================== Left Sidebar ==================== */
.sidebar {
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  padding: 18px 14px 14px;
  overflow-y: auto;
  z-index: 20;
}

.brand-box {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 8px 14px;
  border-bottom: 1px solid var(--border-light);
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  box-shadow: 0 6px 16px rgba(225, 29, 72, 0.22);
  flex-shrink: 0;
}

.brand-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 1px;
}

.eco-links {
  display: flex;
  gap: 6px;
  padding: 10px 6px 6px;
  flex-wrap: wrap;
}

.eco-chip {
  font-size: 11.5px;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  padding: 4px 9px;
  border-radius: 999px;
  text-decoration: none;
  transition: all 0.16s ease;
}

.eco-chip:hover {
  background: var(--brand-indigo-soft);
  color: var(--brand-indigo);
}

.nav-group {
  margin-top: 14px;
}

.nav-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.nav-add-btn {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--brand-primary);
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--brand-primary-soft);
  transition: opacity 0.15s;
}

.nav-add-btn:hover {
  opacity: 0.85;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6.5px 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.15s ease;
  text-align: left;
  margin-bottom: 1px;
}

.nav-item:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

.nav-item.active {
  background: linear-gradient(90deg, #fff1f2 0%, #ffe4e6 100%);
  color: var(--brand-primary);
  font-weight: 600;
}

.nav-item-left {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.nav-item-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-badge {
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(148, 163, 184, 0.14);
  padding: 1px 7px;
  border-radius: 999px;
  flex-shrink: 0;
}

.nav-item.active .nav-badge {
  background: rgba(225, 29, 72, 0.14);
  color: var(--brand-primary);
}

.cos-card {
  margin-top: auto;
  padding: 12px;
  border-radius: 13px;
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--border-light);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}

.cos-card-top {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.16);
}

.cos-card-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin: 5px 0 9px;
  line-height: 1.45;
}

.cos-sync-btn {
  width: 100%;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.16s ease;
}

.cos-sync-btn:hover {
  background: #ffffff;
  color: var(--brand-indigo);
  border-color: rgba(79, 70, 229, 0.28);
}

/* ==================== Main Library Workspace ==================== */
.main-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.topbar {
  height: 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  max-width: 480px;
}

.mobile-menu-btn {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--bg-subtle);
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.search-box {
  position: relative;
  flex: 1;
}

.search-box input {
  width: 100%;
  height: 38px;
  padding: 0 34px 0 36px;
  border-radius: 999px;
  border: 1px solid var(--border-light);
  background: #ffffff;
  font-size: 13.5px;
  outline: none;
  transition: all 0.16s ease;
}

.search-box input:focus {
  border-color: rgba(225, 29, 72, 0.45);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.08);
}

.search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
  pointer-events: none;
}

.search-kbd {
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 1px 6px;
  border-radius: 5px;
  border: 1px solid var(--border-light);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.view-switch {
  display: inline-flex;
  background: var(--bg-subtle);
  padding: 3px;
  border-radius: 9px;
}

.view-btn {
  padding: 5px 10px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.view-btn.active {
  background: #ffffff;
  color: var(--text-main);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.sort-select {
  height: 34px;
  padding: 0 10px;
  border-radius: 9px;
  border: 1px solid var(--border-light);
  background: #ffffff;
  font-size: 12.5px;
  color: var(--text-secondary);
  outline: none;
}

.primary-upload-btn {
  height: 37px;
  padding: 0 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #e11d48 0%, #db2777 52%, #4f46e5 100%);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 6px 18px -4px rgba(225, 29, 72, 0.42);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.primary-upload-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -4px rgba(225, 29, 72, 0.5);
}

.content-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 32px;
}

/* ==================== Hero Banner ==================== */
.hero-card {
  background: linear-gradient(125deg, #ffffff 0%, #fff1f2 52%, #eef2ff 100%);
  border: 1px solid rgba(225, 29, 72, 0.11);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: var(--shadow-card);
  margin-bottom: 18px;
}

.hero-left {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
  flex: 1;
}

.hero-cover-wrap {
  position: relative;
  width: 84px;
  height: 84px;
  flex-shrink: 0;
  cursor: pointer;
}

.hero-cover {
  width: 84px;
  height: 84px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
  background: #e2e8f0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--brand-primary);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(225, 29, 72, 0.18);
  padding: 2px 9px;
  border-radius: 999px;
  margin-bottom: 6px;
}

.hero-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.hero-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.btn-soft {
  padding: 8px 15px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--border-strong);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-soft:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

/* ==================== Category Pills & Section Header ==================== */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.cat-pills {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.cat-pill {
  padding: 5.5px 13px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  background: #ffffff;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  transition: all 0.15s ease;
}

.cat-pill:hover {
  border-color: rgba(225, 29, 72, 0.3);
  color: var(--text-main);
}

.cat-pill.active {
  background: var(--text-main);
  color: #ffffff;
  border-color: var(--text-main);
}

.section-meta {
  font-size: 12.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ==================== Track Table ==================== */
.track-table-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.track-row-head,
.track-row {
  display: grid;
  grid-template-columns: 36px minmax(160px, 2.2fr) minmax(80px, 1fr) 76px 54px 124px;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
}

.track-row-head {
  background: #f8fafc;
  border-bottom: 1px solid var(--border-light);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.track-row {
  border-bottom: 1px solid rgba(15, 23, 42, 0.04);
  transition: background 0.14s ease;
  cursor: pointer;
}

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

.track-row:hover {
  background: #f8fafc;
}

.track-row.playing {
  background: linear-gradient(90deg, #fff1f2 0%, #ffffff 75%);
}

.track-row.dragging {
  opacity: 0.45;
  background: var(--brand-indigo-soft);
}

.col-idx {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-variant-numeric: tabular-nums;
}

.row-play-trigger {
  display: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-primary);
  color: #ffffff;
  font-size: 11px;
  align-items: center;
  justify-content: center;
}

.track-row:hover .col-idx-num {
  display: none;
}

.track-row:hover .row-play-trigger {
  display: inline-flex;
}

/* Equalizer animation when playing */
.eq-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 14px;
}

.eq-bars span {
  width: 3px;
  background: var(--brand-primary);
  border-radius: 2px;
  animation: eqBounce 0.85s ease-in-out infinite;
}

.eq-bars span:nth-child(2) { animation-delay: 0.2s; }
.eq-bars span:nth-child(3) { animation-delay: 0.4s; }
.eq-bars.paused span { animation-play-state: paused; height: 5px !important; }

@keyframes eqBounce {
  0%, 100% { height: 4px; }
  50% { height: 14px; }
}

.song-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.song-cover {
  width: 44px;
  height: 44px;
  border-radius: 9px;
  object-fit: cover;
  background: var(--bg-subtle);
  border: 1px solid rgba(15, 23, 42, 0.06);
  flex-shrink: 0;
}

.song-meta {
  min-width: 0;
}

.song-title-line {
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.track-row.playing .song-title {
  color: var(--brand-primary);
}

.fmt-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  background: #eef2ff;
  color: var(--brand-indigo);
  text-transform: uppercase;
  flex-shrink: 0;
}

.lrc-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 4px;
  background: #ecfdf5;
  color: #059669;
  flex-shrink: 0;
}

.song-tags {
  display: flex;
  gap: 4px;
  margin-top: 3px;
  flex-wrap: wrap;
}

.mini-tag {
  font-size: 10.5px;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 0.5px 6px;
  border-radius: 4px;
}

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

.col-dur {
  font-size: 12.5px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.col-ops {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.icon-op-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
  transition: all 0.14s ease;
}

.icon-op-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

.icon-op-btn.fav-active {
  color: var(--brand-primary);
}

/* ==================== Grid View ==================== */
.track-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
  gap: 16px;
}

.grid-card {
  background: #ffffff;
  border-radius: 15px;
  border: 1px solid var(--border-light);
  padding: 12px;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.grid-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-float);
}

.grid-cover-box {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 11px;
  overflow: hidden;
  background: var(--bg-subtle);
  margin-bottom: 10px;
}

.grid-cover-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.grid-play-fab {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--brand-primary);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  opacity: 0;
  transform: translateY(4px);
  transition: all 0.18s ease;
}

.grid-card:hover .grid-play-fab,
.grid-card.playing .grid-play-fab {
  opacity: 1;
  transform: translateY(0);
}

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

.grid-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==================== Right Live Vinyl & Lyric Dock ==================== */
.lyric-dock {
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(20px);
  border-left: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  padding: 18px 18px 14px;
  overflow: hidden;
}

.dock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.dock-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.dock-expand-btn {
  font-size: 12px;
  color: var(--brand-indigo);
  background: var(--brand-indigo-soft);
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
}

.dock-vinyl-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0 12px;
  border-bottom: 1px solid var(--border-light);
}

.vinyl-disc {
  width: 156px;
  height: 156px;
  border-radius: 50%;
  padding: 16px;
  background:
    radial-gradient(circle, #ffffff 0 18%, transparent 19%),
    repeating-radial-gradient(circle, #e2e8f0 0 2px, #cbd5e1 3px 4px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12), inset 0 0 0 2px rgba(255, 255, 255, 0.8);
  animation: spinDisc 22s linear infinite;
  animation-play-state: paused;
  cursor: pointer;
}

.vinyl-disc.spinning {
  animation-play-state: running;
}

.vinyl-disc img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #ffffff;
}

@keyframes spinDisc {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.dock-song-name {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 11px;
  text-align: center;
}

.dock-song-artist {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 2px;
  text-align: center;
}

.spectrum-canvas {
  width: 100%;
  height: 34px;
  margin-top: 8px;
}

.lyrics-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 18px 6px;
  text-align: center;
  scroll-behavior: smooth;
  mask-image: linear-gradient(to bottom, transparent 0%, #000 12%, #000 88%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 12%, #000 88%, transparent 100%);
}

.lyric-line {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--text-muted);
  padding: 6px 8px;
  border-radius: 8px;
  transition: all 0.22s ease;
  cursor: pointer;
}

.lyric-line:hover {
  color: var(--text-secondary);
  background: rgba(15, 23, 42, 0.03);
}

.lyric-line.active {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--brand-primary);
  transform: scale(1.03);
  background: rgba(225, 29, 72, 0.05);
}

.lyric-empty {
  padding-top: 48px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.8;
}

/* ==================== Bottom Glass Player Bar ==================== */
.player-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--player-h);
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(24px);
  border-top: 1px solid var(--border-light);
  box-shadow: 0 -6px 24px rgba(15, 23, 42, 0.05);
  z-index: 60;
  display: flex;
  flex-direction: column;
}

.progress-rail {
  position: relative;
  height: 5px;
  width: 100%;
  background: #e2e8f0;
  cursor: pointer;
  transition: height 0.12s ease;
}

.progress-rail:hover {
  height: 8px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #e11d48 0%, #6366f1 100%);
  position: relative;
}

.progress-thumb {
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  border: 2.5px solid var(--brand-primary);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
  opacity: 0;
  transition: opacity 0.12s;
}

.progress-rail:hover .progress-thumb {
  opacity: 1;
}

.player-inner {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(200px, 1fr) auto minmax(200px, 1fr);
  align-items: center;
  padding: 0 22px;
  gap: 16px;
}

.now-playing {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.now-cover {
  width: 50px;
  height: 50px;
  border-radius: 11px;
  object-fit: cover;
  cursor: pointer;
  border: 1px solid var(--border-light);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
  flex-shrink: 0;
}

.now-info {
  min-width: 0;
}

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

.now-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.time-readout {
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  font-size: 11.5px;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ctrl-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 16px;
  transition: all 0.15s ease;
}

.ctrl-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

.ctrl-play-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e11d48 0%, #4f46e5 100%);
  color: #ffffff;
  font-size: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px -4px rgba(225, 29, 72, 0.45);
  transition: transform 0.14s ease;
}

.ctrl-play-btn:hover {
  transform: scale(1.05);
}

.player-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.pill-ctrl {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  padding: 5px 10px;
  border-radius: 999px;
}

.pill-ctrl:hover {
  color: var(--brand-primary);
}

.vol-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vol-slider {
  width: 78px;
  accent-color: var(--brand-primary);
  cursor: pointer;
}

/* ==================== Fullscreen Light Lyric Stage ==================== */
.lyric-stage {
  position: fixed;
  inset: 0 0 var(--player-h) 0;
  background:
    radial-gradient(circle at 22% 28%, rgba(251, 113, 133, 0.14), transparent 45%),
    radial-gradient(circle at 78% 70%, rgba(99, 102, 241, 0.13), transparent 48%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  z-index: 55;
  display: none;
  flex-direction: column;
  padding: 24px 42px;
}

.lyric-stage.open {
  display: flex;
}

.stage-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stage-body {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(320px, 1fr);
  gap: 48px;
  align-items: center;
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  min-height: 0;
}

.stage-left {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stage-cover-card {
  width: 290px;
  height: 290px;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 24px 56px -12px rgba(15, 23, 42, 0.18);
  border: 4px solid #ffffff;
  background: #ffffff;
}

.stage-cover-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stage-spectrum {
  width: 290px;
  height: 52px;
  margin-top: 18px;
}

.stage-lyrics-box {
  height: 100%;
  max-height: 520px;
  overflow-y: auto;
  padding: 28px 16px;
  scroll-behavior: smooth;
  mask-image: linear-gradient(to bottom, transparent 0%, #000 14%, #000 86%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 14%, #000 86%, transparent 100%);
}

.stage-lyrics-box .lyric-line {
  font-size: 16px;
  padding: 9px 14px;
  text-align: left;
}

.stage-lyrics-box .lyric-line.active {
  font-size: 22px;
  color: var(--brand-primary);
  background: rgba(225, 29, 72, 0.06);
}

/* ==================== Modals & Queue Drawer ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.32);
  backdrop-filter: blur(6px);
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-card {
  width: 100%;
  max-width: 640px;
  max-height: 88vh;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: var(--shadow-float);
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 16.5px;
  font-weight: 700;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-subtle);
  font-size: 16px;
}

.modal-body {
  padding: 18px 22px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border-light);
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.mode-tabs {
  display: flex;
  gap: 8px;
  background: var(--bg-subtle);
  padding: 4px;
  border-radius: 11px;
}

.mode-tab {
  flex: 1;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.mode-tab.active {
  background: #ffffff;
  color: var(--brand-primary);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.dropzone {
  border: 2px dashed rgba(79, 70, 229, 0.3);
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
  border-radius: 14px;
  padding: 22px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.16s ease;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--brand-primary);
  background: #fff1f2;
}

.dropzone-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  margin-top: 6px;
}

.dropzone-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-field input,
.form-field select,
.form-field textarea {
  padding: 8.5px 11px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: #ffffff;
  font-size: 13px;
  outline: none;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.08);
}

.cover-picker-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.cover-preview-thumb {
  width: 68px;
  height: 68px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  flex-shrink: 0;
}

.upload-progress-box {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: 11px;
  padding: 10px 13px;
  display: none;
}

.upload-progress-box.show {
  display: block;
}

.upload-progress-bar {
  height: 7px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 6px;
}

.upload-progress-inner {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #e11d48 0%, #4f46e5 100%);
  transition: width 0.15s ease;
}

.batch-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 210px;
  overflow-y: auto;
}

.batch-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--border-light);
  font-size: 12.5px;
}

.batch-item img {
  width: 36px;
  height: 36px;
  border-radius: 7px;
  object-fit: cover;
}

/* Queue Drawer */
.queue-drawer {
  position: fixed;
  right: 18px;
  bottom: calc(var(--player-h) + 12px);
  width: 360px;
  max-height: 68vh;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-float);
  z-index: 70;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.queue-drawer.open {
  display: flex;
}

.queue-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.queue-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 13px;
}

.queue-item:hover {
  background: var(--bg-subtle);
}

.queue-item.active {
  background: var(--bg-active);
  color: var(--brand-primary);
  font-weight: 600;
}

/* Toast */
.toast-stack {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--brand-primary);
  box-shadow: var(--shadow-float);
  padding: 10px 15px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
}

/* ==================== Responsive ==================== */
@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 236px minmax(0, 1fr);
  }
  .lyric-dock {
    display: none;
  }
}

@media (max-width: 820px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: var(--player-h);
    width: 260px;
    transform: translateX(-102%);
    transition: transform 0.22s ease;
    box-shadow: var(--shadow-float);
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
  .hero-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .track-row-head {
    display: none;
  }
  .track-row {
    grid-template-columns: 32px minmax(0, 1fr) auto;
    padding: 10px 12px;
  }
  .col-album, .col-cat, .col-dur {
    display: none;
  }
  .player-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0 14px;
  }
  .player-right {
    display: none;
  }
  .stage-body {
    grid-template-columns: 1fr;
    gap: 18px;
    overflow-y: auto;
  }
  .stage-cover-card {
    width: 180px;
    height: 180px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .queue-drawer {
    left: 12px;
    right: 12px;
    width: auto;
  }
}
