/* ===========================================================
   AURA — Liquid Glass design system (monochrome)
   =========================================================== */

:root {
  --bg: #050506;
  --bg-deep: #000000;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.075);
  --surface-3: rgba(255, 255, 255, 0.11);
  --stroke: rgba(255, 255, 255, 0.10);
  --stroke-strong: rgba(255, 255, 255, 0.22);
  --text: #f6f6f8;
  --text-dim: #a3a3ac;
  --text-faint: #6d6d76;
  --accent: #ffffff;
  --accent-contra: #050506;
  --glow: rgba(255, 255, 255, 0.16);
  --shadow-sm: 0 6px 24px rgba(0, 0, 0, 0.42);
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.62);
  --shadow-lg: 0 40px 120px rgba(0, 0, 0, 0.78);
  --blur: 40px;
  --r-xs: 12px;
  --r-sm: 16px;
  --r-md: 22px;
  --r-lg: 30px;
  --r-xl: 40px;
  --player-h: 96px;
  --sidebar-w: 268px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.42'/%3E%3C/svg%3E");
}

html[data-theme='light'] {
  --bg: #efeff1;
  --bg-deep: #ffffff;
  --surface: rgba(255, 255, 255, 0.62);
  --surface-2: rgba(255, 255, 255, 0.80);
  --surface-3: rgba(255, 255, 255, 0.95);
  --stroke: rgba(0, 0, 0, 0.085);
  --stroke-strong: rgba(0, 0, 0, 0.17);
  --text: #08080a;
  --text-dim: #55555e;
  --text-faint: #8b8b94;
  --accent: #0a0a0c;
  --accent-contra: #ffffff;
  --glow: rgba(0, 0, 0, 0.10);
  --shadow-sm: 0 6px 24px rgba(20, 20, 30, 0.09);
  --shadow: 0 26px 70px rgba(20, 20, 30, 0.14);
  --shadow-lg: 0 40px 120px rgba(20, 20, 30, 0.20);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg-deep);
  color: var(--text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background 0.7s var(--ease), color 0.5s var(--ease);
}

::selection {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

html[data-theme='light'] ::selection {
  background: rgba(0, 0, 0, 0.16);
  color: #000;
}

/* ---------- scrollbars ---------- */
.scroll {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}
.scroll::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
.scroll::-webkit-scrollbar-track {
  background: transparent;
}
.scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  border: 2px solid transparent;
  background-clip: content-box;
}
.scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
  background-clip: content-box;
}
html[data-theme='light'] .scroll::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.18);
  background-clip: content-box;
}

/* ===========================================================
   BACKGROUND — liquid light field
   =========================================================== */
#bg-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% -20%, rgba(255, 255, 255, 0.075), transparent 60%),
    radial-gradient(80% 60% at 90% 110%, rgba(255, 255, 255, 0.05), transparent 62%),
    var(--bg);
  transition: background 0.8s var(--ease);
}

#bg-field::after {
  content: '';
  position: absolute;
  inset: -50%;
  background-image: var(--noise);
  opacity: 0.05;
  pointer-events: none;
  animation: grain 7s steps(6) infinite;
}

html[data-theme='light'] #bg-field {
  background:
    radial-gradient(120% 90% at 50% -20%, rgba(0, 0, 0, 0.05), transparent 62%),
    radial-gradient(80% 60% at 90% 110%, rgba(0, 0, 0, 0.035), transparent 64%),
    var(--bg);
}

@keyframes grain {
  0%,
  100% {
    transform: translate(0, 0);
  }
  20% {
    transform: translate(-3%, 2%);
  }
  40% {
    transform: translate(2%, -3%);
  }
  60% {
    transform: translate(-2%, -2%);
  }
  80% {
    transform: translate(3%, 1%);
  }
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  will-change: transform;
  mix-blend-mode: screen;
}

html[data-theme='light'] .blob {
  mix-blend-mode: multiply;
  opacity: 0.28;
  filter: blur(80px);
}

.blob.b1 {
  width: 46vw;
  height: 46vw;
  left: -12vw;
  top: -14vw;
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.30), transparent 68%);
  animation: drift1 26s var(--ease-in-out) infinite alternate;
}
.blob.b2 {
  width: 40vw;
  height: 40vw;
  right: -10vw;
  top: 8vh;
  background: radial-gradient(circle at 60% 40%, rgba(255, 255, 255, 0.22), transparent 70%);
  animation: drift2 32s var(--ease-in-out) infinite alternate;
}
.blob.b3 {
  width: 52vw;
  height: 52vw;
  left: 22vw;
  bottom: -28vw;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.16), transparent 70%);
  animation: drift3 38s var(--ease-in-out) infinite alternate;
}
.blob.b4 {
  width: 26vw;
  height: 26vw;
  right: 18vw;
  bottom: 6vh;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.18), transparent 70%);
  animation: drift2 22s var(--ease-in-out) infinite alternate-reverse;
}

html[data-theme='light'] .blob.b1 {
  background: radial-gradient(circle at 35% 35%, rgba(0, 0, 0, 0.16), transparent 68%);
}
html[data-theme='light'] .blob.b2 {
  background: radial-gradient(circle at 60% 40%, rgba(0, 0, 0, 0.12), transparent 70%);
}
html[data-theme='light'] .blob.b3 {
  background: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.08), transparent 70%);
}
html[data-theme='light'] .blob.b4 {
  background: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.1), transparent 70%);
}

@keyframes drift1 {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(8vw, 6vh, 0) scale(1.14);
  }
  100% {
    transform: translate3d(3vw, 12vh, 0) scale(0.94);
  }
}
@keyframes drift2 {
  0% {
    transform: translate3d(0, 0, 0) scale(1.05);
  }
  50% {
    transform: translate3d(-7vw, 9vh, 0) scale(0.9);
  }
  100% {
    transform: translate3d(-3vw, -6vh, 0) scale(1.16);
  }
}
@keyframes drift3 {
  0% {
    transform: translate3d(0, 0, 0) scale(0.95);
  }
  50% {
    transform: translate3d(-10vw, -8vh, 0) scale(1.12);
  }
  100% {
    transform: translate3d(6vw, -14vh, 0) scale(1);
  }
}

/* reactive pulse while playing */
body.is-playing .blob {
  animation-duration: 16s;
}

/* ===========================================================
   GLASS PRIMITIVES
   =========================================================== */
.glass {
  position: relative;
  background: linear-gradient(
    155deg,
    rgba(255, 255, 255, 0.11) 0%,
    rgba(255, 255, 255, 0.028) 38%,
    rgba(255, 255, 255, 0.055) 100%
  );
  backdrop-filter: blur(var(--blur)) saturate(175%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(175%);
  border: 1px solid var(--stroke);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3),
    inset 1px 0 0 rgba(255, 255, 255, 0.04),
    var(--shadow-sm);
  border-radius: var(--r-md);
}

html[data-theme='light'] .glass {
  background: linear-gradient(
    155deg,
    rgba(255, 255, 255, 0.86) 0%,
    rgba(255, 255, 255, 0.55) 45%,
    rgba(255, 255, 255, 0.72) 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(0, 0, 0, 0.05),
    var(--shadow-sm);
}

/* specular sheen */
.glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    120% 90% at 12% -10%,
    rgba(255, 255, 255, 0.22),
    rgba(255, 255, 255, 0.04) 40%,
    transparent 66%
  );
  opacity: 0.85;
  pointer-events: none;
  transition: opacity 0.5s var(--ease);
}

html[data-theme='light'] .glass::before {
  background: radial-gradient(
    120% 90% at 12% -10%,
    rgba(255, 255, 255, 1),
    rgba(255, 255, 255, 0.5) 42%,
    transparent 70%
  );
  opacity: 0.9;
}

.glass-hover {
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease),
    border-color 0.4s var(--ease), background 0.4s var(--ease);
}
.glass-hover:hover {
  border-color: var(--stroke-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3),
    0 30px 80px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.04);
  transform: translateY(-3px);
}

html[data-theme='light'] .glass-hover:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    0 24px 60px rgba(20, 20, 30, 0.16);
}

/* ===========================================================
   APP SHELL
   =========================================================== */
#app {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  height: 100dvh;
  padding: 14px;
  padding-bottom: calc(var(--player-h) + 22px);
  gap: 14px;
}

/* ---------- sidebar ---------- */
#sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  padding: 22px 16px 16px;
  border-radius: var(--r-xl);
  overflow: hidden;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 8px 16px;
  user-select: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.62));
  box-shadow:
    0 8px 24px rgba(255, 255, 255, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -2px 6px rgba(0, 0, 0, 0.14);
  color: #08080a;
  flex: 0 0 auto;
  position: relative;
  overflow: hidden;
}

html[data-theme='light'] .brand-mark {
  background: linear-gradient(150deg, #101014, #2a2a32);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  color: #fff;
}

.brand-mark svg {
  width: 20px;
  height: 20px;
  position: relative;
  z-index: 1;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-name {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 25px;
  letter-spacing: 0.06em;
  font-weight: 400;
}

.brand-sub {
  font-size: 9px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: 5px;
  font-weight: 500;
}

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

.nav-label {
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 14px 12px 8px;
  font-weight: 600;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 13px;
  border-radius: var(--r-sm);
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  transition: all 0.35s var(--ease);
  overflow: hidden;
  text-align: left;
  width: 100%;
  font-family: inherit;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  opacity: 0.72;
  transition: all 0.35s var(--ease);
}

.nav-item:hover {
  color: var(--text);
  background: var(--surface);
  transform: translateX(3px);
}

.nav-item.active {
  color: var(--text);
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0.14),
    rgba(255, 255, 255, 0.04)
  );
  border-color: var(--stroke);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 6px 18px rgba(0, 0, 0, 0.28);
}

html[data-theme='light'] .nav-item.active {
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.7));
  box-shadow: 0 4px 16px rgba(20, 20, 30, 0.1);
}

.nav-item.active svg {
  opacity: 1;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
  box-shadow: 0 0 12px var(--glow);
}

.sidebar-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  margin: 0 -6px;
  padding: 0 6px;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all 0.35s var(--ease);
}

.user-card:hover {
  background: var(--surface);
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: #05050a;
  background: linear-gradient(145deg, #ffffff, #c9c9d2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 4px 14px rgba(0, 0, 0, 0.4);
  letter-spacing: 0.02em;
  overflow: hidden;
}

html[data-theme='light'] .avatar {
  background: linear-gradient(145deg, #14141a, #3a3a46);
  color: #fff;
}

.user-meta {
  min-width: 0;
  flex: 1;
}
.user-name {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-role {
  font-size: 10.5px;
  color: var(--text-faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 2px;
}

/* ---------- main ---------- */
#main {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-radius: var(--r-xl);
  overflow: hidden;
}

#topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  flex: 0 0 auto;
  z-index: 5;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.34), transparent);
}

html[data-theme='light'] #topbar {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), transparent);
}

.search-shell {
  flex: 1;
  max-width: 560px;
  position: relative;
  display: flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 18px;
  height: 44px;
  gap: 11px;
  transition: all 0.4s var(--ease);
}

.search-shell:focus-within {
  border-color: var(--stroke-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 12px 40px rgba(0, 0, 0, 0.5),
    0 0 0 4px rgba(255, 255, 255, 0.045);
}

.search-shell svg {
  width: 17px;
  height: 17px;
  color: var(--text-faint);
  flex: 0 0 auto;
}

.search-shell input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  font-weight: 450;
  min-width: 0;
}

.search-shell input::placeholder {
  color: var(--text-faint);
}

.kbd {
  font-size: 10px;
  padding: 3px 7px;
  border-radius: 6px;
  border: 1px solid var(--stroke);
  color: var(--text-faint);
  background: var(--surface);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  cursor: pointer;
  border: 1px solid var(--stroke);
  background: var(--surface);
  color: var(--text);
  backdrop-filter: blur(20px);
  transition: all 0.35s var(--ease);
  flex: 0 0 auto;
  position: relative;
  overflow: hidden;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  transition: transform 0.5s var(--ease);
}

.icon-btn:hover {
  background: var(--surface-3);
  border-color: var(--stroke-strong);
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.icon-btn:hover svg {
  transform: rotate(12deg);
}

.icon-btn:active {
  transform: scale(0.94);
}

/* ---------- content ---------- */
#view {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 22px 30px;
  scroll-behavior: smooth;
}

.section {
  margin-bottom: 38px;
  animation: rise 0.65s var(--ease) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.section-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 27px;
  font-weight: 400;
  margin: 0;
  letter-spacing: 0.01em;
}

.section-sub {
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  border-radius: var(--r-xl);
  padding: 44px 40px;
  margin-bottom: 34px;
  overflow: hidden;
  min-height: 268px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  isolation: isolate;
}

.hero::after {
  content: '';
  position: absolute;
  inset: -40% -10% auto auto;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 66%);
  filter: blur(40px);
  animation: heroGlow 12s var(--ease-in-out) infinite alternate;
  z-index: -1;
}

html[data-theme='light'] .hero::after {
  background: radial-gradient(circle, rgba(0, 0, 0, 0.1), transparent 66%);
}

@keyframes heroGlow {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0.8;
  }
  100% {
    transform: translate(-70px, 50px) scale(1.25);
    opacity: 0.45;
  }
}

.hero-eyebrow {
  font-size: 10.5px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 9px;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--glow);
  animation: pulseDot 2.4s infinite;
}

@keyframes pulseDot {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.5);
  }
  70% {
    box-shadow: 0 0 0 9px rgba(255, 255, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

html[data-theme='light'] .live-dot {
  background: #0a0a0c;
}

.hero h1 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(38px, 5.2vw, 66px);
  line-height: 0.98;
  margin: 0 0 14px;
  font-weight: 400;
  letter-spacing: -0.015em;
  max-width: 15ch;
}

.hero h1 em {
  font-style: italic;
  background: linear-gradient(100deg, #fff 20%, #8f8f9a 60%, #fff 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% auto;
  animation: shimmer 7s linear infinite;
}

html[data-theme='light'] .hero h1 em {
  background: linear-gradient(100deg, #05050a 20%, #7a7a86 60%, #05050a 95%);
  -webkit-background-clip: text;
  background-clip: text;
  background-size: 200% auto;
}

@keyframes shimmer {
  to {
    background-position: 200% center;
  }
}

.hero p {
  color: var(--text-dim);
  font-size: 14.5px;
  max-width: 46ch;
  margin: 0 0 24px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

/* ---------- buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.4s var(--ease);
  overflow: hidden;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: linear-gradient(160deg, #ffffff, #dedee6);
  color: #05050a;
  box-shadow:
    0 10px 30px rgba(255, 255, 255, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 -2px 6px rgba(0, 0, 0, 0.12);
}

html[data-theme='light'] .btn-primary {
  background: linear-gradient(160deg, #16161c, #000);
  color: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.85s var(--ease);
}

.btn-primary:hover::after {
  transform: translateX(120%);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 16px 44px rgba(255, 255, 255, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--stroke);
  backdrop-filter: blur(24px);
}

.btn-ghost:hover {
  background: var(--surface-3);
  border-color: var(--stroke-strong);
  transform: translateY(-2px);
}

.btn:active {
  transform: scale(0.96) !important;
}

.btn[disabled] {
  opacity: 0.45;
  pointer-events: none;
}

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

.card {
  position: relative;
  border-radius: var(--r-md);
  padding: 13px;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease),
    border-color 0.4s var(--ease);
  will-change: transform;
}

.card:hover {
  border-color: var(--stroke-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 30px 80px rgba(0, 0, 0, 0.72);
}

.cover-wrap {
  position: relative;
  border-radius: var(--r-sm);
  overflow: hidden;
  aspect-ratio: 1;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02));
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5);
  transform: translateZ(24px);
}

.cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.8s var(--ease), filter 0.5s var(--ease);
}

.card:hover .cover-wrap img {
  transform: scale(1.07);
}

.cover-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent 55%);
  opacity: 0;
  transition: opacity 0.45s var(--ease);
}

.card:hover .cover-wrap::after {
  opacity: 1;
}

.play-fab {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.92);
  color: #05050a;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55), inset 0 1px 0 #fff;
  backdrop-filter: blur(20px);
  opacity: 0;
  transform: translateY(14px) scale(0.85);
  transition: all 0.45s var(--ease);
  z-index: 3;
}

.play-fab svg {
  width: 19px;
  height: 19px;
  margin-left: 2px;
}

.card:hover .play-fab,
.play-fab:focus-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.play-fab:hover {
  transform: scale(1.12) !important;
  box-shadow: 0 14px 38px rgba(255, 255, 255, 0.4);
}

html[data-theme='light'] .play-fab {
  background: #12121a;
  color: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.card-title {
  margin: 12px 3px 0;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transform: translateZ(14px);
}

.card-artist {
  margin: 4px 3px 2px;
  font-size: 11.5px;
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transform: translateZ(10px);
}

.card-badge {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 2;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 9px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #fff;
  backdrop-filter: blur(14px);
}

/* ---------- list rows ---------- */
.track-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.track-row {
  display: grid;
  grid-template-columns: 26px 52px 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 8px 12px;
  border-radius: var(--r-xs);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.3s var(--ease);
  position: relative;
}

.track-row:hover {
  background: var(--surface);
  border-color: var(--stroke);
}

.track-row.active {
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.1), transparent);
  border-color: var(--stroke);
}

.track-row.active .track-name {
  font-weight: 700;
}

.track-idx {
  font-size: 11.5px;
  color: var(--text-faint);
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.track-thumb {
  width: 52px;
  height: 52px;
  border-radius: 11px;
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  position: relative;
}

.track-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.track-name {
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-artist {
  font-size: 11.5px;
  color: var(--text-faint);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-dur {
  font-size: 11.5px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.track-like {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  border: none;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
  transition: all 0.3s var(--ease);
  opacity: 0;
}

.track-row:hover .track-like {
  opacity: 1;
}

.track-like:hover {
  background: var(--surface-2);
  color: var(--text);
  transform: scale(1.12);
}

.track-like.liked {
  color: var(--accent);
  opacity: 1;
  filter: drop-shadow(0 0 8px var(--glow));
}

.track-like svg {
  width: 16px;
  height: 16px;
}

/* equalizer */
.eq {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 13px;
  width: 13px;
}
.eq span {
  flex: 1;
  background: var(--accent);
  border-radius: 1px;
  animation: eqBar 0.9s var(--ease-in-out) infinite alternate;
}
.eq span:nth-child(1) {
  animation-delay: 0s;
}
.eq span:nth-child(2) {
  animation-delay: 0.18s;
}
.eq span:nth-child(3) {
  animation-delay: 0.36s;
}
.eq span:nth-child(4) {
  animation-delay: 0.54s;
}

@keyframes eqBar {
  from {
    height: 3px;
    opacity: 0.6;
  }
  to {
    height: 13px;
    opacity: 1;
  }
}

/* ---------- chips ---------- */
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 10px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: var(--surface);
  color: var(--text-dim);
  font-size: 12.5px;
  font-weight: 550;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.35s var(--ease);
  font-family: inherit;
  backdrop-filter: blur(16px);
}

.chip:hover {
  color: var(--text);
  border-color: var(--stroke-strong);
  transform: translateY(-2px);
}

.chip.active {
  background: var(--accent);
  color: var(--accent-contra);
  border-color: var(--accent);
  box-shadow: 0 8px 24px var(--glow);
}

/* ---------- empty / skeleton ---------- */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 70px 20px;
  text-align: center;
  gap: 12px;
  color: var(--text-faint);
}

.empty-icon {
  width: 68px;
  height: 68px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--stroke);
  margin-bottom: 6px;
}
.empty-icon svg {
  width: 26px;
  height: 26px;
  opacity: 0.55;
}
.empty h3 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
}
.empty p {
  margin: 0;
  font-size: 13px;
  max-width: 34ch;
  line-height: 1.6;
}

.skeleton {
  border-radius: var(--r-md);
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0.04) 20%,
    rgba(255, 255, 255, 0.1) 40%,
    rgba(255, 255, 255, 0.04) 60%
  );
  background-size: 240% 100%;
  animation: shimmerBg 1.5s linear infinite;
}
@keyframes shimmerBg {
  to {
    background-position: -240% 0;
  }
}
.skel-card {
  aspect-ratio: 1;
}
