/* ═══════════════════════════════════════════════════
   WebNghe — Dark Pastel Glassmorphism CSS
   ═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ─── Design Tokens ─── */
:root {
  --bg-base:        #0d0d12;
  --bg-surface:     #13131a;
  --bg-elevated:    #1a1a24;

  --glass-bg:       rgba(255, 255, 255, 0.05);
  --glass-border:   rgba(255, 255, 255, 0.08);
  --glass-hover:    rgba(255, 255, 255, 0.08);
  --glass-active:   rgba(255, 255, 255, 0.12);

  --accent-mint:    #7ee8b2;
  --accent-lavender:#b5a3f5;
  --accent-rose:    #f5a3c0;
  --accent-sky:     #a3cef5;
  --accent-peach:   #f5c9a3;

  --text-primary:   rgba(255, 255, 255, 0.92);
  --text-secondary: rgba(255, 255, 255, 0.55);
  --text-muted:     rgba(255, 255, 255, 0.30);

  --player-h:       88px;
  --sidebar-w:      320px;
  --radius-sm:      8px;
  --radius-md:      14px;
  --radius-lg:      20px;
  --radius-xl:      28px;

  --transition:     all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast:all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-glow-mint:   0 0 20px rgba(126, 232, 178, 0.25);
  --shadow-glow-lavender: 0 0 20px rgba(181, 163, 245, 0.25);
}

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

html { height: 100%; font-size: 15px; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.22); }

/* ─── Glass Utility ─── */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid var(--glass-border);
}

/* ═══════════════════════════════════════════
   HEADER / TOPBAR
   ═══════════════════════════════════════════ */
#app-header {
  position: relative;
  z-index: 100;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(13, 13, 18, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  flex-shrink: 0;
}

.app-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent-mint) 0%, var(--accent-lavender) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  box-shadow: var(--shadow-glow-mint);
}

.logo-text {
  font-size: 1.1rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--accent-mint), var(--accent-lavender));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

/* URL Input area */
#url-form {
  flex: 1;
  display: flex;
  gap: 8px;
  max-width: 640px;
}

#url-input {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.875rem;
  padding: 0 14px;
  height: 40px;
  outline: none;
  transition: var(--transition);
}

#url-input::placeholder { color: var(--text-muted); }

#url-input:focus {
  border-color: rgba(126, 232, 178, 0.4);
  background: rgba(255,255,255,0.08);
  box-shadow: 0 0 0 3px rgba(126, 232, 178, 0.1);
}

#btn-add {
  height: 40px;
  padding: 0 18px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--accent-mint) 0%, var(--accent-lavender) 100%);
  color: #0d0d12;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

#btn-add:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow-mint);
}

#btn-add:active { transform: translateY(0); }

#btn-add:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Header right icons */
.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: var(--transition-fast);
  position: relative;
}

.icon-btn:hover {
  background: var(--glass-hover);
  color: var(--text-primary);
}

.icon-btn.active { color: var(--accent-mint); }

.timer-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 8px;
  height: 8px;
  background: var(--accent-rose);
  border-radius: 50%;
  border: 1.5px solid var(--bg-base);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.8); }
}

/* ═══════════════════════════════════════════
   MAIN LAYOUT
   ═══════════════════════════════════════════ */
#main-layout {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
}

/* ─── Playlist Panel ─── */
#playlist-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#playlist-header {
  padding: 16px 20px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.playlist-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.track-count {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255,255,255,0.06);
  padding: 2px 8px;
  border-radius: 99px;
}

.playlist-actions {
  display: flex;
  gap: 6px;
}

/* Playlist scroll area */
#playlist-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px 16px;
}

/* Empty state */
#empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  height: 100%;
  padding: 40px 20px;
  text-align: center;
}

.empty-icon {
  font-size: 52px;
  opacity: 0.25;
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.empty-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.empty-desc {
  font-size: 0.825rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 260px;
}

/* ─── Track Card ─── */
.track-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px;
  border-radius: var(--radius-md);
  margin-bottom: 4px;
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
  border: 1px solid transparent;
  user-select: none;
}

.track-item:hover {
  background: var(--glass-hover);
  border-color: var(--glass-border);
}

.track-item.active {
  background: rgba(126, 232, 178, 0.08);
  border-color: rgba(126, 232, 178, 0.2);
}

.track-item.active .track-title {
  color: var(--accent-mint);
}

.track-item.dragging {
  opacity: 0.4;
}

.track-item.drag-over {
  border-color: rgba(126, 232, 178, 0.4);
  background: rgba(126, 232, 178, 0.06);
}

/* Drag handle */
.drag-handle {
  color: var(--text-muted);
  font-size: 16px;
  cursor: grab;
  padding: 4px 2px;
  opacity: 0;
  transition: opacity 0.15s;
  flex-shrink: 0;
}

.track-item:hover .drag-handle { opacity: 1; }
.drag-handle:active { cursor: grabbing; }

/* Track number / playing indicator */
.track-index {
  width: 24px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.track-item.active .track-index {
  color: transparent;
}

/* Playing animation bars */
.playing-bars {
  display: none;
  gap: 2px;
  align-items: flex-end;
  height: 14px;
  width: 16px;
}

.track-item.active .playing-bars { display: flex; }
.track-item.active .track-index-num { display: none; }

.bar {
  width: 3px;
  border-radius: 2px;
  background: var(--accent-mint);
  animation: bar-anim 1.2s ease-in-out infinite;
}
.bar:nth-child(1) { height: 60%; animation-delay: 0s; }
.bar:nth-child(2) { height: 100%; animation-delay: 0.2s; }
.bar:nth-child(3) { height: 70%; animation-delay: 0.4s; }
.bar:nth-child(4) { height: 40%; animation-delay: 0.15s; }

@keyframes bar-anim {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}

.track-item.paused .bar { animation-play-state: paused; }

/* Thumbnail */
.track-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-elevated);
  border: 1px solid rgba(255,255,255,0.06);
}

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

.track-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.track-meta {
  font-size: 0.775rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 8px;
}

.track-duration {
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

/* Offline badge */
.badge-offline {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 99px;
  background: rgba(126, 232, 178, 0.15);
  color: var(--accent-mint);
  border: 1px solid rgba(126, 232, 178, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

/* Track actions */
.track-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.15s;
}

.track-item:hover .track-actions { opacity: 1; }

.track-btn {
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-sm);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.track-btn:hover {
  background: var(--glass-hover);
  color: var(--text-primary);
}

.track-btn.offline-btn.saved {
  color: var(--accent-mint);
}

.track-btn.delete-btn:hover {
  background: rgba(245, 163, 192, 0.15);
  color: var(--accent-rose);
}

/* ═══════════════════════════════════════════
   SLEEP TIMER PANEL (slide-in)
   ═══════════════════════════════════════════ */
#timer-panel {
  position: fixed;
  top: 68px;
  right: 16px;
  width: 280px;
  z-index: 200;
  border-radius: var(--radius-lg);
  padding: 20px;
  display: none;
  flex-direction: column;
  gap: 16px;
  animation: slide-in 0.25s ease;
}

#timer-panel.visible {
  display: flex;
}

@keyframes slide-in {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.timer-panel-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Countdown display */
#timer-countdown {
  text-align: center;
  padding: 12px;
  border-radius: var(--radius-md);
  background: rgba(245, 163, 192, 0.08);
  border: 1px solid rgba(245, 163, 192, 0.2);
  display: none;
  flex-direction: column;
  gap: 4px;
}

#timer-countdown.visible { display: flex; }

#timer-time-display {
  font-size: 2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent-rose);
  letter-spacing: -0.03em;
  line-height: 1;
}

.timer-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Preset buttons */
.timer-presets {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.timer-preset-btn {
  padding: 9px 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.825rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: center;
}

.timer-preset-btn:hover {
  background: var(--glass-hover);
  color: var(--text-primary);
  border-color: rgba(245, 163, 192, 0.3);
}

.timer-preset-btn.active {
  background: rgba(245, 163, 192, 0.12);
  border-color: rgba(245, 163, 192, 0.4);
  color: var(--accent-rose);
}

/* Custom input */
.timer-custom {
  display: flex;
  gap: 8px;
  align-items: center;
}

.timer-custom input {
  flex: 1;
  height: 36px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.875rem;
  padding: 0 10px;
  outline: none;
  transition: var(--transition-fast);
}

.timer-custom input:focus {
  border-color: rgba(245, 163, 192, 0.4);
  box-shadow: 0 0 0 3px rgba(245, 163, 192, 0.1);
}

.timer-custom span {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.timer-custom-btn {
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(245, 163, 192, 0.3);
  background: rgba(245, 163, 192, 0.1);
  color: var(--accent-rose);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.timer-custom-btn:hover {
  background: rgba(245, 163, 192, 0.18);
}

/* Cancel button */
#btn-cancel-timer {
  width: 100%;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.08);
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.825rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

#btn-cancel-timer:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text-primary);
}

/* ═══════════════════════════════════════════
   BOTTOM PLAYER BAR
   ═══════════════════════════════════════════ */
#player-bar {
  height: var(--player-h);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0;
  border-top: 1px solid var(--glass-border);
  background: rgba(13, 13, 18, 0.9);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  position: relative;
  z-index: 50;
  padding: 0 16px;
}

/* ─ Now Playing Info ─ */
#now-playing {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 260px;
  min-width: 0;
}

#now-thumb {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg-elevated);
  border: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
  transition: var(--transition);
}

#now-thumb.active {
  box-shadow: 0 0 0 2px var(--accent-mint);
}

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

#now-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

#now-author {
  font-size: 0.775rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─ Center Controls ─ */
#player-controls {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: 600px;
  margin: 0 auto;
}

.control-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ctrl-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 50%;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.ctrl-btn:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.06);
}

.ctrl-btn.active {
  color: var(--accent-mint);
}

#btn-play-pause {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-mint) 0%, var(--accent-lavender) 100%);
  color: #0d0d12;
  font-size: 20px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  box-shadow: var(--shadow-glow-mint);
}

#btn-play-pause:hover {
  transform: scale(1.06);
  box-shadow: 0 0 28px rgba(126, 232, 178, 0.4);
}

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

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

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

.time-label:last-child { text-align: right; }

#progress-bar {
  flex: 1;
  height: 4px;
  border-radius: 99px;
  background: rgba(255,255,255,0.1);
  cursor: pointer;
  position: relative;
  transition: height 0.15s;
}

#progress-bar:hover { height: 6px; }

#progress-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent-mint), var(--accent-lavender));
  position: relative;
  transition: width 0.1s linear;
  pointer-events: none;
}

#progress-fill::after {
  content: '';
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%) scale(0);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px rgba(126,232,178,0.5);
  transition: transform 0.15s;
}

#progress-bar:hover #progress-fill::after {
  transform: translateY(-50%) scale(1);
}

/* ─ Volume + Right Side ─ */
#player-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 200px;
  justify-content: flex-end;
}

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

.vol-icon {
  font-size: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
}

#volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 80px;
  height: 4px;
  border-radius: 99px;
  background: rgba(255,255,255,0.1);
  cursor: pointer;
  outline: none;
}

#volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text-primary);
  cursor: pointer;
  transition: transform 0.15s;
}

#volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.3);
}

/* ═══════════════════════════════════════════
   LOADING OVERLAY (add track)
   ═══════════════════════════════════════════ */
#loading-toast {
  position: fixed;
  bottom: calc(var(--player-h) + 20px);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(30, 30, 42, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--text-primary);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

#loading-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

#loading-toast.error {
  border-color: rgba(245, 163, 192, 0.4);
  background: rgba(245, 163, 192, 0.1);
  color: var(--accent-rose);
}

#loading-toast.success {
  border-color: rgba(126, 232, 178, 0.4);
  background: rgba(126, 232, 178, 0.08);
  color: var(--accent-mint);
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: var(--accent-mint);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ═══════════════════════════════════════════
   OFFLINE PROGRESS (download indicator)
   ═══════════════════════════════════════════ */
.offline-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  background: linear-gradient(90deg, var(--accent-mint), var(--accent-lavender));
  transition: width 0.3s;
  pointer-events: none;
}

/* ═══════════════════════════════════════════
   OVERLAY BACKDROP
   ═══════════════════════════════════════════ */
#panel-backdrop {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: none;
}

#panel-backdrop.visible { display: block; }

/* ═══════════════════════════════════════════
   PWA INSTALL BANNER
   ═══════════════════════════════════════════ */
#install-banner {
  position: fixed;
  bottom: calc(var(--player-h) + 16px);
  right: 16px;
  width: 300px;
  z-index: 200;
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: none;
  gap: 12px;
  align-items: flex-start;
  animation: slide-in 0.3s ease;
}

#install-banner.visible { display: flex; }

.install-icon { font-size: 28px; flex-shrink: 0; }

.install-content { flex: 1; }

.install-title {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 3px;
}

.install-desc {
  font-size: 0.775rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.install-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.btn-install {
  flex: 1;
  height: 32px;
  border-radius: var(--radius-sm);
  border: none;
  background: linear-gradient(135deg, var(--accent-mint) 0%, var(--accent-lavender) 100%);
  color: #0d0d12;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-dismiss {
  height: 32px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}

/* ═══════════════════════════════════════════
   MOBILE RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 640px) {
  #app-header {
    flex-wrap: wrap;
    padding: 10px 14px;
    gap: 10px;
  }

  #url-form {
    order: 3;
    width: 100%;
    max-width: none;
  }

  .logo-text { display: none; }

  .header-actions { margin-left: auto; }

  #player-bar {
    gap: 0;
    padding: 0 12px;
  }

  #now-playing {
    flex: 0 0 auto;
    max-width: 140px;
  }

  #player-controls {
    flex: 1;
    min-width: 0;
  }

  #player-right {
    flex: 0 0 auto;
  }

  .volume-area { display: none; }

  #player-right {
    flex: 0 0 40px;
    justify-content: center;
  }

  #timer-panel {
    right: 8px;
    left: 8px;
    width: auto;
  }

  #install-banner {
    right: 8px;
    left: 8px;
    width: auto;
    bottom: calc(var(--player-h) + 12px);
  }
}

@media (max-width: 400px) {
  .ctrl-btn { width: 30px; height: 30px; font-size: 15px; }
  #btn-play-pause { width: 40px; height: 40px; font-size: 17px; }
}

/* ═══════════════════════════════════════════
   HIGHLIGHT & SELECTION
   ═══════════════════════════════════════════ */
::selection {
  background: rgba(126, 232, 178, 0.25);
  color: var(--text-primary);
}

/* ─── Smooth transitions for theme ─── */
* { transition-property: background-color, border-color, color, box-shadow, opacity;
    transition-duration: 0.15s;
    transition-timing-function: ease; }

.track-item, .ctrl-btn, #btn-play-pause, .icon-btn, #btn-add {
  transition: var(--transition);
}
