/* =========================================================================
   Ziy Music — design system
   A restrained, single-accent dark theme. Everything is built from a small
   set of tokens so the interface stays consistent as it grows.
   ========================================================================= */

:root {
  /* surfaces */
  --bg:            #0a0a0c;
  --surface-1:     #101013;
  --surface-2:     #16161a;
  --surface-3:     #1e1e24;
  --surface-hover: #232329;

  /* lines */
  --border:        rgba(255, 255, 255, 0.065);
  --border-strong: rgba(255, 255, 255, 0.13);

  /* text */
  --text:   #f4f4f5;
  --text-2: #a2a2ae;
  --text-3: #6d6d79;

  /* accent */
  --accent:      #7a6cff;
  --accent-hi:   #938aff;
  --accent-soft: rgba(122, 108, 255, 0.14);
  --accent-line: rgba(122, 108, 255, 0.4);

  /* geometry */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 18px;

  --sidebar-w: 248px;
  --queue-w: 340px;
  --player-h: 84px;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-3: 0 20px 60px rgba(0, 0, 0, 0.6);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

/* ------------------------------------------------------------- reset ---- */

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

html, body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
ul { margin: 0; padding: 0; list-style: none; }
svg { width: 100%; height: 100%; display: block; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

::selection { background: var(--accent-soft); color: var(--text); }

/* scrollbars */
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.14) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.11);
  border: 3px solid transparent;
  border-radius: 999px;
  background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.22); background-clip: content-box; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------- layout --- */

.app {
  display: grid;
  height: 100vh;
  height: 100dvh;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr) 0px;
  grid-template-rows: minmax(0, 1fr) var(--player-h);
  grid-template-areas:
    "sidebar main queue"
    "player  player player";
  transition: grid-template-columns 0.3s var(--ease);
}

.app.queue-open { grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--queue-w); }

/* ------------------------------------------------------------ sidebar --- */

.sidebar {
  grid-area: sidebar;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--surface-1);
  border-right: 1px solid var(--border);
  padding: 18px 12px 12px;
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 20px;
}

.brand__mark {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: linear-gradient(150deg, var(--accent), #4a3fd0);
  color: #fff;
  box-shadow: 0 4px 14px rgba(122, 108, 255, 0.32);
}
.brand__mark svg { width: 18px; height: 18px; }

.brand__name {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.brand__name span { color: var(--text-3); font-weight: 500; }

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

.nav__item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 10px;
  border-radius: var(--r-md);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.14s, color 0.14s;
}
.nav__item:hover { background: var(--surface-2); color: var(--text); }
.nav__item.is-active { background: var(--surface-3); color: var(--text); }

.nav__icon { width: 17px; height: 17px; flex: none; opacity: 0.85; }
.nav__icon svg { stroke-width: 1.8; }

.nav__badge {
  margin-left: auto;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--text-3);
}

.sidebar__section {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.sidebar__sectionHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-3);
}

.playlists { overflow-y: auto; min-height: 0; display: flex; flex-direction: column; gap: 1px; }

.playlistNav__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--r-md);
  color: var(--text-2);
  font-size: 13px;
  transition: background 0.14s, color 0.14s;
}
.playlistNav__item:hover { background: var(--surface-2); color: var(--text); }
.playlistNav__item.is-active { background: var(--surface-3); color: var(--text); }

.playlistNav__art {
  width: 26px; height: 26px; flex: none;
  border-radius: var(--r-sm);
  object-fit: cover;
  background: linear-gradient(140deg, var(--surface-3), var(--surface-2));
}

.playlistNav__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.sidebar__foot { padding-top: 10px; border-top: 1px solid var(--border); margin-top: 8px; }

.sidebar__stat {
  display: flex; align-items: center; gap: 9px;
  width: 100%;
  padding: 7px 10px;
  border-radius: var(--r-md);
  font-size: 12px;
  color: var(--text-3);
  transition: background 0.14s, color 0.14s;
}
.sidebar__stat:hover { background: var(--surface-2); color: var(--text-2); }
.sidebar__stat .nav__icon { width: 14px; height: 14px; }
.sidebar__stat.is-busy .nav__icon { animation: spin 0.9s linear infinite; }

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

/* --------------------------------------------------------------- main --- */

.main {
  grid-area: main;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background:
    radial-gradient(1100px 460px at 78% -12%, rgba(122, 108, 255, 0.075), transparent 62%),
    var(--bg);
}

.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 28px;
  flex: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, background 0.2s, backdrop-filter 0.2s;
}
.topbar.is-stuck {
  background: rgba(10, 10, 12, 0.82);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--border);
}

.topbar__nav { display: flex; gap: 6px; }
.topbar__actions { display: flex; gap: 8px; margin-left: auto; }

.iconBtn {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--text-2);
  flex: none;
  transition: background 0.14s, color 0.14s, opacity 0.14s, transform 0.14s;
}
.iconBtn svg { width: 18px; height: 18px; }
.iconBtn:hover { background: var(--surface-3); color: var(--text); }
.iconBtn:active { transform: scale(0.94); }
.iconBtn:disabled { opacity: 0.32; pointer-events: none; }
.iconBtn--sm { width: 28px; height: 28px; }
.iconBtn--sm svg { width: 15px; height: 15px; }
.iconBtn.is-on { color: var(--accent); }
.iconBtn.is-on:hover { color: var(--accent-hi); }

.search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 1 380px;
  min-width: 160px;
}
.search__icon {
  position: absolute; left: 11px;
  width: 16px; height: 16px;
  color: var(--text-3);
  pointer-events: none;
}
.search input {
  width: 100%;
  height: 36px;
  padding: 0 42px 0 35px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: 13.5px;
  transition: border-color 0.16s, background 0.16s;
}
.search input::placeholder { color: var(--text-3); }
.search input:hover { border-color: var(--border-strong); }
.search input:focus {
  outline: none;
  border-color: var(--accent-line);
  background: var(--surface-3);
}
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }

.search__kbd {
  position: absolute; right: 9px;
  font-size: 10.5px;
  font-family: inherit;
  color: var(--text-3);
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 6px;
  pointer-events: none;
}
.search:focus-within .search__kbd { opacity: 0; }

.scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
}
.scroll > .page { padding: 8px 28px 48px; }

/* ------------------------------------------------------------ typografi - */

.pageTitle {
  font-size: 26px;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}
.pageSub { color: var(--text-2); font-size: 13.5px; }

.sectionHead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 34px 0 14px;
}
.sectionHead:first-child { margin-top: 6px; }
.sectionHead h2 { font-size: 16.5px; letter-spacing: -0.02em; }

.linkBtn {
  font-size: 12.5px;
  font-weight: 550;
  color: var(--text-2);
  padding: 4px 2px;
  border-radius: var(--r-sm);
  transition: color 0.14s;
}
.linkBtn:hover { color: var(--text); }

/* -------------------------------------------------------------- covers -- */

.cover {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  border-radius: var(--r-md);
  overflow: hidden;
  background: linear-gradient(140deg, var(--surface-3), var(--surface-2));
  box-shadow: var(--shadow-1);
  isolation: isolate;
}
.cover img { width: 100%; height: 100%; object-fit: cover; }

.cover--round { border-radius: 50%; }

.cover__fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -0.04em;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
}

/* --------------------------------------------------------------- cards -- */

.grid {
  display: grid;
  gap: 20px 18px;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
}

.card { position: relative; border-radius: var(--r-lg); }

.card__art {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}
.card:hover .card__art { transform: translateY(-3px); box-shadow: var(--shadow-2); }

.card__play {
  position: absolute;
  right: 10px; bottom: 10px;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(8px) scale(0.92);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), background 0.15s;
}
.card__play svg { width: 19px; height: 19px; }
.card:hover .card__play, .card__play:focus-visible { opacity: 1; transform: none; }
.card__play:hover { background: var(--accent-hi); }

.card__meta { padding: 11px 3px 0; }
.card__title {
  font-size: 13.5px;
  font-weight: 550;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card__sub {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card__sub a { transition: color 0.14s; }
.card__sub a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }

/* ------------------------------------------------------- detail header -- */

.detail {
  display: flex;
  align-items: flex-end;
  gap: 26px;
  padding: 22px 0 30px;
}
.detail__art {
  width: 200px; flex: none;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-3);
}
.detail__art.cover--round { border-radius: 50%; }
.detail__info { min-width: 0; padding-bottom: 4px; }

.detail__kind {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 10px;
}
.detail__title {
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 680;
  overflow-wrap: anywhere;
}
.detail__meta {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--text-2);
}
.detail__meta .dot { color: var(--text-3); }
.detail__meta a { font-weight: 550; color: var(--text); }
.detail__meta a:hover { text-decoration: underline; text-underline-offset: 2px; }

.detail__desc {
  margin-top: 12px;
  max-width: 62ch;
  font-size: 13px;
  color: var(--text-2);
}

.detail__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

.playBig {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 44px;
  padding: 0 24px 0 20px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(122, 108, 255, 0.28);
  transition: background 0.15s, transform 0.15s;
}
.playBig svg { width: 17px; height: 17px; }
.playBig:hover { background: var(--accent-hi); }
.playBig:active { transform: scale(0.975); }

.ghostBtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 550;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.ghostBtn svg { width: 16px; height: 16px; }
.ghostBtn:hover { background: var(--surface-2); color: var(--text); border-color: rgba(255,255,255,.22); }
.ghostBtn.is-on { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }

/* ------------------------------------------------------------ tracklist - */

.tracks { margin-top: 4px; }

.tracks__head {
  display: grid;
  align-items: center;
  gap: 16px;
  grid-template-columns: 34px minmax(0, 5fr) minmax(0, 4fr) minmax(0, 3fr) 78px;
  padding: 0 12px 8px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 6px;
}
.tracks__head .num { text-align: right; }

/* Views that hide the album column (album, playlist) drop it from the grid. */
.tracks--no-album .tracks__head,
.tracks--no-album .track { grid-template-columns: 34px minmax(0, 5fr) minmax(0, 5fr) 78px; }

.track {
  display: grid;
  align-items: center;
  gap: 16px;
  grid-template-columns: 34px minmax(0, 5fr) minmax(0, 4fr) minmax(0, 3fr) 78px;
  padding: 7px 12px;
  border-radius: var(--r-md);
  cursor: default;
  transition: background 0.13s;
  position: relative;
}
.track:hover { background: var(--surface-2); }
.track.is-current { background: var(--accent-soft); }
.track.is-dragging { opacity: 0.4; }
.track.is-dragover { box-shadow: inset 0 2px 0 var(--accent); }

.track__idx {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--text-3);
  height: 22px;
}
.track.is-current .track__idx { color: var(--accent); }

.track__play {
  display: none;
  width: 24px; height: 24px;
  place-items: center;
  border-radius: 50%;
  color: var(--text);
}
.track__play svg { width: 14px; height: 14px; }
.track:hover .track__idx > .track__num { display: none; }
.track:hover .track__play { display: grid; }

.track__title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.track__cover {
  width: 38px; height: 38px;
  flex: none;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: linear-gradient(140deg, var(--surface-3), var(--surface-2));
}
.track__cover img { width: 100%; height: 100%; object-fit: cover; }

.track__text { min-width: 0; }
.track__name {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.track.is-current .track__name { color: var(--accent); }
.track__artist {
  font-size: 12.5px;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.track__artist a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }

.track__cell {
  font-size: 12.5px;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.track__cell a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }

/* The trailing column swaps the duration for row actions on hover, so the
   table never reflows when the pointer moves across it. */
.track__end {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 30px;
}

.track__time {
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
  transition: opacity 0.12s;
}
.track:hover .track__time { opacity: 0; }

.track__actions {
  position: absolute;
  right: -4px;
  display: flex;
  align-items: center;
  gap: 1px;
  opacity: 0;
  transition: opacity 0.12s;
}
.track:hover .track__actions,
.track:focus-within .track__actions { opacity: 1; }
.track__actions .iconBtn.is-on { color: var(--accent); }

/* now-playing indicator */
.eq { display: flex; align-items: flex-end; gap: 2px; height: 13px; }
.eq span {
  width: 2.5px;
  background: var(--accent);
  border-radius: 1px;
  animation: eq 0.9s ease-in-out infinite;
}
.eq span:nth-child(1) { height: 60%; animation-delay: -0.5s; }
.eq span:nth-child(2) { height: 100%; animation-delay: -0.2s; }
.eq span:nth-child(3) { height: 45%; animation-delay: -0.75s; }
.eq.is-paused span { animation-play-state: paused; }

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

/* ------------------------------------------------------------- toolbar -- */

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 6px 0 18px;
}

.chips { display: flex; gap: 7px; flex-wrap: wrap; }

.chip {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-1);
  font-size: 12.5px;
  color: var(--text-2);
  transition: all 0.14s;
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.is-on { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }

.count { font-size: 12.5px; color: var(--text-3); margin-left: auto; }

/* ---------------------------------------------------------------- home -- */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 26px 28px;
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  overflow: hidden;
  isolation: isolate;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(115deg, rgba(0,0,0,0.72), rgba(0,0,0,0.34) 62%, rgba(0,0,0,0.66));
  z-index: -1;
}
.hero__art {
  position: absolute;
  inset: -30%;
  z-index: -2;
  filter: blur(52px) saturate(140%);
  opacity: 0.85;
}
.hero__art img { width: 100%; height: 100%; object-fit: cover; }

.hero__cover {
  width: 128px; flex: none;
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-3);
}
.hero__body { min-width: 0; }
.hero__label {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  margin-bottom: 9px;
}
.hero__title {
  font-size: clamp(22px, 3vw, 32px);
  letter-spacing: -0.03em;
  font-weight: 680;
}
.hero__sub { margin-top: 7px; font-size: 13.5px; color: rgba(255, 255, 255, 0.72); }
.hero__actions { display: flex; gap: 10px; margin-top: 18px; }

.statRow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 6px;
}
.stat {
  padding: 14px 16px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--surface-1);
}
.stat__value {
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.stat__label {
  margin-top: 2px;
  font-size: 11.5px;
  font-weight: 550;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* -------------------------------------------------------------- queues -- */

.queue {
  grid-area: queue;
  min-width: 0;
  overflow: hidden;
  background: var(--surface-1);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.app:not(.queue-open) .queue { border-left-color: transparent; }

.queue__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 16px 12px;
  min-width: var(--queue-w);
}
.queue__head h2 { font-size: 14.5px; }

.queue__now { padding: 0 16px 14px; min-width: var(--queue-w); }

.queue__list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px 24px;
  min-width: var(--queue-w);
}

.queue__label {
  padding: 12px 8px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-3);
}

.queueItem {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: var(--r-md);
  cursor: default;
}
.queueItem:hover { background: var(--surface-2); }
.queueItem.is-current { background: var(--accent-soft); }
.queueItem__cover { width: 30px; height: 30px; border-radius: 5px; overflow: hidden; background: var(--surface-3); }
.queueItem__cover img { width: 100%; height: 100%; object-fit: cover; }
.queueItem__name {
  font-size: 13px; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.queueItem.is-current .queueItem__name { color: var(--accent); }
.queueItem__artist {
  font-size: 12px; color: var(--text-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.queueItem .iconBtn { opacity: 0; }
.queueItem:hover .iconBtn { opacity: 1; }

/* -------------------------------------------------------------- player -- */

.player {
  grid-area: player;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 2fr) minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 0 20px;
  background: var(--surface-1);
  border-top: 1px solid var(--border);
  z-index: 20;
}

.player__now {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.nowArt {
  width: 54px; height: 54px;
  flex: none;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: linear-gradient(140deg, var(--surface-3), var(--surface-2));
}
.nowArt img { width: 100%; height: 100%; object-fit: cover; }

.nowText { min-width: 0; }
.nowTitle {
  font-size: 13.5px;
  font-weight: 550;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nowArtist {
  font-size: 12.5px;
  color: var(--text-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nowArtist a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }

.player__center { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.player__controls { display: flex; align-items: center; gap: 6px; }

.playBtn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--text);
  color: #0a0a0c;
  margin: 0 4px;
  transition: transform 0.14s var(--ease), background 0.14s;
}
.playBtn svg { width: 17px; height: 17px; }
.playBtn:hover { transform: scale(1.07); background: #fff; }
.playBtn:active { transform: scale(0.97); }

.player__seek {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 560px;
}

.time {
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  color: var(--text-3);
  min-width: 36px;
  text-align: center;
  flex: none;
}

.player__right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}
.volume { display: flex; align-items: center; gap: 4px; }

/* -------------------------------------------------------------- slider -- */

.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 16px;
  background: transparent;
  cursor: pointer;
  --pct: 0%;
}
.slider::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--accent) 0%, var(--accent) var(--pct),
    rgba(255, 255, 255, 0.14) var(--pct), rgba(255, 255, 255, 0.14) 100%
  );
}
.slider::-moz-range-track {
  height: 4px; border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--accent) 0%, var(--accent) var(--pct),
    rgba(255, 255, 255, 0.14) var(--pct), rgba(255, 255, 255, 0.14) 100%
  );
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px; height: 12px;
  margin-top: -4px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.15s;
}
.slider::-moz-range-thumb {
  width: 12px; height: 12px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  opacity: 0;
  transition: opacity 0.15s;
}
.slider:hover::-webkit-slider-thumb,
.slider:focus-visible::-webkit-slider-thumb { opacity: 1; }
.slider:hover::-moz-range-thumb,
.slider:focus-visible::-moz-range-thumb { opacity: 1; }
.slider:hover::-webkit-slider-runnable-track {
  background: linear-gradient(
    to right,
    var(--accent-hi) 0%, var(--accent-hi) var(--pct),
    rgba(255, 255, 255, 0.2) var(--pct), rgba(255, 255, 255, 0.2) 100%
  );
}
.slider--volume { max-width: 96px; }

/* ------------------------------------------------------------ playlist -- */

.row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 14px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--surface-1);
  margin-bottom: 8px;
  transition: background 0.14s, border-color 0.14s;
}
.row:hover { background: var(--surface-2); border-color: var(--border-strong); }
.row__cover { width: 48px; height: 48px; border-radius: var(--r-sm); overflow: hidden; flex: none; background: var(--surface-3); }
.row__cover img { width: 100%; height: 100%; object-fit: cover; }
.row__body { min-width: 0; flex: 1; }
.row__title { font-size: 14px; font-weight: 550; }
.row__sub { font-size: 12.5px; color: var(--text-2); margin-top: 1px; }
.row__actions { display: flex; gap: 4px; }

/* --------------------------------------------------------- context menu - */

.ctx {
  position: fixed;
  z-index: 200;
  min-width: 224px;
  padding: 5px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-strong);
  background: var(--surface-3);
  box-shadow: var(--shadow-3);
  backdrop-filter: blur(20px);
  animation: pop 0.12s var(--ease);
}
.ctx[hidden] { display: none; }

@keyframes pop {
  from { opacity: 0; transform: translateY(-4px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

.ctx__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--text-2);
  text-align: left;
  transition: background 0.1s, color 0.1s;
}
.ctx__item svg { width: 15px; height: 15px; flex: none; }
.ctx__item:hover { background: rgba(255, 255, 255, 0.07); color: var(--text); }
.ctx__item.is-danger { color: #ff8b8b; }
.ctx__item.is-danger:hover { background: rgba(255, 90, 90, 0.14); color: #ffb0b0; }
.ctx__sep { height: 1px; margin: 5px 8px; background: var(--border); }
.ctx__label {
  padding: 8px 10px 4px;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.ctx__scroll { max-height: 240px; overflow-y: auto; }

/* -------------------------------------------------------------- toasts -- */

.toasts {
  position: fixed;
  left: 50%;
  bottom: calc(var(--player-h) + 18px);
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-2);
  font-size: 13px;
  animation: toastIn 0.22s var(--ease);
}
.toast.is-out { animation: toastOut 0.2s var(--ease) forwards; }
.toast__icon { width: 15px; height: 15px; color: var(--accent); flex: none; }
.toast__action {
  margin-left: 4px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
  padding: 2px 6px;
  border-radius: var(--r-sm);
}
.toast__action:hover { background: var(--accent-soft); }
.toasts .toast { pointer-events: auto; }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateY(6px) scale(0.98); }
}

/* --------------------------------------------------------------- empty -- */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 76px 24px;
}
.empty__art {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: var(--r-lg);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-3);
  margin-bottom: 18px;
}
.empty__art svg { width: 26px; height: 26px; }
.empty__title { font-size: 16px; margin-bottom: 6px; }
.empty__text { font-size: 13.5px; color: var(--text-2); max-width: 46ch; }
.empty__actions { display: flex; gap: 10px; margin-top: 20px; }

/* ------------------------------------------------------------ skeleton -- */

.sk { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: sk 1.3s ease-in-out infinite; border-radius: var(--r-sm); }
@keyframes sk { from { background-position: 100% 50%; } to { background-position: 0 50%; } }

/* -------------------------------------------------------------- drawer -- */

.sheet {
  position: fixed; inset: 0; z-index: 400;
  display: grid; place-items: center;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  animation: pop 0.15s var(--ease);
}
.sheet__panel {
  width: min(440px, calc(100vw - 32px));
  padding: 22px;
  border-radius: var(--r-xl);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-3);
}
.sheet__title { font-size: 17px; margin-bottom: 6px; }
.sheet__text { font-size: 13px; color: var(--text-2); margin-bottom: 16px; }
.sheet__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.field { display: block; margin-bottom: 12px; }
.field > span {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 6px;
}
.field input, .field textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-strong);
  background: var(--surface-1);
  font-size: 13.5px;
  resize: vertical;
}
.field input:focus, .field textarea:focus { border-color: var(--accent-line); outline: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 18px;
  border-radius: var(--r-md);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--surface-3);
  color: var(--text-2);
  transition: background 0.14s, color 0.14s;
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn:hover { background: var(--surface-hover); color: var(--text); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hi); color: #fff; }

/* --------------------------------------------------------- responsive --- */

@media (max-width: 1080px) {
  .detail { flex-direction: column; align-items: flex-start; gap: 18px; }
  .detail__art { width: 150px; }
}

@media (max-width: 960px) {
  .app { grid-template-columns: 0px minmax(0, 1fr) 0px; }
  .app.queue-open { grid-template-columns: 0px minmax(0, 1fr) var(--queue-w); }
  .sidebar { display: none; }
  .player { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
  .player__right { display: none; }
}

@media (max-width: 720px) {
  .scroll > .page { padding: 6px 16px 40px; }
  .topbar { padding: 12px 16px; }
  .player { grid-template-columns: 1fr; grid-template-rows: auto auto; padding: 10px 14px; }
  .player__right { display: none; }
  .tracks__head { display: none; }
  .tracks .track { grid-template-columns: 34px minmax(0, 1fr) 66px; }
  .track__cell { display: none; }
  .track__time { display: none; }
  .track__actions { position: static; opacity: 1; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

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