/* ============================================================
   Cloud Music Design System
   ============================================================ */

:root {
  --bg-primary: #111116;
  --bg-secondary: #171720;
  --bg-tertiary: #1f1f2e;
  --bg-hover: #29293d;
  --bg-active: #32324b;

  --accent-color: #6366f1;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  --accent-hover: #4f46e5;
  --accent-light: rgba(99, 102, 241, 0.15);

  --text-main: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-color: rgba(255, 255, 255, 0.08);

  --sidebar-width: 250px;
  --player-height: 86px;
  --topbar-height: 68px;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);

  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-main);
  height: 100vh;
  overflow: hidden;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* Layout */
.app-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  grid-template-rows: 1fr var(--player-height);
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  position: relative;
}

/* ============================================================
   Sidebar
   ============================================================ */
.sidebar {
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--player-height));
  padding: 20px 14px;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 10px 20px;
}

.logo-icon {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 24px;
}

.logo-icon span {
  width: 4px;
  background: var(--accent-gradient);
  border-radius: 2px;
  animation: logoWave 1.4s ease-in-out infinite alternate;
}
.logo-icon span:nth-child(1) { height: 12px; animation-delay: 0.1s; }
.logo-icon span:nth-child(2) { height: 24px; animation-delay: 0.3s; }
.logo-icon span:nth-child(3) { height: 16px; animation-delay: 0.2s; }
.logo-icon span:nth-child(4) { height: 20px; animation-delay: 0.4s; }

@keyframes logoWave {
  0% { transform: scaleY(0.4); }
  100% { transform: scaleY(1); }
}

.brand-text h2 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tag {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 10px 10px 6px;
}

.nav-menu {
  margin-bottom: 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.nav-item .icon {
  width: 18px;
  height: 18px;
  opacity: 0.8;
}

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

.nav-item.active {
  color: #fff;
  background: var(--accent-gradient);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.nav-item.active .icon {
  opacity: 1;
}

.playlists-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-right: 4px;
}

.playlist-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 4px;
}

.playlist-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  transition: all 0.2s;
  cursor: pointer;
}

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

.playlist-nav-item.active {
  background-color: var(--bg-active);
  color: #fff;
  font-weight: 600;
  border-left: 3px solid var(--accent-color);
}

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

.pl-thumb-mini {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}

.pl-nav-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pl-nav-badge {
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 10px;
  color: var(--text-muted);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}

.portal-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  transition: all 0.2s;
}

.portal-link svg {
  width: 16px;
  height: 16px;
}

.portal-link:hover {
  color: var(--text-main);
  background-color: var(--bg-hover);
}

/* ============================================================
   Main Content Area
   ============================================================ */
.main-content {
  background-color: var(--bg-primary);
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--player-height));
  overflow: hidden;
  position: relative;
}

.topbar {
  height: var(--topbar-height);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(17, 17, 22, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 5;
  flex-shrink: 0;
}

.search-box {
  position: relative;
  width: 320px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.search-box input {
  width: 100%;
  height: 38px;
  padding: 0 34px 0 36px;
  background-color: var(--bg-tertiary);
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  color: var(--text-main);
  font-size: 0.88rem;
  outline: none;
  transition: all 0.2s;
}

.search-box input:focus {
  border-color: var(--accent-color);
  background-color: var(--bg-hover);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.clear-search-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
}

.top-actions {
  display: flex;
  gap: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  outline: none;
}

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

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.45);
}

.btn-secondary {
  background-color: var(--bg-tertiary);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--bg-hover);
  border-color: rgba(255, 255, 255, 0.16);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.btn-ghost:hover {
  background-color: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}

.btn-play-all {
  background: var(--accent-gradient);
  color: #fff;
  padding: 0 24px;
  height: 42px;
  border-radius: var(--radius-full);
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.4);
}

.btn-play-all svg {
  width: 18px;
  height: 18px;
}

.btn-play-all:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.55);
}

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

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

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

/* Content View */
.content-scrollable {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
}

/* Playlist Banner */
.playlist-banner {
  display: flex;
  gap: 28px;
  margin-bottom: 28px;
  align-items: flex-end;
}

.banner-cover {
  width: 180px;
  height: 180px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: #1e1e2d;
  flex-shrink: 0;
}

.banner-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.banner-cover:hover img {
  transform: scale(1.04);
}

.banner-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.banner-type {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-color);
  letter-spacing: 1.5px;
}

.banner-title {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
  line-height: 1.2;
}

.banner-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 680px;
}

.banner-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.meta-sep {
  opacity: 0.4;
}

.banner-controls {
  display: flex;
  gap: 14px;
  margin-top: 12px;
  align-items: center;
}

/* Song Table */
.song-table-container {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.song-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.song-table th {
  padding: 12px 14px;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
}

.song-table td {
  padding: 12px 14px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.song-table tbody tr {
  transition: background-color 0.15s ease;
  border-radius: var(--radius-md);
  cursor: pointer;
}

.song-table tbody tr:hover {
  background-color: var(--bg-hover);
}

.song-table tbody tr.active-playing {
  background-color: rgba(99, 102, 241, 0.12);
}

.song-table tbody tr.active-playing td {
  color: #fff;
}

.col-num {
  width: 50px;
  text-align: center;
}

.col-title {
  width: 38%;
}

.col-artist {
  width: 22%;
}

.col-album {
  width: 20%;
}

.col-duration {
  width: 70px;
  text-align: right;
}

.col-actions {
  width: 100px;
  text-align: right;
}

/* Song cell formatting */
.title-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.title-thumb {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.title-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

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

.active-playing .title-text {
  color: #a78bfa;
}

.title-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Track Playing Equalizer Wave */
.eq-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.eq-bars span {
  width: 3px;
  background-color: #a78bfa;
  border-radius: 1px;
  animation: eqJump 0.8s ease-in-out infinite alternate;
}

.eq-bars span:nth-child(1) { height: 6px; animation-delay: 0.1s; }
.eq-bars span:nth-child(2) { height: 14px; animation-delay: 0.3s; }
.eq-bars span:nth-child(3) { height: 10px; animation-delay: 0.2s; }

@keyframes eqJump {
  0% { transform: scaleY(0.3); }
  100% { transform: scaleY(1); }
}

/* Action buttons in row */
.row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  opacity: 0.6;
  transition: opacity 0.2s;
}

tr:hover .row-actions {
  opacity: 1;
}

.row-action-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.row-action-btn svg {
  width: 15px;
  height: 15px;
}

.row-action-btn:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.12);
}

.row-action-btn.btn-delete:hover {
  color: #ef4444;
  background-color: rgba(239, 68, 68, 0.15);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-icon {
  font-size: 3.5rem;
  margin-bottom: 12px;
  opacity: 0.6;
}

.empty-state h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

/* ============================================================
   Bottom Persistent Player Bar
   ============================================================ */
.player-bar {
  grid-column: 1 / -1;
  background-color: #14141d;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 20;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

/* Left: Song Info */
.player-song-info {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 280px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.player-song-info:hover .track-thumb-wrapper .thumb-hover-overlay {
  opacity: 1;
}

.track-thumb-wrapper {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.track-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.thumb-hover-overlay svg {
  width: 20px;
  height: 20px;
  color: #fff;
}

.track-details {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.track-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.track-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-badge-vip {
  font-size: 0.62rem;
  background: var(--accent-gradient);
  color: #fff;
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 700;
}

.track-artist {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Center: Controls & Progress */
.player-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  max-width: 640px;
}

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

.ctrl-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.ctrl-btn svg {
  width: 20px;
  height: 20px;
}

.ctrl-btn:hover {
  color: #fff;
  transform: scale(1.1);
}

.btn-play-main {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  color: #111;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.btn-play-main svg {
  width: 20px;
  height: 20px;
}

.btn-play-main:hover {
  transform: scale(1.08);
  background: #f1f5f9;
  box-shadow: 0 6px 16px rgba(255, 255, 255, 0.3);
  color: #000;
}

.ctrl-text-btn {
  font-size: 0.95rem;
  font-weight: 700;
  padding: 2px 6px;
  border: 1.5px solid currentColor;
  border-radius: 4px;
}

/* Progress Bar */
.progress-bar-container {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.time-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  min-width: 36px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.progress-track {
  flex: 1;
  height: 5px;
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  position: relative;
  cursor: pointer;
  transition: height 0.2s;
}

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

.progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
  pointer-events: none;
}

.progress-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background-color: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.15s, transform 0.15s;
  pointer-events: none;
}

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

.mini-lyrics-row {
  cursor: pointer;
  height: 18px;
  display: flex;
  align-items: center;
}

.mini-lyric-text {
  font-size: 0.75rem;
  color: var(--text-secondary);
  letter-spacing: 0.4px;
  transition: color 0.2s;
}

.mini-lyrics-row:hover .mini-lyric-text {
  color: #a78bfa;
}

/* Right: Volume & Queue */
.player-right {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 240px;
  justify-content: flex-end;
}

.volume-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.volume-slider {
  -webkit-appearance: none;
  width: 80px;
  height: 4px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.2);
  outline: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

#btn-queue {
  position: relative;
}

.queue-badge {
  position: absolute;
  top: -4px;
  right: -8px;
  background: var(--accent-color);
  color: #fff;
  font-size: 0.65rem;
  padding: 1px 5px;
  border-radius: 8px;
  font-weight: 700;
}

/* ============================================================
   Immersive Lyrics & Vinyl View
   ============================================================ */
.immersive-lyrics-view {
  position: fixed;
  inset: 0;
  bottom: var(--player-height);
  z-index: 50;
  background-color: #0b0b12;
  display: flex;
  flex-direction: column;
  transform: translateY(105%);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.immersive-lyrics-view.active {
  transform: translateY(0);
}

.immersive-bg {
  position: absolute;
  inset: -40px;
  background-size: cover;
  background-position: center;
  filter: blur(60px) brightness(0.25) saturate(1.8);
  transform: scale(1.1);
  z-index: 1;
}

.immersive-glass {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(20, 20, 32, 0.4) 0%, rgba(10, 10, 16, 0.8) 100%);
  z-index: 2;
}

.immersive-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 36px 12px;
}

.btn-close-lyrics {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  backdrop-filter: blur(8px);
}

.btn-close-lyrics svg {
  width: 24px;
  height: 24px;
}

.btn-close-lyrics:hover {
  background: rgba(255, 255, 255, 0.18);
}

.immersive-track-header {
  text-align: center;
}

.immersive-track-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
}

.immersive-track-header p {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 4px;
}

.immersive-header-placeholder {
  width: 44px;
}

.immersive-body {
  position: relative;
  z-index: 10;
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: calc(100% - 80px);
  padding: 0 40px 20px;
  gap: 30px;
}

/* Vinyl Turntable */
.vinyl-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.turntable-container {
  position: relative;
  width: 380px;
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tone-arm-base {
  position: absolute;
  top: -24px;
  right: 10px;
  width: 60px;
  height: 60px;
  z-index: 12;
}

.tone-arm {
  position: absolute;
  top: 15px;
  right: 25px;
  width: 80px;
  height: 190px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 240'%3E%3Ccircle cx='70' cy='20' r='18' fill='%2364748b' stroke='%23334155' stroke-width='4'/%3E%3Ccircle cx='70' cy='20' r='8' fill='%23f1f5f9'/%3E%3Cpath d='M68 25 L35 150 L20 200' fill='none' stroke='%23cbd5e1' stroke-width='6' stroke-linecap='round'/%3E%3Crect x='10' y='195' width='22' height='32' rx='4' fill='%23475569' stroke='%23e2e8f0' stroke-width='2'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
  transform-origin: 52px 16px;
  transform: rotate(-30deg);
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.playing .tone-arm {
  transform: rotate(0deg);
}

.vinyl-disc-wrapper {
  width: 330px;
  height: 330px;
  border-radius: 50%;
  padding: 8px;
  background: radial-gradient(circle, #252533 0%, #15151c 100%);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 0 10px rgba(255, 255, 255, 0.03);
}

.vinyl-disc {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: repeating-radial-gradient(
    circle at center,
    #111 0,
    #111 2px,
    #1a1a1a 3px,
    #0c0c0c 4px
  );
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.9);
}

.playing .vinyl-disc {
  animation: rotateDisc 20s linear infinite;
}

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

.vinyl-center-label {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
  border: 8px solid #000;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.8);
}

.vinyl-center-label img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vinyl-hints {
  margin-top: 24px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.4);
}

/* Lyrics Column */
.lyrics-column {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
}

.lyrics-container {
  height: 100%;
  overflow-y: auto;
  scroll-behavior: smooth;
  padding: 160px 0;
}

.lyrics-wrapper {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.lyric-line {
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  padding: 6px 12px;
  border-radius: 8px;
}

.lyric-line:hover {
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.05);
}

.lyric-line.active {
  font-size: 1.45rem;
  font-weight: 700;
  color: #fff;
  transform: scale(1.02);
  text-shadow: 0 0 20px rgba(167, 139, 250, 0.6);
}

.lyric-line.placeholder {
  text-align: center;
  margin-top: 100px;
  color: var(--text-muted);
}

/* ============================================================
   Play Queue Drawer
   ============================================================ */
.queue-drawer {
  position: fixed;
  right: 0;
  bottom: var(--player-height);
  width: 340px;
  height: 480px;
  background: rgba(24, 24, 34, 0.95);
  backdrop-filter: blur(16px);
  border-left: 1px solid var(--border-color);
  border-top: 1px solid var(--border-color);
  border-top-left-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 40;
  display: flex;
  flex-direction: column;
  transform: translateX(110%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.queue-drawer.open {
  transform: translateX(0);
}

.queue-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.queue-header h3 {
  font-size: 0.95rem;
  font-weight: 600;
}

.queue-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.queue-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s;
}

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

.queue-item.active {
  background: rgba(99, 102, 241, 0.18);
  color: #a78bfa;
}

/* ============================================================
   Modals
   ============================================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 460px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalEnter 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-wide {
  max-width: 620px;
}

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

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

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.form-group {
  margin-bottom: 16px;
  padding: 0 24px;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.88rem;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent-color);
}

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

.form-grid .form-group {
  padding: 0 16px 0 24px;
}
.form-grid .form-group:nth-child(even) {
  padding: 0 24px 0 16px;
}

.upload-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 0 24px;
  margin-bottom: 16px;
}

.file-drop-box {
  border: 1.5px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  background: var(--bg-tertiary);
  position: relative;
  cursor: pointer;
}

.file-drop-box input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.file-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}

.file-hint {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.lrc-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.btn-link-upload {
  font-size: 0.78rem;
  color: var(--accent-color);
  cursor: pointer;
}

.btn-link-upload:hover {
  text-decoration: underline;
}

.upload-progress-container {
  padding: 10px 24px;
}

.progress-bar-small {
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-small-fill {
  height: 100%;
  width: 0%;
  background: var(--accent-gradient);
  transition: width 0.3s;
}

.upload-status-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 6px;
  display: block;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: rgba(0, 0, 0, 0.15);
}

.playlist-select-list {
  padding: 16px 20px;
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.playlist-select-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  cursor: pointer;
  transition: background 0.15s;
}

.playlist-select-item:hover {
  background: var(--bg-hover);
}

/* Modal Header Tabs */
.modal-header-tabs {
  display: flex;
  gap: 8px;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
}

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

.tab-btn.active {
  color: #fff;
  background: var(--accent-gradient);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* Qeecc Banner */
.qeecc-banner {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(236, 72, 153, 0.12) 100%);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-md);
  margin: 16px 24px 0;
  padding: 14px 18px;
}

.qeecc-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  background: var(--accent-gradient);
  color: #fff;
  padding: 2px 8px;
  border-radius: 9999px;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.qeecc-banner h4 {
  font-size: 0.98rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.qeecc-banner p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Qeecc Real-time Progress Bar */
.qeecc-progress-section {
  margin: 18px 24px 0;
  padding: 16px 18px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.progress-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.progress-status-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
}

.progress-pct-badge {
  font-size: 0.82rem;
  font-weight: 700;
  color: #a78bfa;
  font-variant-numeric: tabular-nums;
}

.progress-track-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.progress-track-active {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.progress-track-active.error {
  background: #ef4444;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.progress-track-active.success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.progress-step-details {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Success Card */
.qeecc-success-card {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
  padding: 12px 14px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  animation: modalEnter 0.3s ease;
}

.result-cover {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.result-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.result-badge {
  font-size: 0.65rem;
  font-weight: 700;
  color: #10b981;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.result-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.result-artist {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.result-pl {
  font-size: 0.75rem;
  color: #a78bfa;
  margin-top: 2px;
}

.btn-import {
  font-weight: 600;
  padding: 0 20px;
}

/* ============================================================
   Responsive Media Queries
   ============================================================ */
@media (max-width: 900px) {
  .app-layout {
    grid-template-columns: 80px 1fr;
  }
  .brand-text, .nav-item span, .playlists-header, .playlist-nav-item .pl-nav-title, .pl-nav-badge, .portal-link span {
    display: none;
  }
  .sidebar {
    padding: 16px 8px;
    align-items: center;
  }
  .playlist-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .banner-cover {
    width: 140px;
    height: 140px;
  }
  .immersive-body {
    grid-template-columns: 1fr;
  }
  .vinyl-column {
    display: none;
  }
  .col-album {
    display: none;
  }
}
