/* ═══════════════════════════════════════════════════════════════
   Music Search Module — NetEase-inspired light editorial layout
   Loaded lazily on first entry to the music page.
   ═══════════════════════════════════════════════════════════════ */

#music {
  --mu-bg: #f5f3ef;
  --mu-ink: #1a1a1a;
  --mu-ink-2: #555;
  --mu-ink-3: #8c8c8c;
  --mu-ink-4: #bbb;
  --mu-rule: rgba(26, 26, 26, 0.08);
  --mu-rule-strong: rgba(26, 26, 26, 0.16);
  --mu-accent: #c43b3b;
  --mu-accent-soft: #e76a6a;
  --mu-card: #ffffff;
  --mu-hover: rgba(196, 59, 59, 0.06);
  --mu-row-alt: rgba(26, 26, 26, 0.02);
  --mu-player-bg: rgba(250, 248, 244, 0.96);

  background: var(--mu-bg);
  padding: 0;
  overflow: hidden;
  justify-content: flex-start;
  align-items: stretch;
  font-family: 'Chakra Petch', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--mu-ink);
}

#music * { box-sizing: border-box; }

/* ─────────────── TOPBAR ─────────────── */

.mu-topbar {
  flex: 0 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 28px 0 84px;
  border-bottom: 1px solid var(--mu-rule);
  background: rgba(245, 243, 239, 0.96);
  backdrop-filter: blur(8px);
  position: relative;
  z-index: 6;
}

.mu-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-shrink: 0;
}
.mu-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 2px;
  color: var(--mu-ink);
}
.mu-title-sub {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 3px;
  color: var(--mu-ink-4);
  text-transform: uppercase;
}

.mu-search-wrap {
  flex: 1 1 auto;
  max-width: 520px;
  position: relative;
  display: flex;
  align-items: center;
}
.mu-search-icon {
  position: absolute;
  left: 14px;
  font-size: 13px;
  color: var(--mu-ink-4);
  pointer-events: none;
}
.mu-search-input {
  width: 100%;
  height: 38px;
  padding: 0 44px 0 38px;
  border: 1px solid var(--mu-rule-strong);
  border-radius: 20px;
  background: #fff;
  font-family: inherit;
  font-size: 13px;
  color: var(--mu-ink);
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.mu-search-input:focus {
  border-color: var(--mu-accent);
  box-shadow: 0 0 0 3px rgba(196, 59, 59, 0.08);
}
.mu-search-clear {
  position: absolute;
  right: 12px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: rgba(26, 26, 26, 0.12);
  color: #fff;
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}
.mu-search-clear.visible { display: flex; }
.mu-search-clear:hover { background: var(--mu-accent); }

.mu-agg-label {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: #fff;
  border: 1px solid var(--mu-rule-strong);
  border-radius: 20px;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.5px;
  color: var(--mu-ink-3);
  white-space: nowrap;
}
.mu-agg-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mu-accent);
  box-shadow: 0 0 0 3px rgba(196, 59, 59, 0.12);
  animation: muAggPulse 2.4s ease-in-out infinite;
}
@keyframes muAggPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(196, 59, 59, 0.12); }
  50%      { box-shadow: 0 0 0 5px rgba(196, 59, 59, 0.04); }
}

/* ─────────────── MAIN SPLIT ─────────────── */

.mu-main {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
}

/* ── LEFT: cover + lyrics ── */
.mu-side {
  padding: 32px 30px 28px;
  border-right: 1px solid var(--mu-rule);
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  min-height: 0;
  position: relative;
}

.mu-side::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 1px; height: 40px;
  background: linear-gradient(180deg, var(--mu-accent), transparent);
  opacity: 0.4;
}

.mu-cover-frame {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 1;
  position: relative;
  margin-bottom: 22px;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
  background: linear-gradient(135deg, #ede9e3, #d8d3cb);
  box-shadow:
    0 1px 2px rgba(26, 26, 26, 0.06),
    0 22px 48px -22px rgba(26, 26, 26, 0.22);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.mu-cover-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: inherit;
  pointer-events: none;
  mix-blend-mode: overlay;
}
.mu-cover-frame.playing {
  transform: scale(1.012);
}
.mu-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.45s ease;
}
.mu-cover-img[src=""], .mu-cover-img:not([src]) {
  opacity: 0;
}
.mu-cover-frame::before {
  content: '\266B';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(48px, 20%, 80px);
  color: rgba(26, 26, 26, 0.22);
  z-index: 0;
  pointer-events: none;
}
.mu-cover-frame.has-cover::before { display: none; }

.mu-now-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 500;
  color: var(--mu-ink);
  text-align: center;
  letter-spacing: 0.5px;
  margin: 4px 0 4px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}
.mu-now-meta {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--mu-ink-3);
  text-transform: uppercase;
  margin-bottom: 18px;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}
.mu-now-meta .mu-now-dot {
  display: inline-block;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--mu-accent);
  margin: 0 8px;
  vertical-align: middle;
  opacity: 0.7;
}

.mu-lyrics {
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 82%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 82%, transparent 100%);
  text-align: center;
}
.mu-lyrics-inner {
  position: relative;
  padding: 40% 0;
  transition: transform 0.55s cubic-bezier(0.25, 0.8, 0.3, 1);
  will-change: transform;
}
.mu-lyric-line {
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
  line-height: 28px;
  color: var(--mu-ink-4);
  transition: color 0.4s, font-size 0.4s, transform 0.4s;
  padding: 0 8px;
  word-break: break-word;
}
.mu-lyric-line.active {
  color: var(--mu-accent);
  font-size: 16px;
  font-weight: 500;
}
.mu-lyric-empty {
  padding-top: 40%;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  color: var(--mu-ink-4);
  font-size: 14px;
}

/* ── RIGHT: results ── */
.mu-results {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 0 14px;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.mu-results::-webkit-scrollbar { width: 8px; }
.mu-results::-webkit-scrollbar-thumb { background: rgba(26, 26, 26, 0.12); border-radius: 4px; }
.mu-results::-webkit-scrollbar-thumb:hover { background: rgba(26, 26, 26, 0.22); }

.mu-results-header {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 130px 130px 60px 96px;
  padding: 14px 22px 10px;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--mu-ink-4);
  border-bottom: 1px solid var(--mu-rule);
  position: sticky;
  top: 0;
  background: var(--mu-bg);
  z-index: 2;
}

.mu-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 80px 20px;
  color: var(--mu-ink-4);
  text-align: center;
  flex: 1 1 auto;
}
.mu-empty-icon {
  font-size: 42px;
  opacity: 0.3;
  margin-bottom: 8px;
}
.mu-empty-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-style: italic;
  color: var(--mu-ink-3);
}
.mu-empty-hint {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 10px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
}

.mu-loading {
  padding: 60px 20px;
  text-align: center;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--mu-ink-3);
}
.mu-loading::after {
  content: '';
  display: inline-block;
  width: 14px; height: 14px;
  margin-left: 10px;
  border: 1.5px solid var(--mu-rule-strong);
  border-top-color: var(--mu-accent);
  border-radius: 50%;
  animation: muSpin 0.8s linear infinite;
  vertical-align: middle;
}

.mu-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 130px 130px 60px 96px;
  align-items: center;
  padding: 10px 22px;
  border-bottom: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s;
  position: relative;
}
.mu-row:nth-child(even) { background: var(--mu-row-alt); }
.mu-row:hover { background: var(--mu-hover); }
.mu-row.playing { background: var(--mu-hover); }
.mu-row.playing .mu-row-num { color: var(--mu-accent); }
.mu-row.playing .mu-row-title { color: var(--mu-accent); font-weight: 500; }

.mu-row-num {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 12px;
  color: var(--mu-ink-4);
  letter-spacing: 1px;
  transition: color 0.2s;
}
.mu-row:hover .mu-row-num { visibility: hidden; }
.mu-row-playbtn {
  position: absolute;
  left: 22px;
  width: 24px;
  height: 24px;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--mu-accent);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.mu-row:hover .mu-row-playbtn { display: flex; }
.mu-row.playing .mu-row-playbtn {
  display: flex;
  color: var(--mu-accent);
}

.mu-row-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}
.mu-row-cover {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 4px;
  background: #222;
  object-fit: cover;
  display: block;
}
.mu-row-cover:not([src]), .mu-row-cover[src=""] {
  background: linear-gradient(135deg, #ddd, #b8b8b8);
}
.mu-row-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mu-row-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--mu-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s;
}
.mu-row-tags {
  display: flex;
  align-items: center;
  gap: 6px;
}
.mu-row-source {
  font-family: 'Chakra Petch', 'PingFang SC', sans-serif;
  font-size: 9px;
  letter-spacing: 1px;
  padding: 1px 6px;
  border: 1px solid var(--mu-rule-strong);
  border-radius: 2px;
  color: var(--mu-ink-3);
}
.mu-row-source.src-netease { border-color: #b42e2e; color: #b42e2e; }
.mu-row-source.src-tencent { border-color: #1f8a54; color: #1f8a54; }
.mu-row-source.src-kuwo    { border-color: #a8660f; color: #a8660f; }
.mu-row-source.src-kugou   { border-color: #1f5fbf; color: #1f5fbf; }
.mu-row-source.src-migu    { border-color: #a62658; color: #a62658; }

.mu-row-artist,
.mu-row-album {
  font-size: 12px;
  color: var(--mu-ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 12px;
}
.mu-row-dur {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 11px;
  color: var(--mu-ink-4);
  letter-spacing: 0.5px;
}
.mu-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.2s;
}
.mu-row:hover .mu-row-actions { opacity: 1; }
.mu-row-act {
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 13px;
  color: var(--mu-ink-3);
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mu-row-act:hover {
  background: rgba(196, 59, 59, 0.12);
  color: var(--mu-accent);
}

/* ─────────────── QUEUE DRAWER ─────────────── */

.mu-queue {
  position: absolute;
  right: 0;
  top: 64px;
  bottom: 72px;
  width: 320px;
  max-width: 92vw;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-left: 1px solid var(--mu-rule-strong);
  box-shadow: -20px 0 40px -20px rgba(0, 0, 0, 0.1);
  transform: translateX(100%);
  transition: transform 0.45s cubic-bezier(0.65, 0, 0.35, 1);
  z-index: 5;
  display: flex;
  flex-direction: column;
}
.mu-queue.visible { transform: translateX(0); }
.mu-queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--mu-rule);
  flex-shrink: 0;
}
.mu-queue-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 500;
}
.mu-queue-count {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--mu-ink-4);
  margin-left: 8px;
}
.mu-queue-clear {
  padding: 4px 10px;
  background: none;
  border: 1px solid var(--mu-rule-strong);
  border-radius: 12px;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--mu-ink-3);
  cursor: pointer;
}
.mu-queue-clear:hover { border-color: var(--mu-accent); color: var(--mu-accent); }
.mu-queue-list {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 8px 0;
}
.mu-queue-empty {
  padding: 40px 20px;
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  color: var(--mu-ink-4);
  font-size: 14px;
}
.mu-queue-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px;
  cursor: pointer;
  transition: background 0.2s;
  position: relative;
}
.mu-queue-item:hover { background: var(--mu-hover); }
.mu-queue-item.playing .mu-queue-item-title { color: var(--mu-accent); }
.mu-queue-item-info {
  flex: 1 1 0;
  min-width: 0;
}
.mu-queue-item-title {
  font-size: 12px;
  color: var(--mu-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s;
}
.mu-queue-item-sub {
  font-size: 10px;
  color: var(--mu-ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.mu-queue-item-remove {
  width: 22px; height: 22px;
  border: none;
  background: none;
  border-radius: 50%;
  color: var(--mu-ink-4);
  font-size: 14px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s, color 0.2s;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.mu-queue-item:hover .mu-queue-item-remove { opacity: 1; }
.mu-queue-item-remove:hover {
  background: rgba(196, 59, 59, 0.12);
  color: var(--mu-accent);
}

/* ─────────────── BOTTOM PLAYER ─────────────── */

.mu-player {
  flex: 0 0 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr) minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 0 22px;
  background: var(--mu-player-bg);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--mu-rule);
  position: relative;
  z-index: 5;
}

.mu-player-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.mu-player-cover {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 4px;
  background: #222;
  object-fit: cover;
  display: block;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.mu-player-cover:not([src]), .mu-player-cover[src=""] {
  background: linear-gradient(135deg, #ddd, #b8b8b8);
}
.mu-player-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mu-player-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--mu-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mu-player-artist {
  font-size: 11px;
  color: var(--mu-ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mu-player-empty .mu-player-title { color: var(--mu-ink-4); font-style: italic; font-weight: 400; }
.mu-player-empty .mu-player-cover { opacity: 0.3; }

.mu-player-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.mu-player-ctrls {
  display: flex;
  align-items: center;
  gap: 16px;
}
.mu-ctrl-btn {
  width: 32px; height: 32px;
  border: none;
  background: none;
  color: var(--mu-ink-2);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: color 0.2s, background 0.2s, transform 0.15s;
  padding: 0;
}
.mu-ctrl-btn:hover { color: var(--mu-accent); }
.mu-ctrl-btn:active { transform: scale(0.92); }
.mu-ctrl-btn.play {
  width: 40px; height: 40px;
  background: var(--mu-ink);
  color: #fff;
  font-size: 14px;
}
.mu-ctrl-btn.play:hover {
  background: var(--mu-accent);
  color: #fff;
}
.mu-ctrl-btn[disabled],
.mu-icon-btn[disabled] {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.mu-player-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 520px;
}
.mu-time {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 10px;
  color: var(--mu-ink-4);
  letter-spacing: 0.5px;
  min-width: 36px;
  text-align: center;
}
.mu-progress {
  flex: 1 1 auto;
  height: 4px;
  background: rgba(26, 26, 26, 0.08);
  border-radius: 2px;
  position: relative;
  cursor: pointer;
  transition: height 0.2s;
}
.mu-progress:hover { height: 6px; }
.mu-progress-fill {
  position: absolute;
  left: 0; top: 0;
  height: 100%;
  width: 0%;
  background: var(--mu-accent);
  border-radius: 2px;
  transition: width 0.15s linear;
}
.mu-progress-buf {
  position: absolute;
  left: 0; top: 0;
  height: 100%;
  width: 0%;
  background: rgba(26, 26, 26, 0.12);
  border-radius: 2px;
}
.mu-progress-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--mu-accent);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  box-shadow: 0 0 0 3px rgba(196, 59, 59, 0.15);
}
.mu-progress:hover .mu-progress-thumb { opacity: 1; }

.mu-player-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}
.mu-icon-btn {
  width: 32px; height: 32px;
  border: none;
  background: none;
  color: var(--mu-ink-3);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: color 0.2s, background 0.2s;
}
.mu-icon-btn:hover { color: var(--mu-accent); }
.mu-icon-btn.active { color: var(--mu-accent); }

.mu-volume-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px;
}
.mu-volume {
  width: 80px;
  height: 4px;
  background: rgba(26, 26, 26, 0.08);
  border-radius: 2px;
  position: relative;
  cursor: pointer;
}
.mu-volume-fill {
  position: absolute;
  left: 0; top: 0;
  height: 100%;
  width: 70%;
  background: var(--mu-ink-2);
  border-radius: 2px;
}

/* ── loop mode glyph rotations ── */
.mu-loop-glyph { display: inline-block; }

/* ─────────────── BACK BUTTON ─────────────── */
#music .back-btn { position: absolute; top: 11px; left: 20px; z-index: 20; width: 40px; height: 40px; }
#music .back-btn::after { background: var(--mu-bg); }

/* ─────────────── ANIMATIONS ─────────────── */
@keyframes muSpin {
  to { transform: rotate(360deg); }
}
@keyframes muFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.mu-row { animation: muFadeIn 0.32s ease both; }
/* Stagger first 12 rows; rows beyond that fade in together — any
   more than a handful of staggered entries is noise */
.mu-row:nth-child(1)  { animation-delay: 0.015s; }
.mu-row:nth-child(2)  { animation-delay: 0.030s; }
.mu-row:nth-child(3)  { animation-delay: 0.045s; }
.mu-row:nth-child(4)  { animation-delay: 0.060s; }
.mu-row:nth-child(5)  { animation-delay: 0.075s; }
.mu-row:nth-child(6)  { animation-delay: 0.090s; }
.mu-row:nth-child(7)  { animation-delay: 0.105s; }
.mu-row:nth-child(8)  { animation-delay: 0.120s; }
.mu-row:nth-child(9)  { animation-delay: 0.135s; }
.mu-row:nth-child(10) { animation-delay: 0.150s; }
.mu-row:nth-child(11) { animation-delay: 0.165s; }
.mu-row:nth-child(12) { animation-delay: 0.180s; }

/* ─────────────── TOAST ─────────────── */
.mu-toast {
  position: fixed;
  left: 50%;
  top: 86px;
  transform: translateX(-50%) translateY(-6px);
  padding: 10px 20px;
  background: rgba(26, 26, 26, 0.92);
  color: #fff;
  border-radius: 22px;
  font-family: 'Chakra Petch', 'PingFang SC', sans-serif;
  font-size: 12px;
  letter-spacing: 1px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 2000;
}
.mu-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ─────────────── RESPONSIVE ─────────────── */

/* On medium desktop (900-1279px) there isn't quite enough room to
   comfortably show the Album column alongside Artist + Duration +
   Actions. Hide it and tighten the grid. */
@media (min-width: 901px) and (max-width: 1279px) {
  .mu-results-header,
  .mu-row {
    grid-template-columns: 40px minmax(0, 1fr) 140px 60px 96px;
  }
  .mu-row-album,
  .mu-results-header > span:nth-child(4) { display: none; }
  .mu-main { grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .mu-main { grid-template-columns: 1fr; }
  .mu-side {
    flex-direction: row;
    padding: 14px 16px;
    gap: 14px;
    border-right: none;
    border-bottom: 1px solid var(--mu-rule);
    flex: 0 0 auto;
  }
  .mu-cover-frame { max-width: 72px; margin-bottom: 0; }
  .mu-cover-arm { display: none; }
  .mu-now-title { text-align: left; font-size: 16px; margin-bottom: 2px; }
  .mu-now-meta { text-align: left; margin-bottom: 0; font-size: 10px; }
  .mu-lyrics { display: none; }
  .mu-results-header { display: none; }
  .mu-row {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    padding: 10px 16px;
  }
  .mu-row-playbtn { left: 16px; }
  .mu-row-artist, .mu-row-album, .mu-row-dur { display: none; }
  .mu-row-actions { opacity: 1; }
  .mu-row-cover { width: 42px; height: 42px; }
  .mu-topbar {
    padding: 0 16px 0 72px;
    gap: 12px;
    height: 58px;
    flex-wrap: wrap;
  }
  .mu-title { font-size: 18px; }
  .mu-title-sub { display: none; }
  .mu-search-wrap { min-width: 0; max-width: none; }
  .mu-agg-label { padding: 5px 10px; font-size: 9px; letter-spacing: 1px; }
  .mu-player { grid-template-columns: 1fr auto; gap: 10px; padding: 0 14px; flex: 0 0 64px; }
  .mu-player-bar { display: none; }
  .mu-player-right { gap: 4px; }
  .mu-volume-wrap { display: none; }
  .mu-player-cover { width: 44px; height: 44px; }
  .mu-player-title { font-size: 12px; }
  .mu-player-artist { font-size: 10px; }
  .mu-ctrl-btn { width: 28px; height: 28px; font-size: 14px; }
  .mu-ctrl-btn.play { width: 36px; height: 36px; }
  .mu-queue { top: 58px; bottom: 64px; width: 100%; max-width: 100%; }
  #music .back-btn { top: 8px; left: 16px; width: 38px; height: 38px; }
}

@media (max-width: 520px) {
  .mu-topbar { height: auto; padding: 10px 14px 10px 60px; flex-wrap: wrap; gap: 8px; }
  .mu-title-wrap { order: 1; }
  .mu-agg-label { order: 2; margin-left: auto; padding: 4px 8px; font-size: 8px; letter-spacing: 0.8px; }
  .mu-search-wrap { order: 3; width: 100%; flex-basis: 100%; }
  .mu-search-input { height: 34px; font-size: 12px; padding-left: 34px; }
  .mu-title { font-size: 16px; letter-spacing: 1px; }
  .mu-row-cover { width: 38px; height: 38px; }
  .mu-row-title { font-size: 12px; }
  .mu-row-source { font-size: 8px; padding: 1px 4px; letter-spacing: 0.5px; }
  #music .back-btn { top: 8px; left: 12px; width: 36px; height: 36px; }
}
