/* ── Layout ──────────────────────────────────────────────────────────────── */
.ms-outer  { max-width: 900px; margin: 30px auto 0; padding: 0 15px; }
.ms-header { font-family: juanalzada, Arial, sans-serif; font-size: 2rem; padding: 20px 0; min-height: 120px; color: var(--text); transition: color .2s; }
.ms-body   { display: flex; align-items: flex-start; }
.ms-nav    { width: 200px; min-width: 200px; padding: 20px 20px 20px 0; flex-shrink: 0; font-family: pixelate, Arial, sans-serif; }
.ms-nav a  { display: block; margin-bottom: 10px; color: var(--accent); text-decoration: none; transition: color .15s; }
.ms-nav a:hover { color: var(--accent-hover); }
.ms-nav-theme {
  background: none; border: 1px solid var(--border); border-radius: 6px;
  cursor: pointer; color: var(--muted); font-family: pixelate, Arial, sans-serif;
  font-size: 0.75rem; padding: 3px 8px; margin-top: 4px;
  display: inline-block; transition: color .15s, border-color .15s; letter-spacing: .05em;
}
.ms-nav-theme:hover { color: var(--text); border-color: var(--accent); }
.ms-content { flex: 1; min-width: 0; padding: 20px 0; }

@media (max-width: 767px) {
  .ms-body  { flex-direction: column; }
  .ms-nav   { width: 100%; min-width: 0; display: flex; flex-wrap: wrap; gap: 0 20px; padding: 10px 0; }
  .ms-nav a { display: inline-block; margin-bottom: 10px; }
}

/* ── Player variables ────────────────────────────────────────────────────── */
:root {
  --mp-head:    #1b1b1f;
  --mp-surface: #ffffff;
  --mp-hover:   rgba(0,0,0,0.04);
  --mp-active:  rgba(106,194,131,0.09);
  --mp-scroll:  rgba(0,0,0,0.15);
  --mp-border:  rgba(0,0,0,0.09);
}
[data-theme="dark"] {
  --mp-surface: #1a1a1a;
  --mp-hover:   rgba(255,255,255,0.03);
  --mp-active:  rgba(106,194,131,0.10);
  --mp-scroll:  rgba(255,255,255,0.12);
  --mp-border:  rgba(255,255,255,0.07);
}

/* ── Player shell ────────────────────────────────────────────────────────── */
.mp      { border-radius: 14px; overflow: hidden; outline: 1px solid var(--mp-border); max-width: 620px; }
.mp-head { background: var(--mp-head); padding: 16px 16px 0; }
.mp-now  { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }

#mp-artwork {
  width: 80px; height: 80px; border-radius: 6px; object-fit: cover;
  display: block; flex-shrink: 0; background: #2a2a2a;
}
.mp-meta       { flex: 1; min-width: 0; }
.mp-meta-title { font-family: pixelate, Arial, sans-serif; font-size: 13px; font-weight: 600; color: #e4e4e0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-meta-sub   { font-size: 11px; color: #777; margin-top: 3px; }
.mp-theme-btn  { background: none; border: none; cursor: pointer; color: #666; font-size: 18px; padding: 4px; border-radius: 50%; line-height: 1; flex-shrink: 0; transition: color .15s; }
.mp-theme-btn:hover { color: #e4e4e0; }

#mp-waveform { display: block; width: 100%; height: 64px; cursor: pointer; }

.mp-controls { display: flex; align-items: center; gap: 8px; padding: 9px 0 13px; }
.mp-time { font-family: monospace; font-size: 11px; color: #777; width: 32px; flex-shrink: 0; white-space: nowrap; }
.mp-time.r { text-align: right; }
.mp-ibtn { background: none; border: none; cursor: pointer; color: #aaa; padding: 5px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: color .1s, background .1s; }
.mp-ibtn:hover { color: #e4e4e0; background: rgba(255,255,255,.07); }
.mp-ibtn i { font-size: 20px; }
.mp-playbtn { background: var(--accent); border: none; cursor: pointer; color: #fff; width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background .15s; }
.mp-playbtn:hover { background: var(--accent-hover); }
.mp-playbtn i { font-size: 18px; }
.mp-vol     { flex: 1; max-width: 75px; accent-color: var(--accent); cursor: pointer; flex-shrink: 0; }
.mp-vol-ico { font-size: 15px; color: #666; flex-shrink: 0; }

/* ── Track list ──────────────────────────────────────────────────────────── */
.mp-list { background: var(--mp-surface); max-height: 380px; overflow-y: auto; transition: background .2s; }
.mp-list::-webkit-scrollbar { width: 3px; }
.mp-list::-webkit-scrollbar-thumb { background: var(--mp-scroll); border-radius: 99px; }

.mp-row { display: flex; align-items: center; gap: 10px; padding: 9px 14px; cursor: pointer; border-bottom: 1px solid var(--mp-border); transition: background .1s; outline: none; user-select: none; }
.mp-row:last-child { border-bottom: none; }
.mp-row:hover { background: var(--mp-hover); }
.mp-row.on { background: var(--mp-active); border-left: 3px solid var(--accent); padding-left: 11px; }
.mp-row:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }

.mp-rnum  { font-size: 11px; color: var(--muted); min-width: 16px; text-align: right; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.mp-row.on .mp-rnum { color: var(--accent); }
.mp-rart  { width: 36px; height: 36px; border-radius: 4px; object-fit: cover; flex-shrink: 0; }
.mp-rname { flex: 1; font-family: pixelate, Arial, sans-serif; font-size: 12px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-row.on .mp-rname { color: var(--accent); font-weight: 500; }
.mp-rgenre { font-size: 11px; color: var(--muted); background: var(--mp-hover); border: 1px solid var(--mp-border); border-radius: 4px; padding: 1px 6px; white-space: nowrap; flex-shrink: 0; }
.mp-rdur   { font-family: monospace; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; flex-shrink: 0; min-width: 30px; text-align: right; }

.mp-eqbars { display: flex; align-items: flex-end; gap: 2px; height: 14px; flex-shrink: 0; width: 18px; }
.mp-eqbar  { width: 3px; background: var(--accent); border-radius: 2px; animation: mpeq .7s ease-in-out infinite alternate; }
.mp-eqbar:nth-child(1) { height: 6px;  animation-delay: 0s;   }
.mp-eqbar:nth-child(2) { height: 10px; animation-delay: .15s; }
.mp-eqbar:nth-child(3) { height: 7px;  animation-delay: .3s;  }
.mp-eqbars.paused .mp-eqbar { animation-play-state: paused; }
@keyframes mpeq { from { transform: scaleY(.4); } to { transform: scaleY(1.6); } }

.mp-empty { padding: 2.5rem; text-align: center; font-size: .875rem; color: var(--muted); background: var(--mp-surface); }

@media screen and (min-width: 900px) {
  .ms-header { min-height: 200px; padding: 20px 0; }
}
