:root {
  --fundo: #0f0f12;
  --painel: #16161b;
  --painel-2: #1f1f26;
  --linha: #2a2a33;
  --texto: #f4f4f6;
  --suave: #a1a1ad;
  --apagado: #6b6b78;
  --cor: #a78bfa;
  --cor-forte: #8b5cf6;
  --cor-texto: #120a24;
  --raio: 10px;
  --player-h: 88px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: #000; color: var(--texto);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input { font: inherit; color: inherit; }
svg { width: 20px; height: 20px; flex-shrink: 0; }
[hidden] { display: none !important; }

/* ---------- estrutura ---------- */
.app {
  height: 100dvh; display: grid; gap: 8px; padding: 8px;
  grid-template: "lateral conteudo" 1fr "player player" var(--player-h) / 300px 1fr;
}
.lateral { grid-area: lateral; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.bloco { background: var(--painel); border-radius: var(--raio); padding: 16px 12px; }
.biblioteca { flex: 1; overflow: auto; }
.conteudo { grid-area: conteudo; background: var(--painel); border-radius: var(--raio); overflow: auto; position: relative; min-width: 0; }
.player { grid-area: player; }
.nav-baixo { display: none; }

.marca { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -.02em; padding: 0 8px 14px; }
.marca img { border-radius: 9px; }
.menu button, .nav-baixo button { display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px 8px; border-radius: 8px; font-weight: 700; color: var(--suave); transition: color .15s; }
.menu button svg { width: 24px; height: 24px; }
.menu button:hover, .menu button.ativo { color: var(--texto); }
.biblioteca h2 { font-size: 15px; margin: 0 8px 10px; color: var(--suave); }
.biblioteca h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--apagado); margin: 18px 8px 6px; }
.item-bib { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px; border-radius: 8px; text-align: left; }
.item-bib:hover, .item-bib.ativo { background: var(--painel-2); }
.item-bib b { display: block; font-weight: 600; }
.item-bib small { color: var(--suave); font-size: 12.5px; }
.mini-capa { width: 46px; height: 46px; border-radius: 6px; display: grid; place-items: center; flex-shrink: 0; overflow: hidden; background: var(--painel-2); }
.mini-capa img { width: 100%; height: 100%; object-fit: cover; }
.mini-capa.redonda { border-radius: 50%; }
.grad1 { background: linear-gradient(135deg, #7c3aed, #db2777); }
.grad2 { background: linear-gradient(135deg, #4338ca, #a78bfa); }

/* ---------- topo e busca ---------- */
.topo { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 12px 20px; background: rgba(22, 22, 27, .85); backdrop-filter: blur(12px); }
.busca { flex: 1; max-width: 420px; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px; border-radius: 999px; background: var(--painel-2); border: 1px solid transparent; color: var(--suave); }
.busca:focus-within { border-color: var(--texto); color: var(--texto); }
.busca input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 15px; }
.btn-icone { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 50%; color: var(--suave); position: relative; transition: color .15s, transform .1s; }
.btn-icone:hover { color: var(--texto); }
.btn-icone:active { transform: scale(.94); }
.btn-icone.on { color: var(--cor); }
.btn-icone.on::after { content: ""; position: absolute; bottom: 3px; width: 4px; height: 4px; border-radius: 50%; background: var(--cor); }
.btn-icone .um { display: none; position: absolute; top: 6px; right: 6px; font: 700 9px/1 system-ui; font-style: normal; background: var(--cor); color: var(--cor-texto); border-radius: 50%; width: 12px; height: 12px; place-items: center; }
.btn-icone.um-on .um { display: grid; }
#btnSair { margin-left: auto; }

/* ---------- cabeçalho da lista ---------- */
.cabeca { display: flex; align-items: flex-end; gap: 24px; padding: 28px 24px 24px; background: linear-gradient(180deg, var(--tom, #4c1d95) 0%, rgba(22, 22, 27, 0) 100%); }
.cabeca .arte { width: 200px; height: 200px; border-radius: 8px; flex-shrink: 0; box-shadow: 0 12px 40px rgba(0, 0, 0, .5); overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; background: var(--painel-2); }
.cabeca .arte.uma { grid-template-columns: 1fr; }
.cabeca .arte.redonda { border-radius: 50%; }
.cabeca .arte img, .cabeca .arte .sem-capa { width: 100%; height: 100%; object-fit: cover; }
.cabeca small.tipo { font-size: 12px; font-weight: 700; }
.cabeca h1 { font-size: clamp(32px, 6vw, 72px); line-height: 1.02; letter-spacing: -.04em; margin: 6px 0 12px; font-weight: 900; }
.cabeca .meta { color: var(--suave); font-size: 14px; }
.acoes { display: flex; align-items: center; gap: 20px; padding: 8px 24px 16px; }
.btn-grande { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--cor); color: var(--cor-texto); box-shadow: 0 8px 24px rgba(139, 92, 246, .35); transition: transform .12s, background .15s; }
.btn-grande:hover { transform: scale(1.05); background: #b9a2fd; }
.btn-grande svg { width: 26px; height: 26px; }
.acoes .btn-icone svg { width: 28px; height: 28px; }

/* ---------- lista de faixas ---------- */
.lista { padding: 0 16px 24px; }
.linha-cab, .faixa { display: grid; grid-template-columns: 40px minmax(0, 1fr) minmax(0, .7fr) 44px 60px; align-items: center; gap: 12px; padding: 0 12px; }
.linha-cab { height: 36px; color: var(--suave); font-size: 12.5px; border-bottom: 1px solid var(--linha); margin-bottom: 8px; position: sticky; top: 68px; background: var(--painel); z-index: 2; }
.linha-cab .dur { text-align: right; }
.faixa { height: 58px; border-radius: 6px; cursor: pointer; color: var(--suave); }
.faixa:hover { background: rgba(255, 255, 255, .07); }
.faixa .n { text-align: center; font-variant-numeric: tabular-nums; }
.faixa .n svg { display: none; width: 16px; height: 16px; color: var(--texto); margin: auto; }
.faixa:hover .n span { display: none; }
.faixa:hover .n svg.ic-play { display: block; }
.faixa .tit { display: flex; align-items: center; gap: 12px; min-width: 0; }
.faixa .tit .mini-capa { width: 40px; height: 40px; border-radius: 4px; }
.faixa .tit div { min-width: 0; }
.faixa .tit b { display: block; color: var(--texto); font-weight: 500; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.faixa .tit small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.faixa .art { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.faixa .art a { color: inherit; text-decoration: none; }
.faixa .art a:hover { color: var(--texto); text-decoration: underline; }
.faixa .dur { text-align: right; font-variant-numeric: tabular-nums; font-size: 13px; }
.faixa .curtir { opacity: 0; width: 32px; height: 32px; }
.faixa .curtir svg { width: 17px; height: 17px; }
.faixa:hover .curtir, .faixa .curtir.on { opacity: 1; }
.faixa.atual .tit b, .faixa.atual .n span { color: var(--cor); }
.faixa.atual.tocando .n span { display: none; }
.faixa.atual.tocando .n .eq { display: flex; }
.faixa.atual.tocando:hover .n .eq { display: none; }
.eq { display: none; gap: 2px; height: 14px; align-items: flex-end; justify-content: center; }
.eq i { width: 3px; background: var(--cor); border-radius: 1px; animation: eq .9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.3s; } .eq i:nth-child(3) { animation-delay: -.6s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 14px; } }
.sem-capa { display: grid; place-items: center; font-weight: 800; color: rgba(255, 255, 255, .9); font-size: 15px; }
.vazio { padding: 48px 24px; text-align: center; color: var(--suave); }
.vazio b { display: block; color: var(--texto); font-size: 18px; margin-bottom: 6px; }

/* grade de artistas (busca) */
.secao { padding: 8px 24px 24px; }
.secao h2 { font-size: 22px; margin: 16px 0 14px; letter-spacing: -.02em; }
.grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.cartao { padding: 12px; border-radius: 8px; background: rgba(255, 255, 255, .03); text-align: left; transition: background .15s; }
.cartao:hover { background: rgba(255, 255, 255, .08); }
.cartao .mini-capa { width: 100%; height: auto; aspect-ratio: 1; margin-bottom: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); font-size: 34px; }
.cartao b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cartao small { color: var(--suave); }

/* ---------- barra do player ---------- */
.player { display: grid; grid-template-columns: minmax(180px, 30%) 1fr minmax(160px, 30%); align-items: center; gap: 16px; padding: 0 12px; position: relative; }
.tocando { display: flex; align-items: center; gap: 12px; min-width: 0; }
.capa-p { width: 56px; height: 56px; border-radius: 6px; overflow: hidden; flex-shrink: 0; background: var(--painel-2); }
.capa-p img, .capa-p .sem-capa { width: 100%; height: 100%; object-fit: cover; }
.info-p { min-width: 0; }
.info-p b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.info-p small { display: block; color: var(--suave); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.curtir.on { color: var(--cor); }
.controles { display: flex; flex-direction: column; align-items: center; gap: 4px; max-width: 720px; width: 100%; justify-self: center; }
.botoes { display: flex; align-items: center; gap: 12px; }
.btn-play { width: 40px; height: 40px; border-radius: 50%; background: var(--texto); color: #000; display: grid; place-items: center; transition: transform .1s; }
.btn-play:hover { transform: scale(1.06); }
.btn-play svg { width: 18px; height: 18px; }
.progresso { display: flex; align-items: center; gap: 8px; width: 100%; font-size: 12px; color: var(--suave); font-variant-numeric: tabular-nums; }
.progresso span { width: 42px; text-align: center; }
.volume { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.volume input { width: 110px; }
.mini-progresso { display: none; }

/* barras deslizantes */
input[type=range] { -webkit-appearance: none; appearance: none; flex: 1; height: 16px; background: transparent; cursor: pointer; --p: 0%; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--texto) var(--p), #4d4d57 var(--p)); }
input[type=range]::-moz-range-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--texto) var(--p), #4d4d57 var(--p)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -4px; border-radius: 50%; background: #fff; opacity: 0; transition: opacity .1s; }
input[type=range]::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; opacity: 0; }
input[type=range]:hover::-webkit-slider-runnable-track { background: linear-gradient(to right, var(--cor) var(--p), #4d4d57 var(--p)); }
input[type=range]:hover::-webkit-slider-thumb, input[type=range]:focus-visible::-webkit-slider-thumb { opacity: 1; }
input[type=range]:hover::-moz-range-thumb { opacity: 1; }

/* ---------- tela cheia (celular) ---------- */
.tela-cheia { position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; gap: 20px; padding: max(16px, env(safe-area-inset-top)) 24px max(28px, env(safe-area-inset-bottom)); background: var(--fundo); overflow: hidden; animation: subir .25s ease-out; }
@keyframes subir { from { transform: translateY(40px); opacity: 0; } }
.tc-fundo { position: absolute; inset: -40px; background: var(--tom, #4c1d95); filter: blur(60px); opacity: .55; z-index: -1; }
.tela-cheia header { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.tela-cheia header svg { width: 28px; height: 28px; }
.tc-capa { width: 100%; max-width: 420px; aspect-ratio: 1; margin: auto auto 8px; border-radius: 10px; overflow: hidden; box-shadow: 0 20px 60px rgba(0, 0, 0, .55); background: var(--painel-2); }
.tc-capa img, .tc-capa .sem-capa { width: 100%; height: 100%; object-fit: cover; font-size: 72px; }
.tc-info { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 420px; margin: 0 auto; }
.tc-info div { flex: 1; min-width: 0; }
.tc-info b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-info small { display: block; color: var(--suave); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-info .btn-icone svg { width: 26px; height: 26px; }
.tela-cheia .progresso { flex-direction: column; max-width: 420px; margin: 0 auto; gap: 2px; }
.tela-cheia .progresso input { width: 100%; }
.tela-cheia .progresso input::-webkit-slider-thumb { opacity: 1; }
.tempos { display: flex; justify-content: space-between; width: 100%; }
.botoes.grandes { justify-content: space-between; width: 100%; max-width: 420px; margin: 0 auto; }
.botoes.grandes .btn-icone svg { width: 30px; height: 30px; }
.botoes.grandes .btn-play { width: 68px; height: 68px; }
.botoes.grandes .btn-play svg { width: 30px; height: 30px; }

/* ---------- aviso ---------- */
.aviso { position: fixed; left: 50%; bottom: calc(var(--player-h) + 24px); transform: translate(-50%, 20px); background: var(--texto); color: #000; padding: 10px 16px; border-radius: 8px; font-weight: 600; opacity: 0; pointer-events: none; transition: .2s; z-index: 40; max-width: calc(100% - 32px); }
.aviso.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- tela de entrar ---------- */
.pagina-entrar { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(circle at 30% 0%, #3b1d7a 0%, #000 60%); }
.caixa-entrar { width: 100%; max-width: 380px; background: rgba(22, 22, 27, .92); border: 1px solid var(--linha); border-radius: 16px; padding: 32px 28px; }
.caixa-entrar .marca { padding: 0 0 24px; }
.caixa-entrar h1 { margin: 0 0 6px; font-size: 26px; letter-spacing: -.02em; }
.caixa-entrar .sub { margin: 0 0 22px; color: var(--suave); }
.caixa-entrar label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 14px; }
.caixa-entrar input { display: block; width: 100%; margin-top: 6px; height: 46px; padding: 0 14px; border-radius: 8px; border: 1px solid #3f3f4a; background: #101014; outline: 0; font-size: 16px; }
.caixa-entrar input:focus { border-color: var(--cor); }
.btn-principal { width: 100%; height: 48px; border-radius: 999px; background: var(--cor); color: var(--cor-texto); font-weight: 800; font-size: 15px; margin-top: 6px; }
.btn-principal:disabled { opacity: .6; }
.erro { color: #fca5a5; min-height: 20px; margin: 12px 0 0; font-size: 13px; }

/* ---------- celular ---------- */
@media (max-width: 820px) {
  :root { --player-h: 64px; }
  .app { padding: 0; gap: 0; grid-template: "conteudo" 1fr "player" auto "nav" auto / 1fr; }
  .lateral, .volume, .controles, .linha-cab, .faixa .art, #pCurtir { display: none; }
  .conteudo { border-radius: 0; background: var(--fundo); }
  .topo { padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); background: rgba(15, 15, 18, .9); }
  .busca { max-width: none; height: 42px; }
  .cabeca { flex-direction: column; align-items: center; text-align: center; gap: 16px; padding: 16px 16px 12px; }
  .cabeca .arte { width: 190px; height: 190px; }
  .cabeca h1 { font-size: 30px; margin: 4px 0 6px; }
  .acoes { padding: 4px 16px 8px; }
  .lista { padding: 0 6px 16px; }
  .faixa { grid-template-columns: minmax(0, 1fr) 36px 44px; padding: 0 10px; height: 60px; }
  .faixa .n { display: none; }
  .faixa .curtir { opacity: 1; }
  .faixa.atual.tocando .tit b::before { content: "▶ "; font-size: 11px; }
  .secao { padding: 8px 16px 16px; }
  .player { margin: 0 8px 6px; height: 60px; padding: 0 6px 0 8px; grid-template-columns: 1fr auto; gap: 8px; border-radius: 8px; background: var(--tom-escuro, #2e1065); overflow: hidden; }
  .capa-p { width: 44px; height: 44px; border-radius: 4px; }
  .player .mini-botoes { display: flex !important; }
  .mini-progresso { display: block; position: absolute; left: 8px; right: 8px; bottom: 0; height: 2px; background: rgba(255, 255, 255, .2); border-radius: 2px; }
  .mini-progresso i { display: block; height: 100%; width: 0; background: #fff; border-radius: 2px; }
  .nav-baixo { grid-area: nav; display: flex; justify-content: space-around; padding: 6px 0 max(8px, env(safe-area-inset-bottom)); background: linear-gradient(transparent, #000 40%); }
  .nav-baixo button { flex-direction: column; gap: 3px; width: auto; padding: 4px 18px; font-size: 11px; font-weight: 600; }
  .nav-baixo button svg { width: 24px; height: 24px; }
  .nav-baixo button.ativo { color: var(--texto); }
  .aviso { bottom: 150px; }
}
.mini-botoes { display: none; align-items: center; }
.mini-botoes .btn-icone { color: var(--texto); }
.mini-botoes svg { width: 24px; height: 24px; }

/* ---------- conta e pessoas ---------- */
.pagina { max-width: 680px; }
.titulo-pag { font-size: 32px; letter-spacing: -.03em; margin: 12px 0 16px; font-weight: 900; }
.cartao-form { background: rgba(255, 255, 255, .04); border: 1px solid var(--linha); border-radius: 12px; padding: 18px; margin-bottom: 14px; }
.cartao-form h2 { font-size: 17px; margin: 0 0 14px; }
.cartao-form label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 12px; color: var(--suave); }
.cartao-form input, .linha-form input { display: block; width: 100%; margin-top: 6px; height: 44px; padding: 0 14px; border-radius: 8px; border: 1px solid #3f3f4a; background: #101014; outline: 0; font-size: 16px; color: var(--texto); }
.cartao-form input:focus { border-color: var(--cor); }
.linha-form { display: flex; gap: 10px; align-items: center; }
.linha-form input { margin: 0; flex: 1; min-width: 0; }
.linha-form .btn-principal { width: auto; padding: 0 22px; margin: 0; height: 44px; }
.ajuda { color: var(--suave); font-size: 13px; margin: 8px 0 14px; }
.ajuda.alerta { color: #fcd34d; }
.dica { color: var(--apagado); font-size: 12.5px; margin: 14px 0 0; text-align: center; }
.btn-sec { display: flex; align-items: center; gap: 10px; width: 100%; padding: 14px 16px; border-radius: 10px; background: rgba(255, 255, 255, .04); border: 1px solid var(--linha); font-weight: 600; margin-bottom: 10px; }
.btn-sec:hover { background: rgba(255, 255, 255, .08); }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 18px; flex-shrink: 0; color: #fff; }
.pessoa-topo { display: flex; align-items: center; gap: 14px; }
.pessoa-topo b { display: block; font-size: 17px; }
.pessoa-topo small, .pessoa-info small { color: var(--suave); font-size: 12.5px; }
.lista-pessoas { display: flex; flex-direction: column; gap: 8px; }
.pessoa { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px; border-radius: 10px; background: rgba(255, 255, 255, .03); }
.pessoa-info { flex: 1; min-width: 0; }
.pessoa-info b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pessoa-info b small { color: var(--apagado); font-weight: 500; }
.pessoa-acoes { display: flex; gap: 6px; }
.btn-mini { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid #3f3f4a; font-size: 13px; font-weight: 600; color: var(--texto); text-decoration: none; background: transparent; }
.btn-mini svg { width: 16px; height: 16px; }
.btn-mini:hover { border-color: var(--texto); }
.btn-mini.perigo:hover { border-color: #f87171; color: #f87171; }
.btn-mini.zap { background: #16a34a; border-color: #16a34a; color: #fff; }
.caixa-link { flex-basis: 100%; background: #101014; border: 1px dashed var(--cor); border-radius: 10px; padding: 12px; }
.caixa-link small { color: var(--suave); }
.caixa-link input { display: block; width: 100%; margin: 6px 0 10px; height: 38px; padding: 0 10px; border-radius: 6px; border: 1px solid #3f3f4a; background: #0b0b0e; color: var(--cor); font: 13px ui-monospace, Consolas, monospace; }
.caixa-link-botoes { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 820px) {
  .titulo-pag { font-size: 26px; }
  .pessoa-acoes .btn-mini span { display: none; }
  .nav-baixo button { padding: 4px 10px; }
}
.opcoes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opcao { text-align: left; padding: 14px; border-radius: 10px; border: 1px solid #3f3f4a; background: transparent; }
.opcao b { display: block; font-size: 15px; margin-bottom: 4px; }
.opcao small { color: var(--suave); font-size: 12.5px; line-height: 1.35; }
.opcao.on { border-color: var(--cor); background: rgba(167, 139, 250, .1); }
.opcao.on b { color: var(--cor); }
@media (max-width: 480px) { .opcoes { grid-template-columns: 1fr; } }
