:root {
  color-scheme: dark;
  --bg: #101215;
  --ink: #f7f1ea;
  --muted: #aeb6c2;
  --soft: #cbd2dc;
  --line: #2b313b;
  --panel: #151922;
  --panel-2: #1b2029;
  --panel-3: #222833;
  --side: #08090b;
  --gold: #eac66a;
  --mint: #40d98c;
  --rose: #e56f8c;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 72% 0%, rgba(234, 198, 106, 0.16), transparent 28%),
    linear-gradient(145deg, #14171c 0%, #0f1115 48%, #08090b 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.shell {
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  min-height: calc(100vh - 96px);
}

.sidebar {
  position: sticky;
  top: 0;
  height: calc(100vh - 96px);
  padding: 28px 24px;
  background: rgba(8, 9, 11, 0.96);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  overflow: auto;
}

.brand {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 30px;
  font-weight: 900;
}

.brand span:last-child {
  font-size: 1.12rem;
}

.brand-mark,
.cover,
.folder-thumb {
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--gold), var(--mint));
  color: #111316;
  font-weight: 900;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  box-shadow: 0 12px 34px rgba(234, 198, 106, 0.2);
}

.nav {
  width: 100%;
  min-height: 38px;
  padding: 0 14px;
  margin-bottom: 8px;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-weight: 700;
}

.nav.active,
.nav:hover {
  background: #242a31;
  color: var(--ink);
}

.folder-panel,
.auth-card {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.folder-list {
  display: grid;
  gap: 8px;
  max-height: min(38vh, 340px);
  overflow: auto;
  padding-right: 2px;
}

.folder-button {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 42px;
  padding: 6px 8px;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.folder-button.active,
.folder-button:hover {
  background: var(--panel-3);
  color: var(--ink);
}

.folder-thumb {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  font-size: 0.68rem;
}

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

.folder-name,
.folder-count {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-count {
  color: #7f8997;
  font-size: 0.78rem;
}

.auth-card input {
  width: 100%;
  margin-bottom: 8px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f1217;
  color: var(--ink);
  outline: none;
}

.auth-card input:focus {
  border-color: rgba(234, 198, 106, 0.75);
}

.auth-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.main {
  min-width: 0;
  padding: 32px 40px 126px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 2.55rem;
  line-height: 1.05;
}

.search {
  display: grid;
  gap: 7px;
  width: min(420px, 46vw);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.search input {
  width: 100%;
  height: 48px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--ink);
  color: #14171c;
  outline: none;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.search input:focus {
  border-color: var(--gold);
}

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  min-height: 190px;
  margin-bottom: 28px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(234, 198, 106, 0.18), rgba(64, 217, 140, 0.1)),
    linear-gradient(135deg, #191e26, #12161d);
  box-shadow: var(--shadow);
}

.hero h2 {
  max-width: 820px;
  margin-bottom: 12px;
  font-size: clamp(2.4rem, 4vw, 4.5rem);
  line-height: 0.95;
}

.hero p {
  color: var(--muted);
}

.library-stats {
  margin-bottom: 0;
  color: var(--soft);
  font-size: 0.94rem;
}

.client-guide {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.4fr);
  gap: 24px;
  align-items: start;
  margin-bottom: 28px;
  padding: 22px;
  border: 1px solid rgba(234, 198, 106, 0.18);
  border-radius: 8px;
  background: rgba(13, 16, 21, 0.72);
}

.client-guide h2 {
  margin-bottom: 8px;
  font-size: 1.35rem;
}

.client-guide p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.guide-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  margin-top: 14px;
  padding: 0 12px;
  border: 1px solid rgba(234, 198, 106, 0.34);
  border-radius: 8px;
  color: var(--gold);
  text-decoration: none;
  font-weight: 800;
}

.guide-link:hover {
  background: rgba(234, 198, 106, 0.1);
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.guide-item {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.guide-item.wide {
  grid-column: 1 / -1;
}

.guide-item span {
  display: block;
  margin-bottom: 6px;
  color: #7f8997;
  font-size: 0.78rem;
  font-weight: 800;
}

.guide-item strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 0.96rem;
}

.content {
  display: grid;
  gap: 10px;
}

.track-row,
.playlist-row {
  display: grid;
  grid-template-columns: 56px minmax(200px, 1.6fr) minmax(140px, 0.9fr) minmax(150px, 0.9fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  background: rgba(21, 25, 34, 0.86);
  color: var(--muted);
}

.track-row:hover,
.playlist-row:hover {
  background: rgba(34, 40, 51, 0.92);
  border-color: rgba(234, 198, 106, 0.22);
}

.track-row strong,
.playlist-row strong {
  display: block;
  color: var(--ink);
  font-size: 0.95rem;
}

.cover {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  font-size: 0.78rem;
}

.play-button {
  padding: 0;
}

.row-actions {
  display: flex;
  gap: 8px;
}

.primary,
.ghost,
.icon {
  min-height: 38px;
  border-radius: 8px;
  color: var(--ink);
  font-weight: 800;
}

.primary {
  padding: 0 16px;
  background: var(--gold);
  color: #111316;
}

.primary:hover {
  background: #f1d47f;
}

.ghost,
.icon {
  padding: 0 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.ghost:hover,
.icon:hover {
  border-color: rgba(234, 198, 106, 0.45);
}

.icon {
  min-width: 52px;
}

.liked {
  color: var(--gold);
  border-color: rgba(234, 198, 106, 0.55);
}

.empty {
  padding: 44px 0;
  color: var(--muted);
  text-align: center;
}

.player {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: minmax(280px, 460px) 1fr;
  align-items: center;
  gap: 28px;
  height: 96px;
  padding: 14px 28px;
  background: rgba(8, 9, 11, 0.98);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.38);
}

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

.now .cover {
  width: 56px;
  height: 56px;
}

.now span,
.track-row span,
.playlist-row span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

audio {
  width: 100%;
  accent-color: var(--gold);
}

dialog {
  width: min(420px, 92vw);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
}

.dialog-card {
  display: grid;
  gap: 16px;
}

.playlist-choices {
  display: grid;
  gap: 8px;
}

@media (max-width: 860px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    padding: 18px;
  }

  .brand,
  .folder-panel,
  .auth-card {
    grid-column: 1 / -1;
  }

  .folder-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 220px;
  }

  .main {
    padding: 22px 16px 144px;
  }

  .topbar,
  .client-guide,
  .hero,
  .player {
    grid-template-columns: 1fr;
  }

  .topbar,
  .hero {
    align-items: stretch;
  }

  h1 {
    font-size: 2rem;
  }

  .search {
    width: 100%;
  }

  .hero h2 {
    font-size: 2.4rem;
  }

  .guide-grid {
    grid-template-columns: 1fr;
  }

  .track-row,
  .playlist-row {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    min-height: 64px;
  }

  .track-row .album,
  .track-row .size {
    display: none;
  }

  .player {
    height: 132px;
    gap: 10px;
    padding: 12px 18px;
  }
}
