/* Player público da rádio (página /player/<mount> e incorporação em sites). Sempre escuro. */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Roboto", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color: #fff; background: #0b1017; -webkit-font-smoothing: antialiased;
}
button { font: inherit; }

.pl-pagina { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px 16px; }
.pl-pagina.embed { padding: 0; min-height: 0; height: 100%; background: transparent; }
body.embed { background: transparent; }

/* ------------------------------------------------------------------ cartão */
.pl {
  position: relative; width: 100%; max-width: 640px; aspect-ratio: 16 / 11; min-height: 380px;
  border-radius: 14px; overflow: hidden; isolation: isolate;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
  display: grid; grid-template-rows: auto 1fr auto; padding: 18px 20px;
}
.pl-pagina.embed .pl { max-width: none; height: 100%; aspect-ratio: auto; min-height: 0; border-radius: 10px; box-shadow: none; }

.pl-fundo {
  position: absolute; inset: -40px; z-index: -2;
  background: radial-gradient(90% 80% at 25% 15%, #2c5aa0 0%, #14243c 55%, #0a111b 100%);
  background-size: cover; background-position: center;
  transition: opacity .6s;
}
.pl-fundo.com-capa { filter: blur(26px) saturate(1.25) brightness(.72); transform: scale(1.12); }
.pl-veu {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, .12) 38%, rgba(0, 0, 0, .18) 62%, rgba(0, 0, 0, .78) 100%);
}

/* topo */
.pl-topo { display: flex; align-items: flex-start; gap: 12px; }
.pl-titulos { min-width: 0; flex: 1; }
.pl-radio { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.2; text-shadow: 0 1px 6px rgba(0, 0, 0, .4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-ouvintes { font-size: 13px; color: rgba(255, 255, 255, .78); margin-top: 3px; display: flex; align-items: center; gap: 6px; }
.pl-status {
  flex: none; font-size: 11px; font-weight: 800; letter-spacing: .12em; padding: 5px 9px; border-radius: 4px;
  background: rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .7); display: inline-flex; align-items: center; gap: 7px;
}
.pl-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pl.no-ar .pl-status { background: #e0382f; color: #fff; box-shadow: 0 0 18px rgba(255, 70, 60, .5); }
.pl.no-ar .pl-status::before { animation: pl-pulso 1.6s ease-in-out infinite; }
@keyframes pl-pulso { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.pl-icone {
  flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  color: #fff; background: rgba(255, 255, 255, .12); backdrop-filter: blur(6px);
}
.pl-icone:hover { background: rgba(255, 255, 255, .24); }

/* centro: capa + música */
.pl-centro { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; min-height: 0; padding: 8px 0; }
.pl-capa {
  width: clamp(76px, min(34%, 38vh), 190px); aspect-ratio: 1; border-radius: 10px; overflow: hidden; flex: none;
  display: grid; place-items: center; background: linear-gradient(135deg, #3d8bfd, #1c4fa8);
  box-shadow: 0 14px 36px rgba(0, 0, 0, .5); position: relative;
}
.pl-capa img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pl-capa.logo { background: rgba(255, 255, 255, .95); }
.pl-capa.logo img { object-fit: contain; }
.pl-logo { flex: none; width: 40px; height: 40px; border-radius: 9px; overflow: hidden; background: rgba(255, 255, 255, .95); box-shadow: 0 4px 12px rgba(0, 0, 0, .3); }
.pl-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pl-capa svg { width: 42%; height: 42%; opacity: .9; }
.pl-musica { font-size: 22px; font-weight: 600; line-height: 1.2; max-width: 92%; text-shadow: 0 2px 10px rgba(0, 0, 0, .5);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pl-artista { font-size: 14px; color: rgba(255, 255, 255, .78); max-width: 92%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* rodapé: controles + formatos */
.pl-rodape { display: flex; align-items: center; gap: 12px; }
.pl-play {
  width: 58px; height: 58px; border-radius: 50%; border: 0; cursor: pointer; flex: none; display: grid; place-items: center;
  background: #fff; color: #10161f; box-shadow: 0 8px 24px rgba(0, 0, 0, .45); transition: transform .12s;
}
.pl-play:hover { transform: scale(1.05); }
.pl-play[disabled] { background: rgba(255, 255, 255, .35); cursor: not-allowed; transform: none; }
.pl-play svg { width: 24px; height: 24px; }
.pl-volume { display: flex; align-items: center; gap: 6px; }
.pl-volume input[type=range] { width: 90px; accent-color: #fff; cursor: pointer; }
.pl-eq { display: none; align-items: flex-end; gap: 2px; height: 14px; }
.pl-eq i { width: 3px; background: #fff; border-radius: 1px; animation: pl-eq 1s ease-in-out infinite; }
.pl-eq i:nth-child(2) { animation-duration: .7s; } .pl-eq i:nth-child(3) { animation-duration: 1.2s; } .pl-eq i:nth-child(4) { animation-duration: .85s; }
@keyframes pl-eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }
.pl.tocando .pl-eq { display: inline-flex; }
.pl-formatos { margin-left: auto; display: flex; gap: 6px; }
.pl-qualidade { display: inline-flex; border-radius: 7px; overflow: hidden; background: rgba(255, 255, 255, .13); backdrop-filter: blur(6px); margin-left: auto; }
.pl-qualidade + .pl-formatos { margin-left: 0; }
.pl-qualidade button { border: 0; background: none; color: rgba(255, 255, 255, .78); font-size: 11px; font-weight: 700; letter-spacing: .03em; padding: 6px 9px; cursor: pointer; }
.pl-qualidade button.ativo { background: #fff; color: #10161f; }
.pl-qualidade button[disabled] { opacity: .4; cursor: not-allowed; }
.pl-formatos a {
  font-size: 11px; font-weight: 700; letter-spacing: .04em; color: #fff; text-decoration: none; padding: 6px 8px; border-radius: 6px;
  background: rgba(255, 255, 255, .13); backdrop-filter: blur(6px);
}
.pl-formatos a:hover { background: rgba(255, 255, 255, .26); }

/* painel de links / compartilhar */
.pl-links {
  position: absolute; top: 62px; right: 16px; z-index: 3; width: min(300px, calc(100% - 32px));
  background: rgba(14, 20, 28, .94); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 10px; padding: 8px; box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
}
.pl-links button, .pl-links a {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 7px;
  background: none; color: #e6ebf2; font-size: 13.5px; text-decoration: none; cursor: pointer; text-align: left;
}
.pl-links button:hover, .pl-links a:hover { background: rgba(255, 255, 255, .08); }
.pl-links .sep { height: 1px; background: rgba(255, 255, 255, .1); margin: 6px 4px; }
.pl-links .rotulo { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: rgba(255, 255, 255, .5); padding: 6px 10px 2px; }

/* histórico (só na página pública) */
.pl-historico { width: 100%; max-width: 640px; }
.pl-historico h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: rgba(255, 255, 255, .55); margin: 0 0 8px 4px; font-weight: 600; }
.pl-historico ul { list-style: none; margin: 0; padding: 0; border-radius: 12px; overflow: hidden; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .07); }
.pl-historico li { display: flex; align-items: center; gap: 12px; padding: 9px 12px; }
.pl-historico li + li { border-top: 1px solid rgba(255, 255, 255, .06); }
.pl-historico .mini { width: 42px; height: 42px; border-radius: 6px; overflow: hidden; flex: none; display: grid; place-items: center; background: linear-gradient(135deg, #3d8bfd, #1c4fa8); }
.pl-historico .mini img { width: 100%; height: 100%; object-fit: cover; }
.pl-historico .mini svg { width: 18px; height: 18px; }
.pl-historico .txt { min-width: 0; flex: 1; }
.pl-historico .t1 { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-historico .t2 { font-size: 12px; color: rgba(255, 255, 255, .5); }
.pl-credito { font-size: 11px; color: rgba(255, 255, 255, .35); }
.pl-credito a { color: inherit; }

@media (max-width: 520px) {
  .pl { aspect-ratio: auto; min-height: 420px; padding: 16px; }
  .pl-qualidade ~ .pl-formatos { display: none; }
  .pl-musica { font-size: 18px; }
  .pl-volume input[type=range] { display: none; }
  .pl-formatos a:nth-child(n+3) { display: none; }
}
@media (max-height: 260px) {
  .pl-capa { width: 84px; }
  .pl-musica { font-size: 16px; -webkit-line-clamp: 1; }
  .pl-artista { display: none; }
}
.pl[data-mudo-ativo] .com-som, .pl:not([data-mudo-ativo]) .sem-som { display: none; }
