/* ─── Lysten Web Player Design System ─── */
:root {
  color-scheme: dark;
  --bg-dark: #090a0f;
  --bg-surface: #12131a;
  --bg-surface-elevated: #1a1b24;
  --bg-card: rgba(26, 27, 36, 0.7);
  --bg-card-hover: rgba(36, 38, 52, 0.85);

  --primary: #8b5cf6;
  --secondary: #ec4899;
  --primary-glow: rgba(139, 92, 246, 0.35);
  --accent: #ec4899;
  --accent-gradient: linear-gradient(135deg, #8b5cf6 0%, #d946ef 50%, #ec4899 100%);
  --accent-gradient-hover: linear-gradient(135deg, #9d74f7 0%, #e85cfd 50%, #f462a8 100%);

  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(255, 255, 255, 0.18);
  --glass-bg: rgba(18, 19, 26, 0.82);
  --glass-blur: blur(24px);

  --sidebar-width: 240px;
  --player-height: 90px;
  --top-nav-height: 68px;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.admin-login-logo {
  width: 56px !important;
  height: 56px !important;
  max-width: 56px !important;
  max-height: 56px !important;
  border-radius: 12px;
  object-fit: contain;
}

body {
  font-family: 'Plus Jakarta Sans', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #08090d !important;
  background-image: 
    radial-gradient(ellipse at 50% 0%, rgba(139, 92, 246, 0.16) 0%, transparent 65%),
    radial-gradient(circle at 90% 85%, rgba(14, 165, 233, 0.16) 0%, transparent 50%),
    radial-gradient(circle at 10% 85%, rgba(236, 72, 153, 0.10) 0%, transparent 50%) !important;
  background-size: cover !important;
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

[data-theme="light"] body {
  background-color: #f1f3f9 !important;
  background-image: 
    radial-gradient(ellipse at 50% 0%, rgba(192, 132, 252, 0.18) 0%, transparent 65%),
    radial-gradient(circle at 90% 85%, rgba(125, 211, 252, 0.22) 0%, transparent 50%),
    radial-gradient(circle at 10% 85%, rgba(244, 114, 182, 0.12) 0%, transparent 50%) !important;
  background-size: cover !important;
}

/* ─── 滾動條樣式 ─── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* ─── 毛玻璃基底 ─── */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
}

.glass-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
}
.glass-input:focus-within, .glass-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: rgba(255, 255, 255, 0.08);
}

/* ─── 登入畫面 (Modal) ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 30%, rgba(99, 102, 241, 0.12) 0%, rgba(9, 10, 15, 0.96) 80%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 20px;
}

[data-theme="light"] .modal-overlay {
  background: radial-gradient(circle at 50% 30%, rgba(124, 58, 237, 0.08) 0%, rgba(243, 244, 248, 0.95) 80%);
}

.login-card {
  width: 100%;
  max-width: 440px;
  padding: 36px 32px;
  border-radius: 18px;
  background: rgba(22, 24, 35, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  animation: modalScaleIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] .login-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
}

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

.login-header {
  text-align: center;
  margin-bottom: 24px;
}

.login-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.login-header .app-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.login-header .app-logo .logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.login-header .app-logo .logo-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.login-header h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
  background: linear-gradient(135deg, #a5b4fc 0%, #818cf8 50%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .login-header h2 {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-header .subtitle {
  font-size: 13px;
  color: var(--text-secondary);
}

.form-group {
  margin-bottom: 18px;
}

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

.glass-input {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s ease;
}

.glass-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
  background: rgba(0, 0, 0, 0.45);
}

[data-theme="light"] .glass-input {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #0f172a;
}

[data-theme="light"] .glass-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
  background: #ffffff;
}

/* 聯邦切換與測速選單 */
.federation-quick-select {
  margin-top: 8px;
}

.federation-select-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.btn-ping-nodes {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #818cf8;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-ping-nodes:hover {
  background: rgba(99, 102, 241, 0.25);
  border-color: #6366f1;
  color: #a5b4fc;
}

.federation-select {
  width: 100%;
  padding: 8px 12px;
  font-size: 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.federation-select:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.federation-select option {
  background: #181b26;
  color: #ffffff;
}

[data-theme="light"] .federation-select {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #0f172a;
}

[data-theme="light"] .federation-select option {
  background: #ffffff;
  color: #0f172a;
}

.error-badge {
  padding: 10px 14px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}

.login-form .primary-btn {
  width: 100%;
  margin-top: 6px;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  background: var(--accent-gradient);
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 4px 18px var(--primary-glow);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.primary-btn:hover {
  background: var(--accent-gradient-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px var(--primary-glow);
}

.primary-btn:active {
  transform: translateY(1px);
}

.glass-btn {
  padding: 8px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}
.glass-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-highlight);
}

.icon-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: var(--radius-full);
  transition: var(--transition-fast);
}
.icon-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}
.icon-btn .icon {
  width: 20px;
  height: 20px;
}

/* ─── 主應用版面 ─── */
html.has-token #app-container.hidden {
  display: flex !important;
}
html.has-token #login-modal {
  display: none !important;
}

.app-layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  width: 100vw;
  overflow: hidden;
  position: relative;
}

/* ─── 頂部導航列：精緻通透毛玻璃質感 ─── */
.top-nav {
  background: rgba(12, 13, 20, 0.70) !important;
  backdrop-filter: blur(28px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  contain: layout style;
  height: calc(var(--top-nav-height) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: 0;
  padding-left: calc(24px + env(safe-area-inset-left, 0px));
  padding-right: calc(24px + env(safe-area-inset-right, 0px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  z-index: 100;
  box-sizing: border-box;
}

.app-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 8px;
  filter: drop-shadow(0 2px 8px rgba(168, 85, 247, 0.35));
}
.logo-text {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.context-pill-wrapper {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 4px 14px;
}
.context-label {
  font-size: 12px;
  color: var(--text-muted);
}
.glass-select {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}
.glass-select option {
  background: #181922;
  color: #fff;
  font-weight: 500;
  padding: 4px 8px;
}
.glass-select optgroup {
  background: #1e1b2e;
  color: var(--primary-light, #a78bfa);
  font-weight: 700;
  padding: 6px 4px;
}

/* 專注疲勞提醒橫幅 */
.fatigue-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(30, 27, 75, 0.5));
  border: 1px solid rgba(167, 139, 250, 0.4);
  border-radius: var(--radius-lg, 12px);
  padding: 12px 18px;
  margin-bottom: 20px;
  animation: fadeIn 0.3s ease-out;
  gap: 16px;
}
.fatigue-content {
  display: flex;
  align-items: center;
  gap: 14px;
}
.fatigue-icon {
  font-size: 26px;
}
.fatigue-text strong {
  display: block;
  font-size: 14px;
  color: #fff;
  font-weight: 700;
}
.fatigue-text p {
  font-size: 12px;
  color: var(--text-secondary, #9ca3af);
  margin-top: 2px;
}
.fatigue-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.fatigue-btn {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}
.fatigue-btn.primary {
  background: var(--primary, #8b5cf6);
  color: #fff;
}
.fatigue-btn.secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #e5e7eb;
}
.fatigue-btn:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}

/* ══════════════════════════════════════════════════════════════
   【頂部導航列：伸縮全圓角毛玻璃搜尋膠囊 (方案3 + 方案1)】
   ══════════════════════════════════════════════════════════════ */
.nav-center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin: 0 16px;
}

/* ════════════════════════════════════════════════════════════
   【頂部導航欄：靠右精緻伸縮搜尋膠囊】
   ════════════════════════════════════════════════════════════ */
.search-capsule {
  display: flex;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  box-sizing: border-box;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: width 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.2s ease,
              border-color 0.2s ease,
              box-shadow 0.25s ease,
              transform 0.15s ease;
}

.search-capsule:hover:not(.expanded) {
  transform: scale(1.05);
}

.search-capsule.expanded {
  width: clamp(260px, 22vw, 360px);
  cursor: default;
  transform: none;
}

/* 放大鏡圖示按鈕 */
.search-capsule-icon-btn {
  width: 38px;
  height: 38px;
  min-width: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  outline: none;
}

.search-capsule-icon-btn .icon {
  width: 18px;
  height: 18px;
  transition: color 0.2s ease;
}

/* 輸入框核心架構：保證絕對透明、無任何次級邊框與黑框 */
.search-capsule input.search-capsule-input,
.search-capsule #global-search-input {
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  -webkit-appearance: none !important;
  font-family: inherit !important;
  font-size: 14px !important;
  height: 100% !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  transition: opacity 0.2s ease 0.05s;
}

/* 收合狀態：隱藏且不可點擊 */
.search-capsule:not(.expanded) input.search-capsule-input,
.search-capsule:not(.expanded) #global-search-input {
  width: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  padding: 0 !important;
}

/* 展開狀態：100% 寬度、完全允許輸入並顯示提示詞 */
.search-capsule.expanded input.search-capsule-input,
.search-capsule.expanded #global-search-input {
  flex: 1 1 auto !important;
  width: 100% !important;
  min-width: 160px !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  cursor: text !important;
  padding: 0 8px 0 4px !important;
}

/* 清除按鈕 */
.search-capsule-clear-btn {
  width: 26px;
  height: 26px;
  min-width: 26px;
  margin-right: 6px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.15s ease;
}

.search-capsule-clear-btn:hover {
  transform: scale(1.08);
}

.search-capsule-clear-btn.hidden {
  display: none !important;
}

/* ── 1. 深色模式主題配色 (Dark Mode) ── */
:root:not([data-theme="light"]) .search-capsule {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
}
:root:not([data-theme="light"]) .search-capsule:hover:not(.expanded) {
  background: rgba(255, 255, 255, 0.14) !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
}
:root:not([data-theme="light"]) .search-capsule.expanded {
  background: rgba(18, 20, 32, 0.88) !important;
  border: 1.5px solid var(--primary) !important;
  box-shadow: 0 0 0 2px var(--primary-glow), 0 6px 20px rgba(0, 0, 0, 0.35) !important;
}
:root:not([data-theme="light"]) .search-capsule-icon-btn {
  color: rgba(255, 255, 255, 0.75) !important;
}
:root:not([data-theme="light"]) .search-capsule:hover .search-capsule-icon-btn,
:root:not([data-theme="light"]) .search-capsule.expanded .search-capsule-icon-btn {
  color: var(--primary) !important;
}
:root:not([data-theme="light"]) .search-capsule input.search-capsule-input,
:root:not([data-theme="light"]) .search-capsule #global-search-input {
  color: #ffffff !important;
}
:root:not([data-theme="light"]) .search-capsule input.search-capsule-input::placeholder,
:root:not([data-theme="light"]) .search-capsule #global-search-input::placeholder {
  color: rgba(255, 255, 255, 0.60) !important; /* 深色模式：清晰柔和的白色/淺色提示詞 */
  font-size: 13.5px;
}
:root:not([data-theme="light"]) .search-capsule-clear-btn {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
}
:root:not([data-theme="light"]) .search-capsule-clear-btn:hover {
  background: rgba(255, 255, 255, 0.28) !important;
}

/* ── 2. 淺色模式主題配色 (Light Mode) ── */
[data-theme="light"] .search-capsule,
[data-theme="light"] body.has-custom-wallpaper .search-capsule {
  background: rgba(255, 255, 255, 0.75) !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}
[data-theme="light"] .search-capsule:hover:not(.expanded),
[data-theme="light"] body.has-custom-wallpaper .search-capsule:hover:not(.expanded) {
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: rgba(0, 0, 0, 0.20) !important;
}
[data-theme="light"] .search-capsule.expanded,
[data-theme="light"] body.has-custom-wallpaper .search-capsule.expanded {
  background: rgba(255, 255, 255, 0.96) !important;
  border: 1.5px solid var(--primary) !important;
  box-shadow: 0 0 0 2px var(--primary-glow), 0 6px 20px rgba(0, 0, 0, 0.08) !important;
}
[data-theme="light"] .search-capsule-icon-btn,
[data-theme="light"] body.has-custom-wallpaper .search-capsule-icon-btn {
  color: #475569 !important;
}
[data-theme="light"] .search-capsule:hover .search-capsule-icon-btn,
[data-theme="light"] .search-capsule.expanded .search-capsule-icon-btn {
  color: var(--primary) !important;
}
[data-theme="light"] .search-capsule input.search-capsule-input,
[data-theme="light"] .search-capsule #global-search-input,
[data-theme="light"] body.has-custom-wallpaper .search-capsule input.search-capsule-input,
[data-theme="light"] body.has-custom-wallpaper .search-capsule #global-search-input {
  color: #0f172a !important; /* 淺色模式：深色文字輸入 */
}
[data-theme="light"] .search-capsule input.search-capsule-input::placeholder,
[data-theme="light"] .search-capsule #global-search-input::placeholder,
[data-theme="light"] body.has-custom-wallpaper .search-capsule input.search-capsule-input::placeholder,
[data-theme="light"] body.has-custom-wallpaper .search-capsule #global-search-input::placeholder {
  color: #64748b !important; /* 淺色模式：深色提示詞文字，清晰可辨 */
  font-size: 13.5px;
}
[data-theme="light"] .search-capsule-clear-btn {
  background: rgba(0, 0, 0, 0.08) !important;
  color: #334155 !important;
}
[data-theme="light"] .search-capsule-clear-btn:hover {
  background: rgba(0, 0, 0, 0.16) !important;
  color: #0f172a !important;
}

/* ── 3. 自訂桌布深色模式特別增強 (Dark Mode + Custom Wallpaper) ── */
:root:not([data-theme="light"]) body.has-custom-wallpaper .search-capsule {
  background: rgba(18, 20, 32, 0.70) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
}
:root:not([data-theme="light"]) body.has-custom-wallpaper .search-capsule:hover:not(.expanded) {
  background: rgba(24, 28, 44, 0.85) !important;
  border-color: rgba(255, 255, 255, 0.28) !important;
}
:root:not([data-theme="light"]) body.has-custom-wallpaper .search-capsule.expanded {
  background: rgba(18, 20, 32, 0.92) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 2px var(--primary-glow), 0 8px 24px rgba(0, 0, 0, 0.4) !important;
}

.nav-right {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex-shrink: 0 !important;
  flex-wrap: nowrap !important;
}

.install-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  background: var(--accent-gradient);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px var(--primary-glow);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
  flex-shrink: 0;
}
.install-pill-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
}
.install-pill-btn:active {
  transform: scale(0.96);
}
.install-pill-btn .icon {
  width: 16px;
  height: 16px;
}

.icon-btn-small {
  padding: 7px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.icon-btn-small .icon {
  width: 18px;
  height: 18px;
}

/* 使用者頭像選單容器 */
.user-menu-wrapper {
  position: relative;
}

.user-profile-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.user-profile-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-highlight);
}
.user-profile-btn:active {
  transform: scale(0.97);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #ffffff;
  box-shadow: 0 2px 8px var(--primary-glow);
}
.username-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.dropdown-chevron {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}
.user-menu-wrapper.active .dropdown-chevron {
  transform: rotate(180deg);
}

/* 點擊頭像展開的精緻毛玻璃卡片 */
.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 260px;
  max-height: calc(100vh - 160px);
  display: flex;
  flex-direction: column;
  background: rgba(18, 19, 26, 0.95);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 20px var(--primary-glow);
  padding: 10px 8px;
  z-index: 2000;
  animation: dropdownFadeIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  box-sizing: border-box;
}
@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.dropdown-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px 8px;
  flex-shrink: 0;
}
.user-avatar-lg {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 10px var(--primary-glow);
}
.dropdown-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.dropdown-username {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dropdown-role {
  font-size: 11px;
  color: var(--text-muted);
}

.dropdown-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 6px 0;
  flex-shrink: 0;
}

/* 選單內部可滾動區域 */
.dropdown-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2px 2px 6px 2px;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--primary) 40%, transparent) transparent;
}
.dropdown-body::-webkit-scrollbar {
  width: 4px;
}
.dropdown-body::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--primary) 40%, transparent);
  border-radius: 4px;
}

/* 外觀與主題手風琴折疊區塊 */
.dropdown-accordion {
  margin: 4px 0;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.dropdown-accordion.expanded {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-highlight);
}
.dropdown-accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: none;
  padding: 8px 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.15s ease;
}
.dropdown-accordion-header:hover {
  background: rgba(255, 255, 255, 0.06);
}
.dropdown-accordion-header .accordion-chevron {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  transition: transform 0.25s ease;
}
.dropdown-accordion.expanded .dropdown-accordion-header .accordion-chevron {
  transform: rotate(180deg);
}
.dropdown-accordion-content {
  display: none;
  padding: 4px 4px 6px;
  border-top: 1px solid var(--border-subtle);
  animation: fadeIn 0.2s ease;
}
.dropdown-accordion.expanded .dropdown-accordion-content {
  display: block;
}

.dropdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 6px;
  font-size: 12.5px;
  color: var(--text-secondary);
}
.row-label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.row-label .icon {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

.glass-select-sm {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  outline: none;
  cursor: pointer;
}
.glass-select-sm option {
  background: #181924;
  color: #ffffff;
}

.dropdown-row-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 6px;
  font-size: 12.5px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}
.dropdown-row-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}
.apk-badge-version {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: color-mix(in srgb, var(--primary) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent);
  color: var(--primary-light, var(--primary));
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
}
.dropdown-row-link:hover .apk-badge-version {
  background: color-mix(in srgb, var(--primary) 32%, transparent);
  border-color: color-mix(in srgb, var(--primary) 60%, transparent);
  color: #ffffff;
}
.apk-badge-version .download-icon-sm {
  width: 12px;
  height: 12px;
}

/* 選單固定吸底操作區 (Sticky Footer) */
.dropdown-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--border-subtle);
  margin-top: 4px;
  padding-top: 4px;
}

.dropdown-action-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.dropdown-action-btn:hover {
  background: rgba(239, 68, 68, 0.12);
}
.dropdown-action-btn .icon {
  width: 16px;
  height: 16px;
}
.text-danger {
  color: #f87171 !important;
}

/* 登入頂部語系與 Logo 列 */
.login-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 8px;
}

/* ─── 主體 (側邊欄 + 內容) ─── */
.main-body {
  display: flex;
  flex: 1;
  height: calc(100vh - var(--top-nav-height) - var(--player-height));
  overflow: hidden;
  position: relative;
}

/* 側邊欄：深色模式珠寶級彩色微浸潤毛玻璃 */
.sidebar {
  width: var(--sidebar-width);
  background: color-mix(in srgb, var(--primary) 8%, rgba(12, 13, 20, 0.62)) !important;
  backdrop-filter: blur(32px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(32px) saturate(190%) !important;
  border-right: 1px solid color-mix(in srgb, var(--primary) 16%, rgba(255, 255, 255, 0.12)) !important;
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, 0.18), inset -1px 0 0 rgba(255, 255, 255, 0.05), 4px 0 28px rgba(0, 0, 0, 0.35) !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 12px;
  flex-shrink: 0;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: left;
}
.nav-item:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}
/* 深色模式光棒：暗夜霓虹透光膠囊 + 雷射光劍指示棒 */
.side-nav .nav-item {
  border-left: 4.5px solid transparent !important;
  border-radius: 4px 14px 14px 4px !important;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.side-nav .nav-item:hover {
  background: rgba(255, 255, 255, 0.07) !important;
  color: #ffffff !important;
}

.side-nav .nav-item.active {
  color: #ffffff !important;
  background: color-mix(in srgb, var(--primary) 18%, rgba(255, 255, 255, 0.07)) !important;
  border: 1px solid color-mix(in srgb, var(--primary) 35%, rgba(255, 255, 255, 0.12)) !important;
  border-left: 4.5px solid var(--primary) !important;
  border-radius: 4px 14px 14px 4px !important;
  box-shadow: 0 0 20px var(--primary-glow), inset 0 0 12px color-mix(in srgb, var(--primary) 22%, transparent), -2px 0 10px var(--primary) !important;
}

.side-nav .nav-item.active span {
  color: #ffffff !important;
  font-weight: 700 !important;
  text-shadow: 0 0 10px var(--primary-glow) !important;
}

.side-nav .nav-item.active .icon {
  color: var(--primary) !important;
  filter: drop-shadow(0 0 8px var(--primary)) !important;
}
.nav-item .icon {
  width: 18px;
  height: 18px;
}
.nav-item .badge {
  margin-left: auto;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.sidebar-footer .info-card {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
}
.info-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}
.info-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* 內容區 */
.content-area {
  flex: 1;
  overflow-y: auto;
  padding: 28px 36px 60px;
}

.view-panel {
  display: none;
  animation: fadeIn 0.25s ease;
}
.view-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-hero {
  margin-bottom: 30px;
}
.hero-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
  background: linear-gradient(135deg, #ffffff 72%, var(--primary-light, #c084fc) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}
.hero-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
}

.view-header {
  margin-bottom: 24px;
}
.view-header h2 {
  font-size: 26px;
  font-weight: 700;
}
.view-header-with-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 20px;
  flex-wrap: nowrap;
}
.view-header-text {
  flex: 1 1 auto;
  min-width: 0;
}
.view-header-text h2 {
  font-size: 26px;
  font-weight: 700;
  white-space: nowrap;
}
.view-header-text .subtitle {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.view-header-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.play-all-pill-btn,
#play-all-liked-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 10px 22px !important;
  border-radius: 9999px !important;
  background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
  color: #fff !important;
  border: none !important;
  cursor: pointer !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  box-shadow: 0 4px 16px var(--primary-glow) !important;
  transition: all 0.2s ease !important;
  width: auto !important;
  max-width: fit-content !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}
.play-all-pill-btn:hover,
#play-all-liked-btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 22px var(--primary-glow) !important;
}
.play-all-pill-btn .icon,
.play-all-pill-btn svg,
#play-all-liked-btn .icon,
#play-all-liked-btn svg {
  width: 15px !important;
  height: 15px !important;
  min-width: 15px !important;
  max-width: 15px !important;
  flex-shrink: 0 !important;
}

/* ─── 歌單 Section 與卡片 (Section Grid) ─── */
.section-block {
  margin-bottom: 36px;
}
.section-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cards-scroll-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

.song-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
  position: relative;
}
.song-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-highlight);
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.card-cover-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 12px;
  background: #1c1d26;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}
.card-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.song-card:hover .card-cover {
  transform: scale(1.06);
}

.card-play-hover-btn {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(8px);
  transition: var(--transition-fast);
}
.card-play-hover-btn .icon {
  width: 18px;
  height: 18px;
  margin-left: 2px;
}
.song-card:hover .card-play-hover-btn {
  opacity: 1;
  transform: translateY(0);
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
.card-artist {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── 歌曲清單列表 (Song Row Table) ─── */
.song-list-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.song-row {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  transition: var(--transition-fast);
  cursor: pointer;
  gap: 16px;
}
.song-row:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-subtle);
}
.song-row.playing {
  background: color-mix(in srgb, var(--primary) 14%, transparent) !important;
  border-color: color-mix(in srgb, var(--primary) 30%, transparent) !important;
}

.row-index {
  width: 24px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  flex-shrink: 0;
}
.song-row.playing .row-index {
  color: var(--primary);
  font-weight: 700;
}

.row-cover {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: #20212d;
  flex-shrink: 0;
}

.row-meta {
  flex: 1;
  min-width: 0;
}
.row-title {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}
.song-row.playing .row-title {
  color: #c084fc;
}
.row-artist {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.row-meta-sub-mobile {
  display: none;
}

.row-album {
  width: 180px;
  flex-shrink: 0;
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-genre {
  width: 110px;
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-genre-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: color-mix(in srgb, var(--primary) 12%, rgba(255, 255, 255, 0.05));
  color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 24%, transparent);
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-date {
  width: 105px;
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

.row-duration {
  font-size: 12px;
  color: var(--text-muted);
  width: 50px;
  flex-shrink: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.row-actions {
  width: 80px;
  flex-shrink: 0;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  margin-left: 0 !important;
}

/* ─── 收藏庫切換列與排序選單容器 ─── */
.liked-view-switcher-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.liked-sort-container {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 4px 12px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.liked-sort-container:focus-within,
.liked-sort-container:hover {
  border-color: color-mix(in srgb, var(--primary) 40%, transparent);
  box-shadow: 0 0 12px var(--primary-glow);
}

.liked-sort-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
}

.liked-sort-label .sort-icon {
  width: 14px;
  height: 14px;
  color: var(--primary);
}

.liked-sort-select {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 12.5px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  padding: 2px 4px;
}

.liked-sort-select option {
  background: #181926;
  color: #fff;
}

[data-theme="light"] .liked-sort-container {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .liked-sort-select option {
  background: #ffffff;
  color: #0f172a;
}

/* ─── 桌面自然隨流表頭 (Desktop Table Header - 1:1 Pixel-Perfect Alignment with song-row) ─── */
.song-table-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  user-select: none;
}

.song-table-header .col-th {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted, #94a3b8);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s ease;
}

.song-table-header .col-th:hover {
  color: var(--text-primary, #fff);
}

.song-table-header .col-th.active-sort {
  color: var(--primary) !important;
}

.song-table-header .sort-arrow {
  font-size: 10px;
  line-height: 1;
  opacity: 0.4;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.song-table-header .col-th:hover .sort-arrow {
  opacity: 0.8;
}

.song-table-header .col-th.active-sort .sort-arrow {
  opacity: 1;
  color: var(--primary) !important;
}

.song-table-header .col-th.sort-asc .sort-arrow::after {
  content: "▲";
}

.song-table-header .col-th.sort-desc .sort-arrow::after {
  content: "▼";
}

.song-table-header .col-th:not(.sort-asc):not(.sort-desc) .sort-arrow::after {
  content: "⇅";
}

.song-table-header .col-index {
  width: 24px;
  flex-shrink: 0;
  text-align: center;
  justify-content: center;
}

.song-table-header .col-cover-spacer {
  width: 44px;
  flex-shrink: 0;
}

.song-table-header .col-title {
  flex: 1;
  min-width: 0;
}

.song-table-header .col-album {
  width: 180px;
  flex-shrink: 0;
}

.song-table-header .col-genre {
  width: 110px;
  flex-shrink: 0;
}

.song-table-header .col-date {
  width: 105px;
  flex-shrink: 0;
}

.song-table-header .col-duration {
  width: 50px;
  flex-shrink: 0;
  justify-content: flex-end;
  text-align: right;
}

.song-table-header .col-actions {
  width: 80px;
  flex-shrink: 0;
  cursor: default;
}

/* 響應式中螢幕隱藏次要欄位 */
@media (max-width: 1100px) {
  .song-table-header .col-genre,
  .song-row .row-genre {
    display: none !important;
  }
}

@media (max-width: 900px) {
  .song-table-header .col-date,
  .song-row .row-date {
    display: none !important;
  }
  .song-table-header .col-album,
  .song-row .row-album {
    width: 140px;
  }
}

/* 手機窄螢幕響應式：隱藏表頭，以雙層卡片呈現 */
@media (max-width: 768px) {
  .song-table-header {
    display: none !important;
  }
  .song-row .row-album,
  .song-row .row-genre,
  .song-row .row-date {
    display: none !important;
  }
  .row-meta-sub-mobile {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    color: var(--text-secondary);
    margin-top: 3px;
    flex-wrap: wrap;
  }
  .row-meta-sub-mobile .mobile-genre-tag {
    font-size: 10px;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 4px;
    background: color-mix(in srgb, var(--primary) 14%, transparent);
    color: var(--primary);
    border: 1px solid color-mix(in srgb, var(--primary) 26%, transparent);
  }
  .row-meta-sub-mobile .mobile-date-text {
    font-size: 11px;
    color: var(--text-muted);
  }
}

.song-row.no-row-click {
  cursor: default;
}
.song-row.no-row-click:hover {
  background: rgba(255, 255, 255, 0.04);
}

.row-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.source-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 16px;
  padding: 0;
  border-radius: 4px;
  user-select: none;
  flex-shrink: 0;
  vertical-align: middle;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}

.source-badge:hover {
  transform: scale(1.15);
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.35);
}

.badge-ytm {
  border-color: rgba(255, 0, 0, 0.25);
}

.badge-yt {
  border-color: rgba(255, 0, 0, 0.25);
}

.badge-local {
  border-color: rgba(168, 85, 247, 0.4);
  background: rgba(168, 85, 247, 0.12);
}

.badge-local:hover {
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.45);
}

.badge-icon {
  width: 14px;
  height: 14px;
  display: block;
}

.badge-icon-img {
  width: 14px;
  height: 14px;
  display: block;
  object-fit: contain;
  border-radius: 2px;
}

.row-play-buttons {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.action-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  transition: var(--transition-fast);
  white-space: nowrap;
}
.action-pill-btn .icon {
  width: 12px !important;
  height: 12px !important;
  flex-shrink: 0;
}
.action-pill-btn.play-seq-btn:hover {
  border-color: var(--primary) !important;
  background: color-mix(in srgb, var(--primary) 12%, transparent) !important;
  color: var(--primary) !important;
}
.action-pill-btn.play-radio-btn:hover {
  border-color: rgba(236, 72, 153, 0.6);
  color: #f472b6;
  background: rgba(236, 72, 153, 0.2);
  box-shadow: 0 2px 8px rgba(236, 72, 153, 0.25);
}
.action-pill-btn.play-artist-radio-btn:hover {
  border-color: rgba(56, 189, 248, 0.6);
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.2);
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.25);
}

/* ─── 搜尋頁大輸入框 ─── */
.search-box-large {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
}
.glass-input.large {
  flex: 1;
  padding: 14px 20px;
  font-size: 15px;
}
.search-box-large .primary-btn {
  width: auto;
  padding: 0 28px;
}

/* ─── 搜尋歷史紀錄標籤列 ─── */
.search-history-section {
  margin-bottom: 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  animation: fadeIn 0.2s ease-out;
}
.search-history-section.hidden {
  display: none;
}
.search-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.history-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}
.history-title-wrap .icon-sm {
  width: 14px;
  height: 14px;
  color: var(--primary-light);
}
.clear-history-link {
  background: none;
  border: none;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.2s ease;
}
.clear-history-link:hover {
  color: #f87171;
  background: rgba(239, 68, 68, 0.1);
}
.history-tags-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.history-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  padding: 5px 12px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.history-tag-pill:hover {
  background: rgba(168, 85, 247, 0.18);
  border-color: rgba(168, 85, 247, 0.45);
  color: #ffffff;
  transform: translateY(-1px);
}
.history-tag-pill .tag-remove-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  color: var(--text-muted);
  transition: all 0.15s ease;
  margin-left: 2px;
}
.history-tag-pill .tag-remove-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* ─── 歌詞視圖 (Lyrics Drawer) ─── */
.lyrics-drawer {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 420px;
  background: rgba(14, 15, 22, 0.94);
  backdrop-filter: blur(30px);
  border-left: 1px solid var(--border-highlight);
  z-index: 50;
  display: flex;
  flex-direction: column;
  box-shadow: -15px 0 40px rgba(0, 0, 0, 0.6);
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.lyrics-drawer.hidden {
  display: none;
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.lyrics-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
}
.lyrics-song-info h3 {
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}
.lyrics-song-info p {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}
.lyrics-editor-info {
  font-size: 11px !important;
  color: var(--accent-light, #c084fc) !important;
  background: rgba(168, 85, 247, 0.15);
  padding: 2px 8px;
  border-radius: 12px;
  display: inline-block;
  margin-top: 4px;
}
.lyrics-editor-info.hidden {
  display: none !important;
}
.lyrics-actions {
  display: flex;
  gap: 8px;
}

/* 歌詞工具面板 (時間校正 & 字型設定) */
.lyric-tools-panel {
  background: rgba(24, 25, 38, 0.95);
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: fadeInDown 0.2s ease;
}
.lyric-tools-panel.hidden {
  display: none !important;
}
.lyric-tools-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}
.lyric-tools-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.tool-label {
  font-size: 13px;
  color: var(--text-secondary);
}
.tool-chip-btn {
  padding: 4px 10px;
  border-radius: 14px;
  border: 1px solid var(--border-highlight);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.tool-chip-btn:hover {
  background: var(--accent-glow);
  border-color: var(--accent);
}
.tool-chip-btn.btn-reset {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}
.offset-display-badge {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  min-width: 50px;
  text-align: center;
}
.save-row {
  margin-top: 4px;
}
.save-server-btn {
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  background: var(--accent-gradient);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px var(--accent-glow);
  transition: all 0.2s ease;
}
.save-server-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px var(--accent-glow);
}
.lyric-font-select {
  flex: 1;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(15, 16, 25, 0.9);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
}


.lyrics-content-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 40px 24px 80px;
  scroll-behavior: smooth;
}

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

.lyric-line {
  font-size: 18px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.28);
  line-height: 1.5;
  cursor: pointer;
  transition: all 0.25s ease;
  transform-origin: left center;
}
.lyric-line:hover {
  color: rgba(255, 255, 255, 0.65);
}
.lyric-line.active {
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
  transform: scale(1.05);
  text-shadow: 0 0 20px var(--primary-glow);
}

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

/* ─── 底部播放器：深色模式珠寶級彩色微浸潤毛玻璃 ─── */
.bottom-player {
  background: color-mix(in srgb, var(--primary) 9%, rgba(14, 15, 22, 0.72)) !important;
  backdrop-filter: blur(32px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(32px) saturate(190%) !important;
  border-top: 1px solid color-mix(in srgb, var(--primary) 18%, rgba(255, 255, 255, 0.14)) !important;
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, 0.2), 0 -8px 32px rgba(0, 0, 0, 0.5) !important;
  height: var(--player-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: relative;
  z-index: 100;
}

/* 左側歌曲資訊 */
.player-left {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 300px;
}

.cover-wrapper {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #1c1d26;
  flex-shrink: 0;
  cursor: pointer;
}
.player-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

.equalizer-bars {
  display: none !important;
}
.equalizer-bars span {
  animation: none !important;
}
.equalizer-bars span:nth-child(1) { animation-delay: 0s; height: 10px; }
.equalizer-bars span:nth-child(2) { animation-delay: 0.2s; height: 18px; }
.equalizer-bars span:nth-child(3) { animation-delay: 0.4s; height: 12px; }

@keyframes equalize {
  0% { transform: scaleY(0.3); }
  100% { transform: scaleY(1.2); }
}

.song-meta {
  min-width: 0;
  flex: 1;
}
.song-title {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}
.song-artist {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.player-feedback-btns {
  display: flex;
  gap: 4px;
}
.player-feedback-btns .icon-btn.liked {
  color: #ec4899;
}
.player-feedback-btns .icon-btn.liked svg {
  fill: #ec4899;
}

/* 中間播放按鈕與進度條 */
.player-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 600px;
}

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

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

.primary-circle-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: #ffffff;
  color: #090a0f;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.25);
}
.primary-circle-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.35);
}
.primary-circle-btn:active {
  transform: scale(0.96);
}
.primary-circle-btn .icon {
  width: 20px;
  height: 20px;
}
#play-icon {
  margin-left: 2px;
}

.icon-btn.active {
  color: var(--primary);
  position: relative;
}
.badge-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 9px;
  font-weight: 800;
  background: var(--primary);
  color: #fff;
  width: 13px;
  height: 13px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 進度條 */
.progress-bar-container {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}
.time-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  width: 38px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.slider-track-wrapper {
  position: relative;
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}
.slider-track-wrapper:hover {
  height: 6px;
}

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

.slider-track-wrapper input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  margin: 0;
}

/* 右側輔助控制 */
.player-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  width: 300px;
}

#toggle-queue-btn.active {
  color: #ffffff !important;
  background: var(--primary) !important;
  box-shadow: 0 0 14px var(--primary-glow) !important;
  border-radius: 50% !important;
}

.volume-container {
  display: flex;
  align-items: center;
  gap: 8px;
}
.volume-slider-wrapper {
  width: 90px;
}
.volume-slider-wrapper input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
  cursor: pointer;
}

/* ─── Toast 通知 ─── */
.toast-container {
  position: fixed;
  bottom: 105px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 3500;
  pointer-events: none;
}

.toast {
  padding: 10px 20px;
  border-radius: var(--radius-full);
  background: rgba(24, 25, 34, 0.94);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-highlight);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  animation: toastPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 8px;
}

@keyframes toastPop {
  from { opacity: 0; transform: translateY(12px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── 載入中 Spinner ─── */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

.spinner-icon {
  animation: spin 0.8s linear infinite;
  display: inline-block;
  transform-origin: center;
}

.loading-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 80px 0;
  color: var(--text-secondary);
}

.empty-state {
  text-align: center;
  padding: 60px 0;
  color: var(--text-muted);
}
.empty-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  opacity: 0.4;
}

.hidden {
  display: none !important;
}

/* ─── 響應式佈局 (Mobile, Tablet & Car Landscape) ─── */

/* 1. 中型平板直立模式 (Sidebar 精簡) */
@media (max-width: 900px) and (min-width: 769px) and (orientation: portrait) {
  :root {
    --sidebar-width: 70px;
  }
  .sidebar .nav-item span:not(.badge) {
    display: none;
  }
  .sidebar-footer {
    display: none;
  }
  .nav-center {
    display: none;
  }
  .row-album {
    display: none;
  }
}

/* 2. 手機直向模式 (Portrait Mobile: 寬度 <= 768px) */
@media (max-width: 768px) and (orientation: portrait) {
  :root {
    --player-height: 72px;
    --top-nav-height: calc(56px + env(safe-area-inset-top, 0px));
  }

  /* 手機外層全屏覆蓋，消除重複推擠 */
  .app-layout {
    display: block !important;
    height: 100vh !important;
    height: 100dvh !important;
    width: 100vw !important;
    overflow: hidden !important;
    position: relative !important;
    padding: 0 !important;
  }

  /* 頂部導航精簡、全屏固定懸浮、通透液態毛玻璃 (適配 iOS 動態島 / 瀏海) */
  .top-nav {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: calc(56px + env(safe-area-inset-top, 0px)) !important;
    padding-top: env(safe-area-inset-top, 0px) !important;
    padding-bottom: 0 !important;
    padding-left: calc(12px + env(safe-area-inset-left, 0px)) !important;
    padding-right: calc(12px + env(safe-area-inset-right, 0px)) !important;
    box-sizing: border-box !important;
    z-index: 1600 !important;
    background: rgba(12, 13, 20, 0.72) !important;
    backdrop-filter: blur(28px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    contain: layout style;
  }
  [data-theme="light"] .top-nav {
    background: rgba(255, 255, 255, 0.72) !important;
    backdrop-filter: blur(28px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04) !important;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    contain: layout style;
  }
  .context-pill-wrapper {
    display: none !important;
  }
  .nav-center,
  .search-capsule {
    display: none !important;
  }
  .nav-right {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
    flex-wrap: nowrap !important;
  }
  .user-profile-btn {
    padding: 2px !important;
    border: none !important;
    background: transparent !important;
  }
  .user-profile-btn .username-text,
  .user-profile-btn .dropdown-chevron {
    display: none !important;
  }
  .user-dropdown-menu {
    right: 0 !important;
    width: 220px !important;
  }
  .install-pill-btn {
    padding: 6px 8px !important;
  }
  .install-pill-btn .install-btn-text {
    display: none !important;
  }

  /* 主體全屏鋪滿 */
  .main-body {
    display: block !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    position: relative !important;
    overflow: hidden !important;
  }

  /* 內容滾動區：底部留足安全防遮擋間距 (播放器 64px + 精緻導航列 52px + 安全區)，上下通透滑過 */
  .content-area {
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    padding: calc(56px + env(safe-area-inset-top, 0px) + 8px) 14px calc(52px + 64px + env(safe-area-inset-bottom, 0px) + 14px) 14px !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
  }
  .section-hero {
    margin-top: 4px !important;
    margin-bottom: 18px !important;
  }
  .hero-title {
    font-size: 24px !important;
    margin-bottom: 4px !important;
  }
  .hero-subtitle {
    font-size: 13px !important;
  }
  .row-album {
    display: none;
  }
  .row-duration {
    display: none;
  }

  /* 底部導航功能列：吸底置於手機螢幕最下方，去除多餘上下留白 (適配 iOS/Android 底部手勢安全區) */
  /* 底部導航功能列：吸底置於手機螢幕最下方，支援左右水平滑動，完整容納 6 個分頁標籤 */
  .sidebar {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: auto !important;
    min-height: calc(52px + env(safe-area-inset-bottom, 0px)) !important;
    flex-direction: row !important;
    border-right: none !important;
    border-top: 1px solid rgba(255, 255, 255, 0.10) !important;
    padding: 2px 4px max(3px, env(safe-area-inset-bottom, 0px)) 4px !important;
    z-index: 1000 !important;
    background: rgba(12, 13, 20, 0.72) !important;
    backdrop-filter: blur(28px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
    box-sizing: border-box !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
  }
  .sidebar::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }
  [data-theme="light"] .sidebar {
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(28px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
    border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
  }
  .side-nav {
    display: flex !important;
    flex-direction: row !important;
    justify-content: flex-start !important;
    align-items: center !important;
    width: max-content !important;
    min-width: 100% !important;
    height: 50px !important;
    gap: 2px !important;
    padding: 0 4px !important;
    box-sizing: border-box !important;
  }
  .side-nav .nav-item {
    flex: 0 0 auto !important;
    min-width: 62px !important;
    max-width: 74px !important;
    height: 48px !important;
    min-height: 48px !important;
    padding: 3px 5px !important;
    font-size: 11px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    border-radius: 12px !important;
    border: none !important;
    box-sizing: border-box !important;
    background: transparent !important;
  }
  .side-nav .nav-item .icon,
  .side-nav .nav-item svg {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    display: block !important;
    flex-shrink: 0 !important;
    margin: 0 auto !important;
  }
  .side-nav .nav-item span:not(.badge) {
    display: block !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
    letter-spacing: -0.2px;
    text-align: center;
  }
  .side-nav .nav-item.active {
    border-radius: 12px !important;
    height: 48px !important;
    padding: 3px 5px !important;
  }
  .sidebar .badge,
  #sidebar-liked-count {
    display: none !important;
  }
  .sidebar-footer {
    display: none !important;
  }

  /* 懸浮吸底迷你播放器 (精簡按鈕排版，杜絕擁擠，流暢展開) */
  .bottom-player {
    position: fixed !important;
    bottom: calc(52px + env(safe-area-inset-bottom, 0px) + 6px) !important;
    left: 8px !important;
    right: 8px !important;
    height: 60px !important;
    border-radius: 16px !important;
    padding: 0 10px !important;
    z-index: 990 !important;
    background: rgba(14, 15, 22, 0.72) !important;
    backdrop-filter: blur(28px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box !important;
  }
  [data-theme="light"] .bottom-player {
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(28px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
  }

  /* 當虛擬鍵盤彈出時自動滑出避讓 */
  .bottom-player.keyboard-avoid {
    transform: translateY(calc(100% + 70px)) !important;
  }

  /* 迷你播放器頂部一條細緻動態漸層進度線 */
  .bottom-player .progress-bar-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    padding: 0;
    gap: 0;
  }
  .bottom-player .time-label {
    display: none;
  }
  .bottom-player .slider-track-wrapper {
    height: 3px;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.08);
  }
  .bottom-player .slider-fill {
    border-radius: 0;
  }

  /* 左側：封面、歌曲與歌手名稱 (點擊直接展開全畫面播放器) */
  .player-left {
    width: auto !important;
    flex: 1 1 0% !important;
    min-width: 0 !important;
    gap: 8px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
  }
  .cover-wrapper {
    width: 42px !important;
    height: 42px !important;
    flex-shrink: 0 !important;
    border-radius: 8px !important;
  }
  .player-left .song-meta {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
  }
  .player-left #player-title {
    font-size: 13.5px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
  }
  .player-left #player-artist {
    font-size: 11px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
  }
  .player-feedback-btns {
    display: none !important;
  }

  /* 中間播放鍵：精簡為上一首、播放、下一首 */
  .player-center {
    width: auto !important;
    flex: 0 0 auto !important;
    max-width: none !important;
    gap: 0 !important;
    margin: 0 4px !important;
  }
  .playback-controls {
    gap: 4px !important;
    display: flex !important;
    align-items: center !important;
  }
  #prev-btn, #next-btn {
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  #play-mode-btn,
  #shuffle-btn,
  #repeat-btn {
    display: none !important;
  }
  .primary-circle-btn {
    width: 38px !important;
    height: 38px !important;
  }
  .control-btn .icon {
    width: 18px !important;
    height: 18px !important;
  }

  /* 右側：精簡保留佇列按鈕，移除多餘全螢幕鈕與桌上型專用鈕 */
  .player-right {
    width: auto !important;
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 2px !important;
  }
  #open-fs-player-btn,
  #pip-lyrics-btn,
  #toggle-lyrics-btn,
  .volume-container {
    display: none !important;
  }
  #toggle-queue-btn {
    display: flex !important;
    width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* 歌詞抽屜全螢幕自適應，且預留吸底播放器高度 */
  .lyrics-drawer {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    bottom: calc(56px + 64px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 1500 !important;
  }
  .lyrics-header {
    padding-top: calc(16px + env(safe-area-inset-top, 0px)) !important;
  }
  /* 手機版首頁推薦：精緻橫向輪播卡片 (Spotify/Apple Music 同款)，消除巨大封面壓迫感 */
  .cards-scroll-container {
    display: flex !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 12px !important;
    padding: 0 4px 10px 4px !important;
    scrollbar-width: none;
  }
  .cards-scroll-container::-webkit-scrollbar {
    display: none;
  }

  .song-card {
    flex: 0 0 132px !important;
    width: 132px !important;
    max-width: 132px !important;
    scroll-snap-align: start;
    padding: 10px !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.04) !important;
  }
  .song-card .card-cover-wrapper {
    margin-bottom: 8px !important;
    border-radius: 8px !important;
  }
  .song-card .card-title {
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    margin-bottom: 2px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .song-card .card-artist {
    font-size: 11px !important;
    color: var(--text-muted) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .song-card .card-play-hover-btn {
    display: none !important; /* 手機端直接點擊卡片播放，隱藏 hover 播放鈕保持簡約乾淨 */
  }

  .toast-container {
    bottom: calc(135px + env(safe-area-inset-bottom));
  }
}

/* ─── 下拉重新整理 (Pull to Refresh) ─── */
.ptr-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 0;
  overflow: hidden;
  opacity: 0;
  transition: height 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 0;
}
.ptr-indicator.visible {
  height: 44px;
  opacity: 1;
  margin-bottom: 12px;
}
.ptr-indicator.refreshing .ptr-icon svg {
  animation: spin 0.8s linear infinite;
}
.ptr-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}
.ptr-icon svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

/* 3. 車機/導航機/橫向模式：完全繼承 PC 版經典大器佈局 (底部全寬通欄播放器 + 左側導航 + 中央大歌單) */
@media (orientation: landscape) and (max-height: 600px) {
  :root {
    --top-nav-height: 48px;
    --player-height: 74px;
    --sidebar-width: 175px;
  }

  .app-layout {
    display: flex !important;
    flex-direction: column !important;
    height: 100vh !important;
    height: 100dvh !important;
    width: 100vw !important;
    overflow: hidden !important;
  }

  /* 頂部導航列：緊湊 48px，留出最大垂直視野 */
  .top-nav {
    height: 48px !important;
    padding: 0 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    z-index: 1600 !important;
  }
  .app-logo .logo-icon {
    width: 26px !important;
    height: 26px !important;
  }
  .app-logo .logo-text {
    font-size: 18px !important;
  }
  .context-pill-wrapper {
    display: none !important;
  }
  .nav-center {
    display: block !important;
    flex: 1 !important;
    max-width: 320px !important;
    margin: 0 16px !important;
  }
  .search-bar {
    padding: 4px 10px !important;
  }

  /* 中間主體：左側邊欄 + 右側主內容區 */
  .main-body {
    display: flex !important;
    flex: 1 !important;
    height: calc(100vh - 48px - 74px) !important;
    height: calc(100dvh - 48px - 74px) !important;
    overflow: hidden !important;
    position: relative !important;
  }

  /* 左側側邊欄：175px 寬，大字體、大圖標、駕駛單手好操作 */
  .sidebar {
    width: 175px !important;
    height: 100% !important;
    border-right: 1px solid var(--border-subtle) !important;
    border-top: none !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    padding: 12px 10px !important;
    background: rgba(14, 15, 22, 0.98) !important;
    position: static !important;
    z-index: 10 !important;
  }
  .side-nav {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
  }
  .side-nav .nav-item {
    padding: 9px 12px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    border-radius: var(--radius-md) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
  }
  .side-nav .nav-item .icon {
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0 !important;
  }
  .side-nav .nav-item span:not(.badge) {
    display: inline-block !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--text-secondary) !important;
    white-space: nowrap !important;
  }
  .side-nav .nav-item.active span:not(.badge) {
    color: #ffffff !important;
    font-weight: 700 !important;
  }
  .sidebar .badge {
    display: none !important; /* 隱藏擁擠的數字徽章 */
  }
  .sidebar-footer {
    display: none !important;
  }

  /* 右側主要內容區：寬廣伸展、極速滾動 */
  .content-area {
    flex: 1 !important;
    height: 100% !important;
    overflow-y: auto !important;
    padding: 16px 20px 24px 20px !important;
    box-sizing: border-box !important;
  }
  .cards-scroll-container {
    display: flex !important;
    overflow-x: auto !important;
    gap: 14px !important;
    padding-bottom: 6px !important;
  }
  .song-card {
    flex: 0 0 138px !important;
    width: 138px !important;
  }

  /* 底部通欄播放器：PC 級最舒服的全寬播放艙 */
  .bottom-player {
    position: static !important;
    width: 100vw !important;
    height: 74px !important;
    padding: 0 16px !important;
    background: rgba(18, 19, 26, 0.98) !important;
    border-top: 1px solid var(--border-subtle) !important;
    border-right: none !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    z-index: 100 !important;
    box-sizing: border-box !important;
  }

  /* 左側：封面、歌曲名稱與愛心 */
  .player-left {
    width: 28% !important;
    min-width: 180px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    text-align: left !important;
    gap: 10px !important;
  }
  .cover-wrapper {
    width: 48px !important;
    height: 48px !important;
    border-radius: var(--radius-sm) !important;
    margin-bottom: 0 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
  }
  .song-meta {
    text-align: left !important;
    margin-bottom: 0 !important;
    flex: 1 !important;
    min-width: 0 !important;
  }
  .song-title {
    font-size: 13px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .song-artist {
    font-size: 11px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .player-feedback-btns {
    display: flex !important;
    margin-bottom: 0 !important;
    gap: 6px !important;
  }
  .player-feedback-btns .icon-btn {
    width: 32px !important;
    height: 32px !important;
  }

  /* 中間：核心播控與舒展長進度條 */
  .player-center {
    width: 44% !important;
    max-width: 520px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 4px !important;
  }
  .playback-controls {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 16px !important;
  }
  .control-btn {
    width: 34px !important;
    height: 34px !important;
    background: transparent !important;
    border: none !important;
  }
  .control-btn .icon {
    width: 20px !important;
    height: 20px !important;
  }
  .primary-circle-btn {
    width: 44px !important;
    height: 44px !important;
    background: var(--accent-gradient) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px var(--primary-glow) !important;
    border-radius: var(--radius-full) !important;
  }
  .primary-circle-btn .icon {
    width: 22px !important;
    height: 22px !important;
  }

  /* 橫向長進度條與時間軸 */
  .progress-bar-container {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
  }
  .time-label {
    display: block !important;
    font-size: 10px !important;
    color: var(--text-muted) !important;
    width: 28px !important;
  }
  .slider-track-wrapper {
    height: 4px !important;
    border-radius: 2px !important;
  }

  /* 右側：歌詞、佇列、音量 */
  .player-right {
    width: 26% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 10px !important;
  }
  .player-right .icon-btn {
    width: 34px !important;
    height: 34px !important;
    background: transparent !important;
    border: none !important;
  }
  .volume-container {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    width: 90px !important;
  }

  /* 歌詞抽屜在橫向模式下自右側滑出 380px，不遮蔽主要視野 */
  .lyrics-drawer {
    position: fixed !important;
    top: 48px !important;
    right: 0 !important;
    left: auto !important;
    width: 380px !important;
    bottom: 74px !important;
    border-left: 1px solid var(--border-subtle) !important;
    z-index: 500 !important;
  }
}

/* ─── 進階 YouTube 全網搜尋提示橫幅 ─── */
.search-extend-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 28px 0 20px 0;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(142, 68, 173, 0.12), rgba(30, 32, 45, 0.7));
  border: 1px dashed rgba(142, 68, 173, 0.35);
  border-radius: 12px;
  backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease;
}

.search-extend-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.search-extend-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.search-extend-desc {
  font-size: 12px;
  color: var(--text-secondary, #9ba1b0);
}

.search-extend-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: var(--accent-gradient, linear-gradient(135deg, #8e44ad, #3498db));
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 15px rgba(142, 68, 173, 0.25);
  transition: all 0.2s ease;
}

.search-extend-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(142, 68, 173, 0.4);
}

.search-extend-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

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

.empty-extend-btn {
  margin-top: 16px;
}

/* ─── PWA 智慧更新膠囊 (非侵入式微光提示) ─── */
.pwa-update-pill {
  position: fixed;
  bottom: calc(var(--player-height) + 16px);
  right: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(22, 23, 34, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(168, 85, 247, 0.5);
  border-radius: var(--radius-full);
  padding: 8px 14px 8px 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(168, 85, 247, 0.25);
  z-index: 2500;
  animation: pwaSlideUpFade 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes pwaSlideUpFade {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.pwa-update-pill .pill-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: #a855f7;
  box-shadow: 0 0 8px #a855f7;
  animation: pwaPulseDot 2s infinite ease-in-out;
}
@keyframes pwaPulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}
.pwa-update-pill .pill-text {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}
.pwa-update-pill .pill-btn {
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.pwa-update-pill .pill-btn:hover {
  filter: brightness(1.15);
  transform: scale(1.04);
}
.pwa-update-pill .pill-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}
.pwa-update-pill .pill-close:hover {
  color: #fff;
}

@media (max-width: 768px) {
  .pwa-update-pill {
    bottom: calc(56px + 64px + env(safe-area-inset-bottom, 0px) + 12px);
    right: 12px;
    left: 12px;
    justify-content: space-between;
  }
}

/* ─── 個人資訊與密碼設定 Modal 樣式 ─── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  padding: 16px;
}

.modal-backdrop.hidden {
  display: none !important;
}

.modal-backdrop .modal-card {
  background: #13141f;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  padding: 24px 28px;
  animation: modalScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-backdrop .modal-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  transition: color 0.2s;
}

.modal-close-btn:hover {
  color: #fff;
}

.settings-sub-title {
  font-size: 14px;
  font-weight: 600;
  color: #cbd5e1;
  margin: 0 0 12px 0;
}

.modal-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 20px 0;
}

.input-readonly {
  background: rgba(255, 255, 255, 0.03) !important;
  color: #94a3b8 !important;
  cursor: not-allowed;
}

.input-with-action {
  display: flex;
  gap: 8px;
}

.input-with-action input {
  flex: 1;
}

.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrapper input {
  width: 100%;
  padding-right: 76px;
}

.pwd-actions {
  position: absolute;
  right: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-toggle-pwd, .btn-copy-input {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.2s, color 0.2s;
  padding: 0;
}

.btn-toggle-pwd:hover, .btn-copy-input:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.label-with-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.btn-link-action {
  background: transparent;
  border: none;
  color: var(--primary, #a855f7);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.2s;
}

.btn-link-action:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.input-error-msg {
  color: #f87171;
  font-size: 12px;
  margin-top: 4px;
  display: block;
}

.input-error-msg.hidden {
  display: none !important;
}

/* 頂部情境切換膠囊按鈕 */
.context-mode-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full, 9999px);
  padding: 6px 14px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(12px);
}
.context-mode-pill-btn:hover {
  background: color-mix(in srgb, var(--primary) 15%, transparent) !important;
  border-color: var(--primary) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--primary-glow) !important;
}
.context-pill-icon {
  font-size: 15px;
}
.context-pill-text {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.icon-chevron {
  width: 14px;
  height: 14px;
  stroke: var(--text-muted, #9ca3af);
  transition: transform 0.2s ease;
}

/* 個人選單按鈕 */
.dropdown-row-link-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: none;
  color: var(--text-primary, #fff);
  padding: 10px 14px;
  font-size: 13px;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s;
  text-align: left;
}
.dropdown-row-link-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}
.badge-mini-pill {
  background: color-mix(in srgb, var(--primary) 18%, transparent);
  color: var(--primary-light, var(--primary));
  border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 9999px;
  font-weight: 600;
}
.row-arrow {
  color: var(--text-muted, #9ca3af);
  font-size: 16px;
  font-weight: bold;
}

/* 情境模式切換中心 Modal */
.context-modal-card {
  max-width: 840px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}
.header-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-icon-circle {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--primary) 20%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent);
  box-shadow: 0 4px 14px var(--primary-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.header-subtitle {
  font-size: 12px;
  color: var(--text-muted, #9ca3af);
  margin-top: 2px;
}
.context-modal-body {
  overflow-y: auto;
  padding: 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.context-default-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.2s ease;
}
.context-default-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
}
.context-default-card.active {
  background: color-mix(in srgb, var(--primary) 12%, transparent) !important;
  border-color: var(--primary) !important;
}
.context-card-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.context-card-icon {
  font-size: 28px;
}
.context-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}
.context-card-desc {
  font-size: 12px;
  color: var(--text-muted, #9ca3af);
  margin-top: 2px;
}
.context-card-badge {
  font-size: 12px;
  font-weight: 700;
  color: #c084fc;
  background: rgba(168, 85, 247, 0.2);
  padding: 4px 10px;
  border-radius: 9999px;
  display: none;
}
.context-default-card.active .context-card-badge {
  display: inline-block;
}
.context-modes-heading {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted, #9ca3af);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}
.context-modes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 14px;
}
.context-mode-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s ease;
}
.context-mode-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}
.context-mode-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}
.context-mode-states {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.context-state-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}
.context-state-chip:hover {
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(168, 85, 247, 0.3);
  transform: translateX(2px);
}
.context-state-chip.active {
  background: color-mix(in srgb, var(--primary) 15%, transparent) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 12px var(--primary-glow) !important;
}
.state-chip-main strong {
  display: block;
  font-size: 13px;
  color: #fff;
}
.state-chip-main span {
  font-size: 11px;
  color: var(--text-muted, #9ca3af);
}
.state-chip-active-badge {
  font-size: 11px;
  font-weight: 700;
  color: #c084fc;
  background: rgba(168, 85, 247, 0.25);
  padding: 2px 8px;
  border-radius: 9999px;
  display: none;
}
.context-state-chip.active .state-chip-active-badge {
  display: inline-block;
}

/* 音樂偏好與黑名單 Modal */
.pref-modal-card {
  max-width: 680px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}
.pref-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0 24px;
}
.pref-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted, #9ca3af);
  font-size: 13px;
  font-weight: 600;
  padding: 12px 18px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.pref-tab-btn:hover {
  color: #fff;
}
.pref-tab-btn.active {
  color: #c084fc;
  border-bottom-color: #c084fc;
}
.pref-modal-body {
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.pref-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pref-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #e2e8f0;
}
.pref-chips-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pref-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 500;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.pref-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}
.pref-chip.active {
  background: var(--accent-gradient) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
  box-shadow: 0 2px 8px var(--primary-glow) !important;
}
.pref-chip.disliked-active {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.6);
  color: #fca5a5;
  font-weight: 700;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.25);
}
.pref-chip.expand-toggle-chip {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.25);
  color: #94a3b8;
  font-size: 12px;
}
.pref-chip.expand-toggle-chip:hover {
  background: rgba(168, 85, 247, 0.1);
  border-color: rgba(168, 85, 247, 0.4);
  color: #c084fc;
}

.blacklist-notice {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12px;
  color: #fca5a5;
}
.artist-input-row {
  display: flex;
  gap: 8px;
}
.blacklist-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 28px;
}
.blacklist-artist-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
}
.blacklist-artist-tag button {
  background: transparent;
  border: none;
  color: #fca5a5;
  cursor: pointer;
  padding: 0;
  font-size: 14px;
  line-height: 1;
}
.pref-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ─── 世界探索電台 (情境模式選單內) ─── */
.world-radio-context-card {
  margin-top: 10px;
  border-color: rgba(56, 189, 248, 0.25);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.08) 0%, rgba(16, 185, 129, 0.08) 100%);
  transition: all 0.25s ease;
}
.world-radio-context-card:hover {
  border-color: rgba(56, 189, 248, 0.55);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.14) 0%, rgba(16, 185, 129, 0.14) 100%);
  transform: translateY(-1px);
}
.world-radio-context-card.active {
  border-color: #38bdf8;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.2) 0%, rgba(16, 185, 129, 0.2) 100%);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.25);
}
.world-radio-context-card .context-card-icon {
  font-size: 26px;
}
.discovery-country-tag {
  display: inline-block;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 600;
  margin-right: 6px;
  vertical-align: middle;
}

/* ─── Light Theme ─── */
[data-theme="light"] {
  color-scheme: light;
  --bg-dark: #f8f7fc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f0edf9;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(240, 237, 249, 0.95);

  --primary: #7c3aed;
  --secondary: #db2777;
  --primary-glow: rgba(124, 58, 237, 0.25);
  --accent: #db2777;
  --accent-gradient: linear-gradient(135deg, #7c3aed 0%, #c026d3 50%, #db2777 100%);
  --accent-gradient-hover: linear-gradient(135deg, #8b5cf6 0%, #d946ef 50%, #ec4899 100%);

  --text-primary: #18181b;
  --text-secondary: #52525b;
  --text-muted: #71717a;

  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-highlight: rgba(0, 0, 0, 0.16);
  --glass-bg: rgba(255, 255, 255, 0.88);
}

[data-theme="light"] .glass-input,
[data-theme="light"] .glass-input-sm,
[data-theme="light"] input[type="text"],
[data-theme="light"] input[type="password"] {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-primary);
}

[data-theme="light"] .glass-select-sm {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-primary);
}

[data-theme="light"] .glass-select-sm option {
  background: #ffffff;
  color: #18181b;
}

[data-theme="light"] .user-dropdown-menu {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12), 0 0 20px rgba(124, 58, 237, 0.08);
}

[data-theme="light"] .dropdown-username {
  color: #18181b;
}

[data-theme="light"] .dropdown-row-link:hover,
[data-theme="light"] .dropdown-row-link-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .modal-card {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.15), 0 0 0 1px var(--border-subtle);
}

[data-theme="light"] .context-default-card {
  background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .context-default-card.active {
  background: color-mix(in srgb, var(--primary) 10%, transparent) !important;
  border: 1.5px solid var(--primary) !important;
  box-shadow: 0 4px 16px var(--primary-glow) !important;
}

[data-theme="light"] .context-mode-card {
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .context-state-chip {
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .pref-chip {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-secondary);
}

[data-theme="light"] .pref-chip.active {
  background: var(--accent-gradient) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
  box-shadow: 0 2px 8px var(--primary-glow) !important;
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.28);
}

/* ─── 淺色模式：晶透琉璃微浸潤毛玻璃 ─── */
/* ─── 淺色模式：無色透明純淨毛玻璃 ─── */
[data-theme="light"] .sidebar {
  background: rgba(255, 255, 255, 0.50) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.70) !important;
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, 0.95), 4px 0 24px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .top-nav {
  background: rgba(255, 255, 255, 0.68) !important;
  backdrop-filter: blur(28px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  contain: layout style;
}

[data-theme="light"] .bottom-player {
  background: rgba(255, 255, 255, 0.52) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.70) !important;
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, 0.95), 0 -4px 24px rgba(0, 0, 0, 0.04) !important;
}

/* 淺色模式光棒：白玉立體浮雕底座 + 飽和主題色光棒 */
[data-theme="light"] .side-nav .nav-item {
  color: #334155 !important;
  border-left: 4.5px solid transparent !important;
  border-radius: 4px 14px 14px 4px !important;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

[data-theme="light"] .side-nav .nav-item:hover {
  background: color-mix(in srgb, var(--primary) 5%, rgba(255, 255, 255, 0.55)) !important;
  color: #0f172a !important;
}

[data-theme="light"] .side-nav .nav-item.active {
  background: color-mix(in srgb, var(--primary) 16%, #f3f4f6) !important;
  border: 1.5px solid color-mix(in srgb, var(--primary) 35%, transparent) !important;
  border-left: 5px solid var(--primary) !important;
  border-radius: 4px 14px 14px 4px !important;
  color: var(--primary) !important;
  box-shadow: 0 3px 12px color-mix(in srgb, var(--primary) 22%, transparent), inset 0 1px 0 #ffffff !important;
}

[data-theme="light"] .side-nav .nav-item.active span {
  color: var(--primary) !important;
  font-weight: 700 !important;
  text-shadow: 0 0 8px var(--primary-glow) !important;
}

[data-theme="light"] .side-nav .nav-item.active .icon {
  color: var(--primary) !important;
  filter: drop-shadow(0 0 6px var(--primary-glow)) !important;
}

[data-theme="light"] .side-nav .nav-item.active .badge {
  background: var(--primary) !important;
  color: #ffffff !important;
}

[data-theme="light"] .song-row {
  background: rgba(0, 0, 0, 0.02) !important;
  border-color: rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .song-row:hover {
  background: rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .song-row.playing {
  background: color-mix(in srgb, var(--primary) 10%, transparent) !important;
  border-color: color-mix(in srgb, var(--primary) 25%, transparent) !important;
}



[data-theme="light"] .hero-title,
[data-theme="light"] .view-header h2 {
  background: linear-gradient(135deg, #0f172a 68%, var(--primary) 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  display: inline-block;
  letter-spacing: -0.5px;
}

[data-theme="light"] .hero-subtitle {
  color: #64748b !important;
}

[data-theme="light"] .section-title,
[data-theme="light"] .card-title,
[data-theme="light"] .row-title,
[data-theme="light"] .player-song-title,
[data-theme="light"] .queue-title,
[data-theme="light"] h1:not(.hero-title),
[data-theme="light"] h2:not(.view-header h2),
[data-theme="light"] h3 {
  color: var(--text-primary) !important;
}

[data-theme="light"] .lyrics-drawer {
  background: rgba(255, 255, 255, 0.97) !important;
  border-left-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .fatigue-banner {
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08) !important;
}

/* ─── 淺色模式專用：LOGO 黑色圓角底座 (移除濾鏡白化，顯示原生清晰黑底白標) ─── */
[data-theme="light"] .logo-icon {
  background: #111218 !important;
  border-radius: 8px !important;
  padding: 4px !important;
  width: 24px !important;
  height: 24px !important;
  box-sizing: content-box !important;
  filter: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18) !important;
}

/* ─── 頂部情境切換膠囊 (高對比深色文字與邊框) ─── */
[data-theme="light"] .context-mode-pill-btn {
  background: rgba(0, 0, 0, 0.05) !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  color: #18181b !important;
}
[data-theme="light"] .context-mode-pill-btn:hover {
  background: color-mix(in srgb, var(--primary) 15%, transparent) !important;
  border-color: var(--primary) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--primary-glow) !important;
}
[data-theme="light"] .context-mode-pill-btn .context-pill-text {
  color: #18181b !important;
}
[data-theme="light"] .context-mode-pill-btn .icon-chevron {
  stroke: #52525b !important;
}

/* ─── 通用按鈕全域對比強化 ─── */
[data-theme="light"] .glass-btn {
  background: rgba(0, 0, 0, 0.05) !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  color: #18181b !important;
}
[data-theme="light"] .glass-btn:hover {
  background: rgba(0, 0, 0, 0.08) !important;
  border-color: rgba(0, 0, 0, 0.22) !important;
}

[data-theme="light"] .icon-btn,
[data-theme="light"] .icon-btn-small {
  color: #3f3f46 !important;
}
[data-theme="light"] .icon-btn:hover,
[data-theme="light"] .icon-btn-small:hover {
  color: #18181b !important;
  background: rgba(0, 0, 0, 0.06) !important;
}

[data-theme="light"] .user-profile-btn {
  background: rgba(0, 0, 0, 0.04) !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
}
[data-theme="light"] .user-profile-btn:hover {
  background: rgba(0, 0, 0, 0.08) !important;
  border-color: rgba(0, 0, 0, 0.18) !important;
}
[data-theme="light"] .user-profile-btn .username-text {
  color: #18181b !important;
}
[data-theme="light"] .user-profile-btn .dropdown-chevron {
  color: #52525b !important;
}

/* ─── 播放器控制按鈕與圖標 ─── */
[data-theme="light"] .primary-circle-btn {
  background: #18181b !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2) !important;
}
[data-theme="light"] .primary-circle-btn:hover {
  background: #000000 !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="light"] .control-btn,
[data-theme="light"] .player-right .icon-btn,
[data-theme="light"] .player-left .icon-btn {
  color: #3f3f46 !important;
}
[data-theme="light"] .control-btn:hover,
[data-theme="light"] .player-right .icon-btn:hover,
[data-theme="light"] .player-left .icon-btn:hover {
  color: #18181b !important;
}
[data-theme="light"] .bottom-player .slider-track-wrapper {
  background: rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .song-title,
[data-theme="light"] #player-title {
  color: #18181b !important;
  font-weight: 700 !important;
}

[data-theme="light"] .song-artist,
[data-theme="light"] #player-artist {
  color: #52525b !important;
}

/* ─── 曲目操作、歷史標籤與彈窗對比強化 ─── */
[data-theme="light"] .action-pill-btn {
  background: rgba(0, 0, 0, 0.04) !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  color: #3f3f46 !important;
}
[data-theme="light"] .action-pill-btn:hover {
  border-color: var(--primary) !important;
  color: var(--primary) !important;
  background: color-mix(in srgb, var(--primary) 10%, transparent) !important;
}

[data-theme="light"] .history-tag-pill {
  background: rgba(0, 0, 0, 0.04) !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  color: #3f3f46 !important;
}
[data-theme="light"] .history-tag-pill:hover {
  border-color: var(--primary) !important;
  color: var(--primary) !important;
  box-shadow: 0 6px 18px var(--primary-glow) !important;
}

[data-theme="light"] .fatigue-btn.secondary {
  background: rgba(0, 0, 0, 0.06) !important;
  color: #18181b !important;
}

[data-theme="light"] .modal-close-btn {
  color: #71717a !important;
}
[data-theme="light"] .modal-close-btn:hover {
  color: #18181b !important;
}

[data-theme="light"] .settings-sub-title {
  color: #18181b !important;
}

[data-theme="light"] .modal-header h3,
[data-theme="light"] .modal-header h4,
[data-theme="light"] .header-title-wrap h3 {
  color: #18181b !important;
}

[data-theme="light"] .context-default-title,
[data-theme="light"] .context-mode-title {
  color: #18181b !important;
}

[data-theme="light"] .context-default-desc,
[data-theme="light"] .context-mode-desc {
  color: #52525b !important;
}

[data-theme="light"] input::placeholder {
  color: #71717a !important;
}





/* ─── 我的音樂收藏庫 全面升級樣式 ─── */
.liked-header-wrap {
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
}

.liked-controls-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* 在庫搜尋框 */
.liked-search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  transition: var(--transition-fast);
  min-width: 200px;
}

.liked-search-box:focus-within {
  border-color: rgba(168, 85, 247, 0.6);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.25);
}

.liked-search-icon {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  margin-right: 6px;
  flex-shrink: 0;
}

#liked-search-input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  width: 100%;
}

#liked-search-input::placeholder {
  color: var(--text-muted);
  font-size: 12px;
}

.liked-search-clear-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 11px;
  padding: 0 4px;
  margin-left: 4px;
  transition: var(--transition-fast);
}

.liked-search-clear-btn:hover {
  color: var(--text-primary);
}

/* 視圖切換器 */
.liked-view-switcher {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 2px;
}

.view-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-fast);
}

.view-tab-btn .icon {
  width: 13px;
  height: 13px;
}

.view-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.view-tab-btn.active {
  background: var(--accent-gradient) !important;
  color: #fff !important;
  font-weight: 600 !important;
  border: none !important;
  box-shadow: 0 2px 8px var(--primary-glow) !important;
}

.play-all-pill-btn.shuffle-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

.play-all-pill-btn.shuffle-btn:hover {
  background: rgba(168, 85, 247, 0.25);
  border-color: rgba(168, 85, 247, 0.5);
  color: #d8b4fe;
}

/* 智慧分箱抽屜 (Smart Drawers) */
.liked-smart-drawers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 14px 0 16px;
}

.smart-drawer-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  transition: var(--transition-fast);
}

.smart-drawer-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.smart-drawer-card.active {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(56, 189, 248, 0.15));
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.2);
}

.drawer-icon {
  font-size: 20px;
  line-height: 1;
}

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

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

.drawer-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* 快捷標籤篩選列 (Chips) */
.liked-filter-chips-bar {
  margin-bottom: 14px;
  overflow-x: auto;
  scrollbar-width: none;
}

.liked-filter-chips-bar::-webkit-scrollbar {
  display: none;
}

.liked-chips-container {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding-bottom: 2px;
}

.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.chip-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.chip-btn.active {
  background: var(--accent-gradient) !important;
  color: #ffffff !important;
  border-color: var(--primary) !important;
  box-shadow: 0 4px 18px var(--primary-glow) !important;
}

.chip-divider {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.15);
  margin: 0 4px;
}

/* 歌手視圖卡片網格 */
.artists-grid-container,
.albums-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 18px;
  padding: 8px 0;
}

.artist-group-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: center;
}

.artist-group-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(168, 85, 247, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.artist-avatar-wrap {
  position: relative;
  width: 100px;
  height: 100px;
  margin-bottom: 12px;
}

.artist-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.12);
}

.artist-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.artist-card-count {
  font-size: 11px;
  color: var(--text-muted);
}

/* 展開歌手/專輯詳情面板 */
.artist-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 16px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
  gap: 12px;
}

.artist-detail-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.artist-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  padding: 5px 14px;
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.artist-back-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.artist-detail-actions {
  display: flex;
  gap: 8px;
}

/* 專輯卡片網格 */
.album-group-card {
  display: flex;
  flex-direction: column;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
}

.album-group-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(236, 72, 153, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.album-cover-img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  object-fit: cover;
  margin-bottom: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.album-card-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.album-card-artist {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ─── 動態歌詞淺色模式高對比排版適配 (修復文字與背景接近看不見問題) ─── */
[data-theme="light"] .lyrics-drawer {
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(30px) saturate(180%) !important;
  border-left-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .lyrics-header {
  border-bottom-color: rgba(0, 0, 0, 0.06) !important;
}

[data-theme="light"] .lyrics-song-info h3 {
  color: #0f172a !important;
}

[data-theme="light"] .lyrics-song-info p {
  color: #475569 !important;
}

[data-theme="light"] .lyrics-actions .icon-btn {
  color: #475569 !important;
}

[data-theme="light"] .lyrics-actions .icon-btn:hover {
  color: #0f172a !important;
  background: rgba(0, 0, 0, 0.06) !important;
}

/* 淺色模式下歌詞工具面板 (時間校正 & 字型設定) 高對比卡片與按鈕適配 */
[data-theme="light"] .lyric-tools-panel {
  background: #f1f5f9 !important;
  border-bottom-color: #e2e8f0 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 12px !important;
  margin: 8px 12px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .lyric-tools-title {
  color: #0f172a !important;
}

[data-theme="light"] .tool-label {
  color: #334155 !important;
}

[data-theme="light"] .tool-chip-btn {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #1e293b !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .tool-chip-btn:hover {
  background: #f1f5f9 !important;
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}

[data-theme="light"] .tool-chip-btn.btn-reset {
  background: #fef2f2 !important;
  border-color: #fca5a5 !important;
  color: #dc2626 !important;
}

[data-theme="light"] .offset-display-badge {
  color: var(--accent) !important;
}

[data-theme="light"] .lyric-font-select {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .lyric-font-select option {
  background: #ffffff !important;
  color: #0f172a !important;
}

/* 淺色模式下非活躍歌詞：深石板灰 (對比清晰、極易閱讀) */
[data-theme="light"] .lyric-line {
  color: #475569 !important;
  font-weight: 600 !important;
}

[data-theme="light"] .lyric-line:hover {
  color: #0f172a !important;
}

/* 淺色模式下當前播放中的活躍歌詞：純曜石黑 + 微亮背景標示 (極致清晰與高對比) */
[data-theme="light"] .lyric-line.active {
  color: #000000 !important;
  font-weight: 800 !important;
  text-shadow: 0 0 12px rgba(147, 51, 234, 0.25) !important;
  background: rgba(147, 51, 234, 0.08) !important;
  padding: 4px 10px !important;
  border-radius: 8px !important;
}

[data-theme="light"] .lyrics-placeholder {
  color: #64748b !important;
}

/* ─── 車載/大字體歌詞通用與淺色模式適配 ─── */
.car-lyric-line {
  font-size: 24px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.32);
  line-height: 1.6;
  cursor: pointer;
  transition: all 0.25s ease;
}

.car-lyric-line:hover {
  color: rgba(255, 255, 255, 0.7);
}

.car-lyric-line.active {
  color: #ffffff;
  font-size: 28px;
  font-weight: 800;
  text-shadow: 0 0 20px var(--primary-glow);
}

[data-theme="light"] .car-lyric-line {
  color: rgba(24, 24, 27, 0.42) !important;
}

[data-theme="light"] .car-lyric-line:hover {
  color: rgba(24, 24, 27, 0.78) !important;
}

[data-theme="light"] .car-lyric-line.active {
  color: #18181b !important;
  font-weight: 800 !important;
  text-shadow: 0 0 16px rgba(124, 58, 237, 0.25) !important;
}

/* ─── 主題色盤 (Accent Palette) UI 樣式 ─── */
.dropdown-col {
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 8px !important;
}

.theme-accent-palette {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 4px 2px 2px;
}

.accent-dot-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  outline: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.accent-dot-btn:hover {
  transform: scale(1.18);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

.accent-dot-btn.active {
  transform: scale(1.22);
  border-color: #ffffff;
  box-shadow: 0 0 0 2px var(--primary), 0 4px 12px var(--primary-glow);
}

[data-theme="light"] .accent-dot-btn.active {
  border-color: #ffffff;
  box-shadow: 0 0 0 2px var(--primary), 0 2px 8px rgba(0, 0, 0, 0.25);
}

.custom-color-picker-label {
  background: linear-gradient(135deg, #f43f5e, #f59e0b, #10b981, #0ea5e9, #8b5cf6) !important;
  position: relative;
  overflow: hidden;
}

.custom-color-input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  left: 0;
  top: 0;
}

.custom-color-icon {
  font-size: 10px;
  pointer-events: none;
  line-height: 1;
}

/* ─── 核心按鈕與元件全面連動主題色彩 ─── */
.primary-circle-btn {
  background: var(--accent-gradient) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 16px var(--primary-glow) !important;
}

.primary-circle-btn:hover {
  transform: scale(1.08) !important;
  box-shadow: 0 6px 22px var(--primary-glow) !important;
}

[data-theme="light"] .primary-circle-btn {
  background: var(--accent-gradient) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 16px var(--primary-glow) !important;
}

[data-theme="light"] .primary-circle-btn:hover {
  background: var(--accent-gradient-hover) !important;
  box-shadow: 0 6px 20px var(--primary-glow) !important;
}

/* 播放進度條填滿軌道與滑塊高亮 */
.slider-track-fill {
  background: var(--accent-gradient) !important;
}

.slider-thumb {
  border-color: var(--primary) !important;
  box-shadow: 0 0 10px var(--primary-glow) !important;
}

/* 動態跳動音波柱連動主題色 */
.equalizer-bar {
  background: var(--primary) !important;
}

/* 側邊欄目前選中項連動主題色 (已整合至主樣式與深淺模態光棒定義) */

/* 正在唱的動態歌詞 (活躍行) 連動主題色與微光 */
.lyric-line.active {
  color: #ffffff !important;
  text-shadow: 0 0 20px var(--primary-glow) !important;
}

[data-theme="light"] .lyric-line.active {
  color: var(--primary) !important;
  font-weight: 800 !important;
  text-shadow: 0 0 16px var(--primary-glow) !important;
}

/* ─── 桌面置頂歌詞 (Desktop PiP Lyrics) 樣式 ─── */
#pip-lyrics-btn.active {
  color: var(--primary) !important;
  background: rgba(139, 92, 246, 0.15) !important;
  box-shadow: 0 0 12px var(--primary-glow);
}

[data-theme="light"] #pip-lyrics-btn.active {
  color: var(--primary) !important;
  background: rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 0 10px var(--primary-glow);
}

/* PiP 獨立置頂視窗內部樣式 */
.pip-lyrics-body {
  margin: 0;
  padding: 0;
  background: #090a0f;
  color: #ffffff;
  font-family: 'Plus Jakarta Sans', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
  height: 100vh;
  overflow: hidden;
  user-select: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

.pip-lyrics-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 8px 14px;
  gap: 5px;
}

.pip-lyric-current {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary, #8b5cf6) !important;
  line-height: 1.35;
  text-shadow: 0 0 14px var(--primary-glow, rgba(139, 92, 246, 0.45)), 0 0 28px var(--primary-glow, rgba(139, 92, 246, 0.25));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  transition: color 0.25s ease, text-shadow 0.25s ease;
}

.pip-lyric-next {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  transition: all 0.2s ease;
}

.pip-controls-bar {
  height: 36px;
  background: rgba(18, 19, 26, 0.96);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  gap: 10px;
}

.pip-song-meta {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.pip-song-title {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pip-song-artist {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pip-btn-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.pip-icon-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  outline: none;
}

.pip-icon-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.1);
}

.pip-play-btn {
  background: var(--primary, #8b5cf6) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px var(--primary-glow);
  width: 24px;
  height: 24px;
}

.pip-play-btn:hover {
  background: var(--primary, #8b5cf6) !important;
  box-shadow: 0 3px 12px var(--primary-glow);
}

/* ═══════════════════════════════════════════════════════
   自定義背景圖片（Custom Wallpaper）與防混亂視覺防護層
   ═══════════════════════════════════════════════════════ */
.app-wallpaper-layer {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: -2 !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  pointer-events: none !important;
  opacity: 1 !important;
  filter: none !important;
  transform: none !important;
  transition: opacity 0.4s ease !important;
}

body.has-custom-wallpaper,
[data-theme="light"] body.has-custom-wallpaper {
  background-color: transparent !important;
  background-image: none !important;
}

body.has-custom-wallpaper .app-wallpaper-layer {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: -2 !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  pointer-events: none !important;
  opacity: 1 !important;
  filter: none !important;
  transform: none !important;
  transition: opacity 0.4s ease !important;
}





/* 自訂背景 Modal 樣式 */
.wallpaper-modal-card {
  max-width: 580px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}

.wallpaper-modal-body {
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.wallpaper-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wallpaper-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wallpaper-dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.22s ease;
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}

.wallpaper-dropzone:hover,
.wallpaper-dropzone.dragover {
  border-color: var(--primary);
  background: rgba(139, 92, 246, 0.06);
}

.dropzone-icon {
  font-size: 30px;
  margin-bottom: 6px;
}

.dropzone-highlight {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

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

.wallpaper-current-preview {
  position: relative;
  width: 100%;
  height: 140px;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.wallpaper-current-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--primary);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.wallpaper-actions-row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-start;
  margin-top: 4px;
}

.wallpaper-presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  gap: 10px;
}

.wallpaper-preset-card {
  height: 58px;
  border-radius: 8px;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  padding: 6px 8px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.wallpaper-preset-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.wallpaper-preset-card.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary), 0 4px 12px rgba(0, 0, 0, 0.4);
}

.wallpaper-preset-card .preset-name {
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
}

.wallpaper-slider-group {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 6px;
}

.wallpaper-slider-group .slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.wallpaper-slider-group .slider-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.wallpaper-slider-group .slider-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}

.wallpaper-slider-group .slider-tips {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.4;
}

.glass-range-slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.15);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  accent-color: var(--primary);
}

.glass-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary-glow);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.glass-range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

.wallpaper-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 14px 16px;
  gap: 16px;
}

.wallpaper-toggle-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.wallpaper-toggle-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.4;
  max-width: 380px;
}

/* Switch 开关通用样式 */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

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

.toggle-switch .slider-round {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.18);
  transition: .3s;
  border-radius: 24px;
}

.toggle-switch .slider-round:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

.toggle-switch input:checked + .slider-round {
  background-color: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

.toggle-switch input:checked + .slider-round:before {
  transform: translateX(20px);
}

/* 桌面置頂歌詞 (PiP) 背景連動專用樣式 */
.pip-wallpaper-layer {
  position: absolute;
  inset: -20px;
  z-index: 0;
  background-size: cover;
  background-position: center;
  filter: blur(14px) brightness(0.28);
  transform: scale(1.15);
  pointer-events: none;
}

.pip-lyrics-body.has-wallpaper {
  background: transparent !important;
}

.pip-lyrics-body.has-wallpaper .pip-lyrics-container {
  position: relative;
  z-index: 1;
}

.pip-lyrics-body.has-wallpaper .pip-controls-bar {
  position: relative;
  z-index: 1;
  background: rgba(9, 10, 15, 0.72) !important;
  backdrop-filter: blur(8px);
}

.custom-ambience-picker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  margin-top: 10px;
  animation: fadeIn 0.2s ease;
}

.custom-color-pick-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.custom-color-input-sm {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: transparent;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
}

.custom-color-input-sm::-webkit-color-swatch-wrapper {
  padding: 0;
}

.custom-color-input-sm::-webkit-color-swatch {
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
}

/* ─── 淺色模式自定義背景與防混亂元件適配 ─── */


[data-theme="light"] .glass-range-slider {
  background: rgba(0, 0, 0, 0.14) !important;
}

[data-theme="light"] .glass-range-slider::-webkit-slider-thumb {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

[data-theme="light"] .toggle-switch .slider-round {
  background-color: #cbd5e1 !important;
}

[data-theme="light"] .toggle-switch .slider-round:before {
  background-color: #ffffff !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22) !important;
}

[data-theme="light"] .toggle-switch input:checked + .slider-round {
  background-color: var(--primary) !important;
}

[data-theme="light"] .wallpaper-slider-group,
[data-theme="light"] .wallpaper-toggle-row,
[data-theme="light"] .custom-ambience-picker-row {
  background: rgba(0, 0, 0, 0.03) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .wallpaper-dropzone {
  border-color: rgba(0, 0, 0, 0.15) !important;
  background: rgba(0, 0, 0, 0.02) !important;
}

[data-theme="light"] .wallpaper-dropzone:hover,
[data-theme="light"] .wallpaper-dropzone.dragover {
  border-color: var(--primary) !important;
  background: rgba(124, 58, 237, 0.04) !important;
}

[data-theme="light"] .wallpaper-preset-card {
  border-color: rgba(0, 0, 0, 0.12) !important;
}

/* 淺色模式下精選氛圍卡片自適應明亮系漸層 */
[data-theme="light"] .wallpaper-preset-card[data-preset="aurora"] {
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 50%, #7dd3fc 100%) !important;
}

[data-theme="light"] .wallpaper-preset-card[data-preset="nebula"] {
  background: linear-gradient(135deg, #fdf2f8 0%, #fbcfe8 50%, #fed7aa 100%) !important;
}

[data-theme="light"] .wallpaper-preset-card[data-preset="emerald"] {
  background: linear-gradient(135deg, #ecfdf5 0%, #a7f3d0 50%, #6ee7b7 100%) !important;
}

[data-theme="light"] .wallpaper-preset-card[data-preset="cyberpunk"] {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 50%, #fde047 100%) !important;
}

[data-theme="light"] .wallpaper-preset-card .preset-name {
  color: #1e293b !important;
  text-shadow: none !important;
}

[data-theme="light"] .wallpaper-preset-card.active {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px var(--primary-glow) !important;
}

[data-theme="light"] .custom-color-input-sm::-webkit-color-swatch {
  border-color: rgba(0, 0, 0, 0.2);
}

/* ─── 睡眠定時器 Modal 樣式 ─── */
.sleep-timer-modal-card {
  max-width: 460px;
  width: 92%;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(18, 18, 24, 0.92);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(139, 92, 246, 0.15);
}

.sleep-timer-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 14px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.sleep-timer-banner.active {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
}

.sleep-timer-banner.active .banner-icon {
  animation: sleepPulse 2s infinite ease-in-out;
}

@keyframes sleepPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px rgba(16, 185, 129, 0.6)); }
  50% { transform: scale(1.1); filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.9)); }
}

.sleep-timer-banner .banner-icon {
  font-size: 26px;
  flex-shrink: 0;
}

.sleep-timer-banner .banner-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
}

.sleep-timer-banner.active .banner-title {
  color: #34d399;
}

.sleep-timer-banner .banner-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.sleep-timer-section {
  margin-bottom: 16px;
}

.sleep-timer-section .section-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.sleep-timer-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 3px;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.tab-pill-btn {
  flex: 1;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: 9px;
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-pill-btn.active {
  background: var(--accent-gradient, linear-gradient(135deg, #8b5cf6, #ec4899));
  color: #fff;
  box-shadow: 0 2px 10px rgba(139, 92, 246, 0.35);
}

.preset-chips-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.timer-chip-btn {
  padding: 10px 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: var(--text-main, #f1f5f9);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.timer-chip-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.timer-chip-btn.active {
  background: var(--primary, #8b5cf6);
  border-color: var(--primary, #8b5cf6);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--primary-glow, rgba(139, 92, 246, 0.35));
}

.custom-minutes-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.glass-input-sm {
  flex: 1;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: #fff;
  font-size: 0.9rem;
  outline: none;
}

.specific-time-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.specific-time-wrap label {
  font-size: 0.88rem;
  color: var(--text-main, #fff);
  font-weight: 500;
}

.glass-input-time {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  outline: none;
  transition: border-color 0.2s;
  color-scheme: dark;
}

.glass-input-time:focus {
  border-color: var(--primary, #8b5cf6);
  box-shadow: 0 0 14px var(--primary-glow, rgba(139, 92, 246, 0.3));
}

.time-hint-text {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.4;
}

.stop-mode-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mode-option-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mode-option-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.15);
}

.mode-option-card:has(input:checked) {
  background: var(--primary-glow, rgba(139, 92, 246, 0.12));
  border-color: var(--primary, #8b5cf6);
}

.mode-option-card input[type="radio"] {
  margin-top: 3px;
  accent-color: var(--primary, #8b5cf6);
  cursor: pointer;
}

.mode-option-card .option-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main, #f8fafc);
}

.mode-option-card .option-desc {
  font-size: 0.78rem;
  color: var(--text-muted, #94a3b8);
  margin-top: 2px;
  line-height: 1.35;
}

/* 亮色模式相容 */
[data-theme="light"] .sleep-timer-modal-card {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .sleep-timer-banner {
  background: var(--primary-glow, rgba(124, 58, 237, 0.08));
  border-color: var(--primary, rgba(124, 58, 237, 0.2));
}

[data-theme="light"] .sleep-timer-banner .banner-title {
  color: #1e293b;
}

[data-theme="light"] .sleep-timer-tabs {
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .timer-chip-btn {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
  color: #334155;
}

[data-theme="light"] .timer-chip-btn.active {
  background: var(--primary, #8b5cf6) !important;
  border-color: var(--primary, #8b5cf6) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px var(--primary-glow, rgba(139, 92, 246, 0.35)) !important;
}

[data-theme="light"] .glass-input-sm,
[data-theme="light"] .glass-input-time {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.12);
  color: #0f172a;
  color-scheme: light;
}

[data-theme="light"] .mode-option-card {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .mode-option-card .option-title {
  color: #0f172a;
}

[data-theme="light"] .mode-option-card .option-desc {
  color: #64748b;
}

[data-theme="light"] .mode-option-card:has(input:checked) {
  background: var(--primary-glow, rgba(139, 92, 246, 0.12));
  border-color: var(--primary, #8b5cf6);
}

.sleep-timer-modal-card .primary-btn {
  background: var(--accent-gradient, linear-gradient(135deg, #6366f1 0%, #a855f7 100%));
  color: #ffffff;
}



/* ════════════════════════════════════════════════════════════
   iOS 毛玻璃主題系統 (iOS Glassmorphism Theme System)
   完美區隔深色 / 淺色雙模式：深色深邃星空玻璃，淺色通透牛奶白琉璃
   ════════════════════════════════════════════════════════════ */

/* ── 壁紙底層與暗化 Scrim ── */
.app-wallpaper-layer {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: -2 !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  pointer-events: none !important;
  opacity: 1 !important;
  filter: none !important;
  transform: none !important;
  transition: opacity 0.4s ease !important;
}



/* 淺色模式專屬 Scrim：白晝柔和輕薄霧紗，徹底杜絕黑糊糊的髒感 */


body.has-custom-wallpaper,
[data-theme="light"] body.has-custom-wallpaper {
  background-color: transparent !important;
  background-image: none !important;
}

body.has-custom-wallpaper .content-area,
body.has-custom-wallpaper main.content-area {
  background: transparent !important;
}


/* ════════════════════════════════════════════════════════════
   【桌機版 ≥ 769px：現代頂級懸浮島嶼卡片佈局】
   背景覆蓋整個畫面，卡片帶透明感，深色燻黑、淺色無色透光！
   ════════════════════════════════════════════════════════════ */
@media (min-width: 769px) {

  /* 整個 App 外層容器 */
  .app-layout {
    padding: 0 !important;
    gap: 0 !important;
    box-sizing: border-box !important;
    height: 100vh !important;
    height: 100dvh !important;
    overflow: hidden !important;
    background: transparent !important;
    position: relative !important;
  }

  /* 1. 頂部導航欄 (Top Nav) - 緊靠頂部邊緣，滿寬全屏通透毛玻璃 */
  .top-nav,
  header.top-nav {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 60px !important;
    border-radius: 0 !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
    padding: 0 24px !important;
    flex-shrink: 0 !important;
    width: 100% !important;
    overflow: visible !important;
    z-index: 100 !important;
  }

  /* 2. 主體中間區域：全屏鋪滿 */
  .main-body {
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    display: flex !important;
    position: relative !important;
    background: transparent !important;
    overflow: hidden !important;
  }

  /* 3. 左側選單島嶼卡片 (Sidebar Card) - 保持懸浮島嶼卡片質感 */
  .sidebar,
  aside.sidebar {
    position: fixed !important;
    top: calc(60px + 12px) !important;
    bottom: calc(82px + 12px) !important;
    left: 14px !important;
    width: var(--sidebar-width) !important;
    height: auto !important;
    border-radius: 18px !important;
    padding: 16px 12px !important;
    flex-shrink: 0 !important;
    overflow-y: auto !important;
    z-index: 90 !important;
  }

  /* 4. 中間動態視圖內容區域：貫穿全屏，上下貫通在頂部導航與底部播放器下方平滑滑過！ */
  .content-area,
  main.content-area {
    flex: 1 !important;
    margin-left: calc(var(--sidebar-width) + 26px) !important;
    width: calc(100vw - var(--sidebar-width) - 40px) !important;
    min-height: 0 !important;
    height: 100vh !important;
    height: 100dvh !important;
    border-radius: 0 !important;
    padding: calc(60px + 16px) 24px calc(82px + 24px) 14px !important;
    overflow-y: auto !important;
    background: transparent !important;
    box-sizing: border-box !important;
  }

  /* 5. 底部播放器 (Bottom Player) - 緊靠底部邊緣，滿寬全屏通透毛玻璃 */
  .bottom-player,
  footer.bottom-player {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 82px !important;
    border-radius: 0 !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: none !important;
    border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
    padding: 0 24px !important;
    flex-shrink: 0 !important;
    width: 100% !important;
    z-index: 100 !important;
  }

  /* 6. 歌詞抽屜適配卡片風格 */
  .lyrics-drawer {
    position: fixed !important;
    top: calc(60px + 12px) !important;
    bottom: calc(82px + 12px) !important;
    right: 14px !important;
    border-radius: 18px !important;
    z-index: 120 !important;
  }

  /* ──────────────────────────────────────────────────────────
     【深色模式】：燻黑效果毛玻璃、通透琉璃質感
     ────────────────────────────────────────────────────────── */
  :root:not([data-theme="light"]) .top-nav,
  :root:not([data-theme="light"]) header.top-nav {
    background: rgba(12, 13, 20, 0.70) !important;
    backdrop-filter: blur(28px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    contain: layout style;
  }

  :root:not([data-theme="light"]) .sidebar,
  :root:not([data-theme="light"]) aside.sidebar {
    background: rgba(10, 11, 16, 0.52) !important;
    backdrop-filter: blur(28px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
  }

  :root:not([data-theme="light"]) .bottom-player,
  :root:not([data-theme="light"]) footer.bottom-player {
    background: rgba(10, 11, 16, 0.58) !important;
    backdrop-filter: blur(32px) saturate(190%) !important;
    -webkit-backdrop-filter: blur(32px) saturate(190%) !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), inset 0 1.5px 0 rgba(255, 255, 255, 0.14) !important;
  }

  :root:not([data-theme="light"]) .lyrics-drawer {
    background: rgba(10, 11, 16, 0.88) !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.55) !important;
  }

  /* ──────────────────────────────────────────────────────────
     【淺色模式】：純淨透明毛玻璃 (Colorless Pure Frost Glass)
     ────────────────────────────────────────────────────────── */
  [data-theme="light"] .top-nav,
  [data-theme="light"] header.top-nav {
    background: rgba(255, 255, 255, 0.68) !important;
    backdrop-filter: blur(28px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    contain: layout style;
  }

  [data-theme="light"] .sidebar,
  [data-theme="light"] aside.sidebar {
    background: rgba(255, 255, 255, 0.48) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.70) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
  }

  [data-theme="light"] .bottom-player,
  [data-theme="light"] footer.bottom-player {
    background: rgba(255, 255, 255, 0.52) !important;
    backdrop-filter: blur(28px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.70) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
  }

  [data-theme="light"] .lyrics-drawer {
    background: rgba(255, 255, 255, 0.88) !important;
    border: 1px solid rgba(255, 255, 255, 0.70) !important;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.06) !important;
  }
}

/* ════════════════════════════════════════════════════════════
   【全域通用：內容區開放排版、無色卡片與高清晰文字】
   ════════════════════════════════════════════════════════════ */

/* 1. 內容區域各區塊：完全回歸清透開放，絕不包裹多餘的外框！ */
.section-hero,
.view-header,
.view-header-with-actions,
.liked-header-wrap,
.section-block,
.song-list-container,
.search-box-large,
.search-history-section,
.liked-smart-drawers,
.liked-filter-chips-bar,
.artists-grid-container,
.albums-grid-container {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

/* 2. 深色文字配色：極光白與亮銀，對比度最高 */
:root:not([data-theme="light"]) .hero-title,
:root:not([data-theme="light"]) .view-header h2,
:root:not([data-theme="light"]) .view-header-text h2,
:root:not([data-theme="light"]) .liked-header-text h1,
:root:not([data-theme="light"]) .history-header-text h1,
:root:not([data-theme="light"]) .section-title {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  font-weight: 800 !important;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6) !important;
}

:root:not([data-theme="light"]) .hero-subtitle,
:root:not([data-theme="light"]) .subtitle,
:root:not([data-theme="light"]) .view-header-text .subtitle,
:root:not([data-theme="light"]) .liked-header-text p,
:root:not([data-theme="light"]) .history-header-text p {
  color: #cbd5e1 !important;
  font-weight: 500 !important;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4) !important;
}

/* 3. 淺色文字配色：深石墨藍黑與煙燻黑，不帶髒感，清晰飽滿 */
[data-theme="light"] .hero-title,
[data-theme="light"] .view-header h2,
[data-theme="light"] .view-header-text h2,
[data-theme="light"] .liked-header-text h1,
[data-theme="light"] .history-header-text h1,
[data-theme="light"] .section-title {
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
  font-weight: 800 !important;
  text-shadow: none !important;
}

[data-theme="light"] .hero-subtitle,
[data-theme="light"] .subtitle,
[data-theme="light"] .view-header-text .subtitle,
[data-theme="light"] .liked-header-text p,
[data-theme="light"] .history-header-text p {
  color: #475569 !important;
  font-weight: 500 !important;
  text-shadow: none !important;
}

/* 4. 側邊選單：深色 vs 淺色 */
:root:not([data-theme="light"]) .sidebar .nav-item {
  color: #94a3b8 !important;
  font-weight: 600 !important;
  border-radius: 12px !important;
  padding: 12px 16px !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
:root:not([data-theme="light"]) .sidebar .nav-item:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.08) !important;
}
:root:not([data-theme="light"]) .sidebar .nav-item.active {
  color: #ffffff !important;
  background: var(--accent-gradient) !important;
  border: 1px solid var(--primary) !important;
  box-shadow: 0 4px 18px var(--primary-glow) !important;
}
:root:not([data-theme="light"]) .sidebar .nav-item.active .icon,
:root:not([data-theme="light"]) .sidebar .nav-item.active svg {
  color: #ffffff !important;
  fill: currentColor !important;
}

[data-theme="light"] .sidebar .nav-item {
  color: #475569 !important;
  font-weight: 600 !important;
  border-radius: 12px !important;
  padding: 12px 16px !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
[data-theme="light"] .sidebar .nav-item:hover {
  color: #0f172a !important;
  background: rgba(255, 255, 255, 0.60) !important;
}



/* 5. 內容區歌曲卡片 (Song Cards)：液態壓克力厚玻璃質感，超高視認性與晶瑩光感 */
:root:not([data-theme="light"]) .song-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08) 0%, rgba(22, 24, 34, 0.88) 40%, rgba(14, 15, 22, 0.94) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.24) !important;
  border-left: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 18px !important;
  padding: 14px !important;
  box-shadow: 0 10px 28px -6px rgba(0, 0, 0, 0.55), inset 0 1px 1px rgba(255, 255, 255, 0.12) !important;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

:root:not([data-theme="light"]) .song-card:hover {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.14) 0%, rgba(32, 35, 48, 0.92) 40%, rgba(18, 20, 30, 0.96) 100%) !important;
  border-color: rgba(255, 255, 255, 0.28) !important;
  border-top-color: rgba(255, 255, 255, 0.45) !important;
  transform: translateY(-5px) scale(1.015) !important;
  box-shadow: 0 18px 40px -8px rgba(0, 0, 0, 0.75), 0 0 24px -4px var(--primary-glow), inset 0 1px 1px rgba(255, 255, 255, 0.25) !important;
}

:root:not([data-theme="light"]) .song-card .card-title,
:root:not([data-theme="light"]) .song-card .song-title {
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  letter-spacing: -0.2px !important;
}

:root:not([data-theme="light"]) .song-card .card-artist,
:root:not([data-theme="light"]) .song-card .song-artist {
  color: #94a3b8 !important;
  font-size: 12px !important;
}

[data-theme="light"] .song-card {
  background: linear-gradient(145deg, #ffffff 0%, rgba(255, 255, 255, 0.92) 50%, rgba(240, 244, 255, 0.95) 100%) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  border-top: 1.5px solid #ffffff !important;
  border-left: 1.5px solid #ffffff !important;
  border-radius: 18px !important;
  padding: 14px !important;
  box-shadow: 0 8px 24px -4px rgba(99, 102, 241, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04), inset 0 1px 2px #ffffff !important;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

[data-theme="light"] .song-card:hover {
  background: #ffffff !important;
  border-color: rgba(99, 102, 241, 0.3) !important;
  transform: translateY(-6px) scale(1.02) !important;
  box-shadow: 0 18px 40px -4px rgba(99, 102, 241, 0.2), 0 0 20px -2px var(--primary-glow), inset 0 1px 2px #ffffff !important;
}

[data-theme="light"] .song-card .card-title,
[data-theme="light"] .song-card .song-title {
  color: #0f172a !important;
  font-weight: 700 !important;
  font-size: 14px !important;
}

[data-theme="light"] .song-card .card-artist,
[data-theme="light"] .song-card .song-artist {
  color: #64748b !important;
  font-size: 12px !important;
}

/* 6. 歌單行（Song Rows）：清透懸浮高光 */
.song-row {
  border-radius: 12px !important;
  transition: background 0.18s ease, transform 0.15s ease !important;
}
:root:not([data-theme="light"]) .song-row:hover {
  background: rgba(255, 255, 255, 0.075) !important;
}
:root:not([data-theme="light"]) .song-row .song-name {
  color: #ffffff !important;
}
:root:not([data-theme="light"]) .song-row .artist-name {
  color: #94a3b8 !important;
}

[data-theme="light"] .song-row:hover {
  background: rgba(255, 255, 255, 0.60) !important;
}
[data-theme="light"] .song-row .song-name {
  color: #0f172a !important;
}
[data-theme="light"] .song-row .artist-name {
  color: #64748b !important;
}

/* 7. 收藏庫智慧抽屜與篩選膠囊 */
:root:not([data-theme="light"]) .smart-drawer-card {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 14px !important;
  backdrop-filter: blur(14px) !important;
}
:root:not([data-theme="light"]) .smart-drawer-card:hover {
  background: rgba(255, 255, 255, 0.08) !important;
}

[data-theme="light"] .smart-drawer-card {
  background: rgba(255, 255, 255, 0.50) !important;
  border: 1px solid rgba(255, 255, 255, 0.70) !important;
  border-radius: 14px !important;
  backdrop-filter: blur(14px) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03) !important;
}
[data-theme="light"] .smart-drawer-card:hover {
  background: rgba(255, 255, 255, 0.75) !important;
}

/* 篩選膠囊 */
:root:not([data-theme="light"]) .filter-chip {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #cbd5e1 !important;
  border-radius: 9999px !important;
}
[data-theme="light"] .filter-chip {
  background: rgba(255, 255, 255, 0.55) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  color: #334155 !important;
  border-radius: 9999px !important;
}
.filter-chip.active {
  background: var(--accent-gradient) !important;
  color: #ffffff !important;
  border-color: var(--primary) !important;
  box-shadow: 0 2px 10px var(--primary-glow) !important;
}

/* 8. 搜尋輸入框 */
:root:not([data-theme="light"]) .search-box-large input.glass-input {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 14px !important;
  color: #ffffff !important;
  padding: 14px 20px !important;
}
[data-theme="light"] .search-box-large input.glass-input {
  background: rgba(255, 255, 255, 0.55) !important;
  border: 1px solid rgba(255, 255, 255, 0.70) !important;
  border-radius: 14px !important;
  color: #0f172a !important;
  padding: 14px 20px !important;
}


.app-wallpaper-scrim,


[data-theme="light"] .app-wallpaper-scrim,


/* ════════════════════════════════════════════════════════════
   【手機版 ≤ 768px】
   ════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  body.has-custom-wallpaper .app-wallpaper-layer {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: -2 !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  pointer-events: none !important;
  opacity: 1 !important;
  filter: none !important;
  transform: none !important;
  transition: opacity 0.4s ease !important;
}

  /* ─────────────────────────────
     手機深色模式
     ───────────────────────────── */
  :root:not([data-theme="light"]) body.has-custom-wallpaper .top-nav,
  :root:not([data-theme="light"]) body.has-custom-wallpaper header.top-nav {
    background: rgba(12, 10, 20, 0.72) !important;
    backdrop-filter: blur(28px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    contain: layout style;
  }

  :root:not([data-theme="light"]) body.has-custom-wallpaper .bottom-player,
  :root:not([data-theme="light"]) body.has-custom-wallpaper footer.bottom-player {
    background: rgba(10, 8, 18, 0.68) !important;
    backdrop-filter: blur(28px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(200%) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), 0 -4px 24px rgba(0, 0, 0, 0.25) !important;
  }

  :root:not([data-theme="light"]) body.has-custom-wallpaper .sidebar,
  :root:not([data-theme="light"]) body.has-custom-wallpaper aside.sidebar {
    background: rgba(10, 8, 18, 0.65) !important;
    backdrop-filter: blur(30px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(200%) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10) !important;
  }

  :root:not([data-theme="light"]) body.has-custom-wallpaper .section-block,
  /* removed mobile over-carding */

  /* ─────────────────────────────
     手機淺色模式
     ───────────────────────────── */
  [data-theme="light"] .top-nav,
  [data-theme="light"] body.has-custom-wallpaper .top-nav,
  [data-theme="light"] body.has-custom-wallpaper header.top-nav {
    background: rgba(255, 255, 255, 0.72) !important;
    backdrop-filter: blur(28px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04) !important;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    contain: layout style;
  }

  [data-theme="light"] .bottom-player,
  [data-theme="light"] body.has-custom-wallpaper .bottom-player,
  [data-theme="light"] body.has-custom-wallpaper footer.bottom-player {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(30px) saturate(190%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(190%) !important;
    border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 -4px 20px rgba(0, 0, 0, 0.04) !important;
  }

  [data-theme="light"] .sidebar,
  [data-theme="light"] body.has-custom-wallpaper .sidebar,
  [data-theme="light"] body.has-custom-wallpaper aside.sidebar {
    background: rgba(255, 255, 255, 0.82) !important;
    backdrop-filter: blur(30px) saturate(190%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(190%) !important;
    border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
  }

  [data-theme="light"] body.has-custom-wallpaper .section-block,
  /* removed light mobile over-carding */
}


/* ════════════════════════════════════════════════════════════
   【淺色模式：全域控制元件字體、圖示與輸入框修復】
   ════════════════════════════════════════════════════════════ */
[data-theme="light"] .top-nav .nav-left .logo-text {
  color: #18181b !important;
}
[data-theme="light"] .top-nav #global-search-input {
  background: transparent !important;
  color: #18181b !important;
  border: none !important;
  box-shadow: none !important;
}
[data-theme="light"] .top-nav #global-search-input::placeholder {
  color: #8e8e93 !important;
}
[data-theme="light"] .top-nav .search-icon {
  color: #636366 !important;
}
[data-theme="light"] .top-nav .context-mode-pill {
  background: rgba(0, 0, 0, 0.05) !important;
  color: #18181b !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
}
[data-theme="light"] .top-nav .user-profile-btn {
  color: #18181b !important;
}
[data-theme="light"] .top-nav .icon-btn {
  color: #3a3a3c !important;
}
[data-theme="light"] .top-nav .icon-btn:hover {
  background: rgba(0, 0, 0, 0.05) !important;
  color: var(--primary, #7c3aed) !important;
}

/* 播放器按鈕與文字 */
[data-theme="light"] .bottom-player .song-title,
[data-theme="light"] .bottom-player #player-title,
[data-theme="light"] .bottom-player .player-track-name {
  color: #18181b !important;
}
[data-theme="light"] .bottom-player .song-artist,
[data-theme="light"] .bottom-player #player-artist {
  color: #636366 !important;
}
[data-theme="light"] .bottom-player .control-btn,
[data-theme="light"] .bottom-player .action-btn,
[data-theme="light"] .bottom-player .player-feedback-btn {
  color: #3a3a3c !important;
}
[data-theme="light"] .bottom-player .control-btn:hover,
[data-theme="light"] .bottom-player .action-btn:hover,
[data-theme="light"] .bottom-player .player-feedback-btn:hover {
  color: var(--primary, #7c3aed) !important;
  background: rgba(0, 0, 0, 0.04) !important;
}
[data-theme="light"] .bottom-player .time-display,
[data-theme="light"] .bottom-player .time-label {
  color: #636366 !important;
}
[data-theme="light"] .bottom-player .slider-track-wrapper {
  background: rgba(0, 0, 0, 0.08) !important;
}

/* 歌曲卡片與列表文字 */
[data-theme="light"] .section-title {
  color: #18181b !important;
}
[data-theme="light"] .hero-title {
  color: #18181b !important;
}
[data-theme="light"] .hero-subtitle {
  color: #52525b !important;
}

[data-theme="light"] .card-title {
  color: #18181b !important;
}
[data-theme="light"] .card-artist {
  color: #52525b !important;
}
[data-theme="light"] .song-row {
  color: #18181b;
}
[data-theme="light"] .song-row .row-title {
  color: #18181b !important;
}
[data-theme="light"] .song-row .row-artist,
[data-theme="light"] .song-row .row-album,
[data-theme="light"] .song-row .row-duration {
  color: #636366 !important;
}


/* ════════════════════════════════════════════════════════════
   【壁紙 Modal 內裝置切換 Tab 樣式】
   ════════════════════════════════════════════════════════════ */
.wallpaper-device-tabs {
  display: flex;
  gap: 8px;
  padding: 4px 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 16px;
}
.wallpaper-device-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: transparent;
  color: var(--text-muted, #888);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 500;
}
.wallpaper-device-tab:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary, #fff);
}
.wallpaper-device-tab .tab-sub {
  font-size: 11px;
  opacity: 0.6;
  font-weight: 400;
}
.wallpaper-device-tab.active {
  background: rgba(139, 92, 246, 0.18);
  border-color: rgba(139, 92, 246, 0.40);
  color: #fff;
}
.wallpaper-scope-hint {
  font-size: 12px;
  color: var(--text-muted, #888);
  margin: 0 0 14px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  border-left: 3px solid var(--primary, #8b5cf6);
}

/* 淺色模式專屬 Modal 樣式適配 */
[data-theme="light"] .wallpaper-device-tabs {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .wallpaper-device-tab {
  border-color: rgba(0, 0, 0, 0.10);
  color: #71717a;
}
[data-theme="light"] .wallpaper-device-tab:hover {
  background: rgba(0, 0, 0, 0.03);
  color: #18181b;
}
[data-theme="light"] .wallpaper-device-tab.active {
  border-color: var(--primary) !important;
  color: var(--primary) !important;
}
[data-theme="light"] .wallpaper-scope-hint {
  color: #52525b;
  background: rgba(0, 0, 0, 0.03);
}
[data-theme="light"] .wallpaper-modal-card {
  background: rgba(255, 255, 255, 0.98) !important;
  color: #18181b !important;
}
[data-theme="light"] .wallpaper-section-title {
  color: #3f3f46 !important;
}
[data-theme="light"] .wallpaper-dropzone {
  border-color: rgba(0, 0, 0, 0.14) !important;
  background: rgba(0, 0, 0, 0.02) !important;
}
[data-theme="light"] .dropzone-highlight {
  color: #18181b !important;
}
[data-theme="light"] .dropzone-sub {
  color: #71717a !important;
}


[data-theme="light"] .sidebar .nav-item.active,
[data-theme="light"] .side-nav .nav-item.active {
  color: #ffffff !important;
  background: var(--accent-gradient) !important;
  border: 1px solid var(--primary) !important;
  box-shadow: 0 4px 16px var(--primary-glow) !important;
}
[data-theme="light"] .sidebar .nav-item.active span,
[data-theme="light"] .side-nav .nav-item.active span {
  color: #ffffff !important;
  font-weight: 700 !important;
}
[data-theme="light"] .sidebar .nav-item.active .icon,
[data-theme="light"] .side-nav .nav-item.active .icon,
[data-theme="light"] .sidebar .nav-item.active svg,
[data-theme="light"] .side-nav .nav-item.active svg {
  color: #ffffff !important;
  fill: currentColor !important;
}
[data-theme="light"] .sidebar .nav-item.active .badge,
[data-theme="light"] .sidebar .nav-item.active #sidebar-liked-count {
  background: rgba(255, 255, 255, 0.35) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
}

/* ─── 播放全部與隨機播放按鈕（全主題保證有鮮亮底色） ─── */
.play-all-pill-btn,
#play-all-liked-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 10px 22px !important;
  border-radius: 9999px !important;
  background: var(--accent-gradient) !important;
  color: #ffffff !important;
  border: none !important;
  cursor: pointer !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  box-shadow: 0 4px 16px var(--primary-glow) !important;
  transition: all 0.2s ease !important;
  width: auto !important;
  max-width: fit-content !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}
.play-all-pill-btn:hover,
#play-all-liked-btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 22px var(--primary-glow) !important;
}
.play-all-pill-btn span,
#play-all-liked-btn span {
  color: #ffffff !important;
}
.play-all-pill-btn .icon,
.play-all-pill-btn svg,
#play-all-liked-btn .icon,
#play-all-liked-btn svg {
  width: 15px !important;
  height: 15px !important;
  min-width: 15px !important;
  max-width: 15px !important;
  flex-shrink: 0 !important;
  color: #ffffff !important;
  fill: currentColor !important;
}

.play-all-pill-btn.shuffle-btn,
#shuffle-all-liked-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 10px 20px !important;
  border-radius: 9999px !important;
  background: color-mix(in srgb, var(--primary) 15%, transparent) !important;
  border: 1.5px solid var(--primary) !important;
  color: var(--primary) !important;
  cursor: pointer !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  box-shadow: 0 2px 10px var(--primary-glow) !important;
  transition: all 0.2s ease !important;
  width: auto !important;
  max-width: fit-content !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}
.play-all-pill-btn.shuffle-btn:hover,
#shuffle-all-liked-btn:hover {
  background: var(--primary) !important;
  color: #ffffff !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px var(--primary-glow) !important;
}
.play-all-pill-btn.shuffle-btn span,
#shuffle-all-liked-btn span {
  color: inherit !important;
}
.play-all-pill-btn.shuffle-btn:hover span,
#shuffle-all-liked-btn:hover span {
  color: #ffffff !important;
}
.play-all-pill-btn.shuffle-btn svg,
#shuffle-all-liked-btn svg {
  color: inherit !important;
  stroke: currentColor !important;
}
.play-all-pill-btn.shuffle-btn:hover svg,
#shuffle-all-liked-btn:hover svg {
  color: #ffffff !important;
  stroke: #ffffff !important;
}






/* ══════════════════════════════════════════════════════════════════════════
   【高質感毛玻璃分層防護系統 v2.7.1】
   專門針對自定義背景圖片（body.has-custom-wallpaper）：
   1. 背景壁紙 100% 滿版清晰，絕不全域模糊
   2. 全域暗化遮罩（Scrim）加入智慧底限（防高光刺眼白毛白底撞色）
   3. 歌單清單區加入毛玻璃島嶼容器，撫平背景毛髮高頻雜訊，字體極其清晰
   4. 搜尋框、智慧抽屜、篩選膠囊立體化毛玻璃襯底
   5. 頂部導航與側邊欄折射霧度適度提升，防止照片文字穿透干擾
   6. 預設無壁紙狀態完全不受影響，維持原有清爽體驗
   ══════════════════════════════════════════════════════════════════════════ */

/* ── 1. 全域背景層與防護遮罩 ── */
.app-wallpaper-layer,
body.has-custom-wallpaper .app-wallpaper-layer {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: -2 !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  pointer-events: none !important;
  opacity: 1 !important;
  filter: none !important;
  transform: none !important;
  transition: opacity 0.4s ease !important;
}

/* 深色模式遮罩：給予 24% 基礎深色調光薄霧，降噪壓制高光白毛，使白字立體可讀 */
.app-wallpaper-scrim,
body.has-custom-wallpaper .app-wallpaper-scrim {
  position: fixed !important;
  inset: 0 !important;
  z-index: -1 !important;
  background-color: rgba(6, 8, 14, calc(0.24 + var(--wallpaper-dim, 0.35) * 0.50)) !important;
  pointer-events: none !important;
  transition: opacity 0.3s ease, background-color 0.3s ease !important;
}

/* 淺色模式遮罩：輕柔白玉薄紗，確保深色字體鮮明對比 */
[data-theme="light"] .app-wallpaper-scrim,
[data-theme="light"] body.has-custom-wallpaper .app-wallpaper-scrim {
  position: fixed !important;
  inset: 0 !important;
  z-index: -1 !important;
  background-color: rgba(255, 255, 255, calc(0.12 + var(--wallpaper-dim, 0) * 0.40)) !important;
  pointer-events: none !important;
  transition: opacity 0.3s ease, background-color 0.3s ease !important;
}

/* ── 2. 桌機懸浮島嶼卡片（適度提升霧度，防止背景大字穿透干擾） ── */
@media (min-width: 769px) {

  /* 深色模式：68% 燻黑毛玻璃，微透但折射飽滿 */
  :root:not([data-theme="light"]) body.has-custom-wallpaper .top-nav,
  :root:not([data-theme="light"]) body.has-custom-wallpaper header.top-nav {
    background: rgba(12, 13, 20, 0.70) !important;
    backdrop-filter: blur(28px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    contain: layout style;
  }

  :root:not([data-theme="light"]) body.has-custom-wallpaper .sidebar,
  :root:not([data-theme="light"]) body.has-custom-wallpaper aside.sidebar {
    background: rgba(14, 16, 24, 0.65) !important;
    backdrop-filter: blur(28px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
  }

  :root:not([data-theme="light"]) body.has-custom-wallpaper .bottom-player,
  :root:not([data-theme="light"]) body.has-custom-wallpaper footer.bottom-player {
    background: rgba(14, 16, 24, 0.75) !important;
    backdrop-filter: blur(30px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), inset 0 1.5px 0 rgba(255, 255, 255, 0.14) !important;
  }

  /* 淺色模式：68% 白玉透光琉璃 */
  [data-theme="light"] body.has-custom-wallpaper .top-nav,
  [data-theme="light"] body.has-custom-wallpaper header.top-nav {
    background: rgba(255, 255, 255, 0.68) !important;
    backdrop-filter: blur(28px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    contain: layout style;
  }

  [data-theme="light"] body.has-custom-wallpaper .sidebar,
  [data-theme="light"] body.has-custom-wallpaper aside.sidebar {
    background: rgba(255, 255, 255, 0.65) !important;
    backdrop-filter: blur(28px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.75) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.90) !important;
  }

  [data-theme="light"] body.has-custom-wallpaper .bottom-player,
  [data-theme="light"] body.has-custom-wallpaper footer.bottom-player {
    background: rgba(255, 255, 255, 0.72) !important;
    backdrop-filter: blur(30px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.75) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.90) !important;
  }
}

/* 頂部搜尋框襯底提升對比度 (排除全透明圓角搜尋膠囊) */
:root:not([data-theme="light"]) body.has-custom-wallpaper .search-bar input,
:root:not([data-theme="light"]) body.has-custom-wallpaper .top-nav input:not(.search-capsule-input) {
  background: rgba(0, 0, 0, 0.35) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: #ffffff !important;
}
[data-theme="light"] body.has-custom-wallpaper .search-bar input,
[data-theme="light"] body.has-custom-wallpaper .top-nav input:not(.search-capsule-input) {
  background: rgba(255, 255, 255, 0.65) !important;
  border: 1px solid rgba(0, 0, 0, 0.10) !important;
  color: #0f172a !important;
}

/* ── 3. 歌曲清單列表「毛玻璃島嶼容器」── */
body.has-custom-wallpaper .song-list-container {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  background: rgba(14, 16, 24, 0.65) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  border-radius: 20px !important;
  padding: 14px 16px !important;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.35) !important;
  margin-top: 12px !important;
}

[data-theme="light"] body.has-custom-wallpaper .song-list-container {
  background: rgba(255, 255, 255, 0.68) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.85) !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06) !important;
}

/* 歌單單行高清晰文字與懸停質感 */
body.has-custom-wallpaper .song-row {
  border-radius: 12px !important;
  padding: 10px 14px !important;
  transition: all 0.15s ease !important;
}
:root:not([data-theme="light"]) body.has-custom-wallpaper .song-row {
  color: #ffffff !important;
}
:root:not([data-theme="light"]) body.has-custom-wallpaper .song-row:hover {
  background: rgba(255, 255, 255, 0.08) !important;
}
:root:not([data-theme="light"]) body.has-custom-wallpaper .song-row .row-title,
:root:not([data-theme="light"]) body.has-custom-wallpaper .song-row .song-name {
  color: #ffffff !important;
  font-weight: 600 !important;
}
:root:not([data-theme="light"]) body.has-custom-wallpaper .song-row .row-artist,
:root:not([data-theme="light"]) body.has-custom-wallpaper .song-row .artist-name {
  color: #cbd5e1 !important;
}
:root:not([data-theme="light"]) body.has-custom-wallpaper .song-row .row-index,
:root:not([data-theme="light"]) body.has-custom-wallpaper .song-row .row-duration {
  color: #cbd5e1 !important;
  font-weight: 500 !important;
}

[data-theme="light"] body.has-custom-wallpaper .song-row {
  color: #0f172a !important;
}
[data-theme="light"] body.has-custom-wallpaper .song-row:hover {
  background: rgba(0, 0, 0, 0.05) !important;
}
[data-theme="light"] body.has-custom-wallpaper .song-row .row-title,
[data-theme="light"] body.has-custom-wallpaper .song-row .song-name {
  color: #0f172a !important;
  font-weight: 700 !important;
}
[data-theme="light"] body.has-custom-wallpaper .song-row .row-artist,
[data-theme="light"] body.has-custom-wallpaper .song-row .artist-name {
  color: #475569 !important;
  font-weight: 500 !important;
}
[data-theme="light"] body.has-custom-wallpaper .song-row .row-index,
[data-theme="light"] body.has-custom-wallpaper .song-row .row-duration {
  color: #334155 !important;
  font-weight: 600 !important;
}

/* ── 4. 智慧抽屜與篩選膠囊（收藏庫頁面）── */
:root:not([data-theme="light"]) body.has-custom-wallpaper .smart-drawer-card {
  background: rgba(14, 16, 24, 0.65) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 16px !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35) !important;
}
:root:not([data-theme="light"]) body.has-custom-wallpaper .smart-drawer-card .drawer-name {
  color: #ffffff !important;
  font-weight: 700 !important;
}
:root:not([data-theme="light"]) body.has-custom-wallpaper .smart-drawer-card .drawer-count {
  color: #cbd5e1 !important;
}

[data-theme="light"] body.has-custom-wallpaper .smart-drawer-card {
  background: rgba(255, 255, 255, 0.70) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.85) !important;
  border-radius: 16px !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05) !important;
}
[data-theme="light"] body.has-custom-wallpaper .smart-drawer-card .drawer-name {
  color: #0f172a !important;
  font-weight: 700 !important;
}
[data-theme="light"] body.has-custom-wallpaper .smart-drawer-card .drawer-count {
  color: #475569 !important;
  font-weight: 500 !important;
}

/* 篩選膠囊 */
:root:not([data-theme="light"]) body.has-custom-wallpaper .filter-chip {
  background: rgba(20, 22, 34, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: #f1f5f9 !important;
  font-weight: 600 !important;
}
[data-theme="light"] body.has-custom-wallpaper .filter-chip {
  background: rgba(255, 255, 255, 0.75) !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  color: #0f172a !important;
  font-weight: 600 !important;
}
body.has-custom-wallpaper .filter-chip.active {
  background: var(--accent-gradient) !important;
  color: #ffffff !important;
  border-color: var(--primary) !important;
  box-shadow: 0 2px 10px var(--primary-glow) !important;
}

/* ── 5. 探索搜尋頁面（大搜尋框與標籤）── */
:root:not([data-theme="light"]) body.has-custom-wallpaper .search-box-large input.glass-input,
:root:not([data-theme="light"]) body.has-custom-wallpaper .search-input-wrapper input {
  background: rgba(14, 16, 24, 0.75) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.40) !important;
}
:root:not([data-theme="light"]) body.has-custom-wallpaper .search-box-large input::placeholder,
:root:not([data-theme="light"]) body.has-custom-wallpaper .search-input-wrapper input::placeholder {
  color: #94a3b8 !important;
}

[data-theme="light"] body.has-custom-wallpaper .search-box-large input.glass-input,
[data-theme="light"] body.has-custom-wallpaper .search-input-wrapper input {
  background: rgba(255, 255, 255, 0.80) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  border: 1.5px solid rgba(0, 0, 0, 0.12) !important;
  color: #0f172a !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06) !important;
}
[data-theme="light"] body.has-custom-wallpaper .search-box-large input::placeholder,
[data-theme="light"] body.has-custom-wallpaper .search-input-wrapper input::placeholder {
  color: #64748b !important;
}

/* 歷史標籤 */
:root:not([data-theme="light"]) body.has-custom-wallpaper .history-tag,
:root:not([data-theme="light"]) body.has-custom-wallpaper .search-history-tag,
:root:not([data-theme="light"]) body.has-custom-wallpaper .search-tag {
  background: rgba(20, 22, 34, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #f1f5f9 !important;
  font-weight: 600 !important;
}
[data-theme="light"] body.has-custom-wallpaper .history-tag,
[data-theme="light"] body.has-custom-wallpaper .search-history-tag,
[data-theme="light"] body.has-custom-wallpaper .search-tag {
  background: rgba(255, 255, 255, 0.75) !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  color: #0f172a !important;
  font-weight: 600 !important;
}

/* ── 6. 大標題與文字立體微陰影（確保字字立體、不被背景吃字） ── */
:root:not([data-theme="light"]) body.has-custom-wallpaper .hero-title,
:root:not([data-theme="light"]) body.has-custom-wallpaper .view-header h2,
:root:not([data-theme="light"]) body.has-custom-wallpaper .view-header-text h2,
:root:not([data-theme="light"]) body.has-custom-wallpaper .liked-header-text h1,
:root:not([data-theme="light"]) body.has-custom-wallpaper .history-header-text h1,
:root:not([data-theme="light"]) body.has-custom-wallpaper .section-title {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  font-weight: 800 !important;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.85), 0 1px 3px rgba(0, 0, 0, 0.95) !important;
}

:root:not([data-theme="light"]) body.has-custom-wallpaper .hero-subtitle,
:root:not([data-theme="light"]) body.has-custom-wallpaper .subtitle,
:root:not([data-theme="light"]) body.has-custom-wallpaper .view-header-text .subtitle,
:root:not([data-theme="light"]) body.has-custom-wallpaper .liked-header-text p,
:root:not([data-theme="light"]) body.has-custom-wallpaper .history-header-text p {
  color: #e2e8f0 !important;
  font-weight: 500 !important;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.85) !important;
}

[data-theme="light"] body.has-custom-wallpaper .hero-title,
[data-theme="light"] body.has-custom-wallpaper .view-header h2,
[data-theme="light"] body.has-custom-wallpaper .view-header-text h2,
[data-theme="light"] body.has-custom-wallpaper .liked-header-text h1,
[data-theme="light"] body.has-custom-wallpaper .history-header-text h1,
[data-theme="light"] body.has-custom-wallpaper .section-title {
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
  font-weight: 800 !important;
  text-shadow: 0 1px 8px rgba(255, 255, 255, 0.90) !important;
}

[data-theme="light"] body.has-custom-wallpaper .hero-subtitle,
[data-theme="light"] body.has-custom-wallpaper .subtitle,
[data-theme="light"] body.has-custom-wallpaper .view-header-text .subtitle,
[data-theme="light"] body.has-custom-wallpaper .liked-header-text p,
[data-theme="light"] body.has-custom-wallpaper .history-header-text p {
  color: #1e293b !important;
  font-weight: 600 !important;
  text-shadow: 0 1px 6px rgba(255, 255, 255, 0.85) !important;
}

/* 側邊欄文字對比提亮 */
:root:not([data-theme="light"]) body.has-custom-wallpaper .sidebar .nav-item:not(.active),
:root:not([data-theme="light"]) body.has-custom-wallpaper .side-nav .nav-item:not(.active) {
  color: #e2e8f0 !important;
  font-weight: 600 !important;
}
:root:not([data-theme="light"]) body.has-custom-wallpaper .sidebar .nav-item:not(.active):hover,
:root:not([data-theme="light"]) body.has-custom-wallpaper .side-nav .nav-item:not(.active):hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.12) !important;
}
:root:not([data-theme="light"]) body.has-custom-wallpaper .sidebar .nav-item:not(.active) .icon,
:root:not([data-theme="light"]) body.has-custom-wallpaper .side-nav .nav-item:not(.active) .icon {
  color: #cbd5e1 !important;
}

[data-theme="light"] body.has-custom-wallpaper .sidebar .nav-item:not(.active),
[data-theme="light"] body.has-custom-wallpaper .side-nav .nav-item:not(.active) {
  color: #1e293b !important;
  font-weight: 600 !important;
}
[data-theme="light"] body.has-custom-wallpaper .sidebar .nav-item:not(.active):hover,
[data-theme="light"] body.has-custom-wallpaper .side-nav .nav-item:not(.active):hover {
  color: #0f172a !important;
  background: rgba(0, 0, 0, 0.06) !important;
}
[data-theme="light"] body.has-custom-wallpaper .sidebar .nav-item:not(.active) .icon,
[data-theme="light"] body.has-custom-wallpaper .side-nav .nav-item:not(.active) .icon {
  color: #334155 !important;
}

/* ── 7. 側邊欄選中態與核心按鈕牢固鎖定 ── */
body.has-custom-wallpaper .sidebar .side-nav .nav-item.active,
body.has-custom-wallpaper .sidebar .nav-item.active,
body.has-custom-wallpaper .side-nav .nav-item.active {
  color: #ffffff !important;
  background: var(--accent-gradient) !important;
  border: 1px solid var(--primary) !important;
  box-shadow: 0 4px 18px var(--primary-glow) !important;
}
body.has-custom-wallpaper .sidebar .side-nav .nav-item.active span,
body.has-custom-wallpaper .sidebar .nav-item.active span,
body.has-custom-wallpaper .side-nav .nav-item.active span {
  color: #ffffff !important;
  font-weight: 700 !important;
}
body.has-custom-wallpaper .sidebar .side-nav .nav-item.active .icon,
body.has-custom-wallpaper .sidebar .nav-item.active .icon,
body.has-custom-wallpaper .side-nav .nav-item.active .icon,
body.has-custom-wallpaper .sidebar .nav-item.active svg,
body.has-custom-wallpaper .side-nav .nav-item.active svg {
  color: #ffffff !important;
  fill: currentColor !important;
}
body.has-custom-wallpaper .sidebar .nav-item.active .badge,
body.has-custom-wallpaper .sidebar .nav-item.active #sidebar-liked-count {
  background: rgba(255, 255, 255, 0.35) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
}

/* 播放全部與隨機按鈕 */
body.has-custom-wallpaper .play-all-pill-btn:not(.shuffle-btn),
body.has-custom-wallpaper #play-all-liked-btn {
  background: var(--accent-gradient) !important;
  color: #ffffff !important;
  border: none !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 16px var(--primary-glow) !important;
}
body.has-custom-wallpaper .play-all-pill-btn:not(.shuffle-btn):hover,
body.has-custom-wallpaper #play-all-liked-btn:hover {
  box-shadow: 0 6px 22px var(--primary-glow) !important;
  transform: translateY(-2px) !important;
}
body.has-custom-wallpaper .play-all-pill-btn span,
body.has-custom-wallpaper #play-all-liked-btn span {
  color: #ffffff !important;
}
body.has-custom-wallpaper .play-all-pill-btn svg,
body.has-custom-wallpaper #play-all-liked-btn svg {
  color: #ffffff !important;
  fill: currentColor !important;
}




/* ══════════════════════════════════════════════════════════════════════════
   【搜尋歷史 & 收藏分類 超高對比毛玻璃強化 v2.7.2】
   精準適配 .history-tag-pill、.chip-btn、.liked-view-switcher、.smart-drawer-card
   深淺雙模式：底襯紮實、文字清晰飽滿、任何桌布均清晰易讀！
   ══════════════════════════════════════════════════════════════════════════ */

/* ── 1. 搜尋歷史（Search History Tags & Header）── */

/* 標題與清空按鈕 */
:root:not([data-theme="light"]) .history-title-wrap {
  color: #f1f5f9 !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8) !important;
}
:root:not([data-theme="light"]) .history-title-wrap svg {
  color: #c084fc !important;
}
:root:not([data-theme="light"]) .clear-history-link {
  color: #cbd5e1 !important;
  font-weight: 600 !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 6px !important;
  padding: 3px 8px !important;
}
:root:not([data-theme="light"]) .clear-history-link:hover {
  color: #fca5a5 !important;
  background: rgba(239, 68, 68, 0.25) !important;
}

[data-theme="light"] .history-title-wrap {
  color: #0f172a !important;
  font-weight: 700 !important;
  font-size: 13px !important;
}
[data-theme="light"] .history-title-wrap svg {
  color: #7c3aed !important;
}
[data-theme="light"] .clear-history-link {
  color: #475569 !important;
  font-weight: 600 !important;
  background: rgba(0, 0, 0, 0.06) !important;
  border: 1px solid rgba(0, 0, 0, 0.10) !important;
  border-radius: 6px !important;
  padding: 3px 8px !important;
}
[data-theme="light"] .clear-history-link:hover {
  color: #dc2626 !important;
  background: rgba(239, 68, 68, 0.15) !important;
}

/* 歷史標籤膠囊（深色模式：深色高透毛玻璃 + 亮白字體） */
:root:not([data-theme="light"]) .history-tag-pill {
  background: rgba(18, 20, 32, 0.85) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  color: #f8fafc !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  padding: 6px 14px !important;
  border-radius: 9999px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.40) !important;
  transition: all 0.2s ease !important;
}
:root:not([data-theme="light"]) .history-tag-pill:hover {
  background: color-mix(in srgb, var(--primary) 30%, transparent) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 6px 18px var(--primary-glow) !important;
}
:root:not([data-theme="light"]) .history-tag-pill .tag-remove-btn {
  color: #94a3b8 !important;
  font-weight: 700 !important;
  margin-left: 6px !important;
}
:root:not([data-theme="light"]) .history-tag-pill .tag-remove-btn:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.20) !important;
}

/* 歷史標籤膠囊（淺色模式：白玉高透毛玻璃 + 深藍黑字體） */
[data-theme="light"] .history-tag-pill {
  background: rgba(255, 255, 255, 0.88) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border: 1.5px solid rgba(0, 0, 0, 0.12) !important;
  color: #0f172a !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  padding: 6px 14px !important;
  border-radius: 9999px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08) !important;
  transition: all 0.2s ease !important;
}
[data-theme="light"] .history-tag-pill:hover {
  border-color: var(--primary) !important;
  color: var(--primary) !important;
  box-shadow: 0 6px 18px var(--primary-glow) !important;
}
[data-theme="light"] .history-tag-pill .tag-remove-btn {
  color: #64748b !important;
  font-weight: 700 !important;
  margin-left: 6px !important;
}
[data-theme="light"] .history-tag-pill .tag-remove-btn:hover {
  color: #0f172a !important;
  background: rgba(0, 0, 0, 0.10) !important;
}


/* ── 2. 我的收藏分類膠囊（.chip-btn）── */

/* 深色模式：高立體感燻黑透光卡片，白字高對比 */
:root:not([data-theme="light"]) .chip-btn {
  background: rgba(18, 20, 32, 0.85) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  color: #f8fafc !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  padding: 6px 16px !important;
  border-radius: 9999px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.40) !important;
  transition: all 0.2s ease !important;
  cursor: pointer !important;
}
:root:not([data-theme="light"]) .chip-btn:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
}
:root:not([data-theme="light"]) .chip-btn.active {
  background: var(--accent-gradient) !important;
  color: #ffffff !important;
  border-color: var(--primary) !important;
  box-shadow: 0 4px 18px var(--primary-glow) !important;
}
:root:not([data-theme="light"]) .chip-divider {
  background: rgba(255, 255, 255, 0.25) !important;
  width: 1px !important;
  height: 18px !important;
}

/* 淺色模式：白玉琉璃底色，黑字濃郁飽滿 */
[data-theme="light"] .chip-btn {
  background: rgba(255, 255, 255, 0.88) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border: 1.5px solid rgba(0, 0, 0, 0.12) !important;
  color: #0f172a !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  padding: 6px 16px !important;
  border-radius: 9999px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08) !important;
  transition: all 0.2s ease !important;
  cursor: pointer !important;
}
[data-theme="light"] .chip-btn:hover {
  border-color: var(--primary) !important;
  color: var(--primary) !important;
}
[data-theme="light"] .chip-btn.active {
  background: var(--accent-gradient) !important;
  color: #ffffff !important;
  border-color: var(--primary) !important;
  box-shadow: 0 4px 18px var(--primary-glow) !important;
}
[data-theme="light"] .chip-divider {
  background: rgba(0, 0, 0, 0.15) !important;
  width: 1px !important;
  height: 18px !important;
}


/* ── 3. 收藏庫智慧抽屜（.smart-drawer-card）文字與底板 ── */
:root:not([data-theme="light"]) .smart-drawer-card {
  background: rgba(14, 16, 24, 0.72) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 16px !important;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.40) !important;
}
:root:not([data-theme="light"]) .smart-drawer-card .drawer-title {
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 14px !important;
}
:root:not([data-theme="light"]) .smart-drawer-card .drawer-sub {
  color: #cbd5e1 !important;
  font-weight: 500 !important;
  font-size: 12px !important;
}
:root:not([data-theme="light"]) .smart-drawer-card.active {
  border-color: var(--primary) !important;
  box-shadow: 0 0 20px var(--primary-glow) !important;
}

[data-theme="light"] .smart-drawer-card {
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border: 1.5px solid rgba(0, 0, 0, 0.10) !important;
  border-radius: 16px !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06) !important;
}
[data-theme="light"] .smart-drawer-card .drawer-title {
  color: #0f172a !important;
  font-weight: 700 !important;
  font-size: 14px !important;
}
[data-theme="light"] .smart-drawer-card .drawer-sub {
  color: #475569 !important;
  font-weight: 600 !important;
  font-size: 12px !important;
}
[data-theme="light"] .smart-drawer-card.active {
  border-color: var(--primary) !important;
  box-shadow: 0 0 18px var(--primary-glow) !important;
}


/* ── 4. 視圖切換器（單曲 / 歌手 / 專輯）── */
:root:not([data-theme="light"]) .liked-view-switcher {
  background: rgba(14, 16, 24, 0.75) !important;
  backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  padding: 3px !important;
  border-radius: 9999px !important;
}
:root:not([data-theme="light"]) .view-tab-btn {
  color: #cbd5e1 !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  border-radius: 9999px !important;
  transition: all 0.2s ease !important;
}
:root:not([data-theme="light"]) .view-tab-btn:hover {
  color: #ffffff !important;
}
:root:not([data-theme="light"]) .view-tab-btn.active {
  background: var(--accent-gradient) !important;
  color: #fff !important;
  font-weight: 600 !important;
  border: none !important;
  box-shadow: 0 2px 8px var(--primary-glow) !important;
}

[data-theme="light"] .liked-view-switcher {
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(16px) !important;
  border: 1.5px solid rgba(0, 0, 0, 0.12) !important;
  padding: 3px !important;
  border-radius: 9999px !important;
}
[data-theme="light"] .view-tab-btn {
  color: #475569 !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  border-radius: 9999px !important;
  transition: all 0.2s ease !important;
}
[data-theme="light"] .view-tab-btn:hover {
  color: #0f172a !important;
}
[data-theme="light"] .view-tab-btn.active {
  background: var(--accent-gradient) !important;
  color: #fff !important;
  font-weight: 600 !important;
  border: none !important;
  box-shadow: 0 2px 8px var(--primary-glow) !important;
}


/* ── 5. 收藏庫內快速搜尋輸入框 ── */
:root:not([data-theme="light"]) .liked-search-box {
  background: rgba(14, 16, 24, 0.75) !important;
  backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 9999px !important;
}
:root:not([data-theme="light"]) .liked-search-box input {
  color: #ffffff !important;
}
:root:not([data-theme="light"]) .liked-search-box input::placeholder {
  color: #94a3b8 !important;
}
:root:not([data-theme="light"]) .liked-search-icon {
  color: #cbd5e1 !important;
}

[data-theme="light"] .liked-search-box {
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(16px) !important;
  border: 1.5px solid rgba(0, 0, 0, 0.12) !important;
  border-radius: 9999px !important;
}
[data-theme="light"] .liked-search-box input {
  color: #0f172a !important;
}
[data-theme="light"] .liked-search-box input::placeholder {
  color: #64748b !important;
}
[data-theme="light"] .liked-search-icon {
  color: #475569 !important;
}




/* ══════════════════════════════════════════════════════════════════════════
   【淺色模式：情境聆聽模式 & 偏好設定 Modal 文字配色強化 v2.7.3】
   徹底杜絕白底白字！全面賦予飽滿深色墨灰階與鮮明狀態標籤
   ══════════════════════════════════════════════════════════════════════════ */

/* ── 1. 情境模式切換中心（Context Mode Modal）── */

/* Modal 頂部標題 */
[data-theme="light"] .modal-header h3,
[data-theme="light"] .context-modal-card .modal-header h3 {
  color: #0f172a !important;
  font-weight: 800 !important;
}
[data-theme="light"] .modal-header .header-subtitle,
[data-theme="light"] .context-modal-card .header-subtitle {
  color: #475569 !important;
  font-weight: 500 !important;
}
[data-theme="light"] .modal-close-btn {
  color: #64748b !important;
}
[data-theme="light"] .modal-close-btn:hover {
  color: #0f172a !important;
  background: rgba(0, 0, 0, 0.06) !important;
}

/* 頂部預設卡片（一般探索模式 & 世界探索電台） */
[data-theme="light"] .context-default-card {
  background: #ffffff !important;
  border: 1.5px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04) !important;
}
[data-theme="light"] .context-default-card:hover {
  border-color: var(--primary) !important;
  background: color-mix(in srgb, var(--primary) 6%, transparent) !important;
}
[data-theme="light"] .context-default-card.active {
  background: color-mix(in srgb, var(--primary) 10%, transparent) !important;
  border: 1.5px solid var(--primary) !important;
  box-shadow: 0 4px 16px var(--primary-glow) !important;
}

[data-theme="light"] .context-card-title {
  color: #0f172a !important;
  font-weight: 800 !important;
  font-size: 15px !important;
}
[data-theme="light"] .context-default-card.active .context-card-title {
  color: var(--primary) !important;
}

[data-theme="light"] .context-card-desc {
  color: #475569 !important;
  font-weight: 500 !important;
  font-size: 12px !important;
}

[data-theme="light"] .context-card-badge {
  color: #7c3aed !important;
  background: rgba(124, 58, 237, 0.14) !important;
  border: 1px solid rgba(124, 58, 237, 0.25) !important;
  font-weight: 700 !important;
}

/* 7 大主題情境分組標題 */
[data-theme="light"] .context-modes-heading {
  color: #475569 !important;
  font-weight: 700 !important;
  font-size: 12px !important;
}

/* 情境卡片容器（工作、運動、放鬆等） */
[data-theme="light"] .context-mode-card {
  background: #f8fafc !important;
  border: 1.5px solid rgba(0, 0, 0, 0.07) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02) !important;
}

/* 情境卡片頭部（💼 工作） */
[data-theme="light"] .context-mode-header {
  color: #0f172a !important;
  font-weight: 800 !important;
  font-size: 15px !important;
}

/* 子狀態晶片按鈕（專注思考、開會/協作、重複性工作、短暫休息） */
[data-theme="light"] .context-state-chip {
  background: #ffffff !important;
  border: 1.5px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03) !important;
  transition: all 0.2s ease !important;
}
[data-theme="light"] .context-state-chip:hover {
  background: color-mix(in srgb, var(--primary) 8%, transparent) !important;
  border-color: var(--primary) !important;
  transform: translateX(2px) !important;
}
[data-theme="light"] .context-state-chip.active {
  background: color-mix(in srgb, var(--primary) 12%, transparent) !important;
  border: 1.5px solid var(--primary) !important;
  box-shadow: 0 2px 10px var(--primary-glow) !important;
}

/* 子狀態主要標題文字（★關鍵修復：解決白底白字★） */
[data-theme="light"] .state-chip-main strong {
  color: #0f172a !important;
  font-weight: 700 !important;
  font-size: 13px !important;
}
[data-theme="light"] .context-state-chip.active .state-chip-main strong {
  color: var(--primary) !important;
  font-weight: 800 !important;
}

/* 子狀態描述文字 */
[data-theme="light"] .state-chip-main span {
  color: #64748b !important;
  font-weight: 500 !important;
  font-size: 11px !important;
}
[data-theme="light"] .context-state-chip.active .state-chip-main span {
  color: var(--primary) !important;
}

/* 啟動中標籤 */
[data-theme="light"] .state-chip-active-badge {
  color: #ffffff !important;
  background: var(--primary) !important;
  border: 1px solid var(--primary) !important;
  font-weight: 700 !important;
}


/* ── 2. 音樂偏好與黑名單設定 Modal 強化 ── */
[data-theme="light"] .pref-tab-btn {
  color: #64748b !important;
  font-weight: 600 !important;
}
[data-theme="light"] .pref-tab-btn:hover {
  color: #0f172a !important;
}
[data-theme="light"] .pref-tab-btn.active {
  color: var(--primary) !important;
  border-bottom-color: var(--primary) !important;
  font-weight: 700 !important;
}

[data-theme="light"] .pref-section-title {
  color: #0f172a !important;
  font-weight: 700 !important;
}

[data-theme="light"] .pref-chip {
  background: #f1f5f9 !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  color: #334155 !important;
  font-weight: 600 !important;
}
[data-theme="light"] .pref-chip:hover {
  background: #ffffff !important;
  border-color: #7c3aed !important;
  color: #7c3aed !important;
}
[data-theme="light"] .pref-chip.active {
  background: var(--accent-gradient) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
  box-shadow: 0 2px 8px var(--primary-glow) !important;
}
[data-theme="light"] .pref-chip.disliked-active {
  background: #fee2e2 !important;
  border-color: #ef4444 !important;
  color: #b91c1c !important;
  font-weight: 700 !important;
}

[data-theme="light"] .blacklist-notice {
  background: #fef2f2 !important;
  border: 1px solid #fecaca !important;
  color: #b91c1c !important;
}
[data-theme="light"] .blacklist-artist-tag {
  background: #fee2e2 !important;
  border: 1px solid #fca5a5 !important;
  color: #b91c1c !important;
}



/* ════════════════════════════════════════════════════════════
   【動態歌詞增強：重試按鈕、旋轉動效與手機版可見性高對比優化】(v2.7.4)
   ════════════════════════════════════════════════════════════ */

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

.icon-btn.spinning svg,
.spinning svg {
  animation: spin 0.8s linear infinite !important;
}

.lyrics-empty-container {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 48px 16px !important;
  gap: 16px !important;
  text-align: center !important;
}

.lyrics-inline-retry-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 10px 22px !important;
  border-radius: 24px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  background: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.20) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25) !important;
  transition: all 0.2s ease !important;
}

.lyrics-inline-retry-btn:hover {
  background: rgba(255, 255, 255, 0.22) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35) !important;
}

.lyrics-inline-retry-btn:active {
  transform: translateY(0) !important;
}

[data-theme="light"] .lyrics-inline-retry-btn {
  background: rgba(0, 0, 0, 0.07) !important;
  color: #0f172a !important;
  border: 1px solid rgba(0, 0, 0, 0.14) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06) !important;
}

[data-theme="light"] .lyrics-inline-retry-btn:hover {
  background: rgba(0, 0, 0, 0.12) !important;
}

/* 手機版直向模式下確保歌詞抽屜頂部操作按鈕永遠清晰顯眼、排版不被歌名擠壓 */
@media (max-width: 768px) {
  .lyrics-drawer {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    bottom: calc(56px + 64px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 1500 !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .lyrics-drawer.hidden {
    display: none !important;
  }

  .lyrics-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 14px 16px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09) !important;
    flex-shrink: 0 !important;
    gap: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  [data-theme="light"] .lyrics-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.07) !important;
  }

  .lyrics-song-info {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .lyrics-song-info h3 {
    max-width: 100% !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin: 0 !important;
  }

  .lyrics-song-info p {
    font-size: 12px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin: 2px 0 0 0 !important;
  }

  .lyrics-actions {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex: 0 0 auto !important;
    z-index: 10 !important;
  }

  .lyrics-actions .icon-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.14) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.20) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
    padding: 0 !important;
    cursor: pointer !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .lyrics-actions .icon-btn:active {
    transform: scale(0.92) !important;
  }

  .lyrics-actions .icon-btn .icon {
    width: 18px !important;
    height: 18px !important;
  }

  [data-theme="light"] .lyrics-actions .icon-btn {
    background: rgba(0, 0, 0, 0.08) !important;
    color: #0f172a !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06) !important;
  }
}


/* ══════════════════════════════════════════════════════════════
   【全螢幕沉浸式播放器 (Now Playing Interface) - 方案 A 雙層融合】
   ══════════════════════════════════════════════════════════════ */
.fullscreen-player {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 2100;
  background-color: #0b0c13 !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.42s cubic-bezier(0.2, 0.9, 0.3, 1), opacity 0.3s ease;
  will-change: transform, opacity;
  --fs-accent-rgb: 99, 102, 241;
  --fs-accent-glow: rgba(var(--fs-accent-rgb), 0.45);
}

[data-theme="light"] .fullscreen-player {
  background-color: #f8fafc !important;
}

.fullscreen-player.active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* 方案 A：自訂壁紙底圖穿透層 */
.fs-backdrop-wallpaper {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  filter: blur(24px) brightness(0.65);
  transform: scale(1.15);
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

body.has-custom-wallpaper .fs-backdrop-wallpaper {
  opacity: 1;
}

/* 方案 A：專輯封面取色動態光暈層 */
.fs-dynamic-glow {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(circle at 50% 35%, rgba(var(--fs-accent-rgb), 0.55) 0%, rgba(var(--fs-accent-rgb), 0.25) 55%, transparent 90%);
  filter: blur(50px);
  transform: scale(1.2);
  transition: background 0.8s ease;
  pointer-events: none;
}

/* 若無自訂壁紙，專輯光暈加強為全幅沉浸漸層 */
body:not(.has-custom-wallpaper) .fs-dynamic-glow {
  background: radial-gradient(circle at 50% 30%, rgba(var(--fs-accent-rgb), 0.75) 0%, rgba(var(--fs-accent-rgb), 0.4) 60%, rgba(10, 11, 16, 0.96) 100%);
}

/* 方案 A：高對比安全毛玻璃 Scrim 遮罩層 */
.fs-scrim-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(10, 11, 16, 0.62);
  backdrop-filter: blur(35px) saturate(160%);
  -webkit-backdrop-filter: blur(35px) saturate(160%);
  pointer-events: none;
}

/* 淺色模式下之遮罩與光暈 */
[data-theme="light"] .fullscreen-player {
  --fs-accent-rgb: 79, 70, 229;
}

[data-theme="light"] .fs-backdrop-wallpaper {
  filter: blur(28px) brightness(0.95);
}

[data-theme="light"] body:not(.has-custom-wallpaper) .fs-dynamic-glow {
  background: radial-gradient(circle at 50% 30%, rgba(var(--fs-accent-rgb), 0.35) 0%, rgba(var(--fs-accent-rgb), 0.15) 60%, rgba(248, 250, 252, 0.94) 100%);
}

[data-theme="light"] .fs-scrim-layer {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(35px) saturate(180%);
  -webkit-backdrop-filter: blur(35px) saturate(180%);
}

/* 頂部導航列 */
.fs-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 28px 12px 28px;
  flex-shrink: 0;
}

.fs-header-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.fs-drag-handle {
  width: 42px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.28);
  cursor: grab;
  transition: background 0.2s ease, transform 0.2s ease;
}

.fs-drag-handle:hover {
  background: rgba(255, 255, 255, 0.48);
  transform: scaleX(1.15);
}

[data-theme="light"] .fs-drag-handle {
  background: rgba(0, 0, 0, 0.22);
}
[data-theme="light"] .fs-drag-handle:hover {
  background: rgba(0, 0, 0, 0.38);
}

.fs-header-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted, #94a3b8);
}

[data-theme="light"] .fs-header-title {
  color: #64748b;
}

/* 核心按鈕防護規範：一律微晶毛玻璃膠囊襯底 */
.fs-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  background: rgba(255, 255, 255, 0.12) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  color: #ffffff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.fs-icon-btn:hover {
  background: rgba(255, 255, 255, 0.22) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  transform: scale(1.06);
}

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

.fs-icon-btn.active {
  color: #818cf8 !important;
  border-color: rgba(129, 140, 248, 0.5) !important;
  background: rgba(129, 140, 248, 0.2) !important;
}

[data-theme="light"] .fs-icon-btn {
  border: 1px solid rgba(0, 0, 0, 0.10) !important;
  background: rgba(0, 0, 0, 0.06) !important;
  color: #0f172a !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .fs-icon-btn:hover {
  background: rgba(0, 0, 0, 0.12) !important;
  border-color: rgba(0, 0, 0, 0.18) !important;
}

[data-theme="light"] .fs-icon-btn.active {
  color: #4f46e5 !important;
  border-color: rgba(79, 70, 229, 0.4) !important;
  background: rgba(79, 70, 229, 0.12) !important;
}

/* 膠囊按鈕 (Pill Button) */
.fs-pill-btn {
  height: 38px;
  padding: 0 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  background: rgba(255, 255, 255, 0.10) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  color: #ffffff !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.fs-pill-btn:hover {
  background: rgba(255, 255, 255, 0.20) !important;
  transform: translateY(-1px);
}

.fs-pill-btn.liked {
  background: rgba(236, 72, 153, 0.25) !important;
  border-color: rgba(236, 72, 153, 0.5) !important;
  color: #f472b6 !important;
}

[data-theme="light"] .fs-pill-btn {
  border: 1px solid rgba(0, 0, 0, 0.09) !important;
  background: rgba(0, 0, 0, 0.05) !important;
  color: #0f172a !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .fs-pill-btn:hover {
  background: rgba(0, 0, 0, 0.10) !important;
}

[data-theme="light"] .fs-pill-btn.liked {
  background: rgba(236, 72, 153, 0.15) !important;
  border-color: rgba(236, 72, 153, 0.4) !important;
  color: #db2777 !important;
}

/* 主播放大按鍵 */
.fs-play-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none !important;
  background: #ffffff !important;
  color: #0a0b10 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.4), 0 0 24px var(--fs-accent-glow);
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s ease;
  flex-shrink: 0;
}

.fs-play-btn .icon {
  width: 28px;
  height: 28px;
}

.fs-play-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.5), 0 0 32px var(--fs-accent-glow);
}

.fs-play-btn:active {
  transform: scale(0.95);
}

[data-theme="light"] .fs-play-btn {
  background: #0f172a !important;
  color: #ffffff !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.3), 0 0 20px var(--fs-accent-glow);
}

[data-theme="light"] .fs-play-btn:hover {
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.4), 0 0 28px var(--fs-accent-glow);
}

.fs-step-btn {
  width: 48px;
  height: 48px;
}
.fs-step-btn .icon {
  width: 22px;
  height: 22px;
}

/* 主體排版 (Desktop 上下段式：上舞台雙欄 + 下全寬控制列) */
.fs-body {
  position: relative;
  z-index: 10;
  flex: 1;
  min-height: 0;
  height: calc(100vh - 64px);
  height: calc(100dvh - 64px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8px 48px 24px 48px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  overflow: hidden;
}

.fs-main-stage {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(300px, 400px) 1fr;
  gap: clamp(24px, 3.5vw, 48px);
  align-items: stretch;
  margin-bottom: clamp(18px, 3.2vh, 36px);
}

.fs-info-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
  padding-bottom: 2px;
}

/* 底部全寬整合控制區 (移除頂部分隔線，呈現無界沉浸感，間距動態適配所有螢幕) */
.fs-bottom-controls {
  flex-shrink: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.8vh, 16px);
  padding-top: clamp(14px, 2.2vh, 26px);
  border-top: none !important;
}

[data-theme="light"] .fs-bottom-controls {
  border-top: none !important;
}

.fs-track-vol-row {
  display: flex;
  align-items: center;
  gap: 28px;
  width: 100%;
}

.fs-track-vol-row .fs-progress-container {
  flex: 1;
  margin: 0;
}

.fs-track-vol-row .fs-volume-container {
  flex: 0 0 20% !important;
  width: 20% !important;
  max-width: 20% !important;
  min-width: 150px !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

/* 左側欄：封面視覺 (精準下移對齊右側動態歌詞區塊中心) */
.fs-cover-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  height: 100%;
  padding-top: 56px; /* 精準補償右側頂部歌名/歌手高度，使封面中心與右側歌詞區塊中心水平對齊 */
  box-sizing: border-box;
}

.fs-cover-wrapper {
  position: relative;
  width: 100%;
  max-width: 350px;
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 40px var(--fs-accent-glow);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

[data-theme="light"] .fs-cover-wrapper {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18), 0 0 30px var(--fs-accent-glow);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

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

.fs-visualizer-wrap {
  width: 100%;
  max-width: 320px;
  height: 38px;
  display: none !important;
  align-items: center;
  justify-content: center;
  margin: 8px 0 4px 0;
  pointer-events: none;
}

.fullscreen-player.active .fs-visualizer-wrap {
  display: flex !important;
}

.fs-visualizer-canvas {
  width: 100%;
  height: 38px;
  display: block;
  filter: drop-shadow(0 0 8px var(--primary-glow));
  transition: opacity 0.3s ease;
}

.fs-feedback-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 右側欄：曲目資訊與控制 */
.fs-info-section {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  gap: 14px;
}

.fs-meta-area {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fs-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.fs-song-title {
  font-size: 28px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
  line-height: 1.25;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fs-song-artist {
  font-size: 16px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-theme="light"] .fs-song-title {
  color: #0f172a;
  text-shadow: none;
}
[data-theme="light"] .fs-song-artist {
  color: #475569;
  text-shadow: none;
}

/* 進度條 */
.fs-progress-container {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.fs-time-label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  min-width: 40px;
  font-variant-numeric: tabular-nums;
}

[data-theme="light"] .fs-time-label {
  color: #64748b;
}

.fs-slider-track-wrapper {
  position: relative;
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
}

[data-theme="light"] .fs-slider-track-wrapper {
  background: rgba(0, 0, 0, 0.10);
}

.fs-slider-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: #ffffff;
  border-radius: 3px;
  pointer-events: none;
  transition: width 0.08s linear;
}

[data-theme="light"] .fs-slider-fill {
  background: #0f172a;
}

.fs-slider-track-wrapper input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  margin: 0;
}

/* 播放按鈕列 */
.fs-playback-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 6px 0;
}

/* 視圖切換與輔助工具列 (上下分層：左側膠囊分頁、右側操作藥丸) */
.fs-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;
  padding: 4px 0 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .fs-toolbar-row {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

/* 左側：主視圖切換膠囊 (Segmented Capsule Switcher) */
.fs-segmented-capsule {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

[data-theme="light"] .fs-segmented-capsule {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.08);
}

.fs-segmented-capsule .fs-tab-btn {
  background: transparent;
  border: none;
  padding: 6px 16px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.fs-segmented-capsule .fs-tab-btn:hover {
  color: #ffffff;
}

.fs-segmented-capsule .fs-tab-btn.active {
  background: rgba(255, 255, 255, 0.20);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

[data-theme="light"] .fs-segmented-capsule .fs-tab-btn {
  color: #64748b;
}

[data-theme="light"] .fs-segmented-capsule .fs-tab-btn:hover {
  color: #0f172a;
}

[data-theme="light"] .fs-segmented-capsule .fs-tab-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* 右側：輔助操作藥丸 (Secondary Action Pills) */
.fs-lyric-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.fs-lyric-actions.hidden {
  display: none !important;
}

.fs-action-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.80);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  white-space: nowrap;
}

.fs-action-pill-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.fs-action-pill-btn:active {
  transform: translateY(0);
}

[data-theme="light"] .fs-action-pill-btn {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
  color: #475569;
}

[data-theme="light"] .fs-action-pill-btn:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #0f172a;
}

/* 歌詞與佇列視圖容器 (無邊框通透毛玻璃卡片) */
.fs-panel-view {
  flex: 1;
  min-height: 0;
  max-height: none;
  height: 100%;
  overflow: hidden;
  position: relative;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.14);
  border: none !important;
}

[data-theme="light"] .fs-panel-view {
  background: rgba(255, 255, 255, 0.4);
  border: none !important;
}

.fs-panel-view.hidden {
  display: none;
}

.fs-lyrics-scroll {
  height: 100%;
  overflow-y: auto;
  padding: 24px 20px;
  box-sizing: border-box;
  scroll-behavior: smooth;
  mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
}

.fs-lyrics-lines {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 40px 0;
}

.fs-lyrics-lines .lyric-line {
  font-size: 19px;
  line-height: 1.55;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  padding: 6px 12px;
  border-radius: 10px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.fs-lyrics-lines .lyric-line:hover {
  color: rgba(255, 255, 255, 0.8);
}

.fs-lyrics-lines .lyric-line.active {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  transform: scale(1.03);
  text-shadow: 0 0 18px var(--fs-accent-glow), 0 2px 10px rgba(0, 0, 0, 0.6);
}

[data-theme="light"] .fs-lyrics-lines .lyric-line {
  color: #64748b;
  text-shadow: none;
}

[data-theme="light"] .fs-lyrics-lines .lyric-line:hover {
  color: #334155;
}

[data-theme="light"] .fs-lyrics-lines .lyric-line.active {
  color: #0f172a;
  text-shadow: 0 0 14px rgba(79, 70, 229, 0.25);
}

/* 佇列項目列表 */
.fs-queue-list {
  height: 100%;
  overflow-y: auto;
  padding: 12px;
  box-sizing: border-box;
}

.fs-queue-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.fs-queue-item:hover {
  background: rgba(255, 255, 255, 0.10);
}

.fs-queue-item.active {
  background: rgba(255, 255, 255, 0.18);
}

.fs-queue-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.fs-queue-artist {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
}

[data-theme="light"] .fs-queue-item:hover {
  background: rgba(0, 0, 0, 0.05);
}
[data-theme="light"] .fs-queue-item.active {
  background: rgba(0, 0, 0, 0.09);
}
[data-theme="light"] .fs-queue-title {
  color: #0f172a;
}
[data-theme="light"] .fs-queue-artist {
  color: #64748b;
}

/* ══════════════════════════════════════════════════════════════
   【手機版直向螢幕響應適配 (< 900px)】
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 899px) {
  .fs-body {
    display: flex !important;
    flex-direction: column !important;
    padding: 8px 24px calc(24px + env(safe-area-inset-bottom, 0px)) 24px !important;
    gap: 14px !important;
    overflow-y: auto !important;
    align-items: stretch !important;
    height: 100% !important;
  }

  /* 將包裝容器設為 contents，使所有子元件扁平化依序排版 */
  .fs-main-stage,
  .fs-info-section,
  .fs-info-header,
  .fs-bottom-controls,
  .fs-track-vol-row {
    display: contents !important;
  }

  .fs-cover-section {
    order: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    padding-top: 0 !important;
    height: auto !important;
  }

  .fs-cover-wrapper {
    max-width: min(72vw, 280px) !important;
    border-radius: 20px !important;
  }

  .fs-feedback-bar {
    order: 2 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 16px !important;
    margin-top: 4px !important;
  }

  .fs-meta-area {
    order: 3 !important;
    display: flex !important;
    flex-direction: column !important;
    text-align: left !important;
    gap: 4px !important;
  }

  .fs-song-title {
    font-size: 22px !important;
  }

  .fs-song-artist {
    font-size: 14px !important;
  }

  .fs-progress-container {
    order: 4 !important;
    width: 100% !important;
    margin: 4px 0 !important;
  }

  .fs-playback-controls {
    order: 5 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 22px !important;
    padding: 6px 0 !important;
  }

  .fs-playback-controls #fs-prev-btn {
    order: 1 !important;
  }

  .fs-playback-controls #fs-play-pause-btn {
    order: 2 !important;
  }

  .fs-playback-controls #fs-next-btn {
    order: 3 !important;
  }

  .fs-playback-controls #fs-mode-btn {
    order: 4 !important;
  }

  /* 手機版音量控制條隱藏 (保留實體按鍵控制) */
  .fs-volume-container {
    display: none !important;
  }

  /* 手機版封面 / 歌詞分頁圓點指示器 */
  .fs-page-indicator {
    order: 2.5 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    margin: 4px auto !important;
    padding: 4px 0 !important;
  }

  .fs-page-indicator .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
  }

  .fs-page-indicator .dot.active {
    width: 18px;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  }

  [data-theme="light"] .fs-page-indicator .dot {
    background: rgba(0, 0, 0, 0.22);
  }

  [data-theme="light"] .fs-page-indicator .dot.active {
    background: #0f172a;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
  }

  .fs-tabs-nav {
    display: none !important;
  }

  /* ─── 手機版三頁環形循環切換 (封面 ⇄ 歌詞 ⇄ 播放清單) ─── */
  /* 頁面 1：專輯封面模式 (Cover View) */
  .fullscreen-player.fs-mode-cover .fs-cover-section,
  .fullscreen-player:not(.fs-mode-lyrics):not(.fs-mode-queue) .fs-cover-section {
    display: flex !important;
  }
  .fullscreen-player.fs-mode-cover .fs-feedback-bar,
  .fullscreen-player:not(.fs-mode-lyrics):not(.fs-mode-queue) .fs-feedback-bar {
    display: flex !important;
  }
  .fullscreen-player.fs-mode-cover #fs-lyrics-panel,
  .fullscreen-player:not(.fs-mode-lyrics):not(.fs-mode-queue) #fs-lyrics-panel,
  .fullscreen-player.fs-mode-cover #fs-queue-panel,
  .fullscreen-player:not(.fs-mode-lyrics):not(.fs-mode-queue) #fs-queue-panel {
    display: none !important;
  }

  /* 頁面 2：動態歌詞模式 (Lyrics View) */
  .fullscreen-player.fs-mode-lyrics .fs-cover-section,
  .fullscreen-player.fs-mode-lyrics .fs-feedback-bar,
  .fullscreen-player.fs-mode-lyrics #fs-queue-panel {
    display: none !important;
  }
  .fullscreen-player.fs-mode-lyrics #fs-lyrics-panel {
    order: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    max-height: 48vh !important;
    min-height: 260px !important;
    height: 48vh !important;
    margin: 2px 0 8px 0 !important;
    border-radius: 20px !important;
    background: rgba(0, 0, 0, 0.22) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
  }
  [data-theme="light"] .fullscreen-player.fs-mode-lyrics #fs-lyrics-panel {
    background: rgba(255, 255, 255, 0.55) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
  }

  /* 頁面 3：即將播放清單模式 (Queue View) */
  .fullscreen-player.fs-mode-queue .fs-cover-section,
  .fullscreen-player.fs-mode-queue .fs-feedback-bar,
  .fullscreen-player.fs-mode-queue #fs-lyrics-panel {
    display: none !important;
  }
  .fullscreen-player.fs-mode-queue #fs-queue-panel {
    order: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    max-height: 48vh !important;
    min-height: 260px !important;
    height: 48vh !important;
    margin: 2px 0 8px 0 !important;
    border-radius: 20px !important;
    background: rgba(0, 0, 0, 0.22) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
  }
  [data-theme="light"] .fullscreen-player.fs-mode-queue #fs-queue-panel {
    background: rgba(255, 255, 255, 0.55) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
  }

  /* 手機版切換滑動平移動畫 */
  .fullscreen-player.anim-slide-left .fs-cover-section,
  .fullscreen-player.anim-slide-left #fs-lyrics-panel,
  .fullscreen-player.anim-slide-left #fs-queue-panel {
    animation: fsSlideInRight 0.26s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
  .fullscreen-player.anim-slide-right .fs-cover-section,
  .fullscreen-player.anim-slide-right #fs-lyrics-panel,
  .fullscreen-player.anim-slide-right #fs-queue-panel {
    animation: fsSlideInLeft 0.26s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }

  .fullscreen-player.lyrics-mode .fs-lyrics-lines .lyric-line {
    font-size: 20px !important;
  }

  .fullscreen-player.lyrics-mode .fs-lyrics-lines .lyric-line.active {
    font-size: 26px !important;
  }
}

@media (min-width: 900px) {
  .fs-mobile-only {
    display: none !important;
  }
}



/* 整合播放模式按鈕與快捷圖示欄 */
.fs-feedback-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 16px !important;
  margin-top: 6px !important;
}

.fs-feedback-bar .fs-icon-btn {
  width: 44px !important;
  height: 44px !important;
}

.fs-mode-btn {
  width: 46px !important;
  height: 46px !important;
  position: relative;
}

.fs-mode-btn.active {
  background: rgba(var(--fs-accent-rgb), 0.28) !important;
  border-color: rgba(var(--fs-accent-rgb), 0.65) !important;
  color: #818cf8 !important;
  box-shadow: 0 0 16px var(--fs-accent-glow) !important;
}

[data-theme="light"] .fs-mode-btn.active {
  background: rgba(var(--fs-accent-rgb), 0.16) !important;
  border-color: rgba(var(--fs-accent-rgb), 0.5) !important;
  color: #4f46e5 !important;
}



/* ─── 全螢幕播放器圖示尺寸防護 (解決 iOS Safari / WebKit 0x0 收縮問題) ─── */
.fs-icon-btn svg,
.fs-icon-btn .icon {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
  display: block;
  stroke: currentColor;
  fill: none;
  flex-shrink: 0 !important;
}

.fullscreen-player .hidden,
.fullscreen-player svg.hidden,
.fs-icon-btn svg.hidden,
.fs-icon-btn .icon.hidden,
.fs-mode-btn svg.hidden,
.fs-mode-btn .icon.hidden,
.fs-vol-btn svg.hidden,
.fs-vol-btn .icon.hidden,
.fs-play-btn svg.hidden,
.fs-play-btn .icon.hidden {
  display: none !important;
}

.fs-icon-btn .heart-icon,
.fs-icon-btn .thumb-down-icon {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
}

.fs-close-btn svg,
.fs-close-btn .icon {
  width: 22px !important;
  height: 22px !important;
  stroke-width: 2.5 !important;
}

.fs-mode-btn svg,
.fs-mode-btn .icon {
  width: 22px !important;
  height: 22px !important;
}

.fs-step-btn svg,
.fs-step-btn .icon {
  width: 22px !important;
  height: 22px !important;
  fill: currentColor !important;
  stroke: none !important;
}

.fs-play-btn svg,
.fs-play-btn .icon {
  width: 28px !important;
  height: 28px !important;
  fill: currentColor !important;
  stroke: none !important;
}

.fs-icon-btn.liked .heart-icon {
  fill: #ec4899 !important;
  stroke: #ec4899 !important;
}



/* ─── 全螢幕播放器音量控制 (僅桌面版生效) ─── */
@media (min-width: 900px) {
  .fs-volume-container {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 899px) {
  /* 手機版絕對隱藏音量控制條 (置底防禦，杜絕覆寫) */
  .fs-volume-container,
  .fs-track-vol-row .fs-volume-container,
  #fullscreen-player .fs-volume-container,
  .fullscreen-player .fs-volume-container {
    display: none !important;
  }
}

.fs-vol-btn {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  min-height: 38px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  padding: 0 !important;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
}

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

.fs-vol-btn svg,
.fs-vol-btn .icon {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  display: block;
  stroke: currentColor;
  fill: none;
  flex-shrink: 0 !important;
}

.fs-volume-slider-wrapper {
  position: relative;
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 3px;
  display: flex;
  align-items: center;
}

[data-theme="light"] .fs-volume-slider-wrapper {
  background: rgba(0, 0, 0, 0.12);
}

.fs-volume-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: #ffffff;
  border-radius: 3px;
  pointer-events: none;
  transition: width 0.05s linear;
}

.fs-volume-fill::after {
  content: '';
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

[data-theme="light"] .fs-volume-fill {
  background: #0f172a;
}

[data-theme="light"] .fs-volume-fill::after {
  background: #0f172a;
}

.fs-volume-slider-wrapper input[type="range"] {
  position: absolute;
  inset: -12px 0;
  width: 100%;
  height: calc(100% + 24px);
  opacity: 0;
  cursor: pointer;
  margin: 0;
  z-index: 5;
  touch-action: none;
}


@keyframes fsSlideInRight {
  from {
    opacity: 0;
    transform: translateX(36px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fsSlideInLeft {
  from {
    opacity: 0;
    transform: translateX(-36px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ══════════════════════════════════════════════════════════════
   【桌面版全螢幕播放器：筆電與矮螢幕高度自適應】
   針對 1366x768、1080p 縮放 125%/150%、小筆電等視窗高度較矮環境
   ══════════════════════════════════════════════════════════════ */
@media (min-width: 900px) and (max-height: 850px) {
  .fs-body {
    padding: 6px 40px 18px 40px !important;
  }
  .fs-cover-wrapper {
    max-width: min(320px, 35vh) !important;
  }
  .fs-main-stage {
    gap: 32px !important;
    margin-bottom: clamp(16px, 2.5vh, 24px) !important;
  }
  .fs-bottom-controls {
    gap: 10px !important;
    padding-top: 14px !important;
  }
  .fs-song-title {
    font-size: clamp(20px, 2.2vw, 28px) !important;
  }
  .fs-song-artist {
    font-size: 13px !important;
  }
}

@media (min-width: 900px) and (max-height: 700px) {
  .fs-body {
    padding: 4px 32px 12px 32px !important;
  }
  .fs-cover-wrapper {
    max-width: min(240px, 30vh) !important;
  }
  .fs-main-stage {
    gap: 24px !important;
    margin-bottom: 12px !important;
  }
  .fs-bottom-controls {
    gap: 8px !important;
    padding-top: 10px !important;
  }
  .fs-play-btn {
    width: 54px !important;
    height: 54px !important;
  }
}

/* ══════════════════════════════════════════════════════════════
   【手機版防爆頁橫向鎖定與 Option A 按鈕安全隔離與佈局優化】
   ══════════════════════════════════════════════════════════════ */
html, body {
  max-width: 100vw !important;
  overflow-x: hidden !important;
}

#app-container,
.main-container,
.content-area,
.view-panel {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

@media (max-width: 768px) {
  /* 1. 防禦性橫向溢出封鎖 */
  .content-area {
    overflow-x: hidden !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* 2. 我的收藏頁面：頂部欄滿寬排列 */
  .liked-header-wrap {
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    gap: 12px !important;
  }

  .liked-controls-actions {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 10px !important;
  }

  .liked-search-box {
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .liked-view-switcher {
    display: flex !important;
    width: 100% !important;
    justify-content: space-around !important;
    box-sizing: border-box !important;
  }

  .liked-view-switcher .view-tab-btn {
    flex: 1 !important;
    justify-content: center !important;
  }

  /* 3. 智慧抽屜卡片區：改為 2x2 滿寬網格，杜絕 590px 硬撐 */
  .liked-smart-drawers {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .smart-drawer-card {
    min-width: 0 !important;
    padding: 8px 10px !important;
  }

  /* 4. Option A：歌曲列表「依序播放 / 曲風電台 / 歌手電台」與「分享 / 愛心」安全隔離 */
  .row-title-line {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  /* 手機版膠囊按鈕精簡為精緻圖示按鈕，隱藏冗長文字 */
  .row-play-buttons {
    margin-left: 4px !important;
    gap: 4px !important;
  }

  .row-play-buttons .action-pill-btn {
    padding: 5px 8px !important;
    border-radius: 12px !important;
    font-size: 11px !important;
  }

  .row-play-buttons .action-pill-btn .btn-text {
    display: none !important; /* 手機版隱藏按鈕文字，僅顯示 Icon */
  }

  .row-play-buttons .action-pill-btn .icon {
    margin: 0 !important;
    width: 13px !important;
    height: 13px !important;
  }

  /* 右側操作區（分享 🔗 與 愛心 ❤️）間距擴展與邊界安全隔離 */
  .row-actions {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin-left: auto !important;
    padding-left: 8px !important;
    flex-shrink: 0 !important;
  }

  .row-actions .icon-btn {
    padding: 6px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.05) !important;
  }

  /* 50% 滿寬並排播放按鈕組 */
  .liked-play-actions-group {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .liked-play-actions-group .play-all-pill-btn {
    flex: 1 !important;
    justify-content: center !important;
  }
}

/* ══════════════════════════════════════════════════════════════
   【雙列獨立動態分類膠囊 & 超過一行時折疊收合樣式】
   ══════════════════════════════════════════════════════════════ */
.liked-play-actions-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.liked-chips-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0 18px 0;
  width: 100%;
}

.chips-row-wrap {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
}

.chips-row-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  padding-top: 5px;
  min-width: 32px;
  flex-shrink: 0;
}

.chips-row-content {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  transition: max-height 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.chips-row-content.collapsed {
  max-height: 34px;
}

.chips-row-content.expanded {
  max-height: 500px;
}

.chips-expand-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.chips-expand-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: var(--text-primary);
}

.chips-expand-btn.hidden {
  display: none !important;
}

/* ==========================================================================
   硬體加速圖層隔離與背景 GPU 降載保護 (GPU Layer Isolation & Throttling)
   ========================================================================== */

/* 1. 核心高頻毛玻璃與動畫元素：宣告獨立合成層，防止進度條更新時觸發全頁 Repaint */
.glass-panel,
.bottom-player,
.fullscreen-player,
.lyrics-drawer,
.fs-dynamic-glow,
.fs-scrim-layer {
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* 2. 背景運行模式 (Page Hidden)：當視窗最小化或切到背景時，完全暫停 CSS 動畫與昂貴濾鏡 */
body.page-hidden,
body.page-hidden * {
  animation-play-state: paused !important;
}

body.page-hidden .fs-dynamic-glow {
  filter: none !important;
  opacity: 0 !important;
}

body.page-hidden .fs-scrim-layer {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* ═══════════════════════════════════════════════
   聽歌識別 (Song Recognition)
   ═══════════════════════════════════════════════ */
.recognize-trigger-btn {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  margin-left: 8px;
  border: none;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  background: var(--accent-gradient);
  box-shadow: 0 6px 18px var(--primary-glow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.recognize-trigger-btn:hover { transform: translateY(-1px) scale(1.04); box-shadow: 0 10px 24px var(--primary-glow); }
.recognize-trigger-btn:active { transform: scale(0.96); }

.recognize-modal-card { width: min(440px, 92vw); max-height: 86vh; overflow-y: auto; }

.recognize-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 12px 0 8px;
  gap: 10px;
}
.recognize-headline { font-size: 15px; font-weight: 600; margin: 4px 0 0; }
.recognize-sub { font-size: 13px; opacity: 0.7; margin: 0; text-align: center; }

.recognize-orb {
  --level: 0;
  position: relative;
  width: 148px;
  height: 148px;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.recognize-orb.listening { cursor: default; }
.recognize-orb-ring {
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.45) 0%, rgba(217, 70, 239, 0.12) 70%, transparent 100%);
  transform: scale(1);
  transition: transform 0.12s ease-out;
}
.recognize-orb.listening .recognize-orb-ring {
  animation: recognize-pulse 1.8s ease-in-out infinite;
  transform: scale(calc(1.05 + var(--level) * 0.35));
}
.recognize-orb-core {
  position: absolute;
  inset: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #8b5cf6 0%, #d946ef 55%, #ec4899 100%);
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.45);
  transition: transform 0.18s ease;
}
.recognize-orb:not(.listening):hover .recognize-orb-core { transform: scale(1.05); }
@keyframes recognize-pulse {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 0.45; }
}

.recognize-progress {
  width: 70%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}
.recognize-progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #8b5cf6, #ec4899);
  transition: width 0.1s linear;
}
.recognize-spinner { margin: 36px auto 12px; }
.recognize-msg-icon { font-size: 44px; margin-top: 12px; }

.recognize-text-btn {
  background: none;
  border: none;
  color: inherit;
  opacity: 0.75;
  font-size: 14px;
  cursor: pointer;
  padding: 8px 12px;
}
.recognize-text-btn:hover { opacity: 1; }

.recognize-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  padding-bottom: 4px;
}
.recognize-cover {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
  animation: recognize-pop 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes recognize-pop {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.recognize-title { font-size: 20px; font-weight: 700; }
.recognize-artist { font-size: 15px; opacity: 0.8; }
.recognize-album { font-size: 13px; opacity: 0.6; }
.recognize-badge {
  margin-top: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(16, 185, 129, 0.18);
  color: #10b981;
}
.recognize-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}
.recognize-ghost-btn {
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.recognize-ghost-btn:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.3); }
.recognize-ghost-btn.liked { color: #ec4899; border-color: rgba(236, 72, 153, 0.5); }

.recognize-history { width: 100%; margin-top: 18px; text-align: left; }
.recognize-section-title { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.recognize-history-item {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 10px;
  transition: background 0.15s ease;
}
.recognize-history-item:hover { background: rgba(255, 255, 255, 0.05); }
.recognize-history-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 4px;
  cursor: pointer;
}
.recognize-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
}
.recognize-history-text { min-width: 0; }
.recognize-history-title,
.recognize-history-artist { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recognize-history-title { font-size: 14px; }
.recognize-history-artist { font-size: 12px; opacity: 0.65; }
.recognize-history-del {
  background: none;
  border: none;
  color: inherit;
  opacity: 0.45;
  cursor: pointer;
  padding: 6px 10px;
}
.recognize-history-del:hover { opacity: 0.9; }

/* ═══════════════════════════════════════════════
   收藏庫重複歌曲比對與提醒 (Duplicate Song Warning Modal)
   ═══════════════════════════════════════════════ */
.duplicate-warning-modal-card {
  width: min(540px, 94vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}
.dup-modal-desc {
  font-size: 13.5px;
  line-height: 1.55;
  opacity: 0.85;
  margin: 0 0 14px;
}
.dup-section-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  opacity: 0.6;
  margin: 10px 0 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.dup-song-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.2s ease;
}
.dup-song-card.target-card {
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.35);
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.12);
}
.dup-song-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
}
.dup-song-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.dup-song-header {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dup-song-title {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dup-song-meta {
  font-size: 12px;
  opacity: 0.72;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dup-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 6px;
  font-weight: 600;
  flex-shrink: 0;
}
.dup-badge-target {
  background: rgba(139, 92, 246, 0.2);
  color: #c084fc;
  border: 1px solid rgba(139, 92, 246, 0.4);
}
.dup-badge-exact {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}
.dup-badge-variation {
  background: rgba(234, 179, 8, 0.18);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.35);
}
.dup-badge-other {
  background: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.35);
}
.dup-source-badge {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  opacity: 0.85;
}
.dup-existing-list {
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 2px;
}
.dup-replace-btn {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 8px;
  border: 1px solid rgba(234, 179, 8, 0.45);
  background: rgba(234, 179, 8, 0.16);
  color: #fde047;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.18s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.dup-replace-btn:hover {
  background: rgba(234, 179, 8, 0.3);
  border-color: rgba(234, 179, 8, 0.7);
  transform: translateY(-1px);
}
.dup-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .dup-song-card {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .dup-song-card.target-card {
  background: rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.3);
}
[data-theme="light"] .dup-song-thumb {
  background: rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .dup-source-badge {
  background: rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .dup-replace-btn {
  background: rgba(217, 119, 6, 0.12);
  color: #b45309;
  border-color: rgba(217, 119, 6, 0.3);
}
[data-theme="light"] .dup-replace-btn:hover {
  background: rgba(217, 119, 6, 0.22);
}
[data-theme="light"] .dup-modal-footer {
  border-top-color: rgba(0, 0, 0, 0.08);
}

/* ─── 跨裝置播放接力 Modal (Handoff) ─── */
.handoff-modal-card {
  max-width: 440px;
  border-radius: var(--radius-lg, 24px);
}
.handoff-device-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: color-mix(in srgb, var(--primary, #8b5cf6) 15%, transparent);
  color: var(--primary, #a78bfa);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  margin-bottom: 12px;
}
.handoff-song-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  margin-bottom: 14px;
}
.handoff-thumb {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}
.handoff-song-meta {
  flex: 1;
  overflow: hidden;
  text-align: left;
}
.handoff-song-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary, #fff);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.handoff-song-artist {
  font-size: 12px;
  color: var(--text-secondary, #94a3b8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.handoff-time-badge {
  font-size: 11px;
  color: var(--primary, #a78bfa);
  font-weight: 600;
  margin-top: 4px;
}

/* ─── 版本更新速報 Modal (What's New) ─── */
.whats-new-modal-card {
  max-width: 520px;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
}
.whats-new-header-badge {
  display: inline-block;
  background: color-mix(in srgb, var(--primary, #8b5cf6) 20%, transparent);
  color: var(--primary, #a78bfa);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  margin-left: 8px;
}
.whats-new-body {
  overflow-y: auto;
  padding: 10px 4px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.whats-new-category-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.whats-new-category-title.new { color: var(--primary, #a78bfa); }
.whats-new-category-title.improve { color: #38bdf8; }
.whats-new-category-title.fix { color: #f43f5e; }
.whats-new-items-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.whats-new-item {
  font-size: 13px;
  color: var(--text-primary, #e2e8f0);
  line-height: 1.5;
  padding-left: 14px;
  position: relative;
}
.whats-new-item::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--text-muted, #64748b);
  font-weight: bold;
}

/* ─── 新手亮點輪播導覽 Modal (Onboarding Carousel) ─── */
.onboarding-modal-card {
  max-width: 480px;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 28px;
  padding: 28px 24px;
  text-align: center;
  position: relative;
}
.onboarding-skip-btn {
  position: absolute;
  top: 18px;
  right: 20px;
  background: transparent;
  border: none;
  color: var(--text-muted, #94a3b8);
  font-size: 13px;
  cursor: pointer;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
}
.onboarding-skip-btn:hover {
  color: var(--text-primary, #fff);
  background: rgba(255, 255, 255, 0.08);
}
.onboarding-slide {
  display: none;
  flex-direction: column;
  align-items: center;
  animation: fadeInSlide 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.onboarding-slide.active {
  display: flex;
}
@keyframes fadeInSlide {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.onboarding-icon-circle {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  margin: 12px 0 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.onboarding-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 8px;
  margin-bottom: 8px;
}
.onboarding-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary, #fff);
  margin-bottom: 8px;
}
.onboarding-desc {
  font-size: 13px;
  color: var(--text-secondary, #94a3b8);
  line-height: 1.5;
  margin-bottom: 16px;
  padding: 0 10px;
}
.onboarding-features-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 16px;
  text-align: left;
  width: 100%;
  box-sizing: border-box;
}
.onboarding-feature-row {
  font-size: 12px;
  color: var(--text-primary, #e2e8f0);
  margin: 4px 0;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.onboarding-indicators {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 18px 0 16px;
}
.onboarding-dot {
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.25s ease;
  cursor: pointer;
}
.onboarding-dot.active {
  width: 22px;
  background: var(--primary, #8b5cf6);
  box-shadow: 0 0 10px var(--primary-glow);
}

/* ══════════════════════════════════════════════════════════════
   Lysten v1.7.0 全聯邦排行榜 (Federated Charts) 視覺體系
   ══════════════════════════════════════════════════════════════ */
.charts-header-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.charts-period-toggle {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .charts-period-toggle {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.08);
}

.period-chip-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary, #aaa);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.period-chip-btn:hover {
  color: var(--text-primary, #fff);
}

.period-chip-btn.active {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.charts-nav-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
  overflow-x: auto;
}

.chart-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary, #aaa);
  padding: 8px 18px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s ease;
}

.chart-tab-btn:hover {
  color: var(--text-primary, #fff);
  background: rgba(255, 255, 255, 0.05);
}

.chart-tab-btn.active {
  color: #fff;
  background: color-mix(in srgb, var(--primary) 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 45%, transparent);
  box-shadow: 0 0 14px var(--primary-glow);
}

.chart-refresh-btn {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary, #aaa);
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s ease;
}

.chart-refresh-btn:hover {
  color: var(--text-primary, #fff);
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.charts-content-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 280px;
}

.chart-item-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.chart-item-card:hover {
  background: color-mix(in srgb, var(--primary) 12%, rgba(255, 255, 255, 0.06));
  border-color: color-mix(in srgb, var(--primary) 35%, transparent);
  transform: translateX(4px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.chart-rank-badge {
  font-size: 1.15rem;
  font-weight: 900;
  width: 36px;
  text-align: center;
  flex-shrink: 0;
  color: var(--text-secondary, #888);
}

.chart-rank-badge.top-1 {
  font-size: 1.4rem;
  color: #ffd700;
  text-shadow: 0 0 12px rgba(255, 215, 0, 0.6);
}
.chart-rank-badge.top-2 {
  font-size: 1.3rem;
  color: #c0c0c0;
  text-shadow: 0 0 10px rgba(192, 192, 192, 0.5);
}
.chart-rank-badge.top-3 {
  font-size: 1.25rem;
  color: #cd7f32;
  text-shadow: 0 0 10px rgba(205, 127, 50, 0.5);
}

.chart-item-cover {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.chart-item-info {
  flex: 1;
  min-width: 0;
}

.chart-item-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-primary, #fff);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.chart-item-sub {
  font-size: 0.82rem;
  color: var(--text-secondary, #aaa);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chart-item-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.chart-stat-pill {
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(15, 23, 42, 0.75);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.2px;
}

/* 榮譽徽章高對比立體漸層 */
.chart-badge-gold {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.32), rgba(217, 119, 6, 0.48)) !important;
  color: #fde047 !important;
  border: 1px solid rgba(251, 191, 36, 0.75) !important;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.25) !important;
}

.chart-badge-silver {
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.32), rgba(100, 116, 139, 0.48)) !important;
  color: #f8fafc !important;
  border: 1px solid rgba(203, 213, 225, 0.75) !important;
  box-shadow: 0 0 10px rgba(148, 163, 184, 0.2) !important;
}

.chart-badge-bronze {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.32), rgba(180, 83, 9, 0.48)) !important;
  color: #fed7aa !important;
  border: 1px solid rgba(249, 115, 22, 0.75) !important;
  box-shadow: 0 0 10px rgba(217, 119, 6, 0.2) !important;
}

.chart-badge-hot {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.32), rgba(220, 38, 38, 0.48)) !important;
  color: #fca5a5 !important;
  border: 1px solid rgba(248, 113, 113, 0.75) !important;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.2) !important;
}

.chart-badge-listener {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.32), rgba(109, 40, 217, 0.48)) !important;
  color: #ddd6fe !important;
  border: 1px solid rgba(167, 139, 250, 0.75) !important;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.2) !important;
}

.chart-badge-share {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.32), rgba(219, 39, 119, 0.48)) !important;
  color: #fbcfe8 !important;
  border: 1px solid rgba(244, 114, 182, 0.75) !important;
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.2) !important;
}

.indie-rising-score-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.35), rgba(234, 88, 12, 0.45));
  color: #ffedd5;
  border: 1px solid rgba(251, 146, 60, 0.7);
  box-shadow: 0 0 10px rgba(249, 115, 22, 0.25);
}

/* 熱門曲風榜專屬卡片與視覺元件 */
.chart-genre-card {
  padding: 12px 18px;
}

.genre-badge-icon {
  font-size: 1.6rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--primary) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent);
  border-radius: 12px;
  flex-shrink: 0;
}

.genre-pct-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  background: var(--accent-gradient, linear-gradient(135deg, var(--primary), var(--primary-light)));
  color: #fff;
  letter-spacing: 0.5px;
}

.genre-top-song-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 4px 0 6px;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  font-size: 0.78rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.genre-top-song-title {
  font-weight: 600;
  color: var(--text-primary);
}

.genre-top-song-artist {
  color: var(--text-secondary);
}

.genre-progress-bar-wrap {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 4px;
}

.genre-progress-bar-fill {
  height: 100%;
  background: var(--accent-gradient, var(--primary));
  border-radius: 999px;
  box-shadow: 0 0 8px var(--primary-glow);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.genre-explore-btn {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  background: color-mix(in srgb, var(--primary) 22%, transparent);
  color: var(--primary-light);
  border: 1px solid color-mix(in srgb, var(--primary) 40%, transparent);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.genre-explore-btn:hover {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 12px var(--primary-glow);
  transform: scale(1.05);
}

/* ══════════════════════════════════════════════════════════════
   Lysten v1.7.0 歌曲討論留言抽屜 (Song Comments Drawer)
   ══════════════════════════════════════════════════════════════ */
.fs-comments-badge-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.fs-comments-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 380px;
  max-width: 90vw;
  background: var(--glass-bg, var(--bg-surface));
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-left: 1px solid var(--border-subtle);
  z-index: 50;
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.25);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
  transform: translateX(0);
}

[data-theme="light"] .fs-comments-drawer {
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.08);
}

.fs-comments-drawer.hidden {
  display: none !important;
  transform: translateX(100%);
}

.fs-comments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated, transparent);
}

.fs-comments-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fs-comments-icon {
  font-size: 1.25rem;
}

.fs-comments-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.fs-comments-count-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.fs-comments-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.comment-sort-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.comment-sort-btn.active {
  background: var(--accent-gradient);
  color: #fff;
  border-color: transparent;
}

.fs-comments-list {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 12px 14px;
  transition: all 0.2s ease;
}

.comment-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-highlight);
}

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

.comment-user-info {
  display: flex;
  align-items: center;
  gap: 6px;
}

.comment-author-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.comment-timestamp-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: color-mix(in srgb, var(--primary) 18%, transparent);
  color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.comment-timestamp-tag:hover {
  background: var(--accent-gradient);
  color: #fff;
  transform: scale(1.04);
}

.comment-content-body {
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text-primary);
  word-break: break-word;
  margin-bottom: 8px;
}

.comment-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.comment-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.comment-like-btn, .comment-del-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  transition: color 0.2s ease;
}

.comment-like-btn:hover, .comment-like-btn.liked {
  color: #f43f5e;
}

.comment-del-btn:hover {
  color: #ef4444;
}

.fs-comments-input-bar {
  padding: 12px 16px 16px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated, var(--glass-bg));
}

.comment-input-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.insert-ts-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.insert-ts-btn:hover {
  background: color-mix(in srgb, var(--primary) 22%, transparent);
  color: var(--primary);
  border-color: var(--primary);
}

.char-count-badge {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.comment-input-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.fs-comment-textarea {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  color: var(--text-primary);
  padding: 8px 10px;
  font-size: 0.88rem;
  resize: none;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.fs-comment-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

.comment-submit-btn {
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  cursor: pointer;
}

.comments-empty-state {
  text-align: center;
  padding: 40px 10px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ══════════════════════════════════════════════════════════════
   Lysten v1.7.0 歌詞同步浮動彈幕系統 (Bullet Comments / Danmaku)
   ══════════════════════════════════════════════════════════════ */
.fs-danmaku-container {
  position: absolute;
  top: 70px;
  left: 0;
  right: 0;
  height: 180px;
  pointer-events: none;
  z-index: 15;
  overflow: hidden;
}

.danmaku-item {
  position: absolute;
  white-space: nowrap;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--glass-bg, rgba(18, 18, 28, 0.82));
  border: 1px solid color-mix(in srgb, var(--primary) 40%, var(--border-subtle));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.15), 0 0 12px var(--primary-glow);
  animation: danmaku-slide 8.5s linear forwards;
}

.danmaku-ts {
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 700;
}

.danmaku-user {
  color: var(--text-secondary, #bbb);
  font-size: 0.78rem;
}

@keyframes danmaku-slide {
  from {
    transform: translateX(100vw);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  to {
    transform: translateX(-100%);
    opacity: 0;
  }
}

/* ══════════════════════════════════════════════════════════════
   Lysten v1.7.6 原創音樂工作室 (UGC Studio), 音樂 DNA 雷達圖 & 原創新聲飆升榜
   ══════════════════════════════════════════════════════════════ */
.ugc-studio-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 16px;
}

.ugc-nav-tabs {
  display: flex;
  gap: 10px;
  margin: 14px 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.ugc-nav-tabs::-webkit-scrollbar {
  display: none;
}

.ugc-tab-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.ugc-tab-nav-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.ugc-tab-nav-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 14px var(--primary-glow);
}

.ugc-tab-panel {
  display: block;
}

.ugc-tab-panel.hidden {
  display: none !important;
}

.ugc-my-works-card, .ugc-community-layout {
  padding: 24px;
  border-radius: 18px;
  background: var(--glass-bg, rgba(20, 22, 34, 0.7));
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.ugc-plaza-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ugc-plaza-search-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ugc-search-box {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.ugc-search-box .icon {
  position: absolute;
  left: 14px;
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
  pointer-events: none;
}

.ugc-search-box input {
  width: 100%;
  padding: 9px 14px 9px 38px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s ease;
}

.ugc-search-box input:focus {
  border-color: var(--primary);
}

.ugc-filters-row {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.ugc-filters-row::-webkit-scrollbar {
  display: none;
}

.ugc-filter-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
}

.ugc-filter-pills-wrap {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
}

.ugc-filter-pill {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.ugc-filter-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.ugc-filter-pill.active {
  background: color-mix(in srgb, var(--primary) 25%, transparent);
  color: var(--primary-light, #38bdf8);
  border-color: var(--primary);
  font-weight: 700;
}

.ugc-card-action-btn {
  padding: 5px 9px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ugc-card-action-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.25);
}

.ugc-card-action-btn.edit-btn:hover {
  background: color-mix(in srgb, var(--primary) 30%, transparent);
  border-color: var(--primary);
  color: var(--primary-light, #38bdf8);
}

.ugc-card-action-btn.delete-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #fca5a5;
}

.ugc-songs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.ugc-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--primary) 8%, var(--card-bg, rgba(255, 255, 255, 0.03)));
  border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  cursor: pointer;
}

.ugc-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25), 0 0 16px var(--primary-glow);
}

.ugc-card-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  background: #1e1e2d;
  flex-shrink: 0;
}

.ugc-card-info {
  flex: 1;
  min-width: 0;
}

.ugc-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.ugc-card-meta {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ugc-badge-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: color-mix(in srgb, var(--primary) 18%, transparent);
  color: var(--primary-light, var(--primary));
  border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent);
}

.ugc-card-actions {
  display: flex;
  gap: 6px;
}

/* UGC Upload Modal */
.ugc-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.ugc-modal-box {
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 22px;
  padding: 28px;
  background: var(--glass-bg, #141622);
  border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--border-subtle));
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 30px var(--primary-glow);
  position: relative;
}

.ugc-dropzone {
  border: 2px dashed color-mix(in srgb, var(--primary) 40%, rgba(255, 255, 255, 0.2));
  border-radius: 16px;
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  background: color-mix(in srgb, var(--primary) 5%, transparent);
  transition: all 0.25s ease;
  margin: 16px 0;
}

.ugc-dropzone:hover, .ugc-dropzone.dragover {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  transform: scale(1.01);
}

.ugc-dropzone-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  color: var(--primary);
}

/* DNA Radar Section */
.ugc-dna-card {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 16px 20px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--primary) 10%, rgba(0,0,0,0.3));
  border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent);
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.ugc-dna-radar-wrap {
  width: 180px;
  height: 180px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ugc-dna-stats {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ugc-dna-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.ugc-dna-stat-label {
  color: var(--text-secondary);
}

.ugc-dna-stat-val {
  font-weight: 700;
  color: var(--primary-light, var(--primary));
}

.ugc-mood-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.ugc-mood-pill {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s;
}

.ugc-mood-pill.active {
  background: var(--accent-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 0 10px var(--primary-glow);
}

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

@media (max-width: 600px) {
  .ugc-form-grid {
    grid-template-columns: 1fr;
  }
  .ugc-dna-card {
    flex-direction: column;
    align-items: center;
  }
}

.ugc-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ugc-form-group.full-width {
  grid-column: 1 / -1;
}

.ugc-form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.ugc-input, .ugc-select, .ugc-textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
  box-sizing: border-box;
}

.ugc-input:focus, .ugc-select:focus, .ugc-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 12px var(--primary-glow);
}

/* Indie Rising Chart Styles */
.indie-chart-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 12px;
  scrollbar-width: none;
}
.indie-chart-filters::-webkit-scrollbar {
  display: none;
}

.indie-filter-pill {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.indie-filter-pill.active {
  background: var(--accent-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.indie-rising-score-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 800;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(245, 158, 11, 0.25);
}


/* ─── 歌詞上傳、補充與編輯彈窗 (Lyrics Upload & Edit Modal - Premium Glassmorphism) ─── */
.lyrics-edit-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.lyrics-edit-modal-box {
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: rgba(18, 20, 30, 0.95);
  backdrop-filter: blur(36px);
  -webkit-backdrop-filter: blur(36px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 24px 28px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 35px var(--primary-glow);
  box-sizing: border-box;
  animation: modalScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

[data-theme="light"] .lyrics-edit-modal-box {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.04), 0 0 30px var(--primary-glow);
}

/* 頂部 Header */
.lyrics-edit-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.lyrics-edit-title-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.lyrics-edit-main-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary, #fff);
  letter-spacing: -0.01em;
}

[data-theme="light"] .lyrics-edit-main-title {
  color: #0f172a;
}

.lyrics-edit-icon {
  font-size: 20px;
  line-height: 1;
}

.lyrics-edit-song-badge {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary, #94a3b8);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px 12px;
  border-radius: 999px;
  width: fit-content;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="light"] .lyrics-edit-song-badge {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.06);
  color: #64748b;
}

.lyrics-edit-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary, #94a3b8);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  padding: 0;
}

[data-theme="light"] .lyrics-edit-close-btn {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.08);
  color: #64748b;
}

.lyrics-edit-close-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
  transform: scale(1.08) rotate(90deg);
}

/* 狀態診斷列 */
.lyrics-format-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .lyrics-format-status-bar {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.05);
}

.lyrics-format-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  transition: all 0.25s ease;
}

.lyrics-format-badge .badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.lyrics-format-badge.badge-dynamic {
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.lyrics-format-badge.badge-static {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.lyrics-format-badge.badge-empty,
.lyrics-format-badge.badge-neutral {
  color: var(--text-muted, #94a3b8);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .lyrics-format-badge.badge-empty,
[data-theme="light"] .lyrics-format-badge.badge-neutral {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.07);
  color: #64748b;
}

.lyrics-line-count-badge {
  font-size: 12px;
  color: var(--text-secondary, #94a3b8);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-weight: 700;
}

/* 編輯 Dropzone 與 Textarea */
.lyrics-editor-dropzone {
  position: relative;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 11, 18, 0.6);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
  transition: all 0.25s ease;
  overflow: hidden;
}

[data-theme="light"] .lyrics-editor-dropzone {
  background: rgba(248, 250, 252, 0.95);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.04);
}

.lyrics-editor-dropzone:focus-within {
  border-color: var(--primary);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4), 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent);
}

.lyrics-editor-dropzone.drag-active {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 15%, transparent);
  box-shadow: 0 0 25px var(--primary-glow);
}

.lyrics-edit-textarea {
  width: 100%;
  height: 250px;
  padding: 16px;
  background: transparent;
  border: none;
  color: #f1f5f9;
  font-family: 'JetBrains Mono', 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13.5px;
  line-height: 1.7;
  resize: vertical;
  outline: none;
  box-sizing: border-box;
}

[data-theme="light"] .lyrics-edit-textarea {
  color: #0f172a;
}

.lyrics-edit-textarea::placeholder {
  color: rgba(148, 163, 184, 0.6);
  font-family: inherit;
}

.dropzone-drag-overlay {
  position: absolute;
  inset: 0;
  background: rgba(18, 19, 30, 0.92);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: none;
}

.dropzone-drag-msg {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.dropzone-drag-msg .drag-icon {
  font-size: 36px;
  animation: bounceDown 0.6s infinite alternate ease-in-out;
}

/* 輔助工具列 */
.lyrics-edit-tools-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  gap: 8px;
  flex-wrap: wrap;
}

.lyrics-edit-tools-row .tools-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-btn-pill {
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: var(--text-secondary, #cbd5e1);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

[data-theme="light"] .tool-btn-pill {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
  color: #475569;
}

.tool-btn-pill:hover {
  background: color-mix(in srgb, var(--primary) 20%, rgba(255, 255, 255, 0.15));
  color: #fff;
  border-color: color-mix(in srgb, var(--primary) 40%, rgba(255, 255, 255, 0.2));
  transform: translateY(-1px);
}

[data-theme="light"] .tool-btn-pill:hover {
  background: color-mix(in srgb, var(--primary) 15%, #f1f5f9);
  color: #0f172a;
}

.file-upload-chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: color-mix(in srgb, var(--primary) 20%, rgba(255, 255, 255, 0.08));
  border: 1px solid color-mix(in srgb, var(--primary) 35%, rgba(255, 255, 255, 0.15));
  border-radius: 12px;
  color: var(--text-primary, #fff);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

[data-theme="light"] .file-upload-chip-btn {
  background: color-mix(in srgb, var(--primary) 12%, rgba(0, 0, 0, 0.04));
  border-color: color-mix(in srgb, var(--primary) 30%, rgba(0, 0, 0, 0.1));
  color: #0f172a;
}

.file-upload-chip-btn:hover {
  background: var(--accent-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 16px var(--primary-glow);
  transform: translateY(-1px);
}

/* 底部 Footer */
.lyrics-edit-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .lyrics-edit-footer {
  border-top-color: rgba(0, 0, 0, 0.06);
}

.lyrics-edit-cancel-btn {
  padding: 10px 22px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  color: var(--text-secondary, #cbd5e1);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

[data-theme="light"] .lyrics-edit-cancel-btn {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
  color: #475569;
}

.lyrics-edit-cancel-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

[data-theme="light"] .lyrics-edit-cancel-btn:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #0f172a;
}

.lyrics-edit-submit-btn {
  padding: 10px 26px;
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 18px var(--primary-glow);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.lyrics-edit-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--primary-glow);
  filter: brightness(1.1);
}

.lyrics-edit-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ─── 歌詞空狀態與靜態歌詞樣式 ─── */
.lyrics-empty-actions-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.lyrics-inline-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px var(--primary-glow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.lyrics-inline-add-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.lyrics-inline-retry-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.lyrics-inline-retry-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.static-lyrics-badge-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px;
  margin-bottom: 12px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 10px;
  font-size: 12px;
  color: #fbbf24;
}

.static-lyrics-badge-bar button {
  background: none;
  border: none;
  color: #fbbf24;
  text-decoration: underline;
  cursor: pointer;
  font-weight: 700;
  font-size: 12px;
}

.static-lyric-line {
  padding: 6px 12px;
  color: var(--text-secondary, #cbd5e1);
  font-size: 15px;
  line-height: 1.8;
  text-align: center;
  transition: color 0.15s ease;
}

.static-lyric-line:hover {
  color: #fff;
}


/* ═══════════════════════════════════════════════════════════════════
   💿 專輯搜尋橫向滑軌與專輯詳情卡片 (Album Search & Detail Styles)
   ═══════════════════════════════════════════════════════════════════ */

.album-search-section {
  margin-bottom: 24px;
  padding: 0 4px;
}

.album-search-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.album-search-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary, #f1f5f9);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.album-search-header-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 18%, transparent);
  color: var(--primary-light, #a78bfa);
  border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent);
}

.album-search-view-all-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary, #94a3b8);
  font-size: 12.5px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.album-search-view-all-btn:hover {
  background: color-mix(in srgb, var(--primary) 20%, transparent);
  border-color: color-mix(in srgb, var(--primary) 45%, transparent);
  color: #fff;
  box-shadow: 0 2px 10px var(--primary-glow);
  transform: translateX(2px);
}

.album-carousel {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 4px 14px 4px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.album-carousel::-webkit-scrollbar {
  height: 6px;
}

.album-carousel::-webkit-scrollbar-track {
  background: transparent;
}

.album-carousel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.album-carousel::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.album-card {
  flex: 0 0 160px;
  width: 160px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  flex-direction: column;
  position: relative;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.album-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.07);
  border-color: color-mix(in srgb, var(--primary) 40%, rgba(255, 255, 255, 0.2));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4), 0 0 20px var(--primary-glow);
}

.album-card-cover-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
  background: #111;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.album-card-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.album-card:hover .album-card-cover {
  transform: scale(1.05);
}

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

.album-card:hover .album-card-play-overlay {
  opacity: 1;
}

.album-card-play-btn-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 14px var(--primary-glow);
  transform: scale(0.85);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.album-card:hover .album-card-play-btn-icon {
  transform: scale(1);
}

.album-card-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.album-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary, #f1f5f9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.album-card-artist {
  font-size: 12px;
  color: var(--text-secondary, #94a3b8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.album-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted, #64748b);
  margin-top: 2px;
}

.album-card-type-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--primary) 15%, rgba(255, 255, 255, 0.08));
  color: var(--primary-light, var(--text-secondary));
  border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent);
}

/* ─── 搜尋結果區塊標題 ─── */
.search-songs-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 4px 12px 4px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary, #f1f5f9);
}

/* ─── 專輯詳情 Modal 樣式 ─── */
.album-modal-card {
  max-width: 680px !important;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  padding: 24px 28px !important;
  background: var(--bg-card, #13141f) !important;
  border: 1px solid color-mix(in srgb, var(--primary) 25%, rgba(255, 255, 255, 0.12)) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px color-mix(in srgb, var(--primary) 12%, transparent) !important;
  overflow: hidden;
}

.album-modal-header {
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.album-modal-body {
  overflow-y: auto;
  max-height: calc(88vh - 90px);
  padding-right: 6px;
  margin-top: 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.album-modal-body::-webkit-scrollbar {
  width: 6px;
}

.album-modal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.album-detail-banner {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 22px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.album-detail-cover {
  width: 140px;
  height: 140px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}

.album-detail-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.album-detail-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary, #fff);
  margin-bottom: 6px;
  line-height: 1.3;
}

.album-detail-artist {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--primary-light, #a78bfa);
  margin-bottom: 8px;
}

.album-detail-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-secondary, #94a3b8);
  margin-bottom: 14px;
}

.album-detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.album-play-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px var(--primary-glow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.album-play-all-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.album-download-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.album-download-all-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.album-track-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.album-track-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  transition: all 0.15s ease;
  cursor: pointer;
}

.album-track-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateX(4px);
}

.album-track-no {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted, #64748b);
  width: 24px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.album-track-info {
  flex: 1;
  min-width: 0;
}

.album-track-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary, #f1f5f9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.album-track-artist {
  font-size: 11.5px;
  color: var(--text-secondary, #94a3b8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.album-track-duration {
  font-size: 12px;
  color: var(--text-muted, #64748b);
  font-variant-numeric: tabular-nums;
}

.album-track-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.all-albums-modal-card {
  max-width: 820px !important;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  padding: 24px 28px !important;
  background: var(--bg-card, #13141f) !important;
  border: 1px solid color-mix(in srgb, var(--primary) 25%, rgba(255, 255, 255, 0.12)) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px color-mix(in srgb, var(--primary) 12%, transparent) !important;
  overflow: hidden;
}

.all-albums-modal-body {
  overflow-y: auto;
  max-height: calc(88vh - 90px);
  padding-right: 6px;
  margin-top: 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.all-albums-modal-body::-webkit-scrollbar {
  width: 6px;
}

.all-albums-modal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.all-albums-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 16px;
  padding-bottom: 20px;
}

.all-albums-grid .album-card {
  width: 100%;
  flex: none;
}

@media (max-width: 640px) {
  .all-albums-grid {
    grid-template-columns: repeat(auto-fill, minmax(125px, 1fr));
    gap: 12px;
  }
  .all-albums-modal-card {
    padding: 20px 14px !important;
  }
}

