/* ==========================================================================
   Músicas — player com vinil e playlist (prefixo .mu-)
   ========================================================================== */

.mu-cabecalho { max-width: 720px; }

/* ---------- Player ---------- */
.mu-player {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding: clamp(20px, 4vw, 44px);
  background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) + 6px);
  box-shadow: var(--shadow-lg);
}
.mu-fundo {
  position: absolute; inset: -80px; z-index: -1; pointer-events: none;
  background: var(--mu-capa, none) center / cover no-repeat;
  filter: blur(70px) saturate(1.5); opacity: .28; transition: background-image .4s;
}
.mu-fundo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 30%, var(--surface) 90%); }

.mu-palco { display: flex; flex-direction: column; align-items: center; gap: 18px; min-width: 0; }
.mu-disco-area { position: relative; width: 100%; max-width: 420px; aspect-ratio: 1.22; }
.mu-disco-area[hidden] { display: none; }

.mu-capa {
  position: absolute; left: 0; top: 0; z-index: 2; width: 82%; aspect-ratio: 1;
  border-radius: 6px; overflow: hidden; box-shadow: 0 18px 40px rgba(0, 0, 0, .35), 0 2px 6px rgba(0, 0, 0, .2);
  display: grid; place-items: center; background: var(--bg-alt);
}
.mu-capa img { width: 100%; height: 100%; object-fit: cover; }
.mu-capa img[hidden] { display: none; }
.mu-capa-nota { font-size: 4rem; color: var(--accent); opacity: .5; font-family: var(--font-display); }
.mu-capa img:not([hidden]) + .mu-capa-nota { display: none; }

/* Disco de vinil: desliza para fora da capa e gira enquanto toca */
.mu-vinil {
  position: absolute; z-index: 1; top: 3%; left: 16%; width: 76%; aspect-ratio: 1; border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 34%, rgba(255, 255, 255, .06) 34.5% 35%, transparent 35.5%),
    conic-gradient(from 30deg, rgba(255, 255, 255, .12), transparent 12%, transparent 38%, rgba(255, 255, 255, .1) 50%, transparent 62%, transparent 88%, rgba(255, 255, 255, .12)),
    repeating-radial-gradient(circle, #151412 0 1.5px, #0b0a09 1.5px 3px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .4), inset 0 0 0 2px #050505;
  translate: 0 0;
  transition: translate .7s cubic-bezier(.2, .8, .2, 1);
  animation: mu-girar 3.2s linear infinite; animation-play-state: paused;
}
.mu-vinil-rotulo {
  position: absolute; inset: 31%; border-radius: 50%; overflow: hidden;
  background: linear-gradient(135deg, var(--accent), var(--link));
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .5);
}
.mu-vinil-rotulo img { width: 100%; height: 100%; object-fit: cover; }
.mu-vinil-rotulo::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 12%; height: 12%; translate: -50% -50%;
  border-radius: 50%; background: var(--surface); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .5);
}
.mu.ativo .mu-vinil { translate: 22% 0; }
.mu.tocando .mu-vinil { animation-play-state: running; }
@keyframes mu-girar { to { rotate: 360deg; } }

.mu-embed { width: 100%; max-width: 420px; }
.mu-embed[hidden] { display: none; }
.mu-embed iframe { display: block; width: 100%; border: 0; border-radius: 12px; background: var(--bg-alt); }

/* Vídeo do YouTube: pequeno, mas visível (mínimo 200×200 exigido pelo YouTube) */
.mu-video {
  width: 100%; max-width: 360px; min-height: 200px; aspect-ratio: 16 / 9;
  border-radius: 10px; overflow: hidden; background: #000; box-shadow: var(--shadow);
}
.mu-video[hidden] { display: none; }
.mu-video iframe, .mu-video > div { display: block; width: 100%; height: 100%; min-height: 200px; border: 0; }

/* ---------- Informações e controles ---------- */
.mu-info { min-width: 0; }
.mu-estado { display: flex; align-items: center; gap: 8px; }
.mu.tocando .mu-estado::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  animation: mu-pulso 1.4s ease-in-out infinite;
}
@keyframes mu-pulso { 50% { opacity: .3; transform: scale(.7); } }
.mu-titulo { font-size: clamp(1.7rem, 3.6vw, 2.6rem); margin: 0 0 .2em; overflow-wrap: anywhere; }
.mu-artista { font-size: 1.15rem; font-weight: 600; margin: 0; }
.mu-album { color: var(--muted); margin: 0 0 1rem; font-size: .95rem; }
.mu-album:empty { display: none; }
.mu-comentario {
  margin: 0 0 1.2rem; padding: .2em 0 .2em 1em; border-left: 3px solid var(--accent);
  font-family: var(--font-display); font-style: italic; font-size: 1.08rem; color: var(--text); line-height: 1.5;
}
.mu-comentario[hidden] { display: none; }
.mu-comentario-rotulo {
  display: block; font: 600 .7rem/1.4 var(--font-body); font-style: normal; text-transform: uppercase;
  letter-spacing: .12em; color: var(--muted); margin-bottom: .2em;
}
.mu-aviso {
  font-size: .9rem; background: var(--accent-soft); color: var(--text); padding: 10px 14px;
  border-radius: var(--radius-sm); margin: 0 0 1rem;
}
.mu-aviso a { font-weight: 600; }

.mu-progresso { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.mu-tempo { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 38px; }
.mu-tempo:last-child { text-align: right; }

.mu-player input[type="range"] {
  -webkit-appearance: none; appearance: none; flex: 1; min-width: 0; height: 20px; background: transparent; cursor: pointer;
  --mu-p: 0%;
}
.mu-player input[type="range"]::-webkit-slider-runnable-track {
  height: 5px; border-radius: 999px;
  background: linear-gradient(to right, var(--accent) var(--mu-p), var(--border) var(--mu-p));
}
.mu-player input[type="range"]::-moz-range-track { height: 5px; border-radius: 999px; background: var(--border); }
.mu-player input[type="range"]::-moz-range-progress { height: 5px; border-radius: 999px; background: var(--accent); }
.mu-player input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 15px; height: 15px; margin-top: -5px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--accent); box-shadow: var(--shadow);
}
.mu-player input[type="range"]::-moz-range-thumb {
  width: 11px; height: 11px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent);
}
.mu-player input[type="range"]:disabled { opacity: .4; cursor: default; }

.mu-controles { display: flex; align-items: center; justify-content: center; gap: clamp(6px, 2vw, 18px); margin-bottom: 14px; }
.mu-botao {
  position: relative; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: none; border: 0; color: var(--text); cursor: pointer; transition: background .15s, color .15s, transform .15s;
}
.mu-botao svg { width: 24px; height: 24px; }
.mu-botao:hover { background: var(--bg-alt); }
.mu-botao:disabled { opacity: .35; cursor: default; background: none; }
.mu-alterna { color: var(--muted); }
.mu-alterna[aria-pressed="true"] { color: var(--accent); }
.mu-alterna[aria-pressed="true"]::after {
  content: ""; position: absolute; bottom: 3px; left: 50%; width: 4px; height: 4px; margin-left: -2px;
  border-radius: 50%; background: currentColor;
}
.mu-repetir-um {
  position: absolute; top: 6px; right: 5px; font: 700 .6rem/1 var(--font-body); background: var(--accent); color: var(--accent-text);
  border-radius: 999px; padding: 2px 4px; display: none;
}
#mu-repetir[data-modo="uma"] .mu-repetir-um { display: block; }
.mu-play {
  width: 66px; height: 66px; background: var(--accent); color: var(--accent-text); box-shadow: var(--shadow);
}
.mu-play svg { width: 30px; height: 30px; }
.mu-play:hover { background: var(--accent); transform: scale(1.06); }
.mu-play .mu-ic-pause { display: none; }
.mu.tocando .mu-play .mu-ic-pause { display: block; }
.mu.tocando .mu-play .mu-ic-play { display: none; }
.mu-play.carregando::before {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  border: 3px solid transparent; border-top-color: var(--accent); animation: mu-girar .8s linear infinite;
}

.mu-volume { display: flex; align-items: center; gap: 6px; max-width: 240px; margin: 0 auto; }
.mu-botao-peq { width: 38px; height: 38px; color: var(--muted); }
.mu-botao-peq svg { width: 20px; height: 20px; }
.mu-ic-mudo { display: none; }
#mu-mudo[aria-pressed="true"] .mu-ic-mudo { display: block; }
#mu-mudo[aria-pressed="true"] .mu-ic-som { display: none; }

/* ---------- Playlist ---------- */
.mu-playlist { margin-top: clamp(32px, 5vw, 56px); }
.mu-playlist-topo { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 16px; }
.mu-playlist-topo h2 { margin: 0; }
.mu-playlist-topo h2 small { font: 500 .9rem var(--font-body); color: var(--muted); margin-left: 6px; }
.mu-filtros { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.mu-filtros .filtros { margin: 0; }
.mu-artista-filtro select {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  padding: 6px 30px 6px 14px; border-radius: 999px; font-size: .9rem; cursor: pointer; max-width: 100%;
}

.mu-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mu-lista li[hidden] { display: none; }
.mu-faixa {
  width: 100%; display: grid; grid-template-columns: 28px 48px minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: 8px 12px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--text);
  text-align: left; cursor: pointer; transition: background .15s;
}
.mu-faixa:hover { background: var(--bg-alt); }
.mu-faixa.atual { background: var(--accent-soft); }
.mu-faixa-num { display: grid; place-items: center; color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
.mu-faixa-capa { width: 48px; height: 48px; border-radius: 6px; overflow: hidden; box-shadow: var(--shadow); }
.mu-faixa-capa img { width: 100%; height: 100%; object-fit: cover; }
.mu-faixa-texto { min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.mu-faixa-texto strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mu-faixa-texto span { color: var(--muted); font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mu-faixa.atual .mu-faixa-texto strong { color: var(--link); }
.mu-faixa-meta { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.mu-selo {
  font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
  border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; color: var(--muted);
}

/* Equalizador animado na faixa atual */
.mu-eq { display: none; align-items: flex-end; gap: 2px; height: 14px; }
.mu-eq i { display: block; width: 3px; height: 30%; background: var(--accent); border-radius: 1px; }
.mu-faixa.atual .mu-n { display: none; }
.mu-faixa.atual .mu-eq { display: flex; }
.mu.tocando .mu-faixa.atual .mu-eq i { animation: mu-eq .9s ease-in-out infinite; }
.mu.tocando .mu-faixa.atual .mu-eq i:nth-child(2) { animation-delay: -.3s; animation-duration: .7s; }
.mu.tocando .mu-faixa.atual .mu-eq i:nth-child(3) { animation-delay: -.6s; animation-duration: 1.1s; }
@keyframes mu-eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }

.mu-atalhos { color: var(--muted); font-size: .82rem; margin-top: 20px; text-align: center; }
.mu-atalhos kbd {
  font: 600 .75rem var(--font-body); border: 1px solid var(--border); border-bottom-width: 2px;
  border-radius: 5px; padding: 1px 6px; background: var(--surface); color: var(--text);
}

.mu-vazio-disco {
  width: 96px; height: 96px; margin: 0 auto 12px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0 18%, var(--bg-alt) 19% 23%, transparent 24%), repeating-radial-gradient(circle, var(--muted) 0 1px, var(--text) 1px 3px);
  opacity: .8;
}
.mu-vazio h2 { color: var(--text); }

/* ---------- Responsivo ---------- */
@media (max-width: 820px) {
  .mu-player { grid-template-columns: 1fr; }
  .mu-disco-area { max-width: 330px; }
  .mu-info { text-align: center; }
  .mu-estado { justify-content: center; }
  .mu-comentario { text-align: left; }
}
@media (max-width: 480px) {
  .mu-faixa { grid-template-columns: 20px 44px minmax(0, 1fr) auto; gap: 10px; padding: 8px 6px; }
  .mu-faixa-capa { width: 44px; height: 44px; }
  .mu-selo { display: none; }
  .mu-controles { gap: 2px; }
  .mu-atalhos { display: none; }
  .mu-playlist-topo { align-items: flex-start; flex-direction: column; }
}
@media (hover: none) { .mu-atalhos { display: none; } }
.mu-play:disabled { background: var(--bg-alt); color: var(--muted); box-shadow: none; transform: none; opacity: .7; }
