:root {
  --bg: #0b0d12;
  --surface: #141821;
  --surface-2: #1b202b;
  --surface-3: #232936;
  --text: #f2f0ea;
  --muted: #a3a9b5;
  --faint: #6e7480;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --accent: #f0b35c;
  --accent-soft: rgba(240, 179, 92, 0.13);
  --blue: #7fb7e8;
  --rose: #e58aa0;
  --green: #68c79b;
  --danger: #e0656f;
  --radius: 8px;
  --topbar-h: 62px;
  --player-h: 78px;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

[hidden] {
  display: none !important;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

svg {
  display: block;
  flex-shrink: 0;
}

#app {
  min-height: 100vh;
}

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 14px;
  height: var(--topbar-h);
  padding: 0 20px;
  background: rgba(11, 13, 18, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 5px 8px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}

.brand-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
  white-space: nowrap;
}

.brand-text strong {
  font-size: 16px;
}

.brand-text small {
  color: var(--muted);
  font-size: 11px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0 auto;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.nav-btn {
  height: 32px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  white-space: nowrap;
}

.nav-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.nav-btn.active {
  color: #1c1408;
  background: var(--accent);
  font-weight: 700;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(320px, 28vw);
  min-width: 170px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
}

.search-box:focus-within {
  border-color: rgba(240, 179, 92, 0.5);
  box-shadow: 0 0 0 3px rgba(240, 179, 92, 0.1);
}

.search-box input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

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

.search-clear {
  width: 24px;
  height: 24px;
}

.admin-link {
  display: none;
}

.view {
  padding: calc(var(--topbar-h) + 26px) 24px calc(var(--player-h) + 42px);
}

.page {
  width: min(1200px, 100%);
  margin: 0 auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 600;
  white-space: nowrap;
}

.btn.primary {
  background: var(--accent);
  color: #1c1408;
  border-color: var(--accent);
}

.btn.primary:hover {
  filter: brightness(1.06);
}

.btn.ghost {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--line-strong);
}

.btn.ghost:hover {
  background: var(--surface-3);
}

.btn.block {
  width: 100%;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
}

.icon-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.icon-btn.active {
  color: var(--rose);
  background: rgba(229, 138, 160, 0.12);
}

.text-btn {
  padding: 4px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--blue);
  font-weight: 600;
}

.text-btn:hover {
  background: rgba(127, 183, 232, 0.1);
}

.recommend-band {
  padding: 18px 20px 20px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.recommend-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.recommend-head h2 {
  margin: 0;
  font-size: 17px;
}

.recommend-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px;
}

.recommend-card {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text);
  text-align: left;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.recommend-card:hover,
.recommend-card:focus-visible {
  border-color: rgba(240, 179, 92, 0.42);
  background: var(--surface-3);
  transform: translateY(-1px);
  outline: none;
}

.recommend-cover {
  flex-shrink: 0;
  border-radius: 6px;
}

.recommend-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.recommend-main strong,
.recommend-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recommend-main strong {
  font-size: 13px;
}

.recommend-main small {
  color: var(--muted);
  font-size: 11px;
}

.hero-band {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 26px 22px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.hero-copy h1,
.page-head h1,
.detail-info h1 {
  margin: 0;
}

.hero-copy h1 {
  font-size: 30px;
  line-height: 1.15;
}

.hero-copy p:last-child {
  margin: 8px 0 0;
  color: var(--muted);
}

.hero-actions,
.page-tools {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 26px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.stat-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: var(--radius);
  background: rgba(127, 183, 232, 0.12);
  color: var(--blue);
}

.stat-card:nth-child(2) .stat-icon {
  background: var(--accent-soft);
  color: var(--accent);
}

.stat-card:nth-child(3) .stat-icon {
  background: rgba(229, 138, 160, 0.12);
  color: var(--rose);
}

.stat-card:nth-child(4) .stat-icon {
  background: rgba(104, 199, 155, 0.12);
  color: var(--green);
}

.stat-card strong {
  font-size: 20px;
  line-height: 1;
}

.stat-card span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
}

.section-block {
  margin-top: 26px;
}

.section-head,
.page-head,
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-head {
  margin-bottom: 10px;
}

.section-head h2,
.panel-head h3 {
  margin: 0;
  font-size: 17px;
}

.page-head {
  margin-bottom: 16px;
}

.page-head p,
.detail-info p {
  margin: 3px 0 0;
  color: var(--muted);
}

.track-list {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.track-row {
  display: grid;
  grid-template-columns: 34px 40px minmax(0, 2.2fr) minmax(120px, 1fr) 56px 52px 32px;
  align-items: center;
  gap: 9px;
  min-height: 54px;
  padding: 7px 12px 7px 8px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.track-row:last-child {
  border-bottom: 0;
}

.track-row:hover {
  background: var(--surface-2);
}

.track-index {
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.cover-img {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 5px;
  background: var(--surface-3);
}

.cover-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-img::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: inherit;
  pointer-events: none;
}

.track-main,
.album-meta,
.artist-meta,
.player-title,
.queue-main,
.at-title {
  min-width: 0;
}

.track-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.track-main strong,
.album-meta strong,
.artist-meta strong,
.player-title strong,
.queue-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-main span,
.album-meta span,
.artist-meta span,
.queue-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
}

.track-album {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 13px;
}

.track-plays {
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.track-duration {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.fav-btn.active {
  color: var(--rose);
  background: rgba(229, 138, 160, 0.12);
}

.album-grid,
.artist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 13px;
}

.album-card,
.artist-card {
  min-width: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: left;
  overflow: hidden;
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.album-card:hover,
.artist-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.album-cover {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--surface-2);
}

.album-cover-img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  border-radius: 0;
}

.album-count {
  position: absolute;
  right: 7px;
  bottom: 7px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(10, 12, 17, 0.76);
  color: var(--text);
  font-size: 11px;
  backdrop-filter: blur(6px);
}

.album-meta,
.artist-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 11px 12px;
}

.artist-card {
  text-align: center;
}

.artist-avatar {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: linear-gradient(135deg, hsl(var(--hue, 210) 36% 28%), hsl(calc(var(--hue, 210) + 45) 28% 19%));
  color: rgba(255, 255, 255, 0.92);
  font-size: 40px;
  font-weight: 700;
}

.artist-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.artist-avatar span {
  position: relative;
}

.artist-meta span {
  color: var(--muted);
  font-size: 12px;
}

.select {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text);
  outline: 0;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 16px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
}

.back-btn:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.detail-hero {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px 26px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.detail-cover {
  border-radius: var(--radius);
}

.detail-info h1 {
  font-size: 28px;
  line-height: 1.2;
}

.detail-info .btn {
  margin-top: 16px;
}

.artist-hero-avatar {
  width: 150px;
  height: 150px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #5d6f8f, #353e52);
  color: var(--text);
  font-size: 50px;
  font-weight: 700;
}

.empty-state,
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 160px;
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

.loading-state {
  min-height: 380px;
}

.loading-state svg {
  animation: spin 2.4s linear infinite;
  color: var(--accent);
}

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

.player-bar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 95;
  height: var(--player-h);
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(260px, 2fr) minmax(190px, 1fr);
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  background: rgba(15, 18, 25, 0.96);
  border-top: 1px solid var(--line-strong);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.player-cover {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.player-cover-img {
  border-radius: 6px;
}

.player-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.player-title strong {
  font-size: 13px;
}

.player-title span {
  color: var(--muted);
  font-size: 11px;
}

.player-main {
  min-width: 0;
}

.player-progress {
  display: flex;
  align-items: center;
  gap: 10px;
}

.player-progress .time {
  min-width: 34px;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

input[type="range"] {
  height: 4px;
  flex: 1;
  margin: 0;
  border-radius: 999px;
  background: var(--surface-3);
  accent-color: var(--accent);
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #191105;
  box-shadow: 0 0 0 2px rgba(240, 179, 92, 0.22);
}

.player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.play-btn {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #1c1408;
  box-shadow: 0 4px 16px rgba(240, 179, 92, 0.24);
}

.play-btn:hover {
  filter: brightness(1.07);
}

.player-side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.volume-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 118px;
}

.volume-wrap input {
  min-width: 56px;
}

.side-panel {
  position: fixed;
  z-index: 92;
  right: 16px;
  bottom: calc(var(--player-h) + 12px);
  width: min(370px, calc(100vw - 32px));
  max-height: min(60vh, 600px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(17, 20, 28, 0.97);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.panel-head {
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
}

.queue-list,
.lyric-list {
  overflow-y: auto;
  padding: 8px;
}

.queue-item {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 50px;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 9px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  text-align: left;
}

.queue-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.queue-item.active {
  background: var(--accent-soft);
}

.queue-item.active .queue-no {
  color: var(--accent);
}

.queue-no {
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  text-align: center;
}

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

.queue-dur {
  color: var(--faint);
  font-size: 11px;
  text-align: right;
}

.lyric-list {
  padding: 16px 20px;
}

.lyric-line {
  padding: 6px 0;
  color: var(--faint);
  transition: color 0.16s ease, transform 0.16s ease;
}

.lyric-line.active {
  color: var(--accent);
  transform: translateX(4px);
  font-weight: 600;
}

.toast-root,
#toastRoot {
  position: fixed;
  z-index: 200;
  left: 50%;
  bottom: calc(var(--player-h) + 22px);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 8px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.32);
  opacity: 1;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.out {
  opacity: 0;
  transform: translateY(8px);
}

.toast.warn {
  border-color: rgba(240, 179, 92, 0.4);
  color: var(--accent);
}

.toast.error {
  border-color: rgba(224, 101, 111, 0.45);
  color: var(--danger);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: #2a2f3c;
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-track {
  background: transparent;
}

@media (max-width: 1060px) {
  .main-nav {
    margin: 0;
  }

  .search-box {
    width: min(230px, 24vw);
  }

  .recommend-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .track-row {
    grid-template-columns: 30px 40px minmax(0, 2fr) minmax(100px, 1fr) 50px 32px;
  }

  .track-plays {
    display: none;
  }

  .player-bar {
    grid-template-columns: minmax(170px, 1fr) minmax(220px, 1.6fr) minmax(160px, 1fr);
  }

  .volume-wrap {
    width: 92px;
  }
}

@media (max-width: 860px) {
  .topbar {
    flex-wrap: wrap;
    height: auto;
    min-height: var(--topbar-h);
    padding: 8px 14px;
    gap: 8px;
  }

  .brand {
    order: 1;
  }

  .brand-text {
    display: none;
  }

  .search-box {
    order: 2;
    flex: 1;
    width: auto;
    min-width: 0;
  }

  .main-nav {
    order: 3;
    width: 100%;
    margin: 0;
    overflow-x: auto;
    justify-content: flex-start;
    scrollbar-width: none;
  }

  .main-nav::-webkit-scrollbar {
    display: none;
  }

  .view {
    padding-top: 132px;
  }

  .recommend-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .track-row {
    grid-template-columns: 28px 40px minmax(0, 1fr) 48px 32px;
  }

  .track-album,
  .track-plays {
    display: none;
  }

  .detail-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .detail-cover {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .detail-cover img {
    position: absolute;
  }

  .artist-hero-avatar {
    width: 120px;
    height: 120px;
    font-size: 40px;
  }

  .player-bar {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 9px;
    padding: 0 12px;
  }

  .player-cover .cover-img {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
  }

  .player-side {
    display: none;
  }

  .player-controls {
    gap: 4px;
  }
}

@media (max-width: 600px) {
  .view {
    padding: 132px 12px calc(var(--player-h) + 34px);
  }

  .hero-band {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 18px;
  }

  .hero-copy h1 {
    font-size: 26px;
  }

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

  .stat-card {
    padding: 11px 12px;
  }

  .stat-card strong {
    font-size: 18px;
  }

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

  .recommend-band {
    padding: 14px 14px 16px;
  }

  .recommend-card {
    padding: 6px;
    gap: 8px;
  }

  .recommend-main small {
    display: none;
  }

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

  .track-row {
    grid-template-columns: 24px 38px minmax(0, 1fr) 30px;
    gap: 7px;
    padding-right: 7px;
  }

  .track-duration {
    display: none;
  }

  .page-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .player-bar {
    grid-template-columns: 42px minmax(0, 1fr) auto;
  }

  .player-cover .cover-img {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
  }

  .player-progress .time {
    min-width: 28px;
    font-size: 10px;
  }

  .play-btn {
    width: 38px;
    height: 38px;
  }

  .side-panel {
    right: 8px;
    bottom: calc(var(--player-h) + 8px);
    width: calc(100vw - 16px);
    max-height: 55vh;
  }

  .detail-hero {
    padding: 18px;
  }
}
