/* ===== CSS Custom Properties ===== */
:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #121212;
  --bg-tertiary: #1a1a1a;
  --bg-elevated: #242424;
  --bg-hover: #2a2a2a;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --text-tertiary: #606060;
  --accent: #1db954;
  --accent-hover: #1ed760;
  --accent-active: #169c46;
  --accent-dim: rgba(29, 185, 84, 0.15);
  --danger: #e74c3c;
  --border: #2a2a2a;
  --header-height: 64px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow: 0 4px 12px rgba(0,0,0,0.5);
  --transition: 200ms ease;
}

/* ===== Source Theme Overrides ===== */
body.source-youtube {
  --accent: #e8a035;
  --accent-hover: #f0b050;
  --accent-active: #c8882a;
  --accent-dim: rgba(232, 160, 53, 0.15);
}

body.source-tidal {
  --accent: #00e5ff;
  --accent-hover: #33ecff;
  --accent-active: #00b8cc;
  --accent-dim: rgba(0, 229, 255, 0.15);
}

/* ===== Tidal Disabled ===== */
body.tidal-disabled #mc33ToggleBtn { display: none !important; }
body.tidal-disabled .source-badge.tidal { display: none; }

/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow: hidden;
}

::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--bg-elevated);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

.hidden { display: none !important; }

/* ===== Buttons ===== */
button {
  border: none;
  background: none;
  color: var(--text-primary);
  cursor: pointer;
  font-family: inherit;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: background var(--transition), color var(--transition);
  color: var(--text-secondary);
  position: relative;
}
.icon-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.icon-btn.active {
  color: var(--accent);
}

.text-btn {
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  transition: color var(--transition);
}
.text-btn:hover {
  color: var(--text-primary);
}

/* ===== Header ===== */
.header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding: 0 24px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  gap: 20px;
  z-index: 10;
}

.logo {
  font-size: 1.5rem;
  white-space: nowrap;
  letter-spacing: -0.02em;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  line-height: 1;
}
.logo-my {
  font-weight: 300;
  color: var(--text-tertiary);
}
.logo-music {
  font-weight: 800;
  color: var(--accent);
}

.header-center {
  flex: 1;
  max-width: 560px;
  margin: 0 auto;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-tertiary);
  pointer-events: none;
}

#searchInput {
  width: 100%;
  padding: 10px 36px 10px 40px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 24px;
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition);
}
#searchInput:focus {
  border-color: var(--accent);
}
#searchInput::placeholder {
  color: var(--text-tertiary);
}

.clear-btn {
  position: absolute;
  right: 8px;
  display: flex;
  align-items: center;
  color: var(--text-tertiary);
}
.clear-btn:hover {
  color: var(--text-primary);
}

.search-btn {
  padding: 8px 20px;
  background: var(--accent);
  color: #000;
  border-radius: 24px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background var(--transition);
  white-space: nowrap;
}
.search-btn:hover {
  background: var(--accent-hover);
}

/* ===== Mic FAB (Song Recognition) ===== */
.mic-fab {
  position: fixed;
  right: 24px;
  z-index: 25;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
  touch-action: none;
  /* Desktop: bottom-right, above NP sidebar */
  bottom: 24px;
  right: 324px;
}
.mic-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(0,0,0,0.6);
}
.mic-fab:active {
  transform: scale(0.95);
}
.mic-fab.recording {
  background: var(--danger);
  animation: fab-pulse 1s ease-in-out infinite;
}
.mic-fab.long-press,
.mic-fab.swipe-armed {
  transform: scale(1.15);
  box-shadow: 0 6px 24px rgba(74, 222, 128, 0.5);
  background: #4ade80;
  transition: transform 0.3s, background 0.3s, box-shadow 0.3s;
}
.mic-fab.swiping {
  transition: none;
}
.mic-fab.processing {
  background: var(--accent);
  animation: fab-spin 1s linear infinite;
}
@keyframes fab-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 16px rgba(0,0,0,0.5); }
  50% { transform: scale(1.12); box-shadow: 0 6px 24px rgba(231, 76, 60, 0.5); }
}
@keyframes fab-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Swipe hint arrow */
.mic-fab-swipe-hint {
  position: fixed;
  z-index: 24;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  color: #4ade80;
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}
.mic-fab-swipe-hint.visible {
  opacity: 1;
}

/* Recognition overlay */
.recognize-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}
.recognize-overlay.hidden { display: none; }
.recognize-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.recognize-ring {
  position: relative;
  width: 160px;
  height: 160px;
}
.recognize-ring svg {
  transform: rotate(-90deg);
}
.recognize-ring .ring-track {
  fill: none;
  stroke: rgba(255,255,255,0.08);
  stroke-width: 8;
}
.recognize-ring .ring-level {
  fill: none;
  stroke: #4ade80;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 452.4;
  stroke-dashoffset: 452.4;
  transition: stroke 0.15s, stroke-dashoffset 0.1s;
}
.recognize-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
}
.recognize-icon.pulse {
  animation: rec-icon-pulse 1.5s ease-in-out infinite;
}
.recognize-icon.spin svg {
  animation: mic-spin 1s linear infinite;
}
@keyframes rec-icon-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.92); }
}
.recognize-label {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}
.recognize-timer {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.recognize-hint {
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: color 0.2s;
}
.recognize-hint.good { color: #4ade80; }
.recognize-hint.low { color: #facc15; }
.recognize-hint.silent { color: #f87171; }
.recognize-cancel-btn {
  margin-top: 12px;
  padding: 10px 32px;
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: 24px;
  background: rgba(255,255,255,0.1);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.recognize-cancel-btn:active {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.5);
}

/* ===== Main Content ===== */
.main-content {
  display: flex;
  height: calc(100vh - var(--header-height));
  overflow: hidden;
  position: relative;
}

.view {
  display: none;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
}
.view.active {
  display: flex;
}

.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 12px;
}
.view-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
}

.source-toggle-btn {
  padding: 6px 12px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--bg-primary);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  border-radius: var(--radius-sm);
}

.track-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px 16px;
}

/* ===== Track Item ===== */
.track-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition);
}
.track-item:hover {
  background: var(--bg-hover);
}
.track-item.playing {
  background: var(--accent-dim);
}

.track-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg-elevated);
  flex-shrink: 0;
}

.track-info {
  flex: 1;
  min-width: 0;
}

.track-title {
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track-title-extra {
  font-weight: 400;
  opacity: 0.45;
  font-size: 0.85em;
}
.track-item.playing .track-title {
  color: var(--accent);
}

.track-artist {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-duration {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.track-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity var(--transition);
}
.track-item:hover .track-actions {
  opacity: 1;
}

/* ===== Empty State ===== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-tertiary);
  gap: 16px;
}
.empty-state.small {
  padding: 30px 20px;
  gap: 8px;
}
.empty-state p {
  font-size: 0.95rem;
}

/* ===== Loading ===== */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px;
  gap: 12px;
  color: var(--text-secondary);
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--bg-elevated);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ===== Queue View ===== */
.queue-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.9rem;
}

.queue-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition);
  position: relative;
  user-select: none;
}
.queue-item:hover {
  background: var(--bg-hover);
}
.queue-item.dragging {
  opacity: 0.4;
}
.queue-item .queue-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-secondary);
}
.queue-item .queue-track-info {
  flex: 1;
  min-width: 0;
}
.queue-item .queue-track-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.92rem;
  font-weight: 500;
}
.queue-item .queue-track-artist {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.queue-item-history {
  opacity: 0.45;
}
.queue-item-history:hover {
  background: var(--bg-hover);
}
.queue-item-history .queue-track-title,
.queue-item-history .queue-track-artist {
  color: var(--text-tertiary);
}

.queue-item-current {
  background: var(--accent-dim);
  padding: 12px 12px;
  margin: 6px 0;
}
.queue-item-current:hover {
  background: var(--accent-dim);
}
.queue-item-current .queue-thumb {
  width: 56px;
  height: 56px;
}
.queue-item-current .queue-track-title {
  font-weight: 600;
  color: var(--accent);
  font-size: 1rem;
}
.queue-now-badge {
  display: none;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.12);
  padding: 3px 8px;
  border-radius: 4px;
  flex-shrink: 0;
}
.queue-item-current .queue-now-badge {
  display: inline-block;
}
.queue-item-history .remove-btn,
.queue-item-current .remove-btn {
  display: none;
}

.queue-item .remove-btn {
  opacity: 0;
  transition: opacity var(--transition);
  color: var(--text-tertiary);
  flex-shrink: 0;
  width: 32px;
  height: 32px;
}
.queue-item:hover .remove-btn {
  opacity: 1;
}
.queue-item .remove-btn:hover {
  color: var(--danger);
}
@media (hover: none) {
  .queue-item .remove-btn {
    opacity: 0.6;
  }
}

#queueViewContent {
  flex: 1;
  overflow-y: auto;
  padding: 0 12px 16px;
  -webkit-overflow-scrolling: touch;
}
.queue-empty-hint {
  font-size: 0.8rem;
  margin-top: 6px;
  opacity: 0.6;
}

/* ===== Visualizer ===== */
.visualizer-canvas {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 300px;
  width: auto;
  height: 180px;
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.visualizer-canvas.active {
  opacity: 0.8;
}

/* ===== Now Playing Panel ===== */
.np-panel {
  width: 300px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border);
  overflow-y: auto;
}

.np-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 16px;
  gap: 16px;
}

.np-artwork {
  width: 260px;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-elevated);
  position: relative;
  touch-action: none;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  flex-shrink: 0;
}
.np-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.np-cover[src=""] {
  visibility: hidden;
}

.np-track-info {
  text-align: center;
  width: 100%;
}
.np-title {
  font-size: 1.1rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.np-artist {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.np-genre {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 4px;
  justify-content: center;
}

.np-progress {
  width: 100%;
}
.np-progress-bar {
  position: relative;
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 3px;
  cursor: pointer;
  touch-action: none;
}
.np-progress-bar::after {
  content: '';
  position: absolute;
  top: -12px;
  bottom: -12px;
  left: 0;
  right: 0;
}
.np-progress-bar:hover {
  height: 8px;
}
.np-progress-bar:hover .np-progress-handle {
  opacity: 1;
}
.np-progress-filled {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  width: 0%;
  transition: none;
}
.np-progress-handle {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  background: var(--text-primary);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  left: 0%;
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.np-times {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.72rem;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
}

.np-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
}
.np-play-btn {
  width: 52px !important;
  height: 52px !important;
  background: var(--text-primary);
  color: var(--bg-primary);
  border-radius: 50%;
}
.np-play-btn:hover {
  background: var(--text-primary);
  color: var(--bg-primary);
  transform: scale(1.06);
}
.np-prev-btn, .np-next-btn {
  width: 40px !important;
  height: 40px !important;
}
.np-shuffle-btn, .np-repeat-btn {
  color: var(--text-secondary);
}
.np-shuffle-btn.active, .np-repeat-btn.active {
  color: var(--accent);
}

.np-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
}

.mc33-toggle-btn.active {
  color: var(--accent);
}

.repeat-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--accent);
}

.genre-tag {
  font-size: 0.6rem;
  padding: 1px 6px;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  color: var(--text-secondary);
  white-space: nowrap;
  line-height: 1.4;
}

/* ===== Settings Logout Button ===== */
.settings-section-divider {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-tertiary);
  padding: 20px 0 8px;
  margin-top: 8px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.settings-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.settings-toggle-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.settings-toggle-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}
.settings-toggle-desc {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}
.settings-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.settings-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.settings-toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all var(--transition);
}
.settings-toggle-slider::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: var(--text-tertiary);
  border-radius: 50%;
  transition: all var(--transition);
}
.settings-toggle input:checked + .settings-toggle-slider {
  background: var(--accent);
  border-color: var(--accent);
}
.settings-toggle input:checked + .settings-toggle-slider::before {
  transform: translateX(20px);
  background: #fff;
}
.settings-logout-group {
  text-align: center;
}
.settings-logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition);
}
.settings-logout-btn:hover {
  color: var(--danger);
  border-color: var(--danger);
  background: rgba(231, 76, 60, 0.1);
}
.settings-logout-btn svg {
  flex-shrink: 0;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .header {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 16px;
    gap: 10px;
  }
  .header-left { order: 1; }
  .header-right { order: 2; margin-left: auto; }
  .header-center { order: 3; flex-basis: 100%; max-width: none; }
  .np-panel { width: 260px; }
  .np-artwork { width: 220px; }
  .lyrics-panel { right: 260px; }
  .visualizer-canvas { right: 260px; }
}

@media (max-width: 640px) {
  /* --- Layout variables --- */
  :root {
    --bottom-nav-height: 0px;
    --header-height: 52px;
    --np-panel-height: 248px;
  }

  html {
    font-size: 16px;
  }

  /* --- Compact Header (one line: logo + search + mic) --- */
  .header {
    height: var(--header-height);
    padding: 0 12px;
    gap: 10px;
    flex-wrap: nowrap;
  }
  .header-left {
    order: 0;
  }
  .logo {
    font-size: 1.15rem;
  }
  .header-center {
    order: 1;
    flex: 1;
    max-width: none;
    margin: 0;
  }
  .header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
  }
  .search-btn {
    display: none;
  }
  .search-form {
    gap: 6px;
  }
  .mic-fab {
    right: 16px;
    bottom: calc(64px + 64px + 16px + env(safe-area-inset-bottom, 0px));
  }
  #searchInput {
    padding: 8px 32px 8px 36px;
    font-size: 0.9rem;
  }

  /* --- Main Content (accounts for header + bottom-nav + NP panel) --- */
  .main-content {
    height: calc(100vh - var(--header-height) - var(--bottom-nav-height) - var(--np-panel-height));
  }

  /* --- NP Panel: Fixed Bottom Panel --- */
  .np-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--np-panel-height);
    width: 100%;
    border-left: none;
    border-top: 2px solid rgba(255,255,255,0.12);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
    z-index: 20;
    overflow: hidden;
  }

  .np-content {
    display: grid;
    grid-template-columns: 64px 1fr;
    grid-template-rows: auto auto auto auto;
    gap: 6px 12px;
    padding: 10px 16px 12px;
    align-items: center;
  }

  /* Artwork + Info in einer Zeile */
  .np-artwork {
    grid-column: 1;
    grid-row: 1;
    width: 64px;
    height: 64px;
    aspect-ratio: auto;
    border-radius: var(--radius-sm);
    box-shadow: none;
  }
  .np-track-info {
    grid-column: 2;
    grid-row: 1;
    text-align: left;
    margin: 0;
  }
  .np-title {
    font-size: 1.15rem;
  }
  .np-artist {
    font-size: 1rem;
  }
  .np-genre {
    justify-content: flex-start;
  }
  .genre-tag {
    font-size: 0.75rem;
    padding: 2px 8px;
  }

  /* Progress, Controls, Actions — volle Breite */
  .np-progress {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 0;
  }
  .np-progress-bar {
    height: 8px;
    border-radius: 4px;
  }
  .np-progress-bar::after {
    top: -14px;
    bottom: -14px;
  }
  .np-progress-bar:hover {
    height: 8px;
  }
  .np-progress-filled {
    border-radius: 4px;
  }
  .np-progress-handle {
    width: 22px;
    height: 22px;
    opacity: 1;
  }
  .np-times {
    margin-top: 4px;
    font-size: 0.7rem;
  }

  .np-controls {
    grid-column: 1 / -1;
    grid-row: 3;
    gap: 10px;
    max-width: none;
    margin: 0;
  }
  .np-play-btn {
    width: 48px !important;
    height: 48px !important;
  }
  .np-play-btn svg {
    width: 28px;
    height: 28px;
  }
  .np-prev-btn, .np-next-btn {
    width: 40px !important;
    height: 40px !important;
  }
  .np-shuffle-btn, .np-repeat-btn {
    width: 36px !important;
    height: 36px !important;
  }

  .np-actions {
    grid-column: 1 / -1;
    grid-row: 4;
    justify-content: space-around;
    margin: 0;
  }
  .np-actions .icon-btn {
    width: 40px !important;
    height: 40px !important;
  }

  /* --- Track list items --- */
  .track-item {
    padding: 10px 12px;
  }
  .track-thumb {
    width: 48px;
    height: 48px;
  }
  .track-actions {
    opacity: 1;
  }
  .icon-btn {
    width: 44px;
    height: 44px;
  }
  .icon-btn svg {
    width: 20px;
    height: 20px;
  }
  .clear-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .queue-item .remove-btn {
    opacity: 1;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .queue-item .remove-btn svg {
    width: 18px;
    height: 18px;
  }

  /* --- Source badges --- */
  .source-badge {
    font-size: 0.6rem;
    padding: 1px 5px;
    min-height: 0;
    display: inline-flex;
    align-items: center;
  }

  /* --- Playlist list: show actions on mobile --- */
  .playlist-card-actions {
    opacity: 1;
  }

  /* --- View header --- */
  .view-header {
    padding: 14px 16px 10px;
  }
  .view-header h2 {
    font-size: 1.2rem;
  }

  /* --- Toast: above bottom-nav + NP panel --- */
  .toast {
    bottom: calc(var(--np-panel-height) + var(--bottom-nav-height) + 16px);
  }

  /* --- Lyrics panel: bottom half of remaining screen, full width --- */
  .lyrics-panel {
    right: 0;
    bottom: 0;
    z-index: 220;
  }

  /* --- Visualizer: above bottom-nav + NP panel --- */
  .visualizer-canvas {
    right: 0;
    bottom: calc(var(--np-panel-height) + var(--bottom-nav-height));
  }

  /* --- Video panel: full-width on mobile --- */
  .video-panel {
    right: 0;
    left: 0;
    bottom: calc(var(--np-panel-height) + var(--bottom-nav-height) + 8px);
    width: 100%;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
  }
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-elevated);
  color: var(--text-primary);
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  box-shadow: var(--shadow);
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 100;
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== Recognition Result Banner ===== */
.rec-result-banner {
  position: fixed;
  inset: 0;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 40px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.rec-result-banner.show {
  opacity: 1;
  pointer-events: auto;
}
.rec-result-banner.success {
  background: rgba(22, 163, 74, 0.92);
}
.rec-result-banner.failure {
  background: rgba(220, 38, 38, 0.92);
}
.rec-result-banner.warning {
  background: rgba(217, 119, 6, 0.92);
}
.rec-result-thumb {
  width: 160px;
  height: 160px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  display: none;
}
.rec-result-thumb.visible {
  display: block;
  animation: banner-pop 0.3s ease;
}
.rec-result-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.rec-result-icon svg {
  width: 48px;
  height: 48px;
  color: #fff;
}
.rec-result-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  max-width: 80vw;
}
.rec-result-subtitle {
  font-size: 1.35rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  max-width: 80vw;
}
.rec-result-banner.show .rec-result-icon {
  animation: banner-pop 0.3s ease;
}
.rec-result-dismiss {
  position: absolute;
  bottom: max(24px, env(safe-area-inset-bottom, 24px));
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.03em;
}
@keyframes banner-pop {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* ===== Modal Overlay ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
}
.modal-overlay.open {
  display: flex;
}
.modal {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  width: 380px;
  max-width: 90vw;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
}
.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 20px;
}
.modal-track-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.modal-track-thumb {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}
.modal-track-title {
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.modal-track-artist {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* ===== Playlist Checkbox List (modal) ===== */
.playlist-checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.playlist-check-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}
.playlist-check-item:hover {
  background: var(--bg-hover);
}
.playlist-check-item input[type="checkbox"] {
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
  cursor: pointer;
  flex-shrink: 0;
}
.playlist-check-name {
  flex: 1;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.playlist-check-count {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}
.modal-footer {
  padding: 12px 20px 16px;
  border-top: 1px solid var(--border);
}
.new-playlist-inline {
  display: flex;
  gap: 8px;
}
.new-playlist-inline input {
  flex: 1;
  padding: 8px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
}
.new-playlist-inline input:focus {
  border-color: var(--accent);
}
.text-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.text-btn.accent {
  color: var(--accent);
  font-weight: 600;
}
.text-btn.accent:hover {
  color: var(--accent-hover);
}

/* ===== Global Playlist Badges ===== */
.playlist-card {
  position: relative;
}
.global-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--accent);
  color: #000;
  text-transform: uppercase;
  z-index: 1;
}
.global-badge-sm {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  background: var(--accent);
  color: #000;
  text-transform: uppercase;
  vertical-align: middle;
  margin-left: 4px;
}
.global-checkbox-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.global-checkbox-label input[type="checkbox"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* ===== Playlist Sharing ===== */
.share-code-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.share-code-display {
  display: flex;
  align-items: center;
  gap: 8px;
}
.share-code-value {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--accent);
  padding: 8px 16px;
  background: var(--accent-dim);
  border-radius: var(--radius-md);
  user-select: all;
}
.share-code-timer {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
}
.share-code-error {
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--danger);
}
.connected-users-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.connected-user-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
.connected-user-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}
.connected-user-remove {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: all var(--transition);
  background: none;
}
.connected-user-remove:hover {
  color: var(--danger);
  border-color: rgba(248, 113, 113, 0.3);
}
.shared-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 0.55rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.8);
  color: #fff;
  text-transform: uppercase;
  z-index: 1;
  max-width: calc(100% - 12px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shared-badge-inline {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.8);
  color: #fff;
  vertical-align: middle;
  margin-left: 6px;
}
.shared-badge-sm {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(99, 102, 241, 0.8);
  color: #fff;
  vertical-align: middle;
  margin-left: 4px;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.playlist-edit-page {
  max-width: 600px;
  padding: 0 8px 160px;
}
.playlist-edit-page .settings-group {
  margin-bottom: 16px;
}
.share-user-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ===== Playlists View List ===== */
.playlist-grid {
  display: flex;
  flex-direction: column;
  padding: 0 16px 16px;
}
.playlist-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition);
}
.playlist-card:hover {
  background: var(--bg-hover);
}

/* Playlist cover thumbnail */
.playlist-card-cover {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  overflow: hidden;
  flex-shrink: 0;
}
.playlist-card-cover > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.playlist-card-cover.mosaic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 1px;
}
.playlist-card-cover.mosaic > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.playlist-card-cover.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
}

.playlist-card-info {
  flex: 1;
  min-width: 0;
}
.playlist-card-name {
  font-size: 1.05rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.5;
}
.playlist-card-count {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.playlist-card-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity var(--transition);
}
.playlist-card:hover .playlist-card-actions {
  opacity: 1;
}

/* ===== Playlist Detail View ===== */
.view-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 16px;
  flex-wrap: wrap;
}
.view-header h2 {
  margin: 0;
}
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--transition);
}
.back-btn:hover {
  color: var(--text-primary);
}
.playlist-detail-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}
.btn-accent {
  padding: 8px 18px;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 24px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background var(--transition);
}
.btn-accent:hover {
  background: var(--accent-hover);
}

/* ===== Settings ===== */
.settings-content {
  max-width: 600px;
  padding: 16px;
  padding-bottom: 160px;
  flex: 1;
  overflow-y: auto;
}
.settings-group {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}
.settings-group-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.settings-group-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}
.settings-radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.settings-radio {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background var(--transition);
}
.settings-radio:hover {
  background: var(--bg-hover);
}
.settings-radio input[type="radio"] {
  display: none;
}
.radio-mark {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 2px solid var(--text-secondary);
  border-radius: 50%;
  margin-top: 2px;
  position: relative;
  transition: border-color var(--transition);
}
.radio-mark::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--accent);
  transform: scale(0);
  transition: transform 0.15s ease;
}
.settings-radio input[type="radio"]:checked ~ .radio-mark {
  border-color: var(--accent);
}
.settings-radio input[type="radio"]:checked ~ .radio-mark::after {
  transform: scale(1);
}
.radio-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.radio-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}
.radio-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.settings-link {
  color: var(--accent);
  text-decoration: none;
}
.settings-link:hover {
  text-decoration: underline;
}
.settings-field {
  margin-top: 8px;
}
.settings-field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.settings-input-row {
  display: flex;
  gap: 8px;
}
.settings-input {
  flex: 1;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--bg-hover);
  background: var(--bg-main);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: monospace;
  outline: none;
  transition: border-color var(--transition);
}
.settings-input:focus {
  border-color: var(--accent);
}
.settings-save-btn {
  flex-shrink: 0;
}
.settings-duration-options {
  display: flex;
  gap: 6px;
}
.settings-duration-btn {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.settings-duration-btn:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}
.settings-duration-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}
/* ===== Lyrics Panel ===== */
.lyrics-panel {
  position: fixed;
  top: 100%;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
  z-index: 210;
  overflow: hidden;
  transition: top 0.3s ease;
}
.lyrics-panel.open {
  top: var(--header-height);
}
@media (max-width: 640px) {
  .lyrics-panel {
    right: 0;
    left: 0;
  }
  .lyrics-panel.open {
    top: 30vh;
  }
}
.lyrics-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
}
.lyrics-header h3 {
  font-size: 0.95rem;
  font-weight: 600;
}
.lyrics-content {
  height: calc(100% - 44px);
  overflow-y: auto;
  padding: 24px 20px 40px;
  scroll-behavior: smooth;
}
.lyrics-line {
  text-align: center;
  padding: 8px 16px;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-tertiary);
  transition: color 0.3s ease, font-size 0.3s ease, transform 0.3s ease;
  cursor: default;
}
.lyrics-line-active {
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: 600;
  transform: scale(1.02);
}
.lyrics-line-past {
  color: var(--text-secondary);
}
.lyrics-line.plain {
  color: var(--text-secondary);
}
.lyrics-empty,
.lyrics-loading {
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.9rem;
  padding: 40px 0;
}
.lyrics-loading {
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ===== Inactive track (missing source for current mode) ===== */
.track-item.inactive .track-thumb {
  opacity: 0.3;
  filter: grayscale(1);
}
.track-item.inactive .track-info,
.track-item.inactive .track-end-group {
  opacity: 0.3;
}
.track-item.inactive .track-actions {
  opacity: 0.3;
}
.add-source-confirm {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  background: var(--accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 3;
  cursor: pointer;
  animation: slideInRight 0.2s ease;
}

/* ===== Source Badges ===== */
.track-end-group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}
.source-badges {
  display: flex;
  flex-direction: row;
  gap: 3px;
  flex-shrink: 0;
}

.source-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 6px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 3px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all var(--transition);
  line-height: 1.4;
}

.source-badge:not(.info):hover {
  border-color: var(--text-secondary);
  color: var(--text-secondary);
}
.source-badge.info {
  cursor: default;
  pointer-events: none;
  font-size: 0.55rem;
  padding: 0px 4px;
  line-height: 1.3;
}

.source-badge.active {
  border-color: #e8a035;
  color: #e8a035;
  background: rgba(232, 160, 53, 0.12);
}

.source-badge.tidal.active {
  border-color: #00e5ff;
  color: #00e5ff;
  background: rgba(0, 229, 255, 0.10);
}

/* ===== Source Search Modal ===== */
.source-search-input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.source-search-input-row input {
  flex: 1;
  padding: 8px 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
}

.source-search-input-row input:focus {
  border-color: var(--accent);
}

.source-search-results {
  max-height: 350px;
  overflow-y: auto;
}

.source-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}

.source-result-item:hover {
  background: var(--bg-hover);
}

.source-result-thumb {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.source-result-info {
  flex: 1;
  min-width: 0;
}

.source-result-title {
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.source-result-artist {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.source-result-select {
  flex-shrink: 0;
  font-size: 0.8rem;
}

.source-search-empty,
.source-search-error {
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.85rem;
  padding: 24px 0;
}

.source-search-error {
  color: var(--danger);
}

/* ===== Video Player Panel ===== */
.video-panel {
  position: fixed;
  bottom: 24px;
  right: 324px;
  width: min(480px, calc(100vw - 48px));
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  z-index: 800;
  overflow: hidden;
}

.video-panel.hidden {
  display: none;
}

.video-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-tertiary);
}

.video-panel-title {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-right: 8px;
}

.video-panel-body {
  position: relative;
  width: 100%;
  background: #000;
}

.video-panel-body.ratio-tidal {
  padding-top: 120%;
  background: #000;
}

.video-panel-body iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ===== Auth Screen ===== */
.auth-screen {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.auth-screen.hidden {
  display: none;
}
.auth-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 36px 36px;
  width: 360px;
  max-width: 90vw;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.auth-logo {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 28px;
  letter-spacing: -0.5px;
}
.auth-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 4px;
}
.auth-tab {
  flex: 1;
  padding: 10px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
  transition: all var(--transition);
  background: none;
  border: none;
  cursor: pointer;
}
.auth-tab.active {
  background: var(--bg-elevated);
  color: var(--text-primary);
}
.auth-tab:hover:not(.active) {
  color: var(--text-primary);
}
#authForm {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
#authForm input {
  padding: 12px 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition);
}
#authForm input:focus {
  border-color: var(--accent);
}
#authForm input::placeholder {
  color: var(--text-tertiary);
}
.auth-error {
  padding: 10px 14px;
  background: rgba(231, 76, 60, 0.12);
  border: 1px solid rgba(231, 76, 60, 0.3);
  border-radius: var(--radius-sm);
  color: var(--danger);
  font-size: 0.85rem;
}
.auth-submit {
  padding: 12px;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
  margin-top: 4px;
}
.auth-submit:hover {
  background: var(--accent-hover);
}
.auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* === Welcome Screen === */
.welcome-card {
  text-align: center;
}
.welcome-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.5;
}
.welcome-start-btn {
  width: 100%;
  margin-bottom: 12px;
}
.welcome-admin-link {
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 8px;
  transition: color var(--transition);
}
.welcome-admin-link:hover {
  color: var(--text-secondary);
}

/* === Status Screens (expired/blocked) === */
.status-icon {
  margin: 12px 0;
  color: var(--text-secondary);
}
.status-icon.status-expired { color: #facc15; }
.status-icon.status-blocked { color: #f87171; }
.status-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

/* === User Management Cards === */
.user-management-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.user-card {
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  border: 1px solid var(--border);
}
.user-card-self {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.06);
}
.user-self-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  margin-left: 6px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.user-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.user-card-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-status-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.status-pending {
  background: rgba(250, 204, 21, 0.15);
  color: #facc15;
}
.status-active {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
}
.status-blocked {
  background: rgba(248, 113, 113, 0.15);
  color: #f87171;
}
.user-card-meta {
  display: flex;
  gap: 12px;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.user-card-key {
  font-family: monospace;
  font-size: 0.7rem;
  opacity: 0.7;
  cursor: default;
}
.user-card-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.user-action-btn {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}
.user-action-btn:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}
.user-action-btn.approve-btn {
  border-color: rgba(74, 222, 128, 0.3);
  color: #4ade80;
}
.user-action-btn.approve-btn:hover {
  background: rgba(74, 222, 128, 0.1);
  border-color: #4ade80;
}
.user-action-btn.block-btn {
  border-color: rgba(250, 204, 21, 0.3);
  color: #facc15;
}
.user-action-btn.block-btn:hover {
  background: rgba(250, 204, 21, 0.1);
  border-color: #facc15;
}
.user-action-btn.delete-btn {
  border-color: rgba(248, 113, 113, 0.3);
  color: #f87171;
}
.user-action-btn.delete-btn:hover {
  background: rgba(248, 113, 113, 0.1);
  border-color: #f87171;
}
.user-action-btn.adopt-btn {
  border-color: rgba(96, 165, 250, 0.3);
  color: #60a5fa;
}
.user-action-btn.adopt-btn:hover {
  background: rgba(96, 165, 250, 0.1);
  border-color: #60a5fa;
}

/* === QR Code === */
.qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
}
.qr-code svg {
  border-radius: var(--radius-md);
  max-width: 200px;
  height: auto;
}
.qr-url {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-family: monospace;
  word-break: break-all;
  text-align: center;
}

/* Logout button */
.logout-btn {
  margin-left: 8px;
  color: var(--text-tertiary);
}
.logout-btn:hover {
  color: var(--danger);
  background: rgba(231, 76, 60, 0.1);
}

/* ===== Toggle Switch ===== */
.settings-toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.settings-toggle-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg-elevated);
  border-radius: 12px;
  transition: background var(--transition);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  background: var(--text-secondary);
  border-radius: 50%;
  transition: transform var(--transition), background var(--transition);
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--accent-dim);
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
  background: var(--accent);
}

/* MC33 volume overlay */
.mc33-volume-overlay {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  padding: 20px 28px;
  min-width: 180px;
  text-align: center;
  z-index: 3000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.mc33-volume-overlay.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.mc33-vol-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #00d4ff;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.mc33-vol-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}
.mc33-vol-fill {
  height: 100%;
  background: #00d4ff;
  border-radius: 3px;
  transition: width 0.15s ease;
}
.mc33-vol-level {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

/* MC33 status */
.mc33-status {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-left: 8px;
}
.mc33-status.success {
  color: var(--accent);
}
.mc33-status.error {
  color: var(--danger);
}

/* ===== Mobile Swipe Track Actions ===== */
@media (max-width: 640px) {
  .playlist-track-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
  }
  .playlist-track-wrapper .track-item {
    position: relative;
    z-index: 1;
    background: var(--bg-primary);
    transition: transform 0.2s ease;
  }
  .playlist-track-wrapper .track-actions {
    display: none;
  }
  .playlist-track-wrapper .track-end-group .track-duration {
    font-size: 0.75rem;
  }
  .swipe-action {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 0;
  }
  .swipe-action svg {
    width: 24px;
    height: 24px;
  }
  .swipe-action-queue {
    left: 0;
    background: var(--accent);
    color: #fff;
  }
  .swipe-action-move {
    left: 0;
    background: #16a34a;
    color: #fff;
  }
  .swipe-action-delete {
    right: 0;
    background: var(--danger, #ff4444);
    color: #fff;
  }
  .swipe-confirm {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    background: var(--danger, #ff4444);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 2;
    cursor: pointer;
    animation: slideInRight 0.2s ease;
  }
  @keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
  }
  .swipe-queue-flash {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    padding: 0 16px;
    background: var(--accent);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 2;
    animation: flashIn 0.6s ease forwards;
  }
  @keyframes flashIn {
    0% { opacity: 1; transform: translateX(0); }
    70% { opacity: 1; }
    100% { opacity: 0; transform: translateX(-20px); }
  }
}

/* ── Debug Log Panel ── */
.debug-tab {
  position: fixed;
  right: 8px;
  top: 50%;
  width: 28px;
  height: 28px;
  background: #222;
  border: 1px solid #444;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  z-index: 10000;
  cursor: pointer;
  touch-action: manipulation;
  opacity: 0.6;
}
.debug-tab.open {
  opacity: 1;
  color: #aaa;
}
.debug-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  pointer-events: none;
  z-index: 9998;
  transition: opacity 0.3s ease;
}
.debug-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.debug-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 85vw;
  max-width: 400px;
  height: 100%;
  background: #111;
  border-left: 1px solid #333;
  z-index: 9999;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex;
  flex-direction: column;
}
.debug-panel.dragging {
  transition: none;
}
.debug-panel.open {
  transform: translateX(0);
}
.debug-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #333;
  flex-shrink: 0;
}
.debug-header h3 {
  margin: 0;
  font-size: 14px;
  color: #ccc;
  font-family: 'SF Mono', 'Fira Code', monospace;
}
.debug-clear-btn {
  background: none;
  border: 1px solid #555;
  color: #999;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
}
.debug-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 11px;
  line-height: 1.5;
}
.debug-entry {
  display: flex;
  gap: 6px;
  padding: 3px 0;
  border-bottom: 1px solid #1a1a1a;
  align-items: baseline;
  flex-wrap: wrap;
}
.debug-ts {
  color: #666;
  flex-shrink: 0;
}
.debug-cat {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 3px;
  flex-shrink: 0;
}
.debug-cat-system { background: #1e3a5f; color: #60a5fa; }
.debug-cat-recognition { background: #3b1f5e; color: #c084fc; }
.debug-cat-auth { background: #1a3f2e; color: #4ade80; }
.debug-cat-error { background: #5f1e1e; color: #f87171; }
.debug-msg {
  color: #ddd;
  word-break: break-word;
}

/* ===== Update Banner ===== */
.update-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--accent);
  color: #000;
  font-size: 14px;
  font-weight: 600;
}
.update-banner span { flex: 1; }
.update-install-btn {
  padding: 6px 16px;
  background: #000;
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
}
.update-install-btn:disabled { opacity: 0.6; }
.update-dismiss-btn {
  background: none;
  border: none;
  color: #000;
  font-size: 20px;
  cursor: pointer;
  padding: 0 4px;
}

/* ===== ON AIR Badge ===== */
.on-air-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: rgba(220, 38, 38, 0.14);
  border: 1px solid rgba(220, 38, 38, 0.45);
  border-radius: 999px;
  color: #dc2626;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  margin-right: 8px;
  transition: background 0.15s;
  animation: on-air-glow 2s ease-in-out infinite;
}
.on-air-badge:hover {
  background: rgba(220, 38, 38, 0.22);
}
.on-air-badge.hidden {
  display: none;
}
.on-air-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #dc2626;
  animation: on-air-pulse 1.4s ease-in-out infinite;
}
@keyframes on-air-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}
@keyframes on-air-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.3); }
  50% { box-shadow: 0 0 10px 2px rgba(220, 38, 38, 0.2); }
}

.mini-player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  height: 64px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  z-index: 85;
}
.mini-player.hidden { display: none; }
.mp-track {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  cursor: pointer;
}
.mp-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg-primary);
  flex-shrink: 0;
}
.mp-info {
  flex: 1;
  min-width: 0;
}
.mp-title {
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mp-artist {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.mp-play-btn {
  width: 44px;
  height: 44px;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(64px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  z-index: 90;
}
.bn-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  font-size: 0.7rem;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 0;
  transition: color var(--transition);
}
.bn-btn.active {
  color: var(--accent);
}
.bn-btn svg {
  display: block;
}

.main-content {
  padding-bottom: calc(64px + 64px + env(safe-area-inset-bottom, 0px));
}

.np-full {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  z-index: 200;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  will-change: transform;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.np-full.open {
  transform: translateY(0);
}

.np-full-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
  flex-shrink: 0;
}
.np-full-header-title {
  flex: 1;
  text-align: center;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  font-weight: 600;
}

.np-full-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.np-full-cover-wrap {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 12px 48px rgba(0,0,0,0.5);
  background: var(--bg-primary);
}
.np-full-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.np-full-cover:not([src]),
.np-full-cover[src=""] {
  visibility: hidden;
}

.np-full-info {
  text-align: center;
  width: 100%;
}
.np-full-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.np-full-artist {
  font-size: 1rem;
  color: var(--text-secondary);
}
.np-full-album {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.np-full-progress {
  width: 100%;
  max-width: 480px;
}
.np-full-progress-bar {
  position: relative;
  height: 6px;
  background: var(--bg-hover);
  border-radius: 3px;
  cursor: pointer;
}
.np-full-progress-filled {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 0%;
  background: var(--accent);
  border-radius: 3px;
}
.np-full-progress-handle {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.np-full-times {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.np-full-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
}
.np-full-controls .icon-btn {
  width: 52px;
  height: 52px;
}
.np-full-play-btn {
  width: 72px !important;
  height: 72px !important;
}
.np-full-controls .icon-btn.active {
  color: var(--accent);
}
.np-full-controls .icon-btn .repeat-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 0.6rem;
  color: var(--accent);
  font-weight: 700;
}

.np-full-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%;
}
.np-full-actions .icon-btn.active {
  color: var(--accent);
}

.search-view-header {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}
.search-view-header .search-form {
  display: flex;
  gap: 8px;
  width: 100%;
}
.search-view-header .search-input-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  min-width: 0;
}
.search-view-header .search-icon {
  color: var(--text-tertiary);
  flex-shrink: 0;
}
.search-view-header #searchInput {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.95rem;
  padding: 12px 0;
}
.search-view-header .source-toggle-btn {
  flex-shrink: 0;
  padding: 0 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.search-view-header .source-toggle-btn.tidal {
  background: rgba(0, 255, 255, 0.1);
  border-color: rgba(0, 255, 255, 0.3);
  color: #00ffff;
}
