:root {
  --bg: #0a0714;
  --bg2: #120b22;
  --card: rgba(255, 255, 255, 0.035);
  --card-strong: rgba(139, 92, 246, 0.10);
  --border: rgba(168, 128, 255, 0.16);
  --border-soft: rgba(255, 255, 255, 0.06);
  --primary: #8b5cf6;
  --primary-2: #6d28d9;
  --accent: #a855f7;
  --accent-2: #ec4899;
  --text: #f2eefb;
  --muted: #9c93ba;
  --muted-2: #6f6790;
  --green: #22c55e;
  --green-2: #4ade80;
  --danger: #f43f5e;
  --warning: #f59e0b;
  --radius: 18px;
  --radius-sm: 12px;
  --player-h: 108px;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
  --glow: 0 0 42px rgba(139, 92, 246, 0.35);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  letter-spacing: 0.01em;
}
body::before {
  content: "";
  position: fixed; inset: 0;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(139, 92, 246, 0.14), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(217, 70, 239, 0.08), transparent 55%),
    linear-gradient(180deg, var(--bg2) 0%, var(--bg) 40%);
  pointer-events: none;
  z-index: -2;
}
.bg-glow {
  position: fixed; border-radius: 50%; filter: blur(110px); opacity: 0.5; pointer-events: none; z-index: -1;
}
.bg-glow-1 { width: 480px; height: 480px; left: -120px; top: 30%; background: rgba(109, 40, 217, 0.35); animation: drift 18s ease-in-out infinite; }
.bg-glow-2 { width: 420px; height: 420px; right: -100px; top: 8%; background: rgba(236, 72, 153, 0.16); animation: drift 22s ease-in-out infinite reverse; }
@keyframes drift { 0%,100% { transform: translate(0,0); } 50% { transform: translate(40px, -30px); } }

button { font-family: inherit; border: none; background: none; color: inherit; cursor: pointer; }
input { font-family: inherit; }
.hidden { display: none !important; }
select option { color: #111; background: #fff; }

/* ============ 顶栏 ============ */
.topbar {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(10, 7, 20, 0.72);
  border-bottom: 1px solid var(--border-soft);
}
.topbar-inner {
  max-width: 1180px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: inherit; flex-shrink: 0; }
.brand-logo { width: 40px; height: 40px; object-fit: contain; border-radius: 10px; filter: drop-shadow(0 0 12px rgba(139,92,246,.5)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-size: 19px; font-weight: 800; letter-spacing: 0.02em; }
.brand-name em {
  font-style: normal; font-size: 12px; font-weight: 700; color: transparent;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; margin-left: 4px; letter-spacing: 0.22em;
}
.brand-slogan { font-size: 11px; color: var(--muted); }
.tabs {
  display: flex; gap: 4px; padding: 4px; border-radius: 999px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border-soft); margin: 0 auto;
}
.tab {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted);
  transition: all 0.22s ease; white-space: nowrap;
}
.tab svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tab:hover { color: var(--text); }
.tab.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 6px 22px rgba(139, 92, 246, 0.42);
}
.top-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; position: relative; }
.btn-user {
  display: flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600; color: var(--text);
  background: var(--card-strong); border: 1px solid var(--border); transition: all 0.2s;
}
.btn-user svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.btn-user:hover { border-color: var(--accent); box-shadow: 0 0 22px rgba(168, 85, 247, 0.28); }
.btn-user.logged { background: linear-gradient(135deg, rgba(139,92,246,.25), rgba(236,72,153,.18)); }
.admin-link { font-size: 12.5px; color: var(--muted-2); text-decoration: none; transition: color .2s; }
.admin-link:hover { color: var(--accent); }

.user-menu {
  position: absolute; top: calc(100% + 12px); right: 0; width: 360px; z-index: 80;
  background: linear-gradient(170deg, #1b1330, #100a1e);
  border: 1px solid var(--border); border-radius: 16px; padding: 10px;
  box-shadow: var(--shadow); animation: pop .22s ease;
}
.user-menu .menu-head { display: flex; align-items: center; gap: 12px; padding: 12px; border-bottom: 1px solid var(--border-soft); margin-bottom: 8px; }
.user-menu .menu-avatar {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center;
  background: rgba(139,92,246,.16); border: 1px solid rgba(168,85,247,.4);
  color: var(--accent-2);
}
.user-menu .menu-avatar svg { width: 27px; height: 27px; }
.user-menu .menu-user { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.user-menu .menu-user b { font-size: 15px; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-menu .menu-user span { font-size: 11px; color: var(--muted-2); }
.user-menu .menu-user .menu-status { color: var(--green-2); font-weight: 700; }
.user-menu .menu-head em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.user-menu .member-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 2px 2px 10px; border-bottom: 1px solid var(--border-soft); margin-bottom: 8px; }
.user-menu .ms-item { display: flex; flex-direction: column; gap: 3px; align-items: center; padding: 8px 4px; border-radius: 11px; background: rgba(139,92,246,.09); }
.user-menu .ms-item em { font-style: normal; font-size: 10.5px; color: var(--muted); }
.user-menu .ms-item b { font-size: 14px; font-weight: 800; white-space: nowrap; }
.user-menu .ms-item b.ms-points { color: var(--accent); }
.user-menu .member-qr { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 8px 6px 12px; border-bottom: 1px solid var(--border-soft); margin-bottom: 8px; }
.user-menu .member-qr img { width: 118px; height: 118px; border-radius: 10px; background: #fff; padding: 5px; object-fit: contain; }
.user-menu .member-qr p { font-size: 12.5px; color: var(--text); }
.user-menu .member-qr p b { color: var(--green-2); }
.user-menu .member-qr em { font-style: normal; font-size: 11.5px; color: var(--accent); font-weight: 700; }
.user-menu .member-qr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; }
.user-menu .mqr-block { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; text-align: left; }
.user-menu .mqr-title { font-size: 12px; font-weight: 800; color: var(--text); margin: 0; line-height: 1.35; }
.user-menu .mqr-time { font-size: 11px; color: var(--accent); font-weight: 700; margin: 0; }
.user-menu .mqr-feats { display: flex; flex-direction: column; gap: 2px; align-self: stretch; }
.user-menu .mqr-feats span { font-size: 10.5px; color: var(--muted); text-align: left; line-height: 1.4; }
.user-menu .mqr-note { font-size: 11px; color: var(--accent); font-weight: 700; text-align: center; margin: 8px 0 4px; }
.user-menu .member-qr small { font-size: 10.5px; color: var(--muted-2); text-align: center; line-height: 1.5; }
.user-menu button {
  width: 100%; padding: 11px; border-radius: 11px; font-size: 13.5px; font-weight: 650; color: #fda4af;
  text-align: center; transition: all .18s;
}
.user-menu button:hover { background: rgba(244,63,94,.12); }

/* ============ 主体 ============ */
.main { max-width: 1180px; margin: 0 auto; padding: 34px 20px 170px; }
.view { display: none; animation: fadeUp 0.35s ease; }
.view.active { display: block; }
@keyframes fadeUp { from { opacity: 0; } to { opacity: 1; } }

.plaza-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.plaza-head h1 {
  font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; letter-spacing: 0.01em;
  background: linear-gradient(90deg, #fff 20%, var(--accent) 90%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.sub { color: var(--muted); font-size: 13.5px; margin-top: 6px; }
.searchbox {
  display: flex; align-items: center; gap: 10px; min-width: min(420px, 100%);
  padding: 11px 16px; border-radius: 999px;
  background: rgba(255,255,255,0.045); border: 1px solid var(--border-soft);
  transition: all .22s;
}
.searchbox:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(139,92,246,.14); }
.searchbox svg { width: 17px; height: 17px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; flex-shrink: 0; }
.searchbox input { flex: 1; background: none; border: none; outline: none; color: var(--text); font-size: 14px; }
.searchbox input::placeholder { color: var(--muted-2); }
.plaza-search {
  position: sticky; top: var(--topbar-h, 90px); z-index: 40;
  margin-bottom: 16px;
  background: linear-gradient(180deg, rgba(10,7,20,.94), rgba(10,7,20,.8));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-soft);
}
.plaza-search { width: 100%; max-width: 560px; margin: 0 auto 24px; }

.list-head { display: flex; justify-content: space-between; align-items: center; margin: 4px 2px 12px; }
#plazaCount { font-size: 13px; font-weight: 700; color: var(--accent); letter-spacing: 0.04em; }
.list-tip { font-size: 12px; color: var(--muted-2); }
.btn-ghost.played-btn {
  color: var(--green-2);
  border-color: rgba(34,197,94,.38);
  background: rgba(34,197,94,.08);
}
.btn-ghost.played-btn:hover { border-color: var(--green-2); background: rgba(34,197,94,.16); }

.played-wrap {
  position: relative;
}
#playedList {
  max-height: 58vh; overflow-y: auto;
  scrollbar-width: none; -ms-overflow-style: none;
  padding-right: 2px;
}
#playedList::-webkit-scrollbar { display: none; }
.played-scroll-hint {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  writing-mode: vertical-rl; text-orientation: mixed;
  font-size: 11px; letter-spacing: 3px; color: var(--muted-2); white-space: nowrap;
  pointer-events: none; z-index: 2;
  animation: lxHintBreath 2s ease-in-out infinite;
}
.played-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 12px; cursor: pointer;
  background: var(--card); border: 1px solid var(--border-soft);
  transition: border-color .15s, background .15s;
}
.played-row:hover { border-color: rgba(168,85,247,.5); background: rgba(139,92,246,.10); }
.played-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; font-size: 14px; font-weight: 650; }
.played-name em { font-style: normal; font-size: 12px; color: var(--muted-2); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.played-row .plays { font-size: 12px; color: var(--muted-2); display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; }
.played-row .plays b { color: var(--warning); }
.played-row .mini-btn {
  width: 34px; height: 34px; border-radius: 50%;
  display: inline-grid; place-items: center; flex-shrink: 0;
  border: 1px solid var(--border); background: rgba(255,255,255,.04);
  color: var(--muted); cursor: pointer; transition: all .15s;
}
.played-row .mini-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.played-row .mini-btn:hover { color: #fff; border-color: rgba(168,85,247,.5); background: rgba(139,92,246,.2); }
.played-row .mini-btn.faved { color: var(--accent-2); border-color: rgba(168,85,247,.5); background: rgba(168,85,247,.16); }
.played-row .played-play { color: var(--green-2); border-color: rgba(34,197,94,.35); background: rgba(34,197,94,.08); }

/* 歌曲列表 */
.track-list { display: flex; flex-direction: column; gap: 10px; }
.track {
  display: flex; align-items: center; gap: 14px; padding: 13px 16px;
  background: var(--card); border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
  transition: all 0.22s ease; cursor: pointer; position: relative; overflow: hidden;
}
.track::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--primary), var(--accent-2));
  opacity: 0; transition: opacity .22s;
}
.track:hover { transform: translateY(-2px); border-color: var(--border); background: var(--card-strong); box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.track.playing { border-color: rgba(168,85,247,.55); background: rgba(139,92,246,.10); }
.track.playing::before { opacity: 1; }
.track-cover {
  width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0; position: relative;
  display: grid; place-items: center;
  background: linear-gradient(145deg, rgba(139,92,246,.35), rgba(236,72,153,.18));
  border: 1px solid var(--border);
  overflow: hidden;
}
.track-cover svg { width: 22px; height: 22px; fill: none; stroke: rgba(255,255,255,.85); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.track-avatar { width: 100%; height: 100%; object-fit: cover; display: block; }
.track-cover .eq { position: absolute; right: 6px; bottom: 6px; display: none; gap: 2px; align-items: flex-end; height: 10px; }
.track.playing .eq { display: flex; }
.eq span { width: 2.5px; background: var(--green-2); border-radius: 2px; animation: eq 0.9s ease-in-out infinite; }
.eq span:nth-child(2) { animation-delay: .18s; }
.eq span:nth-child(3) { animation-delay: .36s; }
@keyframes eq { 0%,100% { height: 4px; } 50% { height: 10px; } }
.track-main { flex: 1; min-width: 0; }
.track-title { font-size: 15px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-sub { display: flex; align-items: center; gap: 10px; margin-top: 3px; font-size: 12px; color: var(--muted); }
.track-sub .plays { display: inline-flex; align-items: center; gap: 4px; }
.track-sub .plays svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; }
.mode-badge {
  flex-shrink: 0; font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px; letter-spacing: 0.02em;
}
.mode-badge.singer { color: #f0abfc; background: rgba(217, 70, 239, 0.14); border: 1px solid rgba(217,70,239,.35); }
.mode-badge.musician { color: #7dd3fc; background: rgba(56, 189, 248, 0.12); border: 1px solid rgba(56,189,248,.3); }
.dl-file-btn {
  flex-shrink: 0; font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px;
  color: #facc15; white-space: nowrap; cursor: pointer;
  background: rgba(250, 204, 21, 0.08); border: 1px solid rgba(250, 204, 21, 0.4);
  transition: all .2s;
}
.dl-file-btn:hover { color: #fde68a; background: rgba(250, 204, 21, 0.18); }
.status-chip { flex-shrink: 0; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.status-chip.done { color: var(--green-2); background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.32); }
.status-chip.pending, .status-chip.processing { color: var(--warning); background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.3); animation: blink 1.4s ease-in-out infinite; }
.status-chip.error { color: #fda4af; background: rgba(244,63,94,.1); border: 1px solid rgba(244,63,94,.3); }

/* 我的制作记录：实时进度 */
.jobs-list { margin-top: 28px; }
.jobs-title { font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: 1px; margin-bottom: 12px; }
.jobs-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.jobs-head .jobs-title { margin-bottom: 0; }
.jobs-note { font-size: 11px; color: var(--muted-2); white-space: nowrap; }
.jobs-empty { text-align: center; color: var(--muted); font-size: 13px; padding: 26px 0; }
.job-progress { display: flex; align-items: center; gap: 10px; margin-top: 8px; max-width: 360px; }
.job-progress-track { flex: 1; height: 5px; border-radius: 999px; background: rgba(139,92,246,.16); overflow: hidden; }
.job-progress-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #a855f7, #22c55e); transition: width .8s ease; }
.job-progress-text { font-size: 11px; font-weight: 700; color: var(--warning); min-width: 34px; text-align: right; }
.status-chip.dup { color: var(--green-2); background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.3); }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
.track-dur { flex-shrink: 0; font-size: 12px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.track .dl-btn {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  display: grid; place-items: center; cursor: pointer;
  color: var(--muted); border: 1px solid var(--border); background: rgba(255,255,255,.04);
  transition: all .2s;
}
.track .dl-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.track .dl-btn:hover { color: #fff; background: rgba(139,92,246,.2); border-color: rgba(168,85,247,.5); }
.track .dl-btn.cached { color: var(--green-2); border-color: rgba(34,197,94,.45); background: rgba(34,197,94,.12); cursor: default; }
.spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-top-color: #fff;
  animation: adSpin 0.7s linear infinite;
  display: inline-block;
}
@keyframes adSpin { to { transform: rotate(360deg); } }
.track-actions { display: flex; gap: 4px; flex-shrink: 0; }
.track-actions .mini-btn {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  color: var(--muted); transition: all .2s;
}
.track-actions .mini-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.track-actions .mini-btn:hover { color: #fff; background: rgba(139,92,246,.2); }
.track-actions .mini-btn.faved { color: var(--accent-2); }
.track-actions .mini-btn.del:hover { color: var(--danger); background: rgba(244,63,94,.12); }
.grab { cursor: grab; }
.grab:active { cursor: grabbing; }
.grab svg { width: 15px; height: 15px; stroke: var(--muted-2); }
.dragging { opacity: .45; transform: scale(.985); }
.drag-over { border-color: var(--accent) !important; box-shadow: 0 0 0 3px rgba(168,85,247,.18) !important; }

.empty { text-align: center; padding: 60px 0; color: var(--muted); }
.empty img { width: 130px; opacity: .8; margin-bottom: 14px; filter: drop-shadow(0 8px 30px rgba(139,92,246,.25)); }

/* ============ 伴奏制作 ============ */
.prod-cards {
  display: grid; grid-template-columns: minmax(0, 520px);
  justify-content: center; gap: 14px; margin: 0 auto 22px;
}
.prod-card {
  position: relative; display: flex; align-items: center; gap: 10px;
  padding: 18px 20px; border-radius: 18px; overflow: hidden;
  background: linear-gradient(160deg, rgba(139,92,246,.12), rgba(255,255,255,.02) 55%);
  border: 1px solid var(--border);
  transition: all .25s ease;
  flex-direction: column; align-items: center; text-align: center;
}
.prod-card:hover { transform: translateY(-4px); box-shadow: var(--glow); border-color: rgba(168,85,247,.5); }
.prod-icon {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; position: relative; flex-shrink: 0;
  background: linear-gradient(145deg, rgba(217,70,239,.25), rgba(139,92,246,.12));
  border: 1px solid rgba(217,70,239,.35);
}
.prod-icon.musician { background: linear-gradient(145deg, rgba(56,189,248,.18), rgba(139,92,246,.12)); border-color: rgba(56,189,248,.32); }
.prod-icon svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.pulse-dot {
  position: absolute; right: 8px; top: 8px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--green-2); box-shadow: 0 0 0 0 rgba(74, 222, 128, .5); animation: pulse 1.8s infinite;
}
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(74,222,128,.45); } 70% { box-shadow: 0 0 0 10px rgba(74,222,128,0); } 100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); } }
.prod-card h2 { font-size: 15px; font-weight: 750; margin: 0; white-space: nowrap; }
.prod-card h2 em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--accent); }
.prod-card .prod-title {
  font-size: 18px; font-weight: 800; text-align: center; letter-spacing: 1px; margin: 0 0 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.prod-card .btn-prod { margin-top: 4px; }

/* 保留和声 / 不要和声 选项 */
.harmony-options { display: flex; flex-direction: column; gap: 8px; width: 100%; margin: 2px 0 12px; }
.harmony-opt { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--card); transition: border-color .2s ease, background .2s ease; }
.harmony-opt:hover { border-color: rgba(168,85,247,.45); }
.harmony-opt input { accent-color: #a855f7; width: 16px; height: 16px; flex-shrink: 0; }
.harmony-opt:has(input:checked) { border-color: rgba(168,85,247,.7); background: rgba(139,92,246,.10); }
.harmony-opt-name { display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 2px; font-size: 14px; font-weight: 650; }
.harmony-opt-name em { font-style: normal; font-size: 12px; font-weight: 500; color: var(--muted); }

/* 伴奏制作卡：按钮 → 进度条 → 勾选 → 执行 */
.prod-card .btn-select { width: 100%; }
.upload-tip { width: 100%; text-align: center; font-size: 11.5px; color: var(--muted-2); margin-top: 6px; line-height: 1.5; }
.harmony-options { flex-direction: row; align-items: stretch; }
.harmony-opt { flex: 1; justify-content: flex-start; }
.prod-card .btn-exec { align-self: flex-end; margin-top: 0; }
.prod-card .upload-hint { width: 100%; text-align: center; font-size: 12px; color: var(--muted); margin-top: 6px; min-height: 16px; }
.prod-card .progress { flex: none; width: 100%; height: 6px; }

/* 输入歌名直接做伴奏 */
.lx-search { display: flex; gap: 8px; width: 100%; align-items: center; margin-top: 4px; }
.lx-searchbox { flex: 1; }
.lx-results-wrap { position: relative; width: 100%; }
.lx-results { width: 100%; margin-top: 10px; display: flex; flex-direction: column; gap: 6px; max-height: 280px; overflow-y: auto; padding-right: 18px; scrollbar-width: none; }
.lx-results::-webkit-scrollbar { display: none; }
.lx-scroll-hint {
  position: absolute; right: 3px; top: 50%; transform: translateY(-50%);
  writing-mode: vertical-rl; text-orientation: mixed;
  font-size: 11px; letter-spacing: 3px; color: var(--muted-2); white-space: nowrap;
  pointer-events: none; z-index: 2;
  animation: lxHintBreath 2s ease-in-out infinite;
}
@keyframes lxHintBreath { 0%, 100% { opacity: 0.9; } 50% { opacity: 0.25; } }
.lx-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--card); border: 1px solid var(--border); }
.lx-row .lx-idx { width: 20px; text-align: center; font-size: 12px; color: var(--muted-2); flex-shrink: 0; }
.lx-info { flex: 1; min-width: 0; text-align: left; }
.lx-name { font-size: 14px; font-weight: 650; display: flex; gap: 8px; align-items: baseline; white-space: nowrap; overflow: hidden; }
.lx-name > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.lx-name em { font-style: normal; font-size: 12px; font-weight: 500; color: var(--muted); flex-shrink: 1; }
.lx-meta { font-size: 11.5px; color: var(--muted-2); margin-top: 2px; }
.lx-meta .lrc-yes { color: var(--green-2); font-weight: 700; }
.lx-meta .lrc-no { color: var(--muted-2); }
.lx-fail { font-size: 11.5px; color: #fda4af; margin-top: 2px; }
.lx-row .mini-btn {
  white-space: nowrap; flex-shrink: 0; height: 30px; padding: 0 10px; border-radius: 9px;
  display: inline-flex; align-items: center; gap: 5px; justify-content: center;
  color: var(--muted); border: 1px solid var(--border); background: rgba(255,255,255,.03);
  font-size: 12px; cursor: pointer; transition: all .2s;
}
.lx-row .mini-btn:hover { color: #fff; background: rgba(139,92,246,.2); border-color: rgba(168,85,247,.5); }
.lx-row .mini-btn.active, .lx-row .mini-btn.faved { color: var(--accent-2); background: rgba(168,85,247,.16); border-color: rgba(168,85,247,.5); }
.lx-row .mini-btn.del:hover { color: var(--danger); background: rgba(244,63,94,.12); border-color: rgba(244,63,94,.4); }
.lx-row .mini-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.lx-empty { font-size: 12.5px; color: var(--muted-2); text-align: center; padding: 18px 0; }
.lx-prepared-wrap { width: 100%; margin-top: 14px; border-top: 1px dashed var(--border); padding-top: 12px; }
.lx-prepared-head { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-bottom: 8px; }
.lx-prepared-head h4 { margin: 0; font-size: 13px; font-weight: 750; }
.lx-prepared { display: flex; flex-direction: column; gap: 6px; width: 100%; margin-bottom: 10px; }
.lx-prepared-row { padding: 6px 10px; }
.lx-mode { margin-top: 4px; }
#lxAudio { display: none; }

/* 后台：音乐下载设置 */
.lx-settings { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; align-items: flex-start; }
.lx-check-field { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; color: var(--text); }
.lx-check-field input { accent-color: #a855f7; width: 16px; height: 16px; }
.lx-set-row { display: flex; align-items: center; gap: 12px; }
.lx-set-label { font-size: 13px; color: var(--muted); min-width: 110px; }
.lx-save-row { display: flex; align-items: center; gap: 12px; justify-content: flex-end; margin-bottom: 6px; }

/* ============ 悬浮广告牌 ============ */
.ad-card {
  position: fixed;
  left: 0;
  right: 0;
  margin: 0 auto;
  bottom: 82px;
  z-index: 55;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 680px;
  width: min(680px, calc(100% - 32px));
  height: 64px;
  overflow: hidden;
  border-radius: 14px;
  text-decoration: none;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    0 3px 8px rgba(0, 0, 0, 0.16),
    0 16px 36px rgba(0, 0, 0, 0.30),
    0 46px 90px -12px rgba(0, 0, 0, 0.30);
}
.ad-card--text {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.32), rgba(236, 72, 153, 0.18));
}
.ad-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ad-card .ad-text {
  padding: 0 24px;
  white-space: nowrap;
  text-align: center;
  letter-spacing: 1px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.ad-card .ad-grad {
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  background-size: 200% auto;
}
.ad-card.ad-sweep::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 45%;
  left: -60%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.38), transparent);
  pointer-events: none;
}

/* 图片/文字特效动画 */
@keyframes adBreath { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
.ad-breath { animation: adBreath 2.2s ease-in-out infinite; }
@keyframes adScale { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.035); } }
.ad-scale { animation: adScale 2s ease-in-out infinite; }
@keyframes adShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}
.ad-shake { animation: adShake 0.85s linear infinite; }
@keyframes adGlow {
  0%, 100% { box-shadow: 0 0 10px rgba(168, 85, 247, 0.35); }
  50% { box-shadow: 0 0 30px rgba(168, 85, 247, 0.9); }
}
.ad-glow { animation: adGlow 2s ease-in-out infinite; }
@keyframes adSweep { 0% { left: -60%; } 55%, 100% { left: 125%; } }
.ad-sweep::after { animation: adSweep 2.4s ease-in-out infinite; }

@keyframes adBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.2; } }
.ad-blink { animation: adBlink 1.15s ease-in-out infinite; }
@keyframes adBounce {
  0%, 100% { transform: translateY(0); }
  30% { transform: translateY(-9px); }
  55% { transform: translateY(0); }
  75% { transform: translateY(-4px); }
}
.ad-bounce { animation: adBounce 1.5s ease-in-out infinite; }
@keyframes adSwing { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
.ad-swing { animation: adSwing 1.2s ease-in-out infinite; }
@keyframes adPulseT { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.14); } }
.ad-pulse { animation: adPulseT 1.5s ease-in-out infinite; }
@keyframes adRainbow { 0% { background-position: 0% center; } 100% { background-position: 200% center; } }
.ad-rainbow { animation: adRainbow 3s linear infinite; }
@keyframes adMarquee { 0% { transform: translateX(105%); } 100% { transform: translateX(-105%); } }
.ad-marquee { animation: adMarquee 8s linear infinite; }
.btn-prod {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  margin-left: auto; width: auto; flex-shrink: 0;
  padding: 10px 14px; border-radius: 11px; font-size: 12px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 10px 30px rgba(139,92,246,.32); transition: all .2s;
  white-space: nowrap;
}
.btn-prod svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.btn-prod:hover { transform: translateY(-2px); box-shadow: 0 14px 38px rgba(139,92,246,.45); }
.btn-prod:active { transform: scale(.98); }
.upload-panel {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  padding: 20px 22px; margin-bottom: 34px; border-radius: 18px;
  background: rgba(139,92,246,.08); border: 1px dashed rgba(168,85,247,.45);
  animation: fadeUp .3s ease;
}
.upload-file { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 4px; }
.upload-name { font-size: 14.5px; font-weight: 650; word-break: break-all; }
.upload-mode { font-size: 12px; color: var(--accent); }
.progress { flex: 1; min-width: 160px; height: 7px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.progress-bar { height: 100%; width: 0%; border-radius: 99px; background: linear-gradient(90deg, var(--primary), var(--green-2)); transition: width .2s; }
.upload-hint { width: 100%; font-size: 12.5px; color: var(--muted); }
.pl-section { margin-bottom: 30px; }
.pl-section-title { display: flex; align-items: center; gap: 10px; margin: 0 2px 12px; font-size: 15px; font-weight: 700; }
#view-playlist, #view-produce { position: relative; }
#view-playlist.locked > :not(.playlist-lock),
#view-produce.locked > :not(.playlist-lock) {
  filter: blur(7px);
  opacity: 0.5;
  pointer-events: none;
  user-select: none;
}
.playlist-lock {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: min(600px, 92%);
  z-index: 6;
  text-align: left;
  padding: 28px 24px;
  border-radius: 18px;
  background: rgba(15, 10, 28, 0.55);
  border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 16px 40px rgba(0,0,0,.35);
}
.lock-big {
  font-size: 26px; font-weight: 800; letter-spacing: 1px; margin: 0 0 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lock-sub { font-size: 13px; color: var(--muted); margin: 0; }
.lock-feats { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lock-feats li { font-size: 13.5px; color: var(--muted); line-height: 1.7; }
.pl-section-title::before { content: ""; width: 4px; height: 16px; border-radius: 4px; background: linear-gradient(180deg, var(--primary), var(--accent-2)); }
.pl-section-title em { font-style: normal; font-size: 12px; color: var(--muted-2); font-weight: 600; }
.pl-section-title { align-items: flex-end; }
#dlAllBtn, #bgmUploadBtn {
  margin-left: auto;
  height: 20px;
  line-height: 20px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  color: var(--green-2);
  border: 1px solid rgba(34,197,94,.45);
  background: rgba(34,197,94,.12);
}
#dlAllBtn:hover, #bgmUploadBtn:hover {
  color: #fff;
  border-color: rgba(34,197,94,.65);
  background: rgba(34,197,94,.24);
}

/* ============ 按钮 ============ */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 14px; font-size: 15px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 10px 30px rgba(139,92,246,.3); transition: all .2s;
}
.btn-primary svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(139,92,246,.45); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-ghost {
  padding: 9px 16px; border-radius: 12px; font-size: 13px; font-weight: 600;
  border: 1px solid var(--border); color: var(--text); background: rgba(255,255,255,.04); transition: all .2s;
}
.btn-ghost:hover { border-color: var(--accent); background: rgba(139,92,246,.14); }

/* ============ 播放器 ============ */
.player {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: rgba(12, 8, 24, 0.9);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -14px 50px rgba(0,0,0,.45);
}
.player-progress {
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: rgba(255,255,255,.07);
  touch-action: none; cursor: pointer;
}
.player-progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--green-2));
  box-shadow: 0 0 12px rgba(74, 222, 128, .55);
  position: relative;
  will-change: width;
}
.progress-knob {
  position: absolute; right: -7px; top: 50%; transform: translateY(-50%);
  width: 13px; height: 13px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff, #d9fbe6 60%, var(--green-2));
  border: 2px solid #fff;
  box-shadow: 0 0 10px rgba(74, 222, 128, .85), 0 1px 4px rgba(0,0,0,.4);
  transition: transform .15s ease;
}
.player-progress:hover .progress-knob { transform: translateY(-50%) scale(1.25); }
.player-progress.dragging .progress-knob { transform: translateY(-50%) scale(1.4); }
.lyrics-area {
  height: 118px; display: flex; align-items: center; justify-content: center;
  padding: 16px 20px 4px; overflow: hidden;
}
.lyrics-lines { text-align: center; max-width: 880px; width: 100%; }
.lyric { line-height: 1.45; transition: all .3s ease; }
.lyric.prev, .lyric.next { font-size: 13px; color: var(--muted-2); opacity: 0; transform: translateY(4px); }
.lyric.prev.show, .lyric.next.show { opacity: 1; transform: none; }
.lyric.cur { font-size: clamp(19px, 3.2vw, 27px); font-weight: 750; padding: 5px 0; }
.lyric-text { position: relative; display: inline-block; color: rgba(255,255,255,.92); text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.lyric-fill {
  position: absolute; inset: 0; overflow: hidden; white-space: nowrap; pointer-events: none;
  background: linear-gradient(90deg, #ffffff 0%, var(--green-2) 50%, var(--green) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  color: transparent;
}
.lyric-fill-inner { display: inline-block; will-change: transform; }
.player-bar {
  display: flex; align-items: center; gap: 14px;
  max-width: 1180px; margin: 0 auto; padding: 12px 20px;
}
.controls { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; }
.ctl {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  color: var(--muted); transition: all .2s;
}
.ctl svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ctl:hover { color: #fff; background: rgba(139,92,246,.16); }
.ctl.ctl-play {
  width: 52px; height: 52px; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 8px 26px rgba(139,92,246,.45);
}
.ctl.ctl-play:hover { transform: scale(1.06); box-shadow: 0 10px 32px rgba(139,92,246,.6); }
.ctl.ctl-play .ic-pause { display: none; }
.player.playing .ctl.ctl-play .ic-play { display: none; }
.player.playing .ctl.ctl-play .ic-pause { display: block; }
#btnToggleKind { width: auto; border-radius: 999px; padding: 0 13px; gap: 5px; font-size: 12px; font-weight: 700; border: 1px solid var(--border); }
#btnToggleKind span { letter-spacing: .05em; }
#btnToggleKind.kind-voc { color: #f0abfc; border-color: rgba(217,70,239,.4); background: rgba(217,70,239,.1); }
.vol { position: relative; display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.vol .ctl { width: 34px; height: 34px; }
.vol-wave { opacity: .55; }
.vol-pop {
  position: absolute; bottom: calc(100% + 10px); right: 0; z-index: 15;
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px; border-radius: 15px;
  background: rgba(22, 16, 38, .97); border: 1px solid var(--border);
  box-shadow: var(--shadow); animation: pop .2s ease;
}
.vol-pop-icon { width: 16px; height: 16px; fill: none; stroke: var(--accent); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.vol-pop input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 96px; height: 5px; border-radius: 99px;
  background: linear-gradient(90deg, var(--primary) var(--vol, 80%), rgba(255,255,255,.12) var(--vol, 80%));
  outline: none; cursor: pointer;
}
.vol-pop input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%;
  background: #fff; border: none; box-shadow: 0 2px 10px rgba(0,0,0,.4);
}
#volPct { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }
.pitch {
  display: flex; align-items: center; gap: 2px;
  padding: 3px 4px; border-radius: 999px;
  background: rgba(255,255,255,.05); border: 1px solid var(--border-soft);
  flex-shrink: 0;
}
.pitch-btn {
  width: 34px; height: 30px; border-radius: 999px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  font-size: 16px; font-weight: 800; color: var(--muted);
  background: transparent; border: none;
  transition: all .2s; font-variant-numeric: tabular-nums;
  line-height: 1;
}
.pitch-num { font-size: 9px; font-weight: 800; opacity: .9; }
.pitch-sym { font-size: 15px; line-height: 1; }
.pitch-btn:hover { color: #fff; background: rgba(139,92,246,.2); }
.pitch-btn.active { color: #fff; background: linear-gradient(135deg, var(--primary), var(--accent)); box-shadow: 0 4px 14px rgba(139,92,246,.35); }
.pitch-reset { font-size: 18px; }
.vol-capsule {
  display: flex; align-items: center; gap: 1px;
  padding: 1px 2px; border-radius: 999px;
  background: rgba(255,255,255,.05); border: 1px solid var(--border-soft);
  flex-shrink: 0;
}
.vol-step {
  width: 22px; height: 24px; border-radius: 999px;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 800; color: var(--muted);
  background: transparent; border: none; cursor: pointer;
  transition: all .2s; font-variant-numeric: tabular-nums;
}
.vol-step:hover { color: #fff; background: rgba(139,92,246,.2); }
.vol-pct { display: flex; align-items: center; justify-content: center; gap: 2px; font-size: 9.5px; color: var(--muted); min-width: 22px; text-align: center; font-variant-numeric: tabular-nums; }
.vol-pct svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.ctl:disabled { opacity: .32; cursor: not-allowed; }
.ctl:disabled:hover { background: none; color: var(--muted); }
/* ============ 背景音乐控制条 ============ */
.bgm-wrap { position: relative; flex-shrink: 0; }
.bgm-vol-pop {
  position: absolute; bottom: 38px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 10px 8px; border-radius: 14px;
  background: rgba(18, 12, 32, .92); border: 1px solid var(--border-soft);
  box-shadow: 0 12px 30px rgba(0,0,0,.4); z-index: 70;
}
.bgm-vol-pct { font-size: 11px; font-weight: 700; color: var(--green-2); font-variant-numeric: tabular-nums; }
.bgm-vol-range {
  width: 26px; height: 112px;
  -webkit-appearance: slider-vertical; appearance: slider-vertical;
  accent-color: var(--accent); cursor: pointer;
}
/* ============ 背景音乐播放闪光扫过 ============ */
.bgm-capsule.playing { position: relative; overflow: hidden; }
.bgm-capsule.playing::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent);
  transform: skewX(-15deg);
  animation: bgmSweep 2.6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes bgmSweep {
  0% { left: -60%; }
  35% { left: 130%; }
  100% { left: 130%; }
}
.bgm-capsule {
  display: flex; align-items: center; gap: 1px;
  padding: 1px 2px; border-radius: 999px;
  background: rgba(139,92,246,.16); border: 1px solid rgba(168,85,247,.32);
  flex-shrink: 0;
}
.bgm-btn {
  width: 24px; height: 24px; border-radius: 999px;
  display: grid; place-items: center;
  color: var(--muted); background: transparent; border: none; cursor: pointer;
  transition: all .2s;
}
.bgm-btn svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bgm-btn:hover { color: #fff; background: rgba(139,92,246,.2); }
.bgm-capsule.playing .bgm-ic-play { display: none; }
.bgm-capsule:not(.playing) .bgm-ic-pause { display: none; }
.bgm-capsule.muted .vol-wave { display: none; }
.bgm-capsule.looping #bgmLoop { color: var(--green-2); background: rgba(34,197,94,.14); }
.bgm-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; margin-bottom: 6px; border-radius: 12px;
  background: rgba(255,255,255,.035); border: 1px solid var(--border-soft);
}
.bgm-row.dragging { opacity: .5; }
.bgm-row.drag-over { border-color: var(--accent); background: rgba(139,92,246,.12); }
.bgm-row-grip { color: var(--muted-2); display: inline-flex; cursor: grab; flex-shrink: 0; }
.bgm-row-grip svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.bgm-row-name { flex: 1; min-width: 0; font-size: 13px; font-weight: 650; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bgm-row-size { font-size: 11px; color: var(--muted-2); flex-shrink: 0; }
.bgm-ms {
  width: 24px; height: 24px; border-radius: 8px; flex-shrink: 0;
  display: grid; place-items: center; cursor: pointer;
  font-size: 12px; font-weight: 800;
  color: var(--muted); border: 1px solid var(--border); background: rgba(255,255,255,.04);
  transition: all .2s;
}
.bgm-ms:hover { color: #fff; border-color: var(--accent); background: rgba(139,92,246,.2); }
.bgm-ms.on-m { color: #fda4af; border-color: rgba(244,63,94,.5); background: rgba(244,63,94,.14); }
.bgm-ms.on-s { color: var(--green-2); border-color: rgba(34,197,94,.5); background: rgba(34,197,94,.14); }
.bgm-row .dl-btn {
  width: 28px; height: 28px; border-radius: 9px; flex-shrink: 0;
  display: grid; place-items: center; cursor: pointer;
  color: var(--muted); border: 1px solid var(--border); background: rgba(255,255,255,.04);
  transition: all .2s;
}
.bgm-row .dl-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bgm-row .dl-btn:hover { color: #fff; background: rgba(139,92,246,.2); border-color: rgba(168,85,247,.5); }
.bgm-row .dl-btn.cached { color: var(--green-2); border-color: rgba(34,197,94,.45); background: rgba(34,197,94,.12); cursor: default; }
.bgm-row .mini-btn {
  width: 28px; height: 28px; border-radius: 9px; flex-shrink: 0;
  display: grid; place-items: center; cursor: pointer;
  color: var(--muted); border: 1px solid var(--border); background: rgba(255,255,255,.04);
  transition: all .2s;
}
.bgm-row .mini-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bgm-row .mini-btn:hover { color: #fda4af; background: rgba(244,63,94,.12); border-color: rgba(244,63,94,.4); }
.bgm-row.playing { border-color: rgba(34,197,94,.45); background: rgba(34,197,94,.08); }
.bgm-row.playing .bgm-row-name { position: relative; overflow: hidden; color: var(--green-2); }
.bgm-row.playing .bgm-row-name::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: -50%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-15deg);
  animation: bgmNameSweep 2.4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes bgmNameSweep {
  0% { left: -50%; }
  35% { left: 120%; }
  100% { left: 120%; }
}
.bgm-empty { text-align: center; color: var(--muted-2); font-size: 12.5px; padding: 16px 0; }
.bgm-progress {
  height: 8px; border-radius: 999px; overflow: hidden;
  background: rgba(255,255,255,.08); border: 1px solid var(--border-soft);
}
.bgm-progress-bar {
  height: 100%; width: 0%; border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--green-2));
  transition: width .15s ease;
}
.bgm-progress-compact {
  display: flex; align-items: center; gap: 10px;
  max-width: 340px; height: auto; padding: 0;
  background: none; border: none;
}
.bgm-progress-compact .bgm-progress-track {
  flex: 1; height: 8px; border-radius: 999px; overflow: hidden;
  background: rgba(255,255,255,.08); border: 1px solid var(--border-soft);
}
.bgm-progress-compact .bgm-progress-pct {
  font-size: 12px; font-weight: 700; color: var(--green-2);
  min-width: 40px; text-align: right;
}
.site-footer {
  padding: 22px 16px 26px;
  text-align: center;
  font-size: 12px;
  color: var(--muted-2);
  letter-spacing: .02em;
  line-height: 1.7;
  border-top: 1px solid var(--border-soft);
  margin-top: 24px;
}
/* ============ 首次访问气泡教程 ============ */
.site-tour {
  position: fixed; inset: 0; z-index: 9999;
  pointer-events: none;
}
.site-tour-mask {
  position: absolute; inset: 0;
  background: rgba(6, 4, 14, .58);
}
.site-tour-spot {
  position: fixed; z-index: 1;
  border: 1.5px solid rgba(168, 85, 247, .75);
  border-radius: 16px;
  background: rgba(168, 85, 247, .08);
  box-shadow: 0 0 0 9999px rgba(6, 4, 14, .58), 0 0 26px rgba(168, 85, 247, .55), inset 0 0 18px rgba(168, 85, 247, .16);
  transition: top .28s ease, left .28s ease, width .28s ease, height .28s ease;
}
.site-tour-bubble {
  position: fixed; z-index: 2;
  width: 348px; max-width: calc(100vw - 40px);
  padding: 18px 18px 14px;
  border-radius: 18px;
  background: linear-gradient(170deg, rgba(30, 22, 50, .96), rgba(16, 10, 30, .97));
  border: 1px solid rgba(168, 85, 247, .45);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .65), 0 0 34px rgba(168, 85, 247, .22);
  pointer-events: auto;
  animation: tourPop .28s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes tourPop {
  from { opacity: 0; transform: translateY(10px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.site-tour-bubble::before {
  content: ''; position: absolute; width: 12px; height: 12px;
  background: inherit; border-left: 1px solid rgba(168, 85, 247, .45); border-top: 1px solid rgba(168, 85, 247, .45);
  transform: rotate(45deg);
}
.site-tour-bubble.tour-above::before { bottom: -6.5px; left: 46px; border-left: none; border-top: none; border-right: 1px solid rgba(168,85,247,.45); border-bottom: 1px solid rgba(168,85,247,.45); }
.site-tour-bubble.tour-below::before { top: -6.5px; left: 46px; }
.site-tour-bubble.tour-right::before { left: -6.5px; top: 34px; border-left: none; border-top: none; border-right: 1px solid rgba(168,85,247,.45); border-bottom: 1px solid rgba(168,85,247,.45); }
.site-tour-bubble.tour-center::before { display: none; }
.tour-title { font-size: 15.5px; font-weight: 800; letter-spacing: .03em; margin-bottom: 8px; color: #fff; }
.tour-title i {
  font-style: normal; margin-right: 8px; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
}
.tour-text { font-size: 13px; line-height: 1.75; color: #cfc7e4; margin-bottom: 14px; }
.tour-text b { color: #fff; }
.tour-actions { display: flex; align-items: center; gap: 10px; }
.tour-count { font-size: 11.5px; color: #9d93b8; margin-right: auto; }
.tour-btn {
  padding: 7px 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.05); color: #d9d2ea; font-size: 12.5px; font-weight: 650;
  cursor: pointer; transition: all .15s;
}
.tour-btn:hover { border-color: rgba(168,85,247,.55); background: rgba(139,92,246,.18); color: #fff; }
.tour-btn.primary {
  border-color: rgba(168,85,247,.65); color: #fff;
  background: linear-gradient(135deg, #8b5cf6, #a855f7);
  box-shadow: 0 8px 24px rgba(139,92,246,.35);
}
.tour-btn.primary:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(139,92,246,.5); }
.tour-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
/* ============ 卡拉OK 全屏歌词 ============ */
.karaoke { position: relative; display: flex; flex-direction: column; height: calc(100vh - 210px); animation: fadeUp .3s ease; }
.karaoke-search {
  display: flex; align-items: center; gap: 10px; padding: 8px 20px;
  /* 全宽通栏：背景延伸到屏幕边缘，与主菜单栏无缝连接 */
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-left: max(20px, calc((100vw - 1180px) / 2 + 20px));
  padding-right: max(20px, calc((100vw - 1180px) / 2 + 20px));
  background: rgba(10,7,20,.72);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-soft);
  flex-shrink: 0;
}
body.karaoke-mode .main { padding-top: 0; }
.karaoke-searchbox { flex: 1; }
.karaoke-plist-btn { flex-shrink: 0; }
.karaoke-results {
  position: absolute; left: 20px; right: 20px; top: 58px; z-index: 50;
  max-height: 260px; overflow-y: auto; scrollbar-width: thin;
  background: rgba(14,10,26,.97); border: 1px solid var(--border-soft);
  border-radius: 14px; box-shadow: 0 18px 50px rgba(0,0,0,.55);
}
.karaoke-result {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  cursor: pointer; border-bottom: 1px solid rgba(255,255,255,.05);
  transition: background .15s ease;
}
.karaoke-result:last-child { border-bottom: none; }
.karaoke-result:hover { background: rgba(139,92,246,.14); }
.karaoke-result-main { flex: 1; min-width: 0; }
.karaoke-result-title { font-size: 13.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.karaoke-result-sub { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.karaoke-result .mini-btn {
  width: 34px; height: 34px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 10px; color: var(--muted);
  background: rgba(255,255,255,.06); border: none; cursor: pointer;
  transition: all .2s;
}
.karaoke-result .mini-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.karaoke-result .mini-btn:hover { color: #fff; background: rgba(139,92,246,.22); }
.karaoke-result .mini-btn.faved { color: var(--accent-2); }
.karaoke-result-empty { text-align: center; color: var(--muted); padding: 22px; font-size: 13px; }
.plist-modal { max-height: 76vh; overflow-y: auto; }
.fix-opt {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; margin-bottom: 8px; cursor: pointer;
  border-radius: 10px; border: 1px solid var(--border-soft);
  background: rgba(255,255,255,.03);
  font-size: 13.5px; font-weight: 600;
}
.fix-opt input { accent-color: #a855f7; width: 15px; height: 15px; }
.fix-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.fix-reason {
  display: inline-block; margin-left: 8px; padding: 2px 8px;
  font-size: 11px; font-weight: 700; border-radius: 999px;
  color: #fde68a; background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.3);
}
.fix-mark { display: inline-block; margin-left: 8px; font-size: 15px; font-weight: 900; }
.fix-mark.ok { color: #4ade80; }
.fix-mark.fail { color: #fda4af; }
.quality-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px; margin-bottom: 8px;
  border-radius: 10px; border: 1px solid rgba(244,63,94,.25);
  background: rgba(244,63,94,.06); font-size: 13px;
}
.quality-item b { color: #fff; }
.quality-item span { color: #fda4af; font-size: 12px; flex-shrink: 0; }
.karaoke-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin: 2px 0 10px;
}
.karaoke-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.karaoke-title { font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 38vw; min-width: 0; }
.karaoke-artist { font-size: 11px; color: var(--muted); }
.karaoke-artist { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 24vw; min-width: 0; }
.karaoke-artist::before { content: "·"; margin-right: 6px; color: var(--muted-2); }
.karaoke-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.karaoke-hint { font-size: 12px; color: var(--muted-2); display: flex; align-items: center; gap: 6px; }
.karaoke-hint::before { content: "☝︎"; font-size: 14px; color: var(--accent); }
.karaoke-zoom {
  position: absolute; top: 10px; right: 14px; z-index: 45;
  display: flex; overflow: hidden; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(20, 14, 36, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}
.karaoke-zoom button {
  width: 40px; height: 30px; border: none; background: none; cursor: pointer;
  color: var(--text); font-size: 13px; font-weight: 800; letter-spacing: 0.5px;
  transition: background .18s ease;
}
.karaoke-zoom button + button { border-left: 1px solid rgba(255, 255, 255, 0.15); }
.karaoke-zoom button:hover { background: rgba(139, 92, 246, 0.28); }
.lyric-cal {
  display: flex; align-items: center; gap: 2px;
  padding: 3px 4px; border-radius: 999px;
  background: rgba(255,255,255,.05); border: 1px solid var(--border-soft);
}
.cal-btn {
  padding: 5px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  color: var(--muted); background: transparent; border: none;
  transition: all .2s; font-variant-numeric: tabular-nums;
}
.cal-btn:hover { color: #fff; background: rgba(139,92,246,.2); }
.cal-btn:active { transform: scale(.94); }
.cal-label { font-size: 11.5px; font-weight: 700; color: var(--text); min-width: 72px; text-align: center; font-variant-numeric: tabular-nums; }
.sync-fix-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; color: var(--text); white-space: nowrap;
  background: rgba(255,255,255,.05); border: 1px solid var(--border-soft);
  transition: all .2s;
}
.sync-fix-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }
.sync-fix-btn:hover { color: #fff; border-color: var(--accent); background: rgba(139,92,246,.18); }
.karaoke-close {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(255,255,255,.05); border: 1px solid var(--border-soft); color: var(--muted);
  transition: all .2s;
}
.karaoke-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.karaoke-close:hover { color: #fff; border-color: var(--accent); background: rgba(139,92,246,.16); transform: rotate(90deg); }
.karaoke-stage {
  position: relative; flex: 1; min-height: 52vh;
  border-radius: 22px; overflow: hidden;
  background:
    radial-gradient(600px 300px at 50% 42%, rgba(139,92,246,.13), transparent 70%),
    linear-gradient(180deg, rgba(139,92,246,.05), rgba(255,255,255,.015));
  border: 1px solid var(--border-soft);
}
.karaoke-bg {
  position: absolute; inset: 0; width: 100%;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  filter: grayscale(1) contrast(1.02);
  opacity: .16;
  pointer-events: none; z-index: 0;
}
.karaoke-loading {
  position: absolute; inset: 0; z-index: 20;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: rgba(8,5,16,.62);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.karaoke-loading-spin {
  position: relative; width: 108px; height: 108px;
}
.karaoke-loading-spin::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 3px solid rgba(168,85,247,.18); border-top-color: var(--accent);
  animation: spin .9s linear infinite;
}
.karaoke-loading-text {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 13px; font-weight: 700; color: var(--text); letter-spacing: .05em;
}
@keyframes spin { to { transform: rotate(360deg); } }
.karaoke-grain {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  opacity: .5; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='160' height='160' filter='url(%23n)' opacity='0.55'/></svg>");
  background-size: 160px 160px;
}
.karaoke-lines {
  position: absolute; inset: 0; overflow: hidden; scrollbar-width: none;
  padding: 0 24px; text-align: center; touch-action: auto;
  overflow-anchor: none;
  z-index: 1;
  transform: scale(var(--lyric-zoom, 1));
  transform-origin: 50% 50%;
  transition: transform .2s ease;
}
.karaoke-lines::-webkit-scrollbar { display: none; }
.lyk {
  position: relative; display: grid; width: fit-content; max-width: 92%; margin: 3px auto;
  font-size: clamp(17px, 2.7vw, 28px); font-weight: 700; line-height: 1.7;
  opacity: .3; transform: scale(.92); transition: all .4s ease;
  text-shadow: 0 2px 24px rgba(0,0,0,.3);
}
.lyk.upcoming { opacity: .34; color: var(--muted); }
.lyk.past { opacity: .22; }
.lyk.active { opacity: 1; transform: scale(1.06); }
.lyk-base { grid-area: 1 / 1; position: relative; color: rgba(255,255,255,.94); }
.lyk-fill {
  grid-area: 1 / 1; position: relative; width: 100%; height: auto; overflow: visible;
  white-space: normal; pointer-events: none;
  line-height: inherit; font: inherit; text-shadow: none;
}
.lyk-fill-inner {
  display: inline; white-space: normal;
}
.lyk .w {
  display: inline; opacity: 0;
  background: #a3fd1c;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  transition: opacity .08s linear;
}
.lyk .w.done { opacity: 1; }
.lyk-hint {
  position: absolute; top: calc(34vh - 65px); left: 50%; transform: translateX(-50%);
  z-index: 3; width: fit-content;
  font-size: 17px; font-weight: 800; letter-spacing: .12em; color: var(--text);
  pointer-events: none; white-space: nowrap; opacity: .9;
  background: rgba(139,92,246,.18); padding: 9px 20px; border-radius: 999px;
  border: 1px solid rgba(168,85,247,.35);
  text-shadow: 0 2px 12px rgba(0,0,0,.5);
  animation: lykBreath 2.2s ease-in-out infinite;
}
@keyframes lykBreath {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.lyk-hint.blink { animation: lykFastBlink 0.3s linear infinite; }
.lyk-hint.count { font-size: 34px; letter-spacing: .05em; padding: 12px 28px; top: calc(34vh - 87px); }
@keyframes lykFastBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.05; }
}

/* 歌词窗口底部：歌名 + 显示模式 */
.karaoke-footer {
  position: fixed; left: 0; right: 0; bottom: 78px; z-index: 55;
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: nowrap;
  padding: 44px 22px 14px;
  background: linear-gradient(180deg, transparent 0%, rgba(12,8,24,.68) 42%, rgba(12,8,24,.95) 100%);
  pointer-events: none;
}
.karaoke-footer * { pointer-events: auto; }
.karaoke-footer-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.karaoke-footer-title { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: nowrap; }
.karaoke-footer-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; flex-wrap: nowrap; }
.karaoke-avatar {
  position: relative; width: 60px; height: 60px; border-radius: 50%; flex-shrink: 0;
  background-size: cover; background-position: center;
  border: 2px solid rgba(168,85,247,.45); cursor: pointer;
  transform: translateY(-6px);
  background-color: rgba(255,255,255,.06);
  transition: all .2s;
}
.karaoke-avatar-note {
  position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted);
}
.karaoke-avatar-note svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.karaoke-avatar-name {
  position: absolute; top: -7px; left: -8px;
  max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 10px; font-weight: 700; color: #fff; pointer-events: none;
  background: rgba(139,92,246,.9); border: 1px solid rgba(255,255,255,.25);
  padding: 2px 8px; border-radius: 999px; box-shadow: 0 2px 10px rgba(0,0,0,.35);
}
.karaoke-avatar:hover { border-color: var(--accent); box-shadow: 0 0 18px rgba(168,85,247,.4); }
.artist-modal { max-height: 76vh; overflow-y: auto; }

/* 歌词显示方式切换：单行高亮 / 逐字印染 */
.lyric-mode { display: flex; align-items: center; gap: 2px; padding: 3px 4px; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid var(--border-soft); }
.lm-btn { padding: 5px 12px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: var(--muted); background: transparent; border: none; transition: all .2s; white-space: nowrap; }
.lm-btn:hover { color: #fff; }
.lm-btn.active { color: #fff; background: linear-gradient(135deg, var(--primary), var(--accent)); box-shadow: 0 4px 14px rgba(139,92,246,.35); }
.karaoke-lines.highlight-mode .lyk-fill { display: none; }
.karaoke-lines.highlight-mode .lyk.active { text-shadow: 0 0 22px rgba(77,255,121,.45), 0 2px 24px rgba(0,0,0,.35); }
.karaoke-lines.highlight-mode .lyk.active .lyk-base { color: #4dff79; }
.seek-badge {
  position: absolute; top: 18%; left: 50%; transform: translateX(-50%);
  padding: 10px 22px; border-radius: 999px; font-size: 15px; font-weight: 800; letter-spacing: .06em;
  color: var(--green-2); background: rgba(10, 8, 18, .88); border: 1px solid rgba(34,197,94,.4);
  box-shadow: 0 8px 30px rgba(0,0,0,.4); z-index: 5; font-variant-numeric: tabular-nums;
}
.seek-badge.seek-pop { animation: seekPop .65s ease; }
@keyframes seekPop {
  0% { opacity: 0; transform: translateX(-50%) translateY(10px) scale(.9); }
  20% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translateX(-50%) translateY(-8px); }
}

@media (max-width: 700px) {
  .karaoke { min-height: calc(100vh - 190px); }
  .karaoke-lines { padding: 0 14px; }
  .karaoke-hint { display: none; }
  .lyk { font-size: clamp(16px, 4.6vw, 24px); }
  .karaoke-stage { min-height: 46vh; }
}

/* ============ 弹窗 ============ */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  background: rgba(5, 3, 12, 0.72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  padding: 20px; animation: fadeIn .22s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  position: relative; width: 100%; max-width: 430px; max-height: 90vh; overflow-y: auto;
  background: linear-gradient(170deg, #171026, #0e0918);
  border: 1px solid var(--border); border-radius: 24px; padding: 30px;
  box-shadow: var(--shadow); animation: pop .3s cubic-bezier(.2, .9, .3, 1.2);
}
.announce-modal { max-width: 560px; }
@keyframes pop { from { opacity: 0; transform: scale(.92) translateY(16px); } to { opacity: 1; transform: none; } }
.modal-close {
  position: absolute; right: 16px; top: 14px; width: 32px; height: 32px; border-radius: 50%;
  font-size: 19px; color: var(--muted); transition: all .2s; line-height: 1;
}
.modal-close:hover { color: #fff; background: rgba(255,255,255,.08); transform: rotate(90deg); }
.auth-tabs {
  display: flex; background: rgba(255,255,255,.05); border-radius: 12px; padding: 4px; margin-bottom: 26px;
}
.auth-tab { flex: 1; padding: 10px; border-radius: 9px; font-size: 14px; font-weight: 700; color: var(--muted); transition: all .2s; }
.auth-tab.active { color: #fff; background: linear-gradient(135deg, var(--primary), var(--accent)); box-shadow: 0 6px 18px rgba(139,92,246,.35); }
.auth-panel h3 { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.auth-sub { font-size: 12.5px; color: var(--muted); margin-bottom: 22px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; font-weight: 650; color: var(--muted); margin-bottom: 8px; }
.field input {
  width: 100%; padding: 13px 15px; border-radius: 13px; font-size: 16px; letter-spacing: .2em;
  background: rgba(255,255,255,.05); border: 1px solid var(--border-soft); color: var(--text); outline: none;
  transition: all .2s;
}
.field input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(139,92,246,.14); }
.field input::placeholder { letter-spacing: 0; color: var(--muted-2); }
.qr-box { margin-top: 18px; text-align: center; padding: 18px; border-radius: 16px; background: rgba(255,255,255,.045); border: 1px dashed var(--border); }
.qr-box img { width: 190px; height: 190px; border-radius: 12px; background: #fff; padding: 8px; }
.qr-note { font-size: 14px; font-weight: 750; color: var(--green-2); margin-top: 12px; letter-spacing: .05em; }
.qr-status { font-size: 12px; color: var(--muted); margin-top: 8px; }
.auth-tip { margin-top: 18px; font-size: 11.5px; color: var(--muted-2); text-align: center; line-height: 1.6; }
.announce-body { line-height: 1.8; font-size: 14.5px; margin-bottom: 22px; color: #e9e3f7; }
.announce-body img { max-width: 100%; border-radius: 12px; }
.announce-body h1, .announce-body h2, .announce-body h3 { margin: 14px 0 8px; }

/* ============ Toast ============ */
.toasts { position: fixed; top: 74px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 13px; font-size: 13.5px; font-weight: 600;
  background: rgba(23, 16, 38, .96); border: 1px solid var(--border); color: var(--text);
  box-shadow: 0 12px 34px rgba(0,0,0,.4); animation: slideIn .28s ease; max-width: 340px;
}
.toast.ok { border-color: rgba(34,197,94,.4); }
.toast.ok::before { content: "✓"; color: var(--green-2); font-weight: 800; }
.toast.err { border-color: rgba(244,63,94,.4); }
.toast.err::before { content: "!"; color: var(--danger); font-weight: 800; }
.toast.info::before { content: "♪"; color: var(--accent); font-weight: 800; }
@keyframes slideIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
.toast.leave { opacity: 0; transform: translateX(24px); transition: all .3s; }

.ver-chip {
  display: none;
}

/* ============ 管理后台 ============ */
.admin-body { padding-bottom: 40px; }
.admin-layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-side {
  background: linear-gradient(180deg, #120b22, #0a0714);
  border-right: 1px solid var(--border-soft); padding: 24px 16px 120px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.admin-side .brand { margin-bottom: 28px; padding: 0 8px; }
.admin-nav { display: flex; flex-direction: column; gap: 6px; }
.admin-nav .tab {
  justify-content: flex-start; border-radius: 12px; padding: 12px 14px; font-size: 14px;
  background: none; border: 1px solid transparent; width: 100%;
}
.admin-nav .tab.active { background: linear-gradient(135deg, rgba(139,92,246,.25), rgba(236,72,153,.12)); border-color: var(--border); box-shadow: none; }
.admin-main { padding: 30px 34px 140px; max-width: 1200px; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.admin-head h1 { font-size: 24px; font-weight: 800; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 26px; }
.stat-card {
  padding: 18px; border-radius: 16px; background: var(--card); border: 1px solid var(--border-soft);
}
.stat-card .num { font-size: 26px; font-weight: 800; background: linear-gradient(90deg, #fff, var(--accent)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-card .lbl { font-size: 12px; color: var(--muted); margin-top: 4px; }
.panel {
  background: var(--card); border: 1px solid var(--border-soft); border-radius: 18px; padding: 22px; margin-bottom: 22px;
}
.panel h3 { font-size: 15px; font-weight: 750; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.panel h3::before { content: ""; width: 4px; height: 15px; border-radius: 3px; background: linear-gradient(180deg, var(--primary), var(--accent-2)); }
.toolbar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.toolbar .searchbox { flex: 1; min-width: 240px; }
.table-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--border-soft); }
table.admin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 640px; }
.admin-table th {
  text-align: left; padding: 12px 14px; font-size: 12px; font-weight: 700; color: var(--muted);
  background: rgba(255,255,255,.03); border-bottom: 1px solid var(--border-soft); white-space: nowrap;
}
.admin-table td { padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,.04); vertical-align: middle; }
.admin-table tr:hover td { background: rgba(139,92,246,.05); }
.admin-table .row-actions { display: flex; gap: 6px; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.pager button {
  padding: 6px 12px; border-radius: 9px; font-size: 12px; font-weight: 650;
  border: 1px solid var(--border); color: var(--muted); transition: all .18s;
}
.pager button:hover:not(:disabled) { color: #fff; border-color: var(--accent); background: rgba(139,92,246,.15); }
.pager button:disabled { opacity: .35; cursor: not-allowed; }
.pager span { font-size: 12px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.row-btn {
  padding: 6px 11px; border-radius: 9px; font-size: 12px; font-weight: 650; border: 1px solid var(--border); color: var(--muted);
  transition: all .18s; white-space: nowrap;
}
.row-btn:hover { color: #fff; border-color: var(--accent); background: rgba(139,92,246,.15); }
.row-btn.ok { color: var(--green-2); border-color: rgba(34,197,94,.35); }
.row-btn.ok:hover { background: rgba(34,197,94,.12); }
.row-btn.warn { color: var(--warning); border-color: rgba(245,158,11,.35); }
.row-btn.warn:hover { background: rgba(245,158,11,.12); }
.row-btn.danger { color: #fda4af; border-color: rgba(244,63,94,.35); }
.row-btn.danger:hover { background: rgba(244,63,94,.12); }
.tag-expired { color: #fda4af; font-size: 12px; font-weight: 700; }
.tag-soon { color: var(--warning); font-size: 12px; font-weight: 700; }
.tag-ok { color: var(--green-2); font-size: 12px; font-weight: 700; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .field { margin-bottom: 0; }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.theme-card {
  padding: 16px; border-radius: 14px; cursor: pointer; border: 1px solid var(--border-soft);
  background: rgba(255,255,255,.03); transition: all .2s;
}
.theme-card:hover { border-color: var(--border); transform: translateY(-2px); }
.theme-card.active { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(168,85,247,.15); }
.theme-swatches { display: flex; gap: 6px; margin-bottom: 10px; }
.theme-swatches i { width: 22px; height: 22px; border-radius: 7px; border: 1px solid rgba(255,255,255,.15); }
.theme-card .name { font-size: 13.5px; font-weight: 700; }
.theme-card .desc { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.color-custom { display: flex; gap: 16px; margin-top: 14px; flex-wrap: wrap; align-items: center; }
.color-pick { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.color-pick input[type="color"] { width: 42px; height: 32px; border: none; border-radius: 8px; background: none; cursor: pointer; padding: 0; }
.color-pick input[type="color"]::-webkit-color-swatch-wrapper { padding: 2px; }
.color-pick input[type="color"]::-webkit-color-swatch { border-radius: 7px; border: 1px solid var(--border); }
.editor-toolbar {
  display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; border: 1px solid var(--border-soft); border-bottom: none;
  border-radius: 12px 12px 0 0; background: rgba(255,255,255,.03);
}
.editor-toolbar button {
  min-width: 32px; height: 30px; padding: 0 8px; border-radius: 7px; font-size: 13px; color: var(--muted);
  border: 1px solid transparent; transition: all .15s;
}
.editor-toolbar button:hover { color: #fff; background: rgba(139,92,246,.16); }
.editor-toolbar .sep { width: 1px; background: var(--border-soft); margin: 3px 5px; }
.editor-toolbar select {
  height: 30px; max-width: 132px; padding: 0 6px; border-radius: 7px;
  font-size: 12.5px; color: var(--muted); background: rgba(255,255,255,.05);
  border: 1px solid var(--border-soft); outline: none; cursor: pointer;
}
.editor-toolbar select:hover { color: #fff; border-color: var(--accent); background: rgba(139,92,246,.12); }
.editor-toolbar option { background: #171225; color: #e2e0ea; }
.editor-color-group { display: inline-flex; align-items: center; gap: 4px; padding: 0 4px; }
.editor-color-group button {
  width: 18px; height: 18px; min-width: 18px; padding: 0; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.4);
}
.editor-color-group button:hover { transform: scale(1.15); }
.color-picker-wrap {
  position: relative; display: inline-block; width: 18px; height: 18px;
  border-radius: 50%; border: 1px solid rgba(255,255,255,.4); overflow: hidden;
  background: linear-gradient(135deg, #ff0000, #ff8800, #ffff00, #00ff00, #0088ff, #8800ff, #ff00ff);
}
.color-picker-wrap .color-picker {
  position: absolute; inset: 0; width: 100%; height: 100%; padding: 0;
  border: none; background: none; opacity: 0; cursor: pointer;
}
.editor-urlbar {
  display: flex; gap: 8px; align-items: center; padding: 8px 10px;
  border: 1px solid var(--border-soft); border-bottom: none; background: rgba(255,255,255,.03);
}
.editor-urlbar input {
  flex: 1; min-width: 0; padding: 7px 10px; border-radius: 8px; font-size: 13px;
  border: 1px solid var(--border); background: rgba(0,0,0,.25); color: var(--text); outline: none;
}
.editor-urlbar input:focus { border-color: var(--primary); }
.editor-body {
  min-height: 220px; padding: 16px; border: 1px solid var(--border-soft); border-radius: 0 0 12px 12px;
  outline: none; line-height: 1.8; font-size: 14.5px; color: var(--text); background: rgba(255,255,255,.025);
}
.editor-body img { max-width: 100%; border-radius: 10px; }
.editor-body a { color: var(--accent-2); text-decoration: underline; cursor: pointer; }
.ann-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.ann-tab {
  padding: 7px 16px; border-radius: 999px; font-size: 13px; font-weight: 700;
  color: var(--muted); background: rgba(255,255,255,.04); border: 1px solid var(--border-soft);
  cursor: pointer; transition: all .2s;
}
.ann-tab:hover { color: #fff; border-color: var(--accent); background: rgba(139,92,246,.14); }
.ann-tab.active { color: #fff; background: linear-gradient(135deg, var(--primary), var(--accent)); border-color: transparent; box-shadow: 0 4px 14px rgba(139,92,246,.3); }

/* ============ 响应式 ============ */
@media (max-width: 960px) {
  .tabs { order: 3; width: 100%; justify-content: center; margin: 4px 0 0; }
  .topbar-inner { flex-wrap: wrap; gap: 10px; }
  .top-actions { margin-left: auto; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; border-right: none; border-bottom: 1px solid var(--border-soft); }
  .admin-nav { flex-direction: row; overflow-x: auto; }
  .admin-nav .tab { width: auto; white-space: nowrap; }
}
@media (max-width: 700px) {
  .main { padding: 24px 14px 150px; }
  .prod-cards { grid-template-columns: 1fr; }
  .player-bar { gap: 8px; padding: 10px 14px; }
  .controls { gap: 4px; }
  .vol input[type="range"] { width: 150px; }
  .lyrics-area { height: 96px; }
  .brand-slogan { display: none; }
  .tab { padding: 8px 12px; font-size: 13px; }
  .btn-user span { display: none; }
  .btn-user { padding: 9px 12px; }
  .track { padding: 11px 12px; gap: 11px; }
  .track-actions .mini-btn { width: 31px; height: 31px; }
  .form-grid { grid-template-columns: 1fr; }
}
