/* =========================================================
   SENN MUSIC — "Nightglow" design system
   Ink-blue dark surface, amber-gold + magenta accent duo,
   Space Grotesk display type over Inter UI type.
   All original selectors are kept so app.js keeps working —
   only the visual language changed.
   ========================================================= */

:root {
  /* ---- surfaces (classic Spotify black) ---- */
  --bg: #000000;
  --panel: #0d0d0d;
  --panel-2: #181818;
  --panel-3: #282828;
  --hover: #2f2f2f;
  --text: #ffffff;
  --muted: #b3b3b3;
  --muted-2: #727272;
  --line: rgba(255,255,255,.1);
  --line-strong: rgba(255,255,255,.18);

  /* ---- accent: Spotify green ---- */
  --green: #1ed760;
  --green-dark: #1db954;
  --accent-2: #1ed760;
  --accent-grad: var(--green);
  --accent-grad-soft: rgba(30,215,96,.14);
  --danger: #f15e6c;

  /* ---- shape / shadow ---- */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;
  --shadow-soft: 0 10px 30px rgba(0,0,0,.4);
  --shadow-lift: 0 18px 45px rgba(0,0,0,.55);
  --glow: 0 0 0 1px rgba(30,215,96,.3), 0 8px 24px rgba(30,215,96,.22);

  /* ---- type ---- */
  --font-display: 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* ---- layout ---- */
  --player-h: 96px;
  --sidebar-w: 292px;
  --right-panel-w: 344px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
}

html, body { width: 100%; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input { font: inherit; }
button { border: 0; background: none; color: inherit; }
button, [role="button"] { -webkit-tap-highlight-color: transparent; }
img { display: block; }

::selection { background: var(--green); color: #16110a; }

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  border-radius: 4px;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.28); background-clip: padding-box; }

h1, h2, h3 { font-family: var(--font-display); }

/* ---------- Loading ---------- */
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 18px;
}
.loading-screen strong { font-family: var(--font-display); letter-spacing: -.02em; font-size: 1.25rem; }
.loading-logo,
.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--accent-grad);
  color: #171008;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  box-shadow: var(--glow);
}
.loading-logo { animation: loadingPulse 1.15s ease-in-out infinite alternate; }
@keyframes loadingPulse { from { transform: scale(.92) rotate(-4deg); opacity: .8; } to { transform: scale(1.05) rotate(3deg); opacity: 1; } }
.brand-mark.small { width: 34px; height: 34px; border-radius: 10px; font-size: .92rem; flex: 0 0 auto; box-shadow: none; }

/* ---------- Auth ---------- */
.auth-container {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.auth-box {
  width: min(100%, 430px);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 44px;
  box-shadow: var(--shadow-lift);
}
.auth-brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 36px; }
.auth-box h1 { font-family: var(--font-display); font-size: clamp(1.9rem, 6vw, 2.5rem); line-height: 1.05; letter-spacing: -.03em; margin-bottom: 12px; }
.auth-copy { color: var(--muted); line-height: 1.55; margin-bottom: 30px; font-size: .94rem; }
.field-label { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); margin: 0 0 8px; }
.auth-input,
.modal-input {
  width: 100%;
  min-height: 50px;
  background: var(--panel-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0 14px;
  outline: 0;
  margin-bottom: 18px;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.auth-input::placeholder,
.modal-input::placeholder { color: var(--muted-2); }
.auth-input:focus,
.modal-input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(30,215,96,.16); background: var(--hover); }
.auth-main-btn { width: 100%; min-height: 50px; margin-top: 4px; }
.btn-link { width: 100%; background: transparent; color: var(--muted); padding: 18px 0 0; cursor: pointer; }
.btn-link strong { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.auth-message { min-height: 20px; text-align: center; font-size: .85rem; color: var(--muted); margin-top: 18px; }

/* ---------- Buttons ---------- */
.btn-primary,
.btn-secondary,
.btn-pill-light,
.filter-pill,
.text-button,
.icon-btn,
.back-link,
.logout-btn,
.brand-button,
.sidebar-link,
.library-title-button,
.nav-item,
.profile-chip,
.search-submit {
  cursor: pointer;
}
.btn-primary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  background: var(--accent-grad);
  color: #000;
  border-radius: 999px;
  min-height: 46px;
  padding: 0 24px;
  font-weight: 700;
  box-shadow: var(--glow);
  transition: transform .15s cubic-bezier(.3,.8,.3,1.4), filter .15s ease, box-shadow .15s ease;
}
.btn-primary:hover { transform: translateY(-1px) scale(1.02); filter: brightness(1.08); }
.btn-primary:active { transform: scale(.97); }
.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-strong);
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.btn-secondary:hover { border-color: var(--green); background: rgba(30,215,96,.08); }
.btn-auto { width: auto; }
.btn-pill-light {
  min-height: 36px;
  border-radius: 999px;
  padding: 0 16px;
  background: var(--panel-3);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: border-color .15s ease, background .15s ease;
}
.btn-pill-light:hover { border-color: var(--green); background: var(--hover); }
.icon-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  transition: color .15s ease, background .15s ease;
}
.icon-btn:hover { color: var(--text); background: rgba(255,255,255,.08); }
.icon-btn.subtle { background: transparent; }

/* ---------- App shell ---------- */
.app-container {
  height: calc(100vh - var(--player-h));
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  gap: 10px;
  padding: 10px 10px 0;
  background: var(--bg);
  transition: grid-template-columns .25s cubic-bezier(.3,.8,.3,1);
}
.app-container.now-panel-open {
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--right-panel-w);
}

/* ---------- Sidebar ---------- */
.sidebar {
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sidebar-block {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.sidebar-nav-block { padding: 10px 12px 14px; }
.brand-button,
.library-title-button,
.sidebar-link,
.logout-btn {
  width: 100%;
  background: transparent;
  color: var(--muted);
  display: flex;
  align-items: center;
}
.brand-button {
  gap: 10px;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -.01em;
  font-size: 1.02rem;
  padding: 6px 8px 16px;
}
.primary-nav { display: grid; gap: 3px; }
.sidebar-link {
  min-height: 46px;
  gap: 16px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-align: left;
  transition: color .15s ease, background .15s ease;
}
.sidebar-link i { width: 22px; font-size: 1.18rem; text-align: center; }
.sidebar-link:hover,
.sidebar-link.active { color: var(--text); }
.sidebar-link:hover { background: rgba(255,255,255,.05); }
.sidebar-link.active { background: var(--accent-grad-soft); }
.library-block { flex: 1; min-height: 0; padding: 14px 8px 8px; overflow: hidden; }
.library-heading { height: 42px; display: flex; align-items: center; justify-content: space-between; padding: 0 4px 0 10px; }
.library-title-button { gap: 12px; font-weight: 700; font-size: .95rem; }
.library-title-button:hover { color: var(--text); }
.library-filter-row { padding: 9px 8px 12px; }
.filter-pill {
  min-height: 32px;
  border-radius: 999px;
  background: var(--panel-3);
  border: 1px solid var(--line-strong);
  color: var(--text);
  padding: 0 14px;
  font-size: .8rem;
  font-weight: 600;
}
.sidebar-playlists {
  height: calc(100% - 96px);
  overflow: auto;
  padding: 0 2px 8px;
}
.sidebar-playlist-item {
  width: 100%;
  display: grid;
  grid-template-columns: 48px minmax(0,1fr);
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: background .15s ease;
}
.sidebar-playlist-item:hover { background: rgba(255,255,255,.06); }
.sidebar-playlist-cover {
  width: 48px;
  height: 48px;
  border-radius: 9px;
  overflow: hidden;
  background: linear-gradient(135deg, #3a3a52, #1a1a28);
  display: grid;
  place-items: center;
  color: var(--muted);
}
.sidebar-playlist-cover img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-playlist-copy { min-width: 0; }
.sidebar-playlist-copy strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .88rem; font-weight: 600; }
.sidebar-playlist-copy span { display: block; color: var(--muted); font-size: .74rem; margin-top: 3px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sidebar-empty { color: var(--muted-2); font-size: .78rem; line-height: 1.5; padding: 16px 10px; }
.logout-btn {
  flex: 0 0 auto;
  gap: 12px;
  padding: 12px 16px;
  color: var(--muted);
  font-size: .84rem;
  font-weight: 600;
  border-top: 1px solid var(--line);
}
.logout-btn:hover { color: var(--danger); }

/* ---------- Main ---------- */
.main-content {
  min-width: 0;
  height: 100%;
  position: relative;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.topbar {
  position: absolute;
  z-index: 30;
  top: 0;
  left: 0;
  right: 0;
  height: 66px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(18,18,32,.7);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.content-scroll:not([data-at-top]) ~ .topbar { border-bottom-color: var(--line); }
.topbar-left,
.topbar-actions,
.desktop-history-buttons { display: flex; align-items: center; gap: 10px; }
.history-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,.5);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: .72rem;
}
.mobile-brand { display: none; background: none; color: var(--text); align-items: center; gap: 8px; font-family: var(--font-display); }
.profile-chip { width: 36px; height: 36px; border-radius: 50%; padding: 2px; background: var(--accent-grad); }
.profile-dot { width: 100%; height: 100%; border-radius: 50%; background: var(--panel); display: grid; place-items: center; color: var(--text); }
.content-scroll {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding-top: 66px;
  background: linear-gradient(180deg, #242424 0, var(--panel) 320px, var(--panel) 100%);
}
.view-section { min-height: 100%; padding: 30px 28px 64px; animation: viewIn .22s cubic-bezier(.3,.8,.3,1) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.home-hero { padding: 20px 0 14px; }
.home-hero h1,
.page-heading-row h1,
.search-page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.7rem);
  letter-spacing: -.03em;
  line-height: 1.05;
  font-weight: 700;
}
.home-hero p:not(.eyebrow),
.page-heading-row p,
.search-page-header p { color: var(--muted); margin-top: 9px; line-height: 1.5; max-width: 46ch; }
.eyebrow { font-size: .72rem !important; font-weight: 700; color: var(--green) !important; margin: 0 0 8px !important; }
.content-section { margin-top: 36px; }
.quick-section { margin-top: 18px; }
.section-heading,
.page-heading-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.section-heading.compact { align-items: center; }
.section-heading h2 { font-family: var(--font-display); font-size: 1.4rem; letter-spacing: -.02em; font-weight: 600; }
.section-heading p { color: var(--muted); font-size: .82rem; margin-top: 5px; }
.text-button { background: none; color: var(--muted); font-weight: 700; font-size: .78rem; }
.text-button:hover { color: var(--green); }

/* ---------- Quick playlists ---------- */
.quick-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.quick-playlist-card {
  min-width: 0;
  height: 68px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--panel-3);
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: 68px minmax(0,1fr) 54px;
  align-items: center;
  color: var(--text);
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.quick-playlist-card:hover { background: var(--hover); border-color: var(--line-strong); transform: translateY(-1px); }
.quick-cover { width: 68px; height: 68px; background: linear-gradient(135deg,#3a3a52,#1a1a28); display: grid; place-items: center; color: var(--muted); overflow: hidden; }
.quick-cover img { width: 100%; height: 100%; object-fit: cover; }
.quick-playlist-card strong { padding: 0 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .85rem; font-weight: 600; }
.quick-play-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-grad);
  color: #000;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: translateY(5px) scale(.9);
  box-shadow: var(--shadow-soft);
  transition: opacity .16s ease, transform .16s ease;
}
.quick-playlist-card:hover .quick-play-button { opacity: 1; transform: translateY(0) scale(1); }

/* ---------- Media cards ---------- */
.media-card-grid,
.search-grid,
.playlist-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; }
.media-card,
.search-card,
.playlist-card {
  min-width: 0;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .2s cubic-bezier(.3,.8,.3,1), box-shadow .2s ease;
  position: relative;
}
.media-card:hover,
.search-card:hover,
.playlist-card:hover { background: var(--panel-3); border-color: var(--line-strong); transform: translateY(-4px); box-shadow: var(--shadow-soft); }
.media-art,
.search-art,
.playlist-art {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: linear-gradient(135deg, #35354c, #17172450);
  box-shadow: 0 10px 26px rgba(0,0,0,.35);
}
.media-art img,
.search-art img,
.playlist-art img { width: 100%; height: 100%; object-fit: cover; }
.card-play-btn {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent-grad);
  color: #000;
  display: grid;
  place-items: center;
  font-size: 1rem;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  transform: translateY(8px) scale(.85);
  transition: opacity .18s ease, transform .18s cubic-bezier(.3,.8,.3,1.5);
  cursor: pointer;
}
.media-card:hover .card-play-btn,
.search-card:hover .card-play-btn,
.playlist-card:hover .card-play-btn { opacity: 1; transform: translateY(0) scale(1); }
.card-play-btn:hover { filter: brightness(1.1); transform: translateY(0) scale(1.06) !important; }
.media-card h3,
.search-card h3,
.playlist-card h3 { font-size: .93rem; font-weight: 600; line-height: 1.3; margin-top: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-card p,
.search-card p,
.playlist-card p { color: var(--muted); font-size: .78rem; line-height: 1.45; margin-top: 5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-empty-art { width: 100%; height: 100%; display: grid; place-items: center; font-size: 2.2rem; color: var(--muted); background: linear-gradient(135deg, #3a3a52, #17172a); }
.search-card-actions { display: flex; align-items: center; gap: 8px; margin-top: 13px; }
.search-add-btn {
  flex: 1;
  min-height: 36px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  font-size: .75rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.search-add-btn:hover { border-color: var(--green); color: var(--green); background: rgba(30,215,96,.08); }

/* ---------- Tracks ---------- */
.track-section { margin-top: 44px; }
.track-table-header,
.song-item {
  display: grid;
  grid-template-columns: 34px minmax(240px, 1.5fr) minmax(130px, .7fr) 64px 42px;
  gap: 12px;
  align-items: center;
}
.track-table-header {
  min-height: 38px;
  padding: 0 12px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}
.playlist-container { list-style: none; }
.song-item {
  min-height: 60px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  transition: background .15s ease;
}
.song-item:hover { background: rgba(255,255,255,.05); }
.track-index-cell { position: relative; height: 36px; display: grid; place-items: center; color: var(--muted); font-size: .82rem; }
.track-index-number { display: block; }
.track-row-play {
  display: none;
  width: 30px;
  height: 30px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.song-item:hover .track-index-number { display: none; }
.song-item:hover .track-row-play { display: grid; place-items: center; }
.track-info { display: grid; grid-template-columns: 42px minmax(0,1fr); align-items: center; gap: 12px; min-width: 0; }
.song-thumb { width: 42px; height: 42px; object-fit: cover; border-radius: 7px; background: var(--panel-3); }
.track-copy { min-width: 0; }
.song-title { color: var(--text); font-size: .88rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-subtitle { color: var(--muted); font-size: .72rem; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-source,
.track-duration { font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-menu-btn { opacity: 0; width: 34px; height: 34px; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.track-menu-btn:hover { color: var(--text); background: rgba(255,255,255,.08); }
.song-item:hover .track-menu-btn { opacity: 1; }
.song-item.active-item { background: var(--accent-grad-soft); }
.song-item.active-item .song-title { color: var(--green); }
.song-item.active-item .track-index-number { color: var(--green); }
.active-playing-icon { margin-right: 7px; font-size: .72rem; color: var(--green); animation: eqBlip 1s ease-in-out infinite alternate; }
@keyframes eqBlip { from { opacity: .55; transform: scaleY(.75); } to { opacity: 1; transform: scaleY(1.1); } }
.empty-track-row { padding: 36px 12px; color: var(--muted); text-align: center; }

/* ---------- Library page ---------- */
.page-heading-row { align-items: flex-end; padding: 22px 0 10px; }
.playlist-grid { margin-top: 24px; }

/* ---------- Playlist detail ---------- */
.playlist-detail-hero {
  margin: -30px -28px 0;
  padding: 34px 28px 30px;
  background: linear-gradient(180deg, #4a4a4a, var(--panel-3));
  border-bottom: 1px solid var(--line);
}
.back-link { background: transparent; color: var(--text); display: inline-flex; gap: 8px; align-items: center; margin-bottom: 24px; font-weight: 600; font-size: .82rem; }
.back-link:hover { color: var(--green); }
.playlist-detail-main { display: flex; align-items: flex-end; gap: 24px; }
.playlist-detail-art { position: relative; width: 190px; height: 190px; flex: 0 0 auto; border-radius: var(--radius); background: linear-gradient(135deg,#42425c,#191927); display: grid; place-items: center; color: var(--muted); font-size: 3rem; overflow: hidden; box-shadow: var(--shadow-lift); padding: 0; cursor: pointer; }
.playlist-detail-art-inner { position: absolute; inset: 0; display: grid; place-items: center; }
.playlist-detail-art-inner img { width: 100%; height: 100%; object-fit: cover; }
.edit-cover-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(0,0,0,.62);
  color: var(--text);
  opacity: 0;
  transition: opacity .18s ease;
  font-size: .95rem;
}
.edit-cover-overlay i { font-size: 1.3rem; }
.edit-cover-overlay span { font-size: .72rem; font-weight: 700; }
.playlist-detail-art:hover .edit-cover-overlay,
.playlist-detail-art:focus-visible .edit-cover-overlay { opacity: 1; }
.playlist-detail-copy h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.4rem, 6.5vw, 5rem); line-height: .98; letter-spacing: -.03em; max-width: 920px; word-break: break-word; }
.playlist-detail-copy #detail-playlist-meta { color: var(--text); margin-top: 18px; font-size: .82rem; font-weight: 600; }
.playlist-toolbar { min-height: 98px; display: flex; align-items: center; gap: 14px; }
.edit-info-btn { display: inline-flex; align-items: center; gap: 8px; }
.big-play-btn { width: 58px; height: 58px; border-radius: 50%; background: var(--accent-grad); color: #000; cursor: pointer; font-size: 1.15rem; box-shadow: var(--glow); transition: transform .15s ease, filter .15s ease; }
.big-play-btn:hover { transform: scale(1.05); filter: brightness(1.08); }

/* ---------- Search ---------- */
.search-page-header { padding: 22px 0 22px; }
.search-bar-container {
  width: min(100%, 540px);
  height: 52px;
  border-radius: 999px;
  background: var(--panel-3);
  display: grid;
  grid-template-columns: 50px minmax(0,1fr) auto;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.search-bar-container:focus-within { background: var(--hover); border-color: var(--green); box-shadow: 0 0 0 3px rgba(30,215,96,.14); }
.search-bar-container > i { justify-self: center; color: var(--muted); }
.search-bar-container input { width: 100%; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-weight: 500; }
.search-bar-container input::placeholder { color: var(--muted-2); }
.search-submit { margin-right: 6px; height: 40px; border-radius: 999px; padding: 0 18px; background: #fff; color: #000; font-weight: 700; }
.search-result-heading { margin-top: 40px; }
.empty-state { grid-column: 1/-1; min-height: 260px; border-radius: var(--radius); background: var(--panel-2); border: 1px dashed var(--line-strong); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px; }
.empty-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--panel-3); display: grid; place-items: center; font-size: 1.4rem; margin-bottom: 16px; color: var(--muted); }
.empty-state p { color: var(--muted); margin-top: 7px; font-size: .86rem; }

/* ---------- Right panel ---------- */
.now-playing-panel {
  display: none;
  height: 100%;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  overflow-y: auto;
}
.app-container.now-panel-open .now-playing-panel { display: block; }
.panel-heading { height: 42px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.panel-heading strong { font-family: var(--font-display); font-size: .95rem; }
.panel-cover-art { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); background: var(--panel-3); box-shadow: var(--shadow-soft); }
body:has(#play-pause-btn .fa-pause) .panel-cover-art { box-shadow: var(--glow); }
.panel-track-info { padding: 16px 2px 8px; }
.panel-track-info h2 { font-family: var(--font-display); font-size: 1.2rem; line-height: 1.25; letter-spacing: -.01em; font-weight: 600; }
.panel-track-info p { color: var(--muted); margin-top: 6px; font-size: .84rem; }
.panel-card { background: var(--panel-3); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-top: 20px; }
.panel-card-label { display: block; color: var(--muted); font-size: .72rem; font-weight: 700; margin-bottom: 10px; letter-spacing: .02em; }
.panel-card strong { display: block; font-size: .9rem; }
.panel-card p { color: var(--muted); font-size: .76rem; line-height: 1.5; margin-top: 6px; }

/* ---------- Player ---------- */
.player-bar {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 500;
  height: var(--player-h);
  background: rgba(18,18,32,.82);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
  display: grid;
  grid-template-columns: minmax(220px, 30%) minmax(360px, 40%) minmax(200px, 30%);
  align-items: center;
  padding: 0 20px;
}
.now-playing { min-width: 0; display: flex; align-items: center; gap: 13px; cursor: pointer; }
.player-thumb { width: 58px; height: 58px; object-fit: cover; border-radius: 10px; background: var(--panel-3); box-shadow: 0 6px 16px rgba(0,0,0,.4); transition: box-shadow .2s ease; }
body:has(#play-pause-btn .fa-pause) .player-thumb { box-shadow: var(--glow); }
.now-playing-copy { min-width: 0; display: grid; gap: 4px; }
.now-playing-title { color: var(--text); font-size: .84rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now-playing-artist { color: var(--muted); font-size: .7rem; }
.player-center { display: flex; flex-direction: column; align-items: center; gap: 9px; min-width: 0; }
.controls { display: flex; align-items: center; justify-content: center; gap: 22px; }
.control-secondary,
.main-control { cursor: pointer; display: grid; place-items: center; }
.control-secondary { width: 30px; height: 30px; background: transparent; color: var(--muted); font-size: .88rem; transition: color .15s ease; }
.control-secondary:hover { color: var(--text); }
.control-secondary.active { color: var(--green); position: relative; }
.control-secondary.active::after { content: ''; position: absolute; bottom: -4px; width: 4px; height: 4px; border-radius: 50%; background: var(--green); }
.main-control { width: 36px; height: 36px; border-radius: 50%; background: #fff; color: #000; font-size: .82rem; box-shadow: var(--shadow-soft); transition: transform .12s ease, filter .12s ease; }
.main-control:hover { transform: scale(1.07); }
.progress-container { width: min(100%, 560px); display: grid; grid-template-columns: 38px 1fr 38px; align-items: center; gap: 8px; color: var(--muted); font-size: .65rem; font-variant-numeric: tabular-nums; }
.progress-container span:last-child { text-align: right; }
.player-right { justify-self: end; display: flex; align-items: center; gap: 14px; }
.player-icon-btn { color: var(--muted); }
.player-icon-btn.active { color: var(--green); }
.volume-container { width: 135px; display: grid; grid-template-columns: 18px 1fr; align-items: center; gap: 8px; color: var(--muted); font-size: .8rem; }

/* =========================================================
   YOUTUBE AUDIO ENGINE
   Jangan pakai display:none / visibility:hidden.
   YouTube player butuh viewport valid.
   ========================================================= */

.youtube-machine {
    position: fixed;
    width: 200px;
    height: 200px;
    left: -10000px;
    top: -10000px;
    overflow: hidden;
    pointer-events: none;
    /*
      Jangan display:none.
      Jangan visibility:hidden.
    */
    opacity: 0.01;
    z-index: -1;
}
.youtube-machine iframe {
    width: 200px !important;
    height: 200px !important;
    display: block !important;
}

input[type="range"] {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(to right, #ffffff 0%, #ffffff 0%, rgba(255,255,255,.18) 0%, rgba(255,255,255,.18) 100%);
  cursor: pointer;
  outline: 0;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255,255,255,.15);
  opacity: 0;
  transition: opacity .12s ease;
}
input[type="range"]:hover::-webkit-slider-thumb { opacity: 1; }
input[type="range"]::-moz-range-thumb { width: 13px; height: 13px; border-radius: 50%; border: 0; background: #fff; opacity: 0; }
input[type="range"]:hover::-moz-range-thumb { opacity: 1; }

/* ---------- Modals ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200000;
  background: rgba(6,6,12,.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.modal-content {
  width: min(100%, 420px);
  max-height: min(82vh, 620px);
  overflow: auto;
  background: linear-gradient(180deg, var(--panel-3), var(--panel-2));
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-lift);
  animation: modalIn .18s cubic-bezier(.3,.8,.3,1) both;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.modal-heading h3 { font-family: var(--font-display); font-size: 1.4rem; letter-spacing: -.02em; font-weight: 600; }
.modal-description { color: var(--muted); font-size: .82rem; line-height: 1.5; margin-bottom: 22px; }
.modal-primary { width: 100%; margin-top: 4px; }
.modal-list { list-style: none; display: grid; gap: 4px; }
.modal-list li {
  min-height: 58px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  cursor: pointer;
  transition: background .15s ease;
}
.modal-list li:hover { background: rgba(255,255,255,.07); }
.modal-list-cover { width: 42px; height: 42px; border-radius: 8px; background: var(--panel-3); display: grid; place-items: center; color: var(--muted); overflow: hidden; }
.modal-list-cover img { width: 100%; height: 100%; object-fit: cover; }
.modal-list-copy strong { display: block; font-size: .86rem; font-weight: 600; }
.modal-list-copy span { color: var(--muted); font-size: .72rem; }
.sweet-box { text-align: center; }
.sweet-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--accent-grad-soft); color: var(--green); display: grid; place-items: center; font-size: 1.35rem; margin: 0 auto 18px; }
.sweet-icon.danger { background: rgba(241,94,108,.14); color: var(--danger); }
.sweet-box > h3 { font-family: var(--font-display); font-size: 1.35rem; letter-spacing: -.02em; font-weight: 600; }
.sweet-box > p { color: var(--muted); line-height: 1.5; font-size: .86rem; margin: 10px 0 20px; }
.prompt-heading { text-align: left; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 2px; }
.modal-actions.spread { justify-content: space-between; }

/* ---------- Edit playlist modal ---------- */
.edit-cover-row { display: grid; grid-template-columns: 84px minmax(0,1fr); gap: 14px; align-items: flex-start; margin-bottom: 6px; }
.edit-cover-preview {
  width: 84px;
  height: 84px;
  border-radius: var(--radius-sm);
  background: var(--panel-3);
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 1.5rem;
  overflow: hidden;
  flex: 0 0 auto;
}
.edit-cover-preview img { width: 100%; height: 100%; object-fit: cover; }
.edit-cover-fields .modal-input { margin-bottom: 6px; }
.modal-hint { color: var(--muted-2); font-size: .72rem; line-height: 1.5; margin-bottom: 0; }
.modal-error { color: var(--danger); font-size: .78rem; min-height: 18px; margin: -8px 0 14px; }
.btn-secondary.danger-outline { border-color: rgba(241,94,108,.4); color: var(--danger); }
.btn-secondary.danger-outline:hover { border-color: var(--danger); background: rgba(241,94,108,.1); }
.btn-primary.danger-fill { background: var(--danger); color: #fff; box-shadow: none; }
.btn-primary.danger-fill:hover { filter: brightness(1.08); }
.track-action-preview { display: grid; grid-template-columns: 54px minmax(0,1fr); gap: 12px; align-items: center; padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.track-action-preview img { width: 54px; height: 54px; border-radius: 10px; object-fit: cover; }
.track-action-preview div { min-width: 0; }
.track-action-preview strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-action-preview span { display: block; color: var(--muted); font-size: .75rem; margin-top: 4px; }
.menu-action { width: 100%; min-height: 50px; background: transparent; color: var(--text); display: flex; align-items: center; gap: 13px; padding: 0 10px; border-radius: var(--radius-sm); font-weight: 600; cursor: pointer; text-align: left; transition: background .15s ease; }
.menu-action:hover { background: rgba(255,255,255,.07); }
.menu-action.danger { color: var(--danger); }
.menu-action.muted { color: var(--muted); }

/* ---------- Full player ---------- */
.full-player-container {
  position: fixed;
  inset: 0;
  z-index: 300000;
  background: linear-gradient(180deg, #484848 0%, #181818 46%, #000 100%);
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform .32s cubic-bezier(.3,.8,.2,1);
  padding: max(18px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
  overflow-y: auto;
}
.full-player-container.active { transform: translateY(0); }
.full-player-header { display: grid; grid-template-columns: 42px 1fr 42px; align-items: center; text-align: center; min-height: 44px; }
.full-player-header button,
.full-like-placeholder { background: transparent; color: var(--text); cursor: pointer; font-size: 1.1rem; }
.full-player-header div { display: grid; gap: 3px; }
.full-player-header span { font-size: .6rem; letter-spacing: .1em; font-weight: 700; color: var(--muted); }
.full-player-header strong { font-size: .74rem; font-family: var(--font-display); }
.full-player-art { width: min(100%, 420px); aspect-ratio: 1; margin: clamp(22px, 6vh, 54px) auto 30px; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lift); background: var(--panel-3); transition: box-shadow .25s ease; }
.full-player-container.active:has(#full-play-pause-btn .fa-pause) .full-player-art { box-shadow: var(--glow), var(--shadow-lift); }
.full-player-art img { width: 100%; height: 100%; object-fit: cover; }
.full-player-info { width: min(100%, 520px); margin: 0 auto 28px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.full-player-info > div { min-width: 0; }
.full-player-info h2 { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.full-player-info p { color: var(--muted); margin-top: 6px; font-size: .86rem; }
.full-like-placeholder { font-size: 1.5rem; }
.full-progress-container { width: min(100%, 520px); margin: 0 auto; }
.full-time-row { display: flex; justify-content: space-between; color: var(--muted); font-size: .68rem; margin-top: 8px; font-variant-numeric: tabular-nums; }
.full-controls { width: min(100%, 520px); margin: 24px auto 0; display: grid; grid-template-columns: repeat(5,1fr); align-items: center; justify-items: center; }
.full-controls button { background: transparent; color: var(--text); cursor: pointer; font-size: 1.5rem; }
.full-controls .full-secondary-control { font-size: 1rem; color: var(--muted); }
.full-controls .full-secondary-control.active { color: var(--green); }
.full-main-control { width: 66px; height: 66px; border-radius: 50%; background: #fff !important; color: #000 !important; font-size: 1.3rem !important; box-shadow: var(--shadow-lift); }

/* ---------- Install banner ---------- */
.install-banner {
  position: fixed;
  left: 50%;
  bottom: -160px;
  transform: translateX(-50%);
  z-index: 900000;
  width: min(calc(100% - 24px), 440px);
  background: linear-gradient(180deg, var(--panel-3), var(--panel-2));
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-lift);
  transition: bottom .3s cubic-bezier(.3,.8,.3,1);
}
.install-banner.show { bottom: 116px; }
.install-content { min-width: 0; display: flex; align-items: center; gap: 10px; }
.install-logo { width: 42px; height: 42px; border-radius: 10px; }
.install-text { min-width: 0; }
.install-text strong { display: block; font-size: .82rem; }
.install-text p { color: var(--muted); font-size: .68rem; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.install-actions { display: flex; align-items: center; gap: 6px; }
.btn-install { min-height: 34px; padding: 0 14px; border-radius: 999px; background: var(--accent-grad); color: #000; font-weight: 700; cursor: pointer; }
.btn-close-banner { min-height: 34px; padding: 0 8px; background: transparent; color: var(--muted); cursor: pointer; font-weight: 600; }
.mobile-bottom-nav { display: none; }

/* ---------- Responsive ---------- */
@media (min-width: 1601px) {
  .content-scroll .view-section { max-width: 1400px; margin: 0 auto; }
}

@media (max-width: 1250px) {
  :root { --sidebar-w: 254px; --right-panel-w: 296px; }
  .media-card-grid, .search-grid, .playlist-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .app-container.now-panel-open { grid-template-columns: var(--sidebar-w) minmax(0,1fr); }
  .app-container.now-panel-open .now-playing-panel { display: none; }
  #toggle-now-panel { display: none; }
}

@media (max-width: 980px) {
  :root { --sidebar-w: 224px; }
  .quick-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .media-card-grid, .search-grid, .playlist-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .track-table-header,
  .song-item { grid-template-columns: 34px minmax(200px,1fr) 120px 52px 38px; }
  .player-bar { grid-template-columns: minmax(200px, 35%) minmax(340px, 50%) 15%; }
  .volume-container { display: none; }
}

@media (max-width: 860px) and (min-width: 769px) {
  :root { --sidebar-w: 84px; }
  .brand-button span:not(.brand-mark), .sidebar-link span, .library-title-button span, .logout-btn span { display: none; }
  .brand-button, .sidebar-link, .library-title-button { justify-content: center; }
  .library-block { display: none; }
}

@media (max-width: 768px) {
  :root { --player-h: 0px; }
  body { overflow: hidden; }
  .app-container,
  .app-container.now-panel-open {
    height: 100vh;
    display: block;
    padding: 0;
  }
  .sidebar,
  .now-playing-panel { display: none !important; }
  .main-content { height: 100vh; border-radius: 0; border: 0; }
  .topbar { height: 60px; padding: 0 16px; background: rgba(18,18,32,.9); }
  .desktop-history-buttons { display: none; }
  .mobile-brand { display: flex; }
  .btn-pill-light { min-height: 32px; padding: 0 11px; font-size: .76rem; }
  .btn-pill-light span { display: none; }
  .profile-chip { display: none; }
  .content-scroll { padding-top: 60px; padding-bottom: 146px; }
  .view-section { padding: 20px 16px 50px; }
  .home-hero { padding-top: 14px; }
  .home-hero h1, .page-heading-row h1, .search-page-header h1 { font-size: 2rem; }
  .home-hero p:not(.eyebrow) { font-size: .82rem; }
  .quick-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .quick-playlist-card { height: 56px; grid-template-columns: 56px minmax(0,1fr); }
  .quick-cover { width: 56px; height: 56px; }
  .quick-play-button { display: none; }
  .quick-playlist-card strong { padding: 0 10px; font-size: .75rem; }
  .content-section { margin-top: 28px; }
  .section-heading { margin-bottom: 14px; }
  .section-heading h2 { font-size: 1.25rem; }
  .text-button { display: none; }

  .media-card-grid,
  .search-grid,
  .playlist-grid {
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 13px;
  }
  .media-card,
  .search-card,
  .playlist-card { padding: 10px; }
  .media-card h3,
  .search-card h3,
  .playlist-card h3 { font-size: .8rem; }
  .media-card p,
  .search-card p,
  .playlist-card p { font-size: .69rem; }
  .card-play-btn { display: none; }

  .track-section { margin-top: 36px; }
  .track-table-header { display: none; }
  .song-item {
    grid-template-columns: 28px minmax(0,1fr) 36px;
    gap: 8px;
    min-height: 60px;
    padding: 5px 4px;
  }
  .song-item:hover { background: transparent; }
  .track-album-col,
  .track-time-col,
  .track-source,
  .track-duration { display: none; }
  .track-index-cell { height: 32px; }
  .song-item .track-index-number { display: block; }
  .song-item .track-row-play { display: none !important; }
  .track-info { grid-template-columns: 46px minmax(0,1fr); gap: 11px; }
  .song-thumb { width: 46px; height: 46px; }
  .song-title { font-size: .83rem; }
  .track-subtitle { font-size: .68rem; }
  .track-menu-btn { opacity: 1; }

  .page-heading-row { align-items: flex-start; padding-top: 14px; }
  .page-heading-row .btn-primary { width: 46px; height: 46px; padding: 0; font-size: 0; }
  .page-heading-row .btn-primary i { font-size: .9rem; }

  .playlist-detail-hero { margin: -20px -16px 0; padding: 24px 16px 26px; }
  .back-link { margin-bottom: 18px; }
  .playlist-detail-main { align-items: center; gap: 16px; }
  .playlist-detail-art { width: 116px; height: 116px; font-size: 2rem; }
  .playlist-detail-copy h1 { font-size: 2rem; line-height: 1; }
  .playlist-detail-copy #detail-playlist-meta { margin-top: 10px; font-size: .7rem; }
  .playlist-toolbar { min-height: 80px; justify-content: space-between; }
  .big-play-btn { width: 54px; height: 54px; }
  .edit-info-btn { width: 44px; height: 44px; padding: 0; border-radius: 50%; justify-content: center; font-size: 0; }
  .edit-info-btn i { font-size: .95rem; }

  .search-page-header { padding-top: 14px; }
  .search-bar-container { width: 100%; height: 48px; grid-template-columns: 44px minmax(0,1fr) auto; }
  .search-submit { height: 36px; font-size: .74rem; padding: 0 13px; }
  .search-result-heading { margin-top: 28px; }

  .player-bar {
    height: 60px;
    left: 8px;
    right: 8px;
    bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    width: auto;
    border-radius: var(--radius);
    display: grid;
    grid-template-columns: minmax(0,1fr) 48px;
    padding: 6px 10px;
    overflow: hidden;
  }
  .now-playing { gap: 10px; min-width: 0; }
  .player-thumb { width: 48px; height: 48px; border-radius: 8px; }
  .now-playing-title { font-size: .78rem; }
  .now-playing-artist { font-size: .64rem; }
  .player-center { display: block; justify-self: end; }
  .controls { display: block; }
  #shuffle-btn,
  #prev-btn,
  #next-btn,
  #repeat-btn,
  .progress-container,
  .player-right { display: none !important; }
  .main-control { width: 38px; height: 38px; font-size: 1.1rem; box-shadow: none; }
  .main-control:hover { transform: none; }

  .mobile-bottom-nav {
    position: fixed;
    display: grid;
    grid-template-columns: repeat(3,1fr);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 510;
    height: calc(68px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(10,10,18,.92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-top: 1px solid var(--line);
  }
  .nav-item {
    background: transparent;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: .62rem;
    font-weight: 600;
  }
  .nav-item i { font-size: 1.16rem; transition: transform .15s ease; }
  .nav-item.active { color: var(--green); }
  .nav-item.active i { transform: translateY(-2px); }
  .install-banner.show { bottom: 142px; }

  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal-content { width: 100%; max-width: none; border-radius: 20px 20px 0 0; padding: 22px 18px max(22px, env(safe-area-inset-bottom)); }
  .add-song-modal-card { max-height: 88vh; }
  .track-actions-card { padding-top: 16px; }
}

@media (max-width: 420px) {
  .media-card-grid, .search-grid, .playlist-grid { gap: 10px; }
  .media-card, .search-card, .playlist-card { padding: 9px; }
  .playlist-detail-art { width: 98px; height: 98px; }
  .playlist-detail-copy h1 { font-size: 1.7rem; }
  .auth-box { padding: 34px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
