/* ============================================================
   WuysMusic - style.css
   Dark, refined aesthetic inspired by Spotify
   ============================================================ */

/* ──────────── CSS Variables ──────────── */
:root {
  --bg-base:       #0a0a0f;
  --bg-elevated:   #111118;
  --bg-card:       #17171f;
  --bg-hover:      #1e1e28;
  --bg-active:     #252530;
  --sidebar-w:     260px;
  --player-h:      88px;

  --accent:        #1db954;
  --accent-hover:  #1ed760;
  --accent-dim:    rgba(29, 185, 84, 0.15);

  --text-primary:  #ffffff;
  --text-secondary:#a0a0b8;
  --text-muted:    #6b6b80;
  --text-accent:   var(--accent);

  --border:        rgba(255,255,255,0.06);
  --border-hover:  rgba(255,255,255,0.12);

  --radius-sm:     6px;
  --radius-md:     10px;
  --radius-lg:     16px;
  --radius-xl:     22px;

  --shadow-card:   0 8px 32px rgba(0,0,0,0.5);
  --shadow-player: 0 -4px 40px rgba(0,0,0,0.6);

  --transition:    0.2s cubic-bezier(0.4,0,0.2,1);
  --font-display:  'Syne', sans-serif;
  --font-body:     'DM Sans', sans-serif;
}

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

html { font-size: 15px; scroll-behavior: smooth; }

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

input, button, select { font-family: var(--font-body); }

.hidden { display: none !important; }

/* ──────────── Scrollbar ──────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-hover); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--bg-active); }

/* ══════════════════════════════════════════
   LOGIN PAGE
══════════════════════════════════════════ */
.login-page {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-base);
  overflow: hidden;
  z-index: 1000;
}

.login-bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  animation: float 8s ease-in-out infinite;
}
.orb1 { width: 400px; height: 400px; background: rgba(29,185,84,0.12); top: -100px; left: -100px; animation-delay: 0s; }
.orb2 { width: 300px; height: 300px; background: rgba(100,60,255,0.08); bottom: -80px; right: -80px; animation-delay: 3s; }
.orb3 { width: 200px; height: 200px; background: rgba(29,185,84,0.06); top: 50%; left: 60%; animation-delay: 5s; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -20px) scale(1.05); }
}

.login-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-card), 0 0 80px rgba(29,185,84,0.05);
  position: relative;
  z-index: 1;
  animation: slideUp 0.5s cubic-bezier(0.4,0,0.2,1) forwards;
}

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

.login-logo {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 32px;
}
.login-logo-text {
  font-family: var(--font-display);
  font-size: 1.3rem; font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.login-title {
  font-family: var(--font-display);
  font-size: 1.8rem; font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}
.login-subtitle { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 28px; }

.login-error {
  display: flex; align-items: center; gap: 8px;
  background: rgba(220,60,60,0.12);
  border: 1px solid rgba(220,60,60,0.3);
  color: #ff6b6b;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.85rem;
  margin-bottom: 20px;
  animation: shake 0.3s ease;
}

@keyframes shake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* Form Groups */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; font-size: 0.78rem; font-weight: 500;
  color: var(--text-secondary); letter-spacing: 0.5px;
  text-transform: uppercase; margin-bottom: 8px;
}
.form-group input,
.form-group select {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  padding: 12px 16px;
  font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.form-group input::placeholder { color: var(--text-muted); }
.form-group select option { background: var(--bg-card); }

.password-wrapper { position: relative; }
.password-wrapper input { padding-right: 48px; }
.toggle-pw {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); transition: color var(--transition);
}
.toggle-pw:hover { color: var(--text-primary); }

/* Buttons */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent);
  color: #000;
  border: none; border-radius: 999px;
  font-family: var(--font-body); font-weight: 700; font-size: 0.95rem;
  padding: 14px 32px; cursor: pointer; width: 100%;
  transition: all var(--transition);
  letter-spacing: 0.3px;
}
.btn-primary:hover { background: var(--accent-hover); transform: scale(1.02); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary.small { width: auto; padding: 10px 22px; font-size: 0.85rem; }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-body); font-weight: 500; font-size: 0.9rem;
  padding: 10px 22px; cursor: pointer;
  transition: all var(--transition);
}
.btn-ghost:hover { border-color: var(--border-hover); color: var(--text-primary); }

.btn-danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: #e53935;
  color: #fff;
  border: none; border-radius: 999px;
  font-family: var(--font-body); font-weight: 600; font-size: 0.9rem;
  padding: 10px 22px; cursor: pointer;
  transition: all var(--transition);
}
.btn-danger:hover { background: #ef5350; }

.btn-icon {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted);
  padding: 6px; border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
  transition: color var(--transition), background var(--transition);
  line-height: 0;
}
.btn-icon:hover { color: var(--text-primary); background: var(--bg-hover); }

.required { color: var(--accent); }
.login-hint {
  text-align: center; margin-top: 20px;
  font-size: 0.8rem; color: var(--text-muted);
}
.login-hint code {
  background: var(--bg-card); padding: 2px 6px;
  border-radius: 4px; color: var(--accent); font-size: 0.8rem;
}

/* ══════════════════════════════════════════
   MAIN APP LAYOUT
══════════════════════════════════════════ */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: 1fr var(--player-h);
  height: 100vh;
  transition: grid-template-columns var(--transition);
}
.app.sidebar-collapsed {
  --sidebar-w: 72px;
}

/* ──────────── Sidebar ──────────── */
.sidebar {
  grid-row: 1 / 2;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  overflow: hidden;
  transition: width var(--transition);
  position: relative;
  z-index: 10;
}

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

.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: 1.05rem; font-weight: 800;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
}
.brand span { transition: opacity var(--transition); }
.app.sidebar-collapsed .brand span { opacity: 0; width: 0; }

.sidebar-toggle {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 4px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  transition: color var(--transition), transform var(--transition);
  flex-shrink: 0;
}
.sidebar-toggle:hover { color: var(--text-primary); }
.app.sidebar-collapsed .sidebar-toggle { transform: rotate(180deg); }

/* Nav */
.sidebar-nav {
  padding: 12px 10px;
  display: flex; flex-direction: column; gap: 2px;
}
.nav-btn {
  display: flex; align-items: center; gap: 12px;
  background: none; border: none; cursor: pointer;
  color: var(--text-secondary);
  padding: 10px 10px;
  border-radius: var(--radius-md);
  font-size: 0.88rem; font-weight: 500;
  transition: all var(--transition);
  white-space: nowrap; width: 100%;
  text-align: left;
}
.nav-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-btn.active { background: var(--bg-active); color: var(--text-primary); }
.nav-btn.active svg { color: var(--accent); }
.nav-btn span { transition: opacity var(--transition); }
.app.sidebar-collapsed .nav-btn span { opacity: 0; width: 0; overflow: hidden; }

.sidebar-divider {
  height: 1px; background: var(--border);
  margin: 4px 16px;
}

/* Library */
.sidebar-library {
  flex: 1; overflow-y: auto;
  padding: 8px 10px;
}
.library-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 6px 10px;
}
.library-title {
  font-size: 0.72rem; font-weight: 600;
  color: var(--text-muted); letter-spacing: 1px;
  text-transform: uppercase;
  transition: opacity var(--transition);
}
.app.sidebar-collapsed .library-title,
.app.sidebar-collapsed .library-header .btn-icon { opacity: 0; pointer-events: none; }

.album-list { display: flex; flex-direction: column; gap: 1px; }

.album-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 8px; border-radius: var(--radius-md);
  cursor: pointer; transition: all var(--transition);
  white-space: nowrap; overflow: hidden;
}
.album-item:hover { background: var(--bg-hover); }
.album-item.active { background: var(--bg-active); }
.album-item-icon {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  background: var(--bg-active);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: var(--text-muted);
  font-size: 0.75rem; font-weight: 700;
}
.album-item-info { overflow: hidden; }
.album-item-name {
  font-size: 0.85rem; font-weight: 500;
  color: var(--text-primary);
  overflow: hidden; text-overflow: ellipsis;
}
.album-item-count { font-size: 0.74rem; color: var(--text-muted); }

/* Sidebar Footer */
.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
}
.user-info { display: flex; align-items: center; gap: 10px; overflow: hidden; }
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: #000;
  font-weight: 700; font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.user-name {
  font-size: 0.85rem; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap;
  transition: opacity var(--transition);
}
.app.sidebar-collapsed .user-name { opacity: 0; width: 0; }
.app.sidebar-collapsed .logout-btn { opacity: 0; pointer-events: none; }
.logout-btn:hover { color: #ff6b6b !important; }

/* ──────────── Main Content ──────────── */
.main-content {
  grid-column: 2;
  grid-row: 1 / 2;
  overflow-y: auto;
  padding: 32px 36px;
  position: relative;
}

.view { display: none; animation: fadeIn 0.3s ease; }
.view.active { display: block; }

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

.view-header { margin-bottom: 32px; }
.view-title {
  font-family: var(--font-display);
  font-size: 2rem; font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 6px;
}
.view-subtitle { color: var(--text-secondary); font-size: 0.9rem; }

/* Section */
.section { margin-bottom: 40px; }
.section-title {
  font-family: var(--font-display);
  font-size: 1.2rem; font-weight: 700;
  margin-bottom: 18px;
  letter-spacing: -0.3px;
}

/* Songs Grid */
.songs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.song-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.song-card:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.4);
}
.song-card.playing {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.song-card-cover {
  width: 100%; aspect-ratio: 1;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: var(--bg-active);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
  overflow: hidden;
  position: relative;
}
.song-card-cover img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-md); }
.song-card-cover .default-cover {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--bg-active), var(--bg-elevated));
}
.play-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity var(--transition);
  border-radius: var(--radius-md);
}
.song-card:hover .play-overlay { opacity: 1; }
.play-overlay-btn {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transform: scale(0.8); transition: transform var(--transition);
  color: #000;
}
.song-card:hover .play-overlay-btn { transform: scale(1); }

.song-card-title {
  font-size: 0.88rem; font-weight: 600;
  color: var(--text-primary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  margin-bottom: 3px;
}
.song-card-artist { font-size: 0.78rem; color: var(--text-secondary); }
.song-card-duration {
  font-size: 0.72rem; color: var(--text-muted);
  margin-top: 4px;
}

/* Now playing indicator */
.playing-bars {
  display: flex; align-items: flex-end; gap: 2px;
  height: 16px;
}
.playing-bars span {
  width: 3px; background: var(--accent);
  border-radius: 2px;
  animation: bar-bounce 0.8s ease-in-out infinite;
}
.playing-bars span:nth-child(1) { height: 6px; animation-delay: 0s; }
.playing-bars span:nth-child(2) { height: 12px; animation-delay: 0.15s; }
.playing-bars span:nth-child(3) { height: 8px; animation-delay: 0.3s; }

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

/* Songs List (for album view and search) */
.songs-list { display: flex; flex-direction: column; gap: 2px; }

.song-row {
  display: grid;
  grid-template-columns: 32px 48px 1fr 1fr auto 40px;
  align-items: center; gap: 14px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition);
  color: var(--text-secondary);
}
.song-row:hover { background: var(--bg-hover); color: var(--text-primary); }
.song-row.playing { color: var(--accent); background: var(--accent-dim); }
.song-row-num { font-size: 0.85rem; text-align: center; color: inherit; }
.song-row-cover {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  object-fit: cover; background: var(--bg-active);
  overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.song-row-cover img { width: 100%; height: 100%; object-fit: cover; }
.song-row-info .song-row-title { font-size: 0.9rem; font-weight: 500; color: inherit; }
.song-row-info .song-row-artist { font-size: 0.8rem; color: var(--text-muted); }
.song-row-album { font-size: 0.82rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song-row-duration { font-size: 0.82rem; color: var(--text-muted); white-space: nowrap; }
.song-row-del {
  opacity: 0; transition: opacity var(--transition);
}
.song-row:hover .song-row-del { opacity: 1; }
.song-row-del:hover { color: #ff6b6b !important; }

/* Search Bar */
.search-bar-wrapper {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 18px;
  max-width: 500px;
  margin-top: 16px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-bar-wrapper:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.search-bar-wrapper input {
  background: none; border: none; outline: none;
  color: var(--text-primary); font-size: 0.95rem; width: 100%;
}
.search-bar-wrapper input::placeholder { color: var(--text-muted); }
.search-bar-wrapper svg { color: var(--text-muted); flex-shrink: 0; }

/* Empty State */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; padding: 60px 20px; text-align: center;
}
.empty-icon { font-size: 3rem; }
.empty-state p { color: var(--text-secondary); font-size: 0.9rem; }

/* ──────────── Upload Form ──────────── */
.upload-form-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 640px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Drop Zone */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: all var(--transition);
  background: var(--bg-card);
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.drop-input {
  position: absolute; inset: 0;
  opacity: 0; cursor: pointer;
  width: 100%; height: 100%;
}
.drop-content { pointer-events: none; }
.drop-label { color: var(--text-secondary); font-size: 0.9rem; margin: 8px 0 4px; }
.drop-sub { color: var(--text-muted); font-size: 0.8rem; }
.drop-preview {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; color: var(--text-primary);
  font-size: 0.88rem;
}

.cover-drop { padding: 0; overflow: hidden; min-height: 120px; }
.cover-drop .drop-content { padding: 28px; }
.cover-preview-img {
  width: 100%; max-height: 200px;
  object-fit: cover; border-radius: calc(var(--radius-lg) - 2px);
}

.upload-msg {
  padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: 0.85rem; margin-bottom: 12px;
}
.upload-msg.success { background: rgba(29,185,84,0.12); color: var(--accent); border: 1px solid rgba(29,185,84,0.3); }
.upload-msg.error { background: rgba(220,60,60,0.12); color: #ff6b6b; border: 1px solid rgba(220,60,60,0.3); }

/* ──────────── Album View ──────────── */
.album-view-header {
  display: flex; align-items: flex-end; gap: 28px;
  margin-bottom: 36px; padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.album-cover-large {
  width: 180px; height: 180px; border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
  box-shadow: var(--shadow-card);
}
.album-cover-large img { width: 100%; height: 100%; object-fit: cover; }
.album-label {
  display: block; font-size: 0.7rem; font-weight: 700;
  letter-spacing: 2px; color: var(--text-muted);
  text-transform: uppercase; margin-bottom: 8px;
}
.album-view-title {
  font-family: var(--font-display);
  font-size: 2.4rem; font-weight: 800;
  letter-spacing: -1px; line-height: 1;
  margin-bottom: 12px;
}
.album-view-count { color: var(--text-secondary); font-size: 0.88rem; margin-bottom: 20px; }
.album-actions { display: flex; gap: 10px; align-items: center; }

/* ══════════════════════════════════════════
   PLAYER BAR
══════════════════════════════════════════ */
.player-bar {
  grid-column: 1 / -1;
  grid-row: 2;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
  padding: 0 20px;
  box-shadow: var(--shadow-player);
  z-index: 100;
}

/* Now Playing */
.player-now-playing {
  display: flex; align-items: center; gap: 14px;
}
.now-cover {
  width: 52px; height: 52px; border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
}
.now-cover img { width: 100%; height: 100%; object-fit: cover; }
.now-info { overflow: hidden; }
.now-title {
  font-size: 0.88rem; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--text-primary);
}
.now-artist { font-size: 0.78rem; color: var(--text-secondary); }
.like-btn.liked { color: var(--accent) !important; }

/* Player Controls */
.player-controls {
  display: flex; flex-direction: column;
  align-items: center; gap: 8px;
  padding: 12px 0;
}
.controls-btns {
  display: flex; align-items: center; gap: 6px;
}
.ctrl-btn {
  width: 34px; height: 34px; border-radius: 50%;
}
.ctrl-btn.active { color: var(--accent) !important; }
.play-pause-btn {
  width: 42px; height: 42px;
  background: var(--text-primary) !important;
  color: #000 !important;
  border-radius: 50%;
  transition: all var(--transition) !important;
}
.play-pause-btn:hover { transform: scale(1.08); background: var(--text-primary) !important; }

/* Progress Bar */
.progress-wrapper {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
}
.time-label { font-size: 0.74rem; color: var(--text-muted); min-width: 30px; }
.time-label:last-child { text-align: right; }

.progress-bar-container {
  flex: 1; cursor: pointer; padding: 8px 0; position: relative;
}
.progress-bar-bg {
  height: 4px; border-radius: 99px;
  background: var(--bg-active);
  position: relative; overflow: visible;
}
.progress-bar-fill {
  height: 100%; border-radius: 99px;
  background: var(--text-primary);
  width: 0%; pointer-events: none;
  transition: background 0.2s;
}
.progress-bar-container:hover .progress-bar-fill,
.volume-bar-container:hover .progress-bar-fill {
  background: var(--accent);
}
.progress-thumb {
  position: absolute; right: 0; top: 50%;
  transform: translate(50%, -50%);
  width: 12px; height: 12px; border-radius: 50%;
  background: white;
  opacity: 0; transition: opacity var(--transition);
  pointer-events: none;
}
.progress-bar-container:hover .progress-thumb,
.volume-bar-container:hover .progress-thumb { opacity: 1; }

/* Volume */
.player-right {
  display: flex; align-items: center; gap: 10px;
  justify-content: flex-end;
}
.volume-bar-container {
  width: 90px; cursor: pointer; padding: 8px 0; position: relative;
}
.vol-pct { font-size: 0.74rem; color: var(--text-muted); min-width: 34px; }

/* ══════════════════════════════════════════
   MODALS
══════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  width: 100%; max-width: 420px;
  box-shadow: var(--shadow-card);
  animation: modalIn 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
.modal.small { max-width: 340px; }

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

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.modal-header h3 {
  font-family: var(--font-display);
  font-size: 1.1rem; font-weight: 700;
}
.modal-actions {
  display: flex; gap: 10px; justify-content: flex-end;
  margin-top: 20px;
}
.confirm-msg { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.5; }

/* ══════════════════════════════════════════
   TOAST
══════════════════════════════════════════ */
.toast {
  position: fixed; bottom: calc(var(--player-h) + 16px); left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 22px;
  font-size: 0.85rem; color: var(--text-primary);
  box-shadow: var(--shadow-card);
  z-index: 9998;
  opacity: 0; transition: all 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
}
.toast.show {
  opacity: 1; transform: translateX(-50%) translateY(0);
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; --player-h: 80px; }

  .app {
    grid-template-columns: 0 1fr;
  }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: var(--player-h);
    width: 260px; z-index: 200;
    transform: translateX(-100%);
    transition: transform var(--transition);
  }
  .app.sidebar-open .sidebar { transform: translateX(0); }
  .main-content { grid-column: 1 / -1; padding: 20px 18px; }
  .form-row { grid-template-columns: 1fr; }
  .album-view-header { flex-direction: column; align-items: flex-start; }
  .album-cover-large { width: 140px; height: 140px; }
  .player-bar { grid-template-columns: 1fr auto; padding: 0 14px; }
  .player-right { display: none; }
  .player-now-playing { gap: 10px; }
  .now-cover { width: 44px; height: 44px; }
  .song-row { grid-template-columns: 36px 1fr auto; }
  .song-row-num, .song-row-album, .song-row-del { display: none; }
  .songs-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
  .view-title { font-size: 1.5rem; }
}

/* Smooth transitions for playing state */
.song-card, .song-row {
  transition: all var(--transition);
}
