:root {
  --bg: #090b12;
  --bg2: #101828;
  --panel: rgba(16, 25, 39, 0.9);
  --panel-border: rgba(167, 190, 255, 0.15);
  --text: #edf3ff;
  --muted: #9caecc;
  --accent: #1ee19f;
  --accent2: #00adff;
  --danger: #ff788f;
  --glass-v2: linear-gradient(165deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.03) 100%);
  --glass-v2-border: rgba(190, 215, 255, 0.22);
  --glass-v2-shadow: 0 16px 40px rgba(6, 10, 20, 0.45);
  --ease-out-cinematic: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-snappy: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 170ms;
  --dur-mid: 260ms;
  --dur-slow: 420ms;
}

* {
  box-sizing: border-box;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(114, 150, 214, 0.65) rgba(255, 255, 255, 0.05);
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}

*::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(30, 225, 159, 0.9), rgba(0, 173, 255, 0.9));
  border: 2px solid rgba(14, 20, 30, 0.85);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Plus Jakarta Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(52rem 30rem at -8% -10%, #1a5a74 0%, transparent 55%),
    radial-gradient(46rem 40rem at 120% -15%, #263575 0%, transparent 52%),
    linear-gradient(145deg, var(--bg), var(--bg2));
  overflow-x: hidden;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  z-index: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.22) 0.5px, transparent 0.5px);
  background-size: 3px 3px;
  mix-blend-mode: soft-light;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: "Archivo", sans-serif;
}

input,
button,
select {
  font: inherit;
  color: var(--text);
}

select,
option {
  background: #0f1a2a;
  color: #e6f1ff;
}

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.28;
  z-index: 0;
  animation: ambientFloat 12s ease-in-out infinite alternate;
}

.ambient.a {
  width: 30rem;
  height: 30rem;
  left: -10rem;
  top: -12rem;
  background: #09e6a7;
}

.ambient.b {
  width: 28rem;
  height: 28rem;
  right: -9rem;
  bottom: -12rem;
  background: #2e9bff;
  animation-duration: 15s;
}

.share-view,
.auth-screen,
.app {
  position: relative;
  z-index: 1;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--dur-slow) var(--ease-out-cinematic), transform var(--dur-slow) var(--ease-out-cinematic);
}

body.ui-ready .share-view,
body.ui-ready .auth-screen,
body.ui-ready .app {
  opacity: 1;
  transform: translateY(0);
}

.hidden {
  display: none !important;
}

.panel {
  border: 1px solid var(--panel-border);
  background: var(--panel);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(10px);
  transition: transform var(--dur-mid) var(--ease-out-cinematic), box-shadow var(--dur-mid) ease, border-color var(--dur-mid) ease;
}

.share-view,
.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.share-card,
.auth-card {
  width: min(36rem, 100%);
  border-radius: 24px;
  border: 1px solid var(--panel-border);
  background: rgba(14, 22, 35, 0.96);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  padding: 1.2rem;
}

.share-card {
  width: min(48rem, 100%);
  border-radius: 28px;
  border: 1px solid rgba(170, 218, 255, 0.28);
  background:
    radial-gradient(140% 120% at 0% 0%, rgba(30, 225, 159, 0.2) 0%, transparent 45%),
    radial-gradient(120% 110% at 100% 0%, rgba(0, 173, 255, 0.24) 0%, transparent 48%),
    rgba(9, 16, 28, 0.97);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.5);
}

.card-v2,
.card-v2-soft,
.track-item,
.playlist-item,
.stat-card,
.share-track,
.playlist-search-wrap,
.share-player-wrap {
  border: 1px solid var(--glass-v2-border);
  background: var(--glass-v2);
  box-shadow: var(--glass-v2-shadow);
  backdrop-filter: blur(10px);
  transition: transform var(--dur-mid) var(--ease-out-cinematic), box-shadow var(--dur-mid) ease, border-color var(--dur-mid) ease;
}

.card-v2-soft {
  box-shadow: 0 10px 26px rgba(6, 10, 20, 0.35);
}

.share-card p,
.auth-card p,
.muted {
  color: var(--muted);
}

.share-player-wrap {
  margin-top: 0.7rem;
  padding: 0.9rem;
  border-radius: 18px;
  border: 1px solid rgba(184, 225, 255, 0.26);
  background:
    linear-gradient(135deg, rgba(20, 34, 53, 0.92), rgba(9, 20, 35, 0.9)),
    rgba(255, 255, 255, 0.03);
}

.share-now-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: 15px;
  border: 1px solid rgba(201, 232, 255, 0.3);
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  padding: 0.62rem;
  margin-bottom: 0.55rem;
}

#share-cover {
  width: 64px;
  height: 64px;
  border-radius: 13px;
  object-fit: cover;
  box-shadow: 0 12px 24px rgba(1, 8, 16, 0.45);
}

#share-track-title {
  margin: 0;
  font-weight: 700;
  font-size: 1.02rem;
}

#share-track-artist {
  margin: 0.14rem 0 0;
  color: #9fb9d6;
  font-size: 0.88rem;
}

#share-now {
  margin: 0 0 0.52rem;
  color: #c9def8;
  font-size: 0.92rem;
}

#share-audio {
  width: 100%;
}

.share-controls {
  margin-top: 0.62rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.52rem;
}

.share-transport {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.share-progress {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 0.45rem;
}

.share-volume-wrap {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
}

.share-controls span {
  color: #a8c2de;
  font-size: 0.8rem;
  text-align: center;
}

.share-upnext {
  margin-top: 0.8rem;
  margin-bottom: 0.78rem;
  border-radius: 16px;
  overflow: hidden;
}

.share-card > .solid-btn {
  margin-top: 0.2rem;
}

.share-upnext-toggle {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(176, 218, 255, 0.2);
  background: linear-gradient(125deg, rgba(13, 33, 54, 0.92), rgba(10, 23, 39, 0.9));
  color: var(--text);
  padding: 0.62rem 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  text-align: left;
}

.share-upnext-toggle span:first-child,
.player-upnext-toggle span:first-child {
  margin-right: auto;
}

.share-upnext-toggle span {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.share-upnext-toggle small {
  color: #aac6e4;
  font-size: 0.78rem;
}

.drawer-caret {
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid #b4d4f3;
  border-bottom: 2px solid #b4d4f3;
  transform: rotate(45deg);
  transition: transform 220ms ease, border-color 220ms ease;
  margin-left: 0.2rem;
}

.share-upnext-toggle[aria-expanded="true"] .drawer-caret,
.player-upnext-toggle[aria-expanded="true"] .drawer-caret {
  transform: rotate(-135deg);
  border-color: #dcfff4;
}

.share-upnext-panel {
  max-height: 0;
  opacity: 0;
  padding: 0 0.52rem;
  background: rgba(6, 14, 25, 0.55);
  overflow: hidden;
  pointer-events: none;
  transition: max-height 280ms cubic-bezier(0.22, 1, 0.36, 1), opacity 220ms ease, padding 220ms ease;
}

.share-upnext-panel.is-open {
  max-height: 24rem;
  opacity: 1;
  padding: 0.52rem;
  pointer-events: auto;
}

.share-tracks {
  margin: 0;
  display: grid;
  gap: 0.46rem;
  max-height: 18rem;
  overflow: auto;
}

.share-track {
  border: 1px solid rgba(161, 205, 240, 0.24);
  border-radius: 12px;
  padding: 0.62rem;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.share-track:hover {
  transform: translateY(-1px);
  border-color: rgba(98, 215, 255, 0.62);
  box-shadow: 0 10px 24px rgba(8, 16, 29, 0.35);
}

.share-track-main {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0.55rem;
  align-items: center;
}

.share-track-index {
  color: #9ac8f2;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
}

.share-track.active {
  border-color: rgba(30, 225, 159, 0.75);
  background: linear-gradient(120deg, rgba(30, 225, 159, 0.23), rgba(0, 173, 255, 0.19));
  box-shadow: 0 0 0 1px rgba(30, 225, 159, 0.25), 0 14px 26px rgba(6, 16, 25, 0.45);
  animation: activePulse 2.2s ease-in-out infinite;
}

.toast-stack {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
  display: grid;
  gap: 0.5rem;
  width: min(22rem, calc(100vw - 2rem));
}

.playlist-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 220ms ease;
}

.playlist-modal.show {
  opacity: 1;
}

.playlist-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 7, 13, 0.72);
  backdrop-filter: blur(6px);
}

.playlist-modal-card {
  position: relative;
  width: min(30rem, 100%);
  border-radius: 20px;
  border: 1px solid var(--glass-v2-border);
  background: rgba(12, 19, 31, 0.96);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
  padding: 0.95rem;
  display: grid;
  gap: 0.55rem;
  transform: translateY(20px) scale(0.98);
  transition: transform 220ms ease;
}

.playlist-modal.show .playlist-modal-card {
  transform: translateY(0) scale(1);
}

.playlist-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}

.playlist-modal-list {
  display: grid;
  gap: 0.35rem;
  max-height: 15rem;
  overflow: auto;
  padding-right: 0.2rem;
}

.playlist-modal-section {
  display: grid;
  gap: 0.35rem;
}

.playlist-modal-section h4 {
  margin: 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9ab8db;
}

.playlist-modal-choice {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-align: left;
  padding: 0.52rem 0.62rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.playlist-modal-choice:hover {
  border-color: rgba(30, 225, 159, 0.7);
  background: rgba(30, 225, 159, 0.12);
}

.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 1250;
  display: grid;
  place-items: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 220ms ease;
}

.confirm-modal.show {
  opacity: 1;
}

.confirm-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 15, 0.72);
  backdrop-filter: blur(5px);
}

.confirm-modal-card {
  position: relative;
  width: min(25rem, 100%);
  border-radius: 16px;
  border: 1px solid var(--glass-v2-border);
  background: rgba(12, 18, 30, 0.96);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.5);
  padding: 0.9rem;
  display: grid;
  gap: 0.6rem;
  transform: translateY(22px) scale(0.98);
  transition: transform 220ms ease;
}

.confirm-modal.show .confirm-modal-card {
  transform: translateY(0) scale(1);
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.toast {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  background: linear-gradient(120deg, rgba(12, 22, 36, 0.98), rgba(11, 18, 30, 0.98));
  padding: 0.65rem 0.75rem;
  opacity: 0;
  transform: translateY(-10px) scale(0.985);
  transition: transform var(--dur-mid) var(--ease-snappy), opacity var(--dur-mid) ease;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.35);
}

.toast::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(30, 225, 159, 0.9), rgba(0, 173, 255, 0.85));
  transform-origin: left;
  animation: toastLife 2.5s linear forwards;
}

.toast::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.08) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: toastSweep 700ms ease 80ms forwards;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast.success {
  border-color: rgba(30, 225, 159, 0.65);
}

.toast.error {
  border-color: rgba(255, 120, 143, 0.7);
}

.toast.error::before {
  background: linear-gradient(90deg, rgba(255, 120, 143, 0.88), rgba(255, 170, 90, 0.9));
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin: 1rem 0;
}

.tab {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 0.65rem;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}

.tab.active {
  background: linear-gradient(120deg, var(--accent), var(--accent2));
  color: #001117;
  border-color: transparent;
  font-weight: 700;
}

.auth-form {
  display: grid;
  gap: 0.65rem;
}

.remember-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.remember-row input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.remember-switch {
  width: 2.7rem;
  height: 1.45rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  position: relative;
  transition: background 180ms ease, border-color 180ms ease;
}

.remember-switch::after {
  content: "";
  position: absolute;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 999px;
  left: 0.18rem;
  top: 0.12rem;
  background: #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
  transition: transform 180ms ease;
}

.remember-row input[type="checkbox"]:checked + .remember-switch {
  background: linear-gradient(120deg, var(--accent), var(--accent2));
  border-color: transparent;
}

.remember-row input[type="checkbox"]:checked + .remember-switch::after {
  transform: translateX(1.2rem);
}

input,
select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 0.7rem 0.78rem;
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease, background-color var(--dur-fast) ease;
}

input:focus,
select:focus {
  outline: 2px solid rgba(30, 225, 159, 0.48);
  border-color: rgba(126, 232, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(30, 225, 159, 0.2), 0 10px 20px rgba(4, 18, 30, 0.35);
}

.solid-btn,
.outline-btn,
.ghost-btn {
  border-radius: 12px;
  padding: 0.68rem 0.95rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  transition: transform var(--dur-fast) var(--ease-out-cinematic), box-shadow var(--dur-fast) ease, border-color var(--dur-fast) ease, background-position var(--dur-mid) ease;
}

.solid-btn {
  border: 0;
  background: linear-gradient(120deg, var(--accent), var(--accent2), #77f0cb);
  background-size: 200% 100%;
  color: #001218;
  font-weight: 700;
}

.solid-btn:hover,
.outline-btn:hover,
.ghost-btn:hover,
.tiny-btn:hover,
.share-btn:hover,
.round-btn:hover,
.playlist-launch-btn:hover,
.heart-btn:hover,
.cat-btn:hover,
.tab:hover,
.search-result:hover,
.queue-item:hover,
.player-upnext-item:hover,
.playlist-modal-choice:hover,
.playlist-choice:hover,
.share-upnext-toggle:hover,
.player-upnext-toggle:hover {
  transform: translateY(-1px);
}

.solid-btn:hover {
  background-position: 100% 0;
  box-shadow: 0 14px 24px rgba(14, 125, 126, 0.35);
}

.solid-btn:active,
.outline-btn:active,
.ghost-btn:active,
.tiny-btn:active,
.round-btn:active,
.share-btn:active,
.playlist-launch-btn:active,
.heart-btn:active {
  transform: translateY(0) scale(0.98);
}

.outline-btn,
.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1rem;
  padding: 1rem;
  padding-bottom: 12rem;
}

.sidebar {
  border-radius: 20px;
  padding: 1rem;
  display: grid;
  align-content: start;
  gap: 1rem;
  opacity: 0;
  transform: translateX(-14px);
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo {
  width: 3rem;
  height: 3rem;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #001116;
  background: linear-gradient(120deg, var(--accent), var(--accent2));
}

.logo-wrap p {
  margin: 0.1rem 0 0;
  color: var(--muted);
}

.nav-cats {
  display: grid;
  gap: 0.5rem;
}

.cat-btn {
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.02);
  text-align: left;
  padding: 0.62rem 0.7rem;
  cursor: pointer;
}

.cat-btn.active {
  border-color: rgba(30, 225, 159, 0.7);
  background: rgba(30, 225, 159, 0.14);
}

.profile-mini {
  margin-top: auto;
  display: grid;
  gap: 0.5rem;
}

.pill {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.45rem 0.7rem;
  text-align: center;
}

.main {
  border-radius: 20px;
  padding: 1rem;
  opacity: 0;
  transform: translateY(14px);
}

.main-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.74rem;
  color: #bfd6ff;
  margin: 0;
}

#head-title {
  margin-top: 0.35rem;
  font-size: clamp(1.2rem, 1vw + 1rem, 1.8rem);
}

#upload-policy {
  color: var(--muted);
  font-size: 0.87rem;
  display: none;
}

.head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
}

.queue-panel {
  border-radius: 14px;
  padding: 0.75rem;
  margin-bottom: 0.8rem;
}

.queue-head {
  margin-bottom: 0.5rem;
}

.queue-head h3 {
  margin-top: 0.18rem;
  font-size: 1rem;
}

.queue-list {
  display: grid;
  gap: 0.35rem;
  max-height: 14rem;
  overflow: auto;
  padding-right: 0.2rem;
}

.queue-item {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  padding: 0.5rem 0.58rem;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 0.55rem;
  text-align: left;
  cursor: pointer;
}

.queue-item.active {
  border-color: rgba(30, 225, 159, 0.75);
  background: linear-gradient(120deg, rgba(30, 225, 159, 0.14), rgba(0, 173, 255, 0.13));
  animation: activePulse 2.2s ease-in-out infinite;
}

.queue-index {
  color: #9ed8ff;
  font-weight: 700;
  font-size: 0.86rem;
}

.queue-copy {
  display: grid;
  gap: 0.1rem;
}

.queue-copy small {
  color: #9eb4d2;
}

.cat-section {
  animation: rise 0.35s ease;
}

.section-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
}

.section-row span {
  color: var(--muted);
  font-size: 0.89rem;
}

.library-search-row {
  margin-bottom: 0.62rem;
}

.library-search-row .search-input {
  margin-bottom: 0;
}

.track-list,
.playlist-list {
  display: grid;
  gap: 0.62rem;
}

.load-more-wrap {
  margin-top: 0.72rem;
  display: flex;
  justify-content: center;
}

.track-item,
.playlist-item {
  border-radius: 14px;
  padding: 0.7rem;
  transition: transform var(--dur-fast) var(--ease-out-cinematic), border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
  animation: elementIn var(--dur-mid) var(--ease-out-cinematic) both;
}

.track-item:hover,
.playlist-item:hover {
  transform: translateY(-2px);
  border-color: rgba(125, 183, 255, 0.45);
  box-shadow: 0 18px 34px rgba(6, 12, 24, 0.44);
}

.track-head {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 0.65rem;
  align-items: center;
}

.track-cover {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  object-fit: cover;
}

.track-title {
  margin: 0;
  font-weight: 700;
}

.track-sub {
  margin: 0.16rem 0 0;
  color: var(--muted);
  font-size: 0.87rem;
}

.track-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.track-actions,
.playlist-tools,
.playlist-composer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.62rem;
}

.playlist-launch-btn {
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(135deg, rgba(36, 59, 88, 0.85), rgba(12, 35, 58, 0.82));
  color: #e8f6ff;
  padding: 0.48rem 0.7rem;
  cursor: pointer;
}

.playlist-launch-btn:hover {
  border-color: rgba(30, 225, 159, 0.6);
  background: linear-gradient(135deg, rgba(28, 98, 100, 0.88), rgba(11, 72, 115, 0.88));
}

.playlist-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.35rem;
}

.playlist-title-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.playlist-danger-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.playlist-count-badge {
  border-radius: 999px;
  border: 1px solid rgba(112, 205, 255, 0.38);
  background: rgba(14, 83, 103, 0.35);
  color: #cdefff;
  font-size: 0.74rem;
  padding: 0.18rem 0.44rem;
  white-space: nowrap;
}

.playlist-tracks-list {
  margin: 0.62rem 0 0;
  max-height: 13rem;
  overflow: auto;
  padding-right: 0.25rem;
  display: grid;
  gap: 0.42rem;
}

.playlist-track-row {
  border-radius: 12px;
  padding: 0.48rem 0.55rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.55rem;
  align-items: center;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out-cinematic), border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}

.playlist-track-row:hover {
  border-color: rgba(120, 210, 255, 0.55);
  transform: translateY(-1px);
}

.playlist-track-copy {
  display: grid;
  gap: 0.12rem;
}

.playlist-track-copy small {
  color: #9fb7d4;
}

.playlist-track-check {
  position: relative;
  width: 18px;
  height: 18px;
  display: inline-block;
}

.playlist-track-check input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.playlist-track-checkmark {
  position: absolute;
  inset: 0;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
}

.playlist-track-check input:checked + .playlist-track-checkmark {
  border-color: rgba(30, 225, 159, 0.95);
  background: linear-gradient(120deg, rgba(30, 225, 159, 0.92), rgba(0, 173, 255, 0.86));
}

.playlist-picker {
  position: relative;
  min-width: 220px;
}

.playlist-picker-toggle {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.42rem 0.58rem;
  cursor: pointer;
  text-align: left;
}

.playlist-choice-list {
  position: absolute;
  top: calc(100% + 0.3rem);
  left: 0;
  right: 0;
  z-index: 12;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(10, 17, 28, 0.98);
  padding: 0.36rem;
  display: grid;
  gap: 0.3rem;
  max-height: 9rem;
  overflow: auto;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 150ms ease, transform 150ms ease;
}

.playlist-picker.open .playlist-choice-list {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.playlist-choice {
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  text-align: left;
  padding: 0.42rem 0.5rem;
  cursor: pointer;
}

.playlist-choice:hover {
  border-color: rgba(30, 225, 159, 0.65);
  background: rgba(30, 225, 159, 0.1);
}

.tiny-btn,
.share-btn {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.42rem 0.58rem;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out-cinematic), border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease, background var(--dur-fast) ease;
}

.tiny-btn.active,
.round-btn.active {
  border-color: rgba(30, 225, 159, 0.95);
  background: linear-gradient(120deg, rgba(30, 225, 159, 0.24), rgba(0, 173, 255, 0.23));
  color: #dffff6;
  box-shadow: 0 0 0 1px rgba(30, 225, 159, 0.2), 0 0 18px rgba(30, 225, 159, 0.35);
}

.heart-btn {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
  color: #dce9ff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out-cinematic), border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}

.heart-btn.active {
  border-color: rgba(30, 225, 159, 0.9);
  color: #33f4b1;
  background: rgba(30, 225, 159, 0.16);
  text-shadow: 0 0 10px rgba(51, 244, 177, 0.55);
}

.playlist-item h4 {
  margin-bottom: 0.35rem;
}

.playlist-item ol {
  margin: 0;
  padding-left: 1rem;
  color: var(--muted);
}

.playlist-tools {
  align-items: center;
}

.share-slug-input {
  min-width: 200px;
  max-width: 260px;
}

.pretty-select {
  min-width: 190px;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(15, 26, 42, 0.85);
}

.bulk-line {
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: center;
  gap: 0.45rem;
}

.bulk-line input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: #20d8a1;
}

.danger-btn {
  border-color: rgba(255, 120, 143, 0.5);
  color: #ff90a2;
}

.row-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
  margin-bottom: 0.65rem;
}

.upload-form {
  display: grid;
  gap: 0.55rem;
}

.upload-utility-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.file-card {
  display: grid;
  gap: 0.34rem;
  color: var(--muted);
}

.progress-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

#upload-progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(120deg, var(--accent), #62f2d1);
  transition: width 0.2s ease;
}

.playlist-search-wrap {
  margin-top: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.55rem;
  background: rgba(255, 255, 255, 0.02);
}

.search-input {
  margin-bottom: 0.45rem;
}

.search-results {
  display: grid;
  gap: 0.35rem;
  max-height: 14rem;
  overflow: auto;
  padding-right: 0.22rem;
}

.search-result {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  text-align: left;
  padding: 0.4rem 0.5rem;
  cursor: pointer;
  display: grid;
  gap: 0.15rem;
  animation: elementIn var(--dur-mid) var(--ease-out-cinematic) both;
}

.search-result small {
  color: #93abc9;
}

.search-result:hover {
  border-color: rgba(30, 225, 159, 0.55);
  background: rgba(30, 225, 159, 0.1);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}

.stat-card {
  border-radius: 14px;
  padding: 0.62rem;
}

.stat-card h4 {
  color: var(--muted);
  font-size: 0.85rem;
}

.stat-card p {
  margin: 0.25rem 0 0;
  font-size: 1.35rem;
  font-weight: 800;
}

.player {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  border-radius: 18px;
  padding: 0.72rem;
  display: grid;
  grid-template-columns: 1fr 1.4fr 0.8fr;
  grid-template-rows: auto auto;
  gap: 0.7rem;
  align-items: center;
  opacity: 0;
  transform: translateY(18px);
}

.now {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

#player-cover {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
}

#player-title {
  margin: 0;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#player-artist {
  margin: 0.1rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.round-btn {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.45rem 0.7rem;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out-cinematic), border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}

.round-btn.strong {
  border-color: transparent;
  color: #001219;
  background: linear-gradient(120deg, var(--accent), var(--accent2));
  font-weight: 700;
}

.round-btn.active {
  border-color: rgba(30, 225, 159, 0.95);
}

.timeline {
  margin-top: 0.45rem;
  display: grid;
  grid-template-columns: 50px 1fr 50px;
  gap: 0.4rem;
  align-items: center;
}

.timeline span,
.vol-wrap span {
  color: var(--muted);
  font-size: 0.82rem;
}

input[type="range"] {
  --range-progress: 0%;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 0.42rem;
  border-radius: 999px;
  border: none;
  padding: 0;
  background: linear-gradient(
    90deg,
    var(--accent) 0%,
    var(--accent2) var(--range-progress),
    rgba(255, 255, 255, 0.15) var(--range-progress),
    rgba(255, 255, 255, 0.15) 100%
  );
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 999px;
  border: 2px solid #133243;
  background: #ecffff;
  box-shadow: 0 0 0 4px rgba(30, 225, 159, 0.18);
}

input[type="range"]::-moz-range-thumb {
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 999px;
  border: 2px solid #133243;
  background: #ecffff;
  box-shadow: 0 0 0 4px rgba(30, 225, 159, 0.18);
}

.vol-wrap {
  display: grid;
  gap: 0.32rem;
}

.player-upnext {
  grid-column: 1 / -1;
  border-radius: 14px;
  overflow: hidden;
}

.player-upnext-toggle {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(176, 218, 255, 0.2);
  background: linear-gradient(125deg, rgba(15, 29, 45, 0.92), rgba(10, 20, 35, 0.9));
  color: var(--text);
  padding: 0.52rem 0.7rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  text-align: left;
}

.player-upnext-toggle span {
  font-weight: 700;
}

.player-upnext-toggle small {
  color: #a9c4df;
  font-size: 0.78rem;
}

.player-upnext-panel {
  background: rgba(8, 14, 24, 0.62);
  max-height: 0;
  opacity: 0;
  padding: 0 0.46rem;
  overflow: hidden;
  pointer-events: none;
  transition: max-height 280ms cubic-bezier(0.22, 1, 0.36, 1), opacity 220ms ease, padding 220ms ease;
}

.player-upnext-panel.is-open {
  max-height: 16rem;
  opacity: 1;
  padding: 0.46rem;
  pointer-events: auto;
}

.player-upnext-list {
  display: grid;
  gap: 0.36rem;
  max-height: 11rem;
  overflow: auto;
}

.player-upnext-item {
  border-radius: 10px;
  border: 1px solid rgba(158, 203, 241, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  padding: 0.45rem 0.55rem;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 0.5rem;
  align-items: center;
  text-align: left;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px) scale(0.985);
  transition: opacity 220ms ease, transform 260ms cubic-bezier(0.22, 1, 0.36, 1), border-color 180ms ease;
}

.player-upnext-item:hover {
  border-color: rgba(108, 210, 255, 0.58);
}

.player-upnext-item.active {
  border-color: rgba(30, 225, 159, 0.8);
  background: linear-gradient(120deg, rgba(30, 225, 159, 0.22), rgba(0, 173, 255, 0.2));
  animation: activePulse 2.2s ease-in-out infinite;
}

.share-track {
  opacity: 0;
  transform: translateY(8px) scale(0.985);
  transition: opacity 220ms ease, transform 260ms cubic-bezier(0.22, 1, 0.36, 1), border-color 160ms ease, box-shadow 160ms ease;
}

.share-upnext-panel.is-open .share-track,
.player-upnext-panel.is-open .player-upnext-item {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.share-upnext-panel.is-open .share-track:nth-child(1),
.player-upnext-panel.is-open .player-upnext-item:nth-child(1) { transition-delay: 20ms; }
.share-upnext-panel.is-open .share-track:nth-child(2),
.player-upnext-panel.is-open .player-upnext-item:nth-child(2) { transition-delay: 40ms; }
.share-upnext-panel.is-open .share-track:nth-child(3),
.player-upnext-panel.is-open .player-upnext-item:nth-child(3) { transition-delay: 60ms; }
.share-upnext-panel.is-open .share-track:nth-child(4),
.player-upnext-panel.is-open .player-upnext-item:nth-child(4) { transition-delay: 80ms; }
.share-upnext-panel.is-open .share-track:nth-child(5),
.player-upnext-panel.is-open .player-upnext-item:nth-child(5) { transition-delay: 100ms; }
.share-upnext-panel.is-open .share-track:nth-child(6),
.player-upnext-panel.is-open .player-upnext-item:nth-child(6) { transition-delay: 120ms; }
.share-upnext-panel.is-open .share-track:nth-child(7),
.player-upnext-panel.is-open .player-upnext-item:nth-child(7) { transition-delay: 140ms; }
.share-upnext-panel.is-open .share-track:nth-child(8),
.player-upnext-panel.is-open .player-upnext-item:nth-child(8) { transition-delay: 160ms; }

.player-upnext-index {
  color: #9fd8ff;
  font-size: 0.82rem;
  font-weight: 700;
}

.player-upnext-copy {
  display: grid;
  gap: 0.08rem;
}

.player-upnext-copy small {
  color: #9ab3cf;
}

body.ui-ready .sidebar,
body.ui-ready .main,
body.ui-ready .player {
  opacity: 1;
  transform: translate(0, 0);
}

body.ui-ready .sidebar {
  transition: opacity var(--dur-slow) var(--ease-out-cinematic) 40ms, transform var(--dur-slow) var(--ease-out-cinematic) 40ms;
}

body.ui-ready .main {
  transition: opacity var(--dur-slow) var(--ease-out-cinematic) 80ms, transform var(--dur-slow) var(--ease-out-cinematic) 80ms;
}

body.ui-ready .player {
  transition: opacity var(--dur-slow) var(--ease-out-cinematic) 130ms, transform var(--dur-slow) var(--ease-out-cinematic) 130ms;
}

.track-item:nth-child(1), .playlist-item:nth-child(1), .queue-item:nth-child(1), .search-result:nth-child(1), .stat-card:nth-child(1) { animation-delay: 15ms; }
.track-item:nth-child(2), .playlist-item:nth-child(2), .queue-item:nth-child(2), .search-result:nth-child(2), .stat-card:nth-child(2) { animation-delay: 35ms; }
.track-item:nth-child(3), .playlist-item:nth-child(3), .queue-item:nth-child(3), .search-result:nth-child(3), .stat-card:nth-child(3) { animation-delay: 55ms; }
.track-item:nth-child(4), .playlist-item:nth-child(4), .queue-item:nth-child(4), .search-result:nth-child(4), .stat-card:nth-child(4) { animation-delay: 75ms; }
.track-item:nth-child(5), .playlist-item:nth-child(5), .queue-item:nth-child(5), .search-result:nth-child(5), .stat-card:nth-child(5) { animation-delay: 95ms; }

@keyframes elementIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes activePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(30, 225, 159, 0.18), 0 0 0 1px rgba(30, 225, 159, 0.22);
  }
  100% {
    box-shadow: 0 0 0 8px rgba(30, 225, 159, 0), 0 0 0 1px rgba(30, 225, 159, 0.35);
  }
}

@keyframes toastLife {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

@keyframes toastSweep {
  from {
    transform: translateX(-120%);
  }
  to {
    transform: translateX(120%);
  }
}

@keyframes ambientFloat {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(2%, -2%, 0) scale(1.06);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 1100px) {
  .app {
    grid-template-columns: 1fr;
  }

  .player {
    grid-template-columns: 1fr;
  }

  .player-upnext {
    order: 4;
  }

  .share-slug-input,
  .pretty-select {
    min-width: unset;
    width: 100%;
  }

  .playlist-picker {
    min-width: 100%;
  }
}

@media (max-width: 780px) {
  .main-head {
    flex-direction: column;
  }

  .track-head {
    grid-template-columns: 1fr;
  }

  .track-cta {
    justify-content: flex-start;
  }

  .playlist-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .row-form {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .share-progress {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
  }

  .share-volume-wrap {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .player {
    left: 0.5rem;
    right: 0.5rem;
    bottom: 0.5rem;
  }
}

@media (max-width: 560px) {
  .app {
    padding: 0.6rem;
    padding-bottom: 11.5rem;
  }

  .sidebar,
  .main {
    padding: 0.7rem;
    border-radius: 16px;
  }

  .share-card,
  .auth-card {
    padding: 0.85rem;
    border-radius: 18px;
  }

  .share-track {
    align-items: flex-start;
    flex-direction: column;
  }

  .share-upnext-toggle,
  .player-upnext-toggle {
    padding: 0.5rem 0.58rem;
  }

  .player {
    padding: 0.58rem;
    border-radius: 14px;
  }

  .timeline {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
  }
}
