/* ============================================================
   Muse · 私人影音室
   ============================================================ */

:root {
  --bg: #0b0a0f;
  --bg-elevated: #121016;
  --surface: #17151c;
  --surface-2: #1e1b24;
  --surface-3: #262230;
  --text: #f6f1ea;
  --text-soft: #c9c1b8;
  --muted: #8d857d;
  --faint: #5f5954;
  --border: rgba(255, 255, 255, 0.075);
  --border-strong: rgba(255, 255, 255, 0.14);
  --accent: #ff7459;
  --accent-2: #ffb454;
  --accent-soft: rgba(255, 116, 89, 0.13);
  --accent-glow: rgba(255, 116, 89, 0.28);
  --danger: #ff6b6b;
  --radius: 14px;
  --sidebar: 252px;
  --player: 96px;
  --font: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, "Songti SC", "Noto Serif CJK SC", "Noto Serif SC", serif;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection {
  background: var(--accent);
  color: #1a0d09;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.11);
  border: 3px solid transparent;
  background-clip: content-box;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
  background-clip: content-box;
}

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

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.is-hidden {
  display: none !important;
}

.icon {
  display: inline-block;
  flex: none;
  vertical-align: middle;
}

/* ---------- 背景光晕 ---------- */

.aura {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.aura span {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
}

.aura-one {
  width: 46vw;
  height: 46vw;
  left: -16vw;
  top: -18vw;
  background: radial-gradient(circle, rgba(255, 116, 89, 0.3), transparent 68%);
}

.aura-two {
  width: 40vw;
  height: 40vw;
  right: -14vw;
  top: 24vh;
  background: radial-gradient(circle, rgba(120, 86, 255, 0.2), transparent 70%);
}

.aura-grid {
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
  filter: none;
  opacity: 0.24;
  background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 0%, black, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, black, transparent 72%);
}

/* ---------- 登录 ---------- */

.login-screen {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(404px, 100%);
  padding: 38px 34px 28px;
  border-radius: 26px;
  background: linear-gradient(160deg, rgba(30, 27, 36, 0.92), rgba(15, 13, 19, 0.94));
  border: 1px solid var(--border);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(28px);
  animation: rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 50%;
  background: repeating-radial-gradient(circle at center, #17151c 0 2px, #27232e 3px 4px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.7), 0 6px 20px rgba(0, 0, 0, 0.35);
}

.brand-mark::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 18px var(--accent-glow);
}

.brand-mark::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #17151c;
}

.brand-text h1 {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}

.brand-text p {
  margin: 5px 0 0;
  font-size: 9.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}

.brand-lg {
  gap: 16px;
}

.brand-lg .brand-mark {
  width: 60px;
  height: 60px;
}

.brand-lg .brand-mark::before {
  width: 21px;
  height: 21px;
}

.brand-lg .brand-text h1 {
  font-size: 34px;
}

.brand-lg .brand-text p {
  font-size: 10px;
}

.login-copy {
  margin: 28px 0 26px;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.7;
}

.login-field {
  display: block;
  margin-bottom: 14px;
}

.login-field > span {
  display: block;
  margin-bottom: 8px;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.login-field input {
  width: 100%;
  height: 48px;
  padding: 0 15px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.035);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.login-field input::placeholder {
  color: var(--faint);
}

.login-field input:focus {
  border-color: rgba(255, 116, 89, 0.6);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 4px rgba(255, 116, 89, 0.1);
}

.login-foot {
  margin: 26px 0 0;
  text-align: center;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--faint);
}

.form-error {
  min-height: 18px;
  margin: 12px 0 0;
  color: var(--danger);
  font-size: 12.5px;
  text-align: center;
}

.shake {
  animation: shake 0.35s ease;
}

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.15s, background 0.2s, border-color 0.2s, opacity 0.2s;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #1c0e08;
  box-shadow: 0 8px 24px rgba(255, 116, 89, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-primary:hover {
  filter: brightness(1.07);
  box-shadow: 0 10px 30px rgba(255, 116, 89, 0.3);
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: wait;
}

.btn-ghost {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-soft);
}

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

.btn-danger {
  border-color: rgba(255, 107, 107, 0.3);
  background: rgba(255, 107, 107, 0.1);
  color: #ff8a8a;
}

.btn-danger:hover {
  background: rgba(255, 107, 107, 0.16);
}

.btn-block {
  width: 100%;
  height: 46px;
}

.btn-sm {
  height: 34px;
  padding: 0 12px;
  font-size: 12.5px;
  border-radius: 9px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  transition: color 0.18s, background 0.18s, transform 0.15s;
}

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

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

.icon-btn.is-active,
.icon-btn.is-fav {
  color: var(--accent);
}

.icon-btn.is-active {
  background: var(--accent-soft);
}

:focus-visible {
  outline: 2px solid rgba(255, 116, 89, 0.75);
  outline-offset: 2px;
}

/* ---------- 应用框架 ---------- */

.app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
}

.sidebar {
  position: fixed;
  z-index: 40;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  padding: 28px 18px 120px;
  background: linear-gradient(180deg, rgba(15, 13, 19, 0.82), rgba(11, 10, 15, 0.74));
  border-right: 1px solid var(--border);
  backdrop-filter: blur(26px);
}

.sidebar .brand {
  padding: 0 8px 28px;
}

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

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 43px;
  padding: 0 12px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 550;
  text-align: left;
  transition: background 0.2s, color 0.2s;
}

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

.nav-item.is-active {
  color: var(--text);
  background: linear-gradient(90deg, rgba(255, 116, 89, 0.17), rgba(255, 116, 89, 0.04));
}

.nav-item.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  bottom: 11px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(var(--accent), var(--accent-2));
  box-shadow: 0 0 14px var(--accent-glow);
}

.nav-item.is-active .nav-icon {
  color: var(--accent);
}

.nav-icon {
  display: inline-flex;
  color: var(--faint);
  transition: color 0.2s;
}

.nav-item:hover .nav-icon {
  color: var(--text-soft);
}

.nav-label {
  flex: 1;
}

.nav-item em {
  font-style: normal;
  font-size: 11px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.side-section {
  margin-top: 30px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.side-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px 10px 12px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

.side-title .icon-btn {
  width: 26px;
  height: 26px;
}

.playlist-nav {
  overflow-y: auto;
  padding: 2px 0 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.playlist-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  text-align: left;
  transition: color 0.18s, background 0.18s;
}

.playlist-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
}

.playlist-link.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.playlist-dot {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.82);
  background: linear-gradient(135deg, hsl(var(--hue, 20) 64% 44%), hsl(calc(var(--hue, 20) + 42) 68% 32%));
}

.playlist-link span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.playlist-link em {
  font-style: normal;
  font-size: 10.5px;
  color: var(--faint);
}

.playlist-empty {
  padding: 8px 12px;
  color: var(--faint);
  font-size: 12px;
  line-height: 1.6;
}

.sidebar-foot {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding-top: 16px;
}

.storage-card {
  flex: 1;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.022);
}

.storage-top {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
}

.storage-bar {
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.storage-bar i {
  display: block;
  height: 100%;
  width: 2%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.6s ease;
}

.sidebar-foot > .icon-btn {
  margin-bottom: 3px;
}

.main-wrap {
  flex: 1;
  min-width: 0;
  margin-left: var(--sidebar);
  padding: 0 36px 140px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 30px 0 18px;
  background: linear-gradient(180deg, rgba(11, 10, 15, 0.94) 55%, rgba(11, 10, 15, 0));
  backdrop-filter: blur(14px);
}

.page-heading {
  flex: 1;
  min-width: 0;
}

.heading-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.page-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 31px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-heading p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.topbar-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 274px;
  height: 40px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.035);
  transition: width 0.25s ease, border-color 0.2s, background 0.2s;
}

.search:focus-within {
  width: 310px;
  border-color: rgba(255, 116, 89, 0.42);
  background: rgba(255, 255, 255, 0.05);
}

.search-icon {
  display: inline-flex;
  color: var(--faint);
}

.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 12.5px;
}

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

.search input::-webkit-search-cancel-button {
  display: none;
}

.search-clear {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.menu-btn {
  display: none;
}

.content {
  max-width: 1420px;
  padding-top: 8px;
}

/* ---------- 工具栏 / 列表 ---------- */

.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 4px 14px;
  animation: fade 0.4s ease both;
}

.list-count {
  color: var(--faint);
  font-size: 11.5px;
  letter-spacing: 0.04em;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.select-wrap {
  position: relative;
}

.select-wrap::after {
  content: "";
  position: absolute;
  right: 11px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.select {
  appearance: none;
  height: 34px;
  padding: 0 30px 0 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-soft);
  font-size: 12px;
  outline: none;
  cursor: pointer;
}

.select:hover {
  border-color: var(--border-strong);
}

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

.track {
  position: relative;
  display: grid;
  grid-template-columns: 34px 46px minmax(0, 1fr) minmax(90px, 0.65fr) 58px 78px;
  align-items: center;
  gap: 13px;
  padding: 7px 10px;
  border-radius: 11px;
  cursor: pointer;
  transition: background 0.16s;
  animation: fade 0.35s ease both;
}

.track:hover {
  background: rgba(255, 255, 255, 0.04);
}

.track.is-active {
  background: linear-gradient(90deg, rgba(255, 116, 89, 0.09), rgba(255, 255, 255, 0.015));
}

.track.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.track-play {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--faint);
  transition: color 0.18s, background 0.18s;
}

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

.track.is-active .track-play {
  color: var(--accent);
}

.cover {
  position: relative;
  overflow: hidden;
  flex: none;
  border-radius: 8px;
  background: linear-gradient(
    135deg,
    hsl(var(--hue, 18) 58% 34%),
    hsl(calc(var(--hue, 18) + 46) 55% 19%)
  );
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.7);
}

.track-cover {
  width: 46px;
  height: 46px;
}

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

.track-title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13.5px;
  font-weight: 550;
  color: var(--text);
  transition: color 0.16s;
}

.track.is-active .track-title {
  color: var(--accent-2);
}

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

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

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

.track-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1px;
  opacity: 0;
  transition: opacity 0.18s;
}

.track:hover .track-actions,
.track.is-active .track-actions,
.track:focus-within .track-actions {
  opacity: 1;
}

.track-actions .icon-btn {
  width: 30px;
  height: 30px;
}

.track-actions .is-fav {
  opacity: 1;
}

/* ---------- 视频 ---------- */

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 26px 22px;
  padding-top: 6px;
}

.video-card {
  min-width: 0;
  cursor: pointer;
  animation: fadeUp 0.4s ease both;
}

.video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, hsl(var(--hue, 18) 52% 26%), hsl(calc(var(--hue, 18) + 40) 50% 13%));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25), inset 0 0 0 1px rgba(255, 255, 255, 0.055);
}

.video-thumb .cover {
  position: absolute;
  inset: 0;
  border-radius: 0;
  box-shadow: none;
}

.video-thumb img {
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.3s;
}

.video-card:hover .video-thumb img {
  transform: scale(1.045);
}

.video-duration {
  position: absolute;
  right: 9px;
  bottom: 9px;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(8, 7, 11, 0.78);
  backdrop-filter: blur(6px);
  color: #eee9e2;
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.video-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(9, 7, 12, 0.24);
  opacity: 0;
  transition: opacity 0.22s;
}

.video-play span {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #1c1210;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transform: scale(0.85);
  transition: transform 0.25s;
}

.video-card:hover .video-play {
  opacity: 1;
}

.video-card:hover .video-play span {
  transform: scale(1);
}

.video-meta {
  padding: 11px 3px 0;
}

.video-meta h3 {
  margin: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13.5px;
  font-weight: 550;
}

.video-meta p {
  margin: 6px 0 0;
  color: var(--faint);
  font-size: 11px;
}

/* ---------- 空状态 / 骨架屏 ---------- */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 430px;
  padding: 48px 20px;
  text-align: center;
  animation: fadeUp 0.45s ease both;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  margin-bottom: 24px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: radial-gradient(circle at 35% 30%, rgba(255, 116, 89, 0.16), rgba(255, 255, 255, 0.02));
  color: var(--accent);
}

.empty h3 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
}

.empty p {
  max-width: 440px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}

.skeleton {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding-top: 8px;
}

.skel-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 10px;
}

.skel-block {
  border-radius: 7px;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.035) 30%, rgba(255, 255, 255, 0.075) 50%, rgba(255, 255, 255, 0.035) 70%);
  background-size: 220% 100%;
  animation: shimmer 1.5s infinite linear;
}

.skel-cover {
  width: 46px;
  height: 46px;
  flex: none;
}

.skel-lines {
  flex: 1;
}

.skel-line {
  height: 9px;
  margin: 7px 0;
}

/* ---------- 播放器 ---------- */

.player {
  position: fixed;
  z-index: 60;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--player);
  background: linear-gradient(180deg, rgba(19, 17, 24, 0.88), rgba(13, 11, 17, 0.96));
  border-top: 1px solid var(--border);
  backdrop-filter: blur(30px) saturate(1.2);
  box-shadow: 0 -18px 48px rgba(0, 0, 0, 0.45);
  animation: playerIn 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.player-timeline {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 20px;
  padding: 0 24px;
  color: var(--faint);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.player-timeline .seek {
  flex: 1;
}

.range {
  -webkit-appearance: none;
  appearance: none;
  height: 16px;
  background: transparent;
  outline: none;
}

.range::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(
    to right,
    var(--accent) 0%,
    var(--accent-2) var(--p, 0%),
    rgba(255, 255, 255, 0.11) var(--p, 0%)
  );
}

.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 11px;
  height: 11px;
  margin-top: -4px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.15s;
}

.range:hover::-webkit-slider-thumb,
.range:focus-visible::-webkit-slider-thumb {
  opacity: 1;
}

.range::-moz-range-track {
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.11);
}

.range::-moz-range-progress {
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.range::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 50%;
  background: #fff;
}

.volume {
  width: 84px;
}

.player-inner {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr);
  align-items: center;
  gap: 24px;
  height: calc(var(--player) - 20px);
  padding: 0 24px 4px;
}

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

.np-cover {
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 9px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 116, 89, 0.3), rgba(120, 86, 255, 0.16));
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.np-cover .cover {
  width: 100%;
  height: 100%;
  border-radius: 0;
}

.np-text {
  min-width: 0;
}

.np-title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12.5px;
  font-weight: 600;
}

.np-artist {
  margin-top: 4px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--muted);
  font-size: 10.5px;
}

.np-fav {
  flex: none;
}

.player-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.controls {
  display: flex;
  align-items: center;
  gap: 5px;
}

.controls .icon-btn {
  color: var(--faint);
}

.controls .icon-btn:hover {
  color: var(--text);
}

.play-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin: 0 6px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--text);
  color: #141017;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: transform 0.16s, background 0.2s;
}

.play-btn:hover {
  transform: scale(1.06);
  background: #fff;
}

.play-btn:active {
  transform: scale(0.97);
}

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

.lyrics-btn {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
}

/* ---------- 歌词 / 队列 ---------- */

.lyrics-panel {
  position: fixed;
  z-index: 55;
  right: 26px;
  bottom: calc(var(--player) + 18px);
  width: min(380px, calc(100vw - 40px));
  max-height: 58vh;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: rgba(20, 18, 25, 0.96);
  backdrop-filter: blur(24px);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.5);
  animation: rise 0.25s ease both;
}

.lyrics-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px 10px;
  border-bottom: 1px solid var(--border);
}

.lyrics-head h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
}

.lyrics-body {
  overflow-y: auto;
  padding: 18px 20px 24px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 2;
  white-space: pre-wrap;
}

/* ---------- 弹窗 ---------- */

.modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(6, 5, 9, 0.66);
  backdrop-filter: blur(9px);
  animation: fade 0.2s ease both;
}

.modal {
  width: min(540px, 100%);
  max-height: min(86vh, 820px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  background: linear-gradient(170deg, #1a171f, #121016);
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: rise 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.modal.modal-wide {
  width: min(660px, 100%);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 26px 16px;
}

.modal-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.modal-head p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.modal-body {
  overflow-y: auto;
  padding: 0 26px 26px;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 16px 26px 22px;
  border-top: 1px solid var(--border);
}

.field {
  display: block;
  margin-bottom: 14px;
}

.field > span {
  display: block;
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.input,
.textarea {
  width: 100%;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  outline: none;
  font-size: 13px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input {
  height: 40px;
}

.textarea {
  min-height: 112px;
  padding: 11px 12px;
  resize: vertical;
  line-height: 1.7;
}

.input:focus,
.textarea:focus {
  border-color: rgba(255, 116, 89, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 116, 89, 0.1);
}

/* 上传 */

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 154px;
  margin-bottom: 16px;
  padding: 22px;
  border: 1.5px dashed rgba(255, 255, 255, 0.16);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.018);
  color: var(--muted);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.dropzone:hover,
.dropzone.is-drag {
  border-color: rgba(255, 116, 89, 0.55);
  background: rgba(255, 116, 89, 0.06);
  color: var(--text-soft);
}

.dropzone .dz-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 2px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}

.dropzone strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.dropzone span {
  font-size: 11px;
  color: var(--faint);
}

.upload-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.upload-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.022);
}

.upload-type {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.upload-main {
  flex: 1;
  min-width: 0;
}

.upload-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12px;
}

.upload-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
  color: var(--faint);
  font-size: 10px;
}

.upload-bar {
  flex: 1;
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.upload-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.2s ease;
}

.upload-state {
  flex: none;
  width: 42px;
  text-align: right;
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.upload-state.is-done {
  color: #7ed6a5;
}

.upload-state.is-error {
  color: var(--danger);
}

/* 弹窗中的列表 */

.pick-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 320px;
  overflow-y: auto;
}

.pick-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text-soft);
  text-align: left;
}

.pick-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border);
}

.pick-item .playlist-dot {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  font-size: 12px;
}

.pick-item span:nth-child(2) {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pick-item em {
  font-style: normal;
  color: var(--faint);
  font-size: 10.5px;
}

/* 右键菜单 */

.menu-pop {
  position: fixed;
  z-index: 130;
  min-width: 186px;
  padding: 6px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: rgba(27, 24, 32, 0.98);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(16px);
  animation: fade 0.15s ease both;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-soft);
  font-size: 12.5px;
  text-align: left;
}

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

.menu-item.danger {
  color: #ff8585;
}

.menu-item.danger:hover {
  background: rgba(255, 107, 107, 0.1);
}

.menu-sep {
  height: 1px;
  margin: 5px 8px;
  background: var(--border);
}

.menu-title {
  padding: 7px 10px 5px;
  color: var(--faint);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* 视频播放 */

.video-modal {
  position: fixed;
  z-index: 110;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: rgba(6, 5, 9, 0.94);
  backdrop-filter: blur(18px);
  animation: fade 0.22s ease both;
}

.video-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 22px;
}

.video-modal-title {
  min-width: 0;
}

.video-modal-title h3 {
  margin: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 14px;
  font-weight: 600;
}

.video-modal-title p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.video-stage {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 0 24px 26px;
  min-height: 0;
}

.video-stage video {
  width: min(1180px, 100%);
  max-height: 100%;
  border-radius: 14px;
  background: #000;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
}

/* Toast */

.toast-root {
  position: fixed;
  z-index: 200;
  bottom: calc(var(--player) + 16px);
  right: 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 340px;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: rgba(27, 24, 32, 0.97);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  color: var(--text-soft);
  font-size: 12px;
  animation: toastIn 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.toast.is-error {
  border-color: rgba(255, 107, 107, 0.35);
  color: #ffb0b0;
}

.toast .icon {
  color: var(--accent);
}

.toast.is-error .icon {
  color: var(--danger);
}

/* 抽屉遮罩 */

.drawer-overlay {
  position: fixed;
  z-index: 39;
  inset: 0;
  background: rgba(5, 4, 8, 0.6);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

/* ---------- 动画 ---------- */

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(9px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes playerIn {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes shimmer {
  from {
    background-position: 120% 0;
  }
  to {
    background-position: -120% 0;
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes shake {
  10%,
  90% {
    transform: translateX(-1px);
  }
  20%,
  80% {
    transform: translateX(2px);
  }
  30%,
  50%,
  70% {
    transform: translateX(-4px);
  }
  40%,
  60% {
    transform: translateX(4px);
  }
}

/* ---------- 响应式 ---------- */

@media (max-width: 1180px) {
  .main-wrap {
    padding-left: 28px;
    padding-right: 28px;
  }
  .search {
    width: 220px;
  }
  .search:focus-within {
    width: 250px;
  }
  .track {
    grid-template-columns: 34px 46px minmax(0, 1fr) 58px 78px;
  }
  .track-album {
    display: none;
  }
}

@media (max-width: 940px) {
  :root {
    --player: 88px;
  }

  .sidebar {
    width: 278px;
    transform: translateX(-104%);
    transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 26px 0 70px rgba(0, 0, 0, 0.4);
    background: rgba(13, 11, 17, 0.98);
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar.is-open ~ .drawer-overlay,
  .drawer-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .main-wrap {
    margin-left: 0;
    padding: 0 20px 122px;
  }

  .menu-btn {
    display: inline-grid;
    flex: none;
  }

  .topbar {
    gap: 14px;
    flex-wrap: wrap;
    padding: 18px 0 14px;
  }

  .page-heading {
    order: 1;
  }

  .menu-btn {
    order: 0;
  }

  .topbar-tools {
    order: 3;
    width: 100%;
  }

  .search {
    flex: 1;
    width: auto;
  }

  .search:focus-within {
    width: auto;
    flex: 1;
  }

  .upload-btn {
    flex: none;
  }

  .player-inner {
    grid-template-columns: minmax(120px, 1fr) auto minmax(80px, auto);
    gap: 12px;
    padding: 0 16px 4px;
  }

  .player-timeline {
    padding: 0 16px;
  }

  .player-right .volume,
  .player-right #mute {
    display: none;
  }

  .lyrics-btn {
    display: none;
  }

  .np-fav {
    display: none;
  }
}

@media (max-width: 680px) {
  :root {
    --player: 80px;
  }

  .main-wrap {
    padding: 0 14px 112px;
  }

  .topbar {
    padding: 14px 0 10px;
  }

  .page-heading h2 {
    font-size: 24px;
  }

  .page-heading p {
    font-size: 11px;
    margin-top: 5px;
  }

  .topbar-tools {
    gap: 8px;
  }

  .upload-btn {
    width: 42px;
    padding: 0;
  }

  .upload-label {
    display: none;
  }

  .search {
    height: 38px;
  }

  .content {
    padding-top: 2px;
  }

  .list-toolbar {
    padding: 2px 2px 10px;
  }

  .track {
    grid-template-columns: 30px 42px minmax(0, 1fr) 48px 32px;
    gap: 9px;
    padding: 7px 4px;
  }

  .track-cover {
    width: 42px;
    height: 42px;
  }

  .track-duration {
    font-size: 10.5px;
  }

  .track-actions .icon-btn {
    width: 28px;
    height: 28px;
  }

  .track-actions {
    opacity: 1;
  }

  .track-actions [data-action="favorite"] {
    display: none;
  }

  .video-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .player-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 0 12px 4px;
  }

  .player-right {
    display: none;
  }

  .player-center {
    align-items: flex-end;
  }

  .controls {
    gap: 2px;
  }

  .controls #shuffle,
  .controls #repeat,
  .controls #prev {
    display: none;
  }

  .play-btn {
    width: 36px;
    height: 36px;
    margin: 0 2px;
  }

  .np-cover {
    width: 40px;
    height: 40px;
  }

  .np-title {
    font-size: 11.5px;
  }

  .player-timeline {
    gap: 8px;
    padding: 0 12px;
    font-size: 9px;
  }

  .modal-backdrop {
    padding: 12px;
    align-items: flex-end;
  }

  .modal {
    max-height: 90vh;
    border-radius: 18px;
  }

  .modal-head {
    padding: 20px 18px 14px;
  }

  .modal-body {
    padding: 0 18px 20px;
  }

  .modal-foot {
    padding: 14px 18px 18px;
  }

  .dropzone {
    min-height: 132px;
  }

  .lyrics-panel {
    right: 10px;
    left: 10px;
    width: auto;
    bottom: calc(var(--player) + 10px);
    max-height: 52vh;
  }

  .video-stage {
    padding: 0 10px 16px;
  }

  .video-modal-head {
    padding: 12px 14px;
  }

  .toast-root {
    bottom: calc(var(--player) + 12px);
    right: 12px;
    left: 12px;
    align-items: center;
  }

  .toast {
    max-width: 100%;
  }
}

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

/* ---------- 补充 ---------- */

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.section-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 20px 4px 10px;
}

.section-title h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.section-title span {
  color: var(--faint);
  font-size: 10.5px;
  letter-spacing: 0.08em;
}

.pick-item.is-current {
  border-color: rgba(255, 116, 89, 0.28);
  background: var(--accent-soft);
}

.pick-item small {
  display: inline-block;
  margin-top: 3px;
}

.has-player .main-wrap {
  padding-bottom: 140px;
}
