/* ══════════════════════════════════════════════════════════════════
   Playlister — CSS
   ══════════════════════════════════════════════════════════════════ */

/* Toast genérico (mensagem temporária que aparece e some sozinha) — usado
   pelo Player em qualquer página (ex.: "Adicionar à Biblioteca", arrastar
   item pra fila), por isso mora aqui no CSS global, não em inventario.php. */
.inv-player-toast {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #1e1b2e;
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 13px;
    opacity: 0;
    transition: opacity .25s, transform .25s;
    pointer-events: none;
    z-index: 99999;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(0,0,0,.35);
}
.inv-player-toast.vis { opacity: 1; transform: translateX(-50%) translateY(0); }

#playlister {
    font-family: inherit;
}

/* ── Reset base ─────────────────────────────────────────────── */
#playlister * {
    box-sizing: border-box;
    margin: 0; padding: 0;
}
#playlister button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    outline: none;
}
#playlister input[type=range] {
    -webkit-appearance: none; appearance: none;
    outline: none; cursor: pointer;
    height: 4px; border-radius: 99px;
    background: linear-gradient(
        to right,
        #6c5ce7  var(--fill, 0%),
        rgba(255,255,255,.18) var(--fill, 0%)
    );
}
#playlister input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 13px; height: 13px; border-radius: 50%;
    background: #a29bfe;
    box-shadow: 0 0 5px rgba(108,92,231,.7);
    transition: transform .12s;
}
#playlister input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.3); }
#playlister input[type=range]::-moz-range-thumb {
    width: 13px; height: 13px; border-radius: 50%;
    background: #a29bfe; border: none;
}

/* ── YouTube wrapper (sempre fora de vista) */
#pltr-yt-wrap {
    position: fixed;
    top: -9999px; left: -9999px;
    width: 480px; height: 270px;
    z-index: 10500;
    pointer-events: none;
    border-radius: 10px;
    overflow: hidden;
    /* sem transition: drag precisa de resposta imediata */
}
/* No modo edição garante ocultação */
#playlister[data-modo-edicao] #pltr-yt-wrap {
    top: -9999px !important; left: -9999px !important;
    pointer-events: none !important;
}
/* Na biblioteca: oculta o vídeo YT que flutua por cima */
#playlister:has(#pltr-full.modo-biblioteca) #pltr-yt-wrap {
    top: -9999px !important; left: -9999px !important;
    pointer-events: none !important;
}
/* No minimizado: posição inicial no canto inferior direito (acima da barra ~100px + gap) */
#playlister[data-mode="minimized"] #pltr-yt-wrap.yt-ativo {
    top: auto; bottom: 120px;
    left: auto; right: 16px;
    width: 200px; height: 113px;
    pointer-events: auto;
    border: 1px solid rgba(255,255,255,.12);
    box-shadow: 0 8px 32px rgba(0,0,0,.6);
}
/* Embed genérico (Xvideos etc.) flutuante começa maior que o do YT — o
   player deles tem uma thumb de pré-visualização na timeline (ao passar o
   mouse) de tamanho fixo, que num player de 200x113 cobria quase a tela
   toda e tampava o próprio botão de play. Maior, ela ocupa proporção menor. */
#playlister[data-embed="1"][data-mode="minimized"] #pltr-yt-wrap.yt-ativo {
    width: 360px; height: 237px;
}
#pltr-yt-player { width: 100%; height: 100%; }

/* Overlay: bloqueia UI interna do YT (botão gigante/canal/título) */
#pltr-yt-overlay {
    position: absolute; inset: 0; z-index: 1;
    cursor: grab;
    border-radius: inherit;
    background: transparent;
}
#pltr-yt-overlay.arrastando { cursor: grabbing; }

/* ── Embed genérico (sites com embed próprio, ex.: Xvideos) ──────────────
   Mesmo slot/posição do #pltr-yt-wrap (vídeo do YT) — só troca o que fica
   visível dentro dele. Sem overlay por cima: aqui queremos que o mouse
   chegue nos controles do PRÓPRIO site (sem API pra controlar por fora). */
#pltr-embed-iframe {
    display: none;
    width: 100%; height: 100%;
    border: none;
}
#playlister[data-embed="1"] #pltr-embed-iframe { display: block; }
#playlister[data-embed="1"] #pltr-yt-player,
#playlister[data-embed="1"] #pltr-yt-overlay,
#playlister[data-embed="1"] .pltr-yt-fs-btn { display: none !important; }

/* Barrinha de arrastar do embed genérico — só existe (e só é clicável) no
   modo minimizado, igual o drag do vídeo do YT. Fica só na borda de cima
   pra não cobrir os controles do site por baixo. */
#pltr-embed-drag {
    display: none;
    position: absolute; top: 0; left: 0; right: 0; height: 20px; z-index: 2;
    align-items: center; justify-content: center;
    background: linear-gradient(rgba(0,0,0,.55), rgba(0,0,0,0));
    color: rgba(255,255,255,.75); font-size: 13px; line-height: 1;
    cursor: grab;
}
#pltr-embed-drag.arrastando { cursor: grabbing; }
#playlister[data-embed="1"][data-mode="minimized"] #pltr-embed-drag { display: flex; pointer-events: auto; }

/* Mini-barra do embed (Anterior/Fechar/Próxima) — só no minimizado: no
   fullscreen os mesmos botões já existem em .pltr-full-controls, logo
   abaixo do vídeo; aqui é só pro vídeo flutuante ficar com os próprios. */
#playlister[data-embed="1"][data-mode="minimized"] #pltr-embed-iframe { height: calc(100% - 38px); }
#pltr-embed-minibar {
    display: none;
    position: absolute; left: 0; right: 0; bottom: 0; height: 38px; z-index: 3;
    align-items: center; justify-content: center; gap: 22px;
    background: rgba(10,10,20,.92);
    border-top: 1px solid rgba(255,255,255,.08);
    cursor: grab; /* espaço vazio da barra também arrasta — ver JS */
}
#pltr-embed-minibar.arrastando { cursor: grabbing; }
#playlister[data-embed="1"][data-mode="minimized"] #pltr-embed-minibar { display: flex; }
.pltr-embed-mb-btn {
    background: none; border: none; color: rgba(255,255,255,.75);
    font-size: 18px; line-height: 1; cursor: pointer; padding: 7px 12px; border-radius: 7px;
    transition: color .15s, background .15s;
}
.pltr-embed-mb-btn:hover { color: #fff; background: rgba(255,255,255,.14); }
.pltr-embed-mb-x { color: rgba(255,120,120,.85); }
.pltr-embed-mb-x:hover { color: #ff4757; background: rgba(255,71,87,.16); }

/* Escondemos os NOSSOS timeline/volume/play-pause durante um embed genérico
   — sem API de controle, eles não fariam nada, e o site já mostra os dele
   próprios por dentro do iframe. Prev/Next/Repetir/Parar continuam
   funcionando normalmente (só trocam de faixa / param tudo). */
#playlister[data-embed="1"] .pltr-bar-seek-area,
#playlister[data-embed="1"] .pltr-bar-vol,
#playlister[data-embed="1"] .pltr-btn-play,
#playlister[data-embed="1"] .pltr-full-seek-area,
#playlister[data-embed="1"] .pltr-full-vol-area,
#playlister[data-embed="1"] .pltr-ctrl-play { display: none !important; }

/* ── Handles de resize nas quinas do vídeo flutuante ──────────────────── */
.pltr-yt-corner {
    position: absolute;
    width: 22px; height: 22px;
    z-index: 2;
    opacity: 0;
    transition: opacity .18s;
    pointer-events: none;
}
/* Clicáveis no modo minimizado ativo */
#playlister[data-mode="minimized"] #pltr-yt-wrap.yt-ativo .pltr-yt-corner {
    pointer-events: auto;
}
/* Visíveis APENAS ao hover na própria quina, ou durante resize */
#playlister[data-mode="minimized"] #pltr-yt-wrap.yt-ativo .pltr-yt-corner:hover,
#pltr-yt-wrap.resizando .pltr-yt-corner {
    opacity: 1;
}
/* Posicionamento e cursor por canto */
.pltr-yt-corner--tl { top: 0;    left: 0;   cursor: nwse-resize; }
.pltr-yt-corner--tr { top: 0;    right: 0;  cursor: nesw-resize; }
.pltr-yt-corner--bl { bottom: 0; left: 0;   cursor: nesw-resize; }
.pltr-yt-corner--br { bottom: 0; right: 0;  cursor: nwse-resize; }
/* Caractere de quina indicador */
.pltr-yt-corner::after {
    content: '';
    position: absolute;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    color: rgba(162,155,254,.85);
    text-shadow: 0 0 6px rgba(108,92,231,.6);
    transition: transform .15s, color .15s;
}
.pltr-yt-corner--tl::after { content: '┌'; top: 2px;    left: 2px; }
.pltr-yt-corner--tr::after { content: '┐'; top: 2px;    right: 2px; }
.pltr-yt-corner--bl::after { content: '└'; bottom: 2px; left: 2px; }
.pltr-yt-corner--br::after { content: '┘'; bottom: 2px; right: 2px; }
.pltr-yt-corner:hover::after { transform: scale(1.45); color: #a29bfe; }

/* ── Drag-and-drop touch: opacidade no item sendo arrastado */
.ddt-dragging { opacity: 0.35 !important; }

/* ── Erro embed YouTube (vídeo bloqueado / indisponível) */
#pltr-yt-err {
    position: absolute; inset: 0; z-index: 4;
    background: rgba(10,10,20,0.92);
    border-radius: inherit;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 10px; padding: 16px; text-align: center;
}
#pltr-yt-err[hidden] { display: none; }
#pltr-yt-err-msg  { color: #f1f5f9; font-size: 13px; font-weight: 700; line-height: 1.4; }
#pltr-yt-err-link { color: #60a5fa; font-size: 12px; text-decoration: underline; }
#pltr-yt-err-skip { color: #64748b; font-size: 11px; }

/* ── iOS autoplay fallback */
#pltr-yt-tap {
    position: absolute; inset: 0; z-index: 3;
    background: rgba(0,0,0,0.52);
    border: none; border-radius: inherit;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    cursor: pointer; color: #fff; gap: 8px;
}
#pltr-yt-tap[hidden] { display: none; }
#pltr-yt-tap::before {
    content: '▶';
    font-size: 52px; line-height: 1;
    filter: drop-shadow(0 2px 10px rgba(0,0,0,.7));
}
#pltr-yt-tap::after {
    content: 'Toque para reproduzir';
    font-size: 13px; font-weight: 600; opacity: 0.88;
    text-shadow: 0 1px 4px rgba(0,0,0,.6);
}

/* ── Toggle Música / Vídeo ── */
.pltr-yt-toggle-wrap {
    display: none;
    align-items: center;
    gap: 9px;
    margin-bottom: 14px;
}
.pltr-yt-toggle-wrap.yt-ativo { display: flex; }
.pltr-yt-toggle-label {
    font-size: 13px;
    color: rgba(255,255,255,.65);
    user-select: none;
}
#playlister .pltr-yt-toggle {
    position: relative;
    width: 52px; height: 26px;
    background: rgba(255,255,255,.2);
    border: none; border-radius: 13px;
    cursor: pointer; padding: 0;
    transition: background .2s;
    flex-shrink: 0;
}
#playlister .pltr-yt-toggle[aria-checked="true"] { background: #6c5ce7; }
#playlister .pltr-yt-toggle-knob {
    position: absolute;
    top: 3px; left: 3px;
    width: 20px; height: 20px;
    background: #fff; border-radius: 50%;
    transition: transform .2s;
    pointer-events: none;
}
#playlister .pltr-yt-toggle[aria-checked="true"] .pltr-yt-toggle-knob { transform: translateX(26px); }

/* ── Slot: reserva espaço no layout para o vídeo no lugar da thumb ── */
.pltr-yt-slot {
    display: none;
    width: min(510px, 90%);
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    background: #000;
    margin-bottom: 12px;
    flex-shrink: 0;
}
#playlister[data-mode="fullscreen"][data-yt-view="video"] .pltr-yt-slot { display: block; }
#playlister[data-mode="fullscreen"][data-yt-view="video"] #pltr-full-thumb { display: none; }
#playlister[data-mode="fullscreen"][data-yt-view="video"] .pltr-eq-canvas  { display: none; }

/* ── YT wrap sobreposto ao slot (posicionado via JS) ── */
#pltr-yt-wrap.pltr-yt-slot-mode {
    border-radius: 10px;
    z-index: 10200;
    pointer-events: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,.7);
}
#pltr-yt-wrap.pltr-yt-slot-mode #pltr-yt-overlay { display: none; }

/* ── Botão de fullscreen nativo do vídeo ── */
.pltr-yt-fs-btn {
    position: absolute;
    bottom: 6px; right: 6px;
    width: 30px; height: 30px;
    background: rgba(0,0,0,.55);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 6px;
    color: #fff; font-size: 15px;
    cursor: pointer;
    display: none;
    align-items: center; justify-content: center;
    z-index: 2;
    transition: background .15s;
}
.pltr-yt-fs-btn:hover { background: rgba(0,0,0,.8); }
#pltr-yt-wrap.pltr-yt-slot-mode .pltr-yt-fs-btn { display: flex; }

/* ════════════════════════════════════════════════════════════════
   MODO HIDDEN
   ════════════════════════════════════════════════════════════════ */
/* No modo hidden: fullscreen some; a barra usa transform (gaveta) e fica visível como handle */
#playlister[data-mode="hidden"] #pltr-full { display: none !important; }

/* ════════════════════════════════════════════════════════════════
   MODO MINI — pill arrastável
   ════════════════════════════════════════════════════════════════ */
#pltr-mini {
    display: none;
    position: fixed;
    bottom: 24px; right: 20px;
    width: 260px; height: 52px;
    background: #0d0f1a;
    border: 1px solid rgba(108, 92, 231, .22);
    border-radius: 99px;
    box-shadow: 0 6px 28px rgba(0,0,0,.55), 0 0 0 1px rgba(108,92,231,.25);
    z-index: 9200;
    cursor: grab;
    display: none;
    align-items: center;
    gap: 8px;
    padding: 0 10px 0 8px;
    user-select: none;
    transition: box-shadow .2s;
    will-change: transform;
}
#pltr-mini:active { cursor: grabbing; }
#playlister[data-mode="mini"] #pltr-mini { display: flex; }

.pltr-mini-thumb {
    width: 36px; height: 36px; border-radius: 50%;
    background: #1a1d2e;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; flex-shrink: 0; overflow: hidden;
}
.pltr-mini-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.pltr-mini-info { flex: 1; min-width: 0; }
.pltr-mini-info span {
    display: block;
    font-size: 12px; font-weight: 600; color: #ffffff;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pltr-mini-playbtn {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: #fff; font-size: 12px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(108,92,231,.5);
    transition: transform .12s;
}
.pltr-mini-playbtn:hover { transform: scale(1.1); }
.pltr-mini-expand {
    color: rgba(255,255,255,.45); font-size: 14px; padding: 4px;
    flex-shrink: 0; border-radius: 6px;
    transition: color .15s, background .15s;
}
.pltr-mini-expand:hover { color: #ffffff; background: rgba(255,255,255,.08); }

/* ════════════════════════════════════════════════════════════════
   BARRA DO PLAYER — gaveta deslizante estilo dock
   ════════════════════════════════════════════════════════════════ */
#pltr-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    display: flex; flex-direction: column;
    background: #0d0f1a;
    border-radius: 12px 12px 0 0;
    z-index: 9100;
    box-shadow: 0 -4px 32px rgba(0,0,0,.55);
    /* Recolhida: apenas o handle (28px) fica visível */
    transform: translateY(calc(100% - 28px));
    transition: transform .32s cubic-bezier(.4,0,.2,1);
}
/* Expandida quando tocando */
#playlister[data-mode="minimized"] #pltr-bar { transform: translateY(0); }
/* Totalmente escondida no fullscreen */
#playlister[data-mode="fullscreen"] #pltr-bar { transform: translateY(100%); pointer-events: none; }

/* Handle — a alça sempre visível */
.pltr-bar-handle {
    height: 28px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; border-radius: 12px 12px 0 0;
    position: relative;
    transition: background .2s;
}
.pltr-bar-handle:hover { background: rgba(108,92,231,.12); }
.pltr-bar-handle-label {
    position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
    font-size: 10px; font-weight: 800; letter-spacing: 2.5px; text-transform: uppercase;
    color: #fff;
    text-shadow: 0 0 8px rgba(139,108,239,.9), 0 0 20px rgba(139,108,239,.5);
    user-select: none; pointer-events: none;
    transition: opacity .2s;
}
.pltr-bar-handle-pip {
    width: 36px; height: 4px; border-radius: 2px;
    background: rgba(255,255,255,.18);
    transition: background .2s, width .2s;
}
.pltr-bar-handle:hover .pltr-bar-handle-pip { background: rgba(108,92,231,.7); width: 48px; }
.pltr-bar-handle-arrow {
    position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
    color: rgba(255,255,255,.22);
    transition: color .2s, transform .32s;
}
#playlister[data-mode="minimized"] .pltr-bar-handle-arrow { transform: translateY(-50%) rotate(180deg); color: rgba(255,255,255,.3); }
.pltr-bar-handle:hover .pltr-bar-handle-arrow { color: rgba(108,92,231,.8); }

/* Corpo da barra — a linha de controles */
.pltr-bar-body {
    display: flex; align-items: center; gap: 12px;
    padding: 0 16px; height: 72px; flex-shrink: 0;
    border-top: 1px solid rgba(108, 92, 231, .22);
}

.pltr-bar-thumb {
    width: 48px; height: 48px; border-radius: 8px;
    background: #1a1d2e;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; flex-shrink: 0; overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,.4);
}
.pltr-bar-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
/* Zoom para remover bordas pretas do hqdefault.jpg do YouTube */
.pltr-bar-thumb.yt-thumb img { transform: scale(1.36); }

.pltr-bar-info { min-width: 0; flex: 0 0 180px; }
@media (max-width: 600px) { .pltr-bar-info { flex: 1; } }
.pltr-bar-nome {
    font-size: 13px; font-weight: 700; color: #ffffff;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pltr-bar-meta {
    font-size: 11px; color: rgba(255,255,255,.45);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin-top: 2px;
}

.pltr-bar-seek-area {
    flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0;
}
.pltr-bar-seek-area input[type=range] { flex: 1; min-width: 0; }
@media (max-width: 700px) { .pltr-bar-seek-area { display: none; } }

.pltr-time {
    font-size: 11px; color: rgba(255,255,255,.45);
    min-width: 34px; text-align: center; flex-shrink: 0;
}

.pltr-bar-controls { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.pltr-btn {
    color: rgba(255,255,255,.45); font-size: 22px;
    padding: 8px; border-radius: 10px;
    transition: color .15s, background .15s, transform .12s; line-height: 1;
}
.pltr-btn:hover { color: #ffffff; background: rgba(255,255,255,.08); }
.pltr-btn-play {
    width: 48px; height: 48px; border-radius: 50%;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe) !important;
    color: #fff !important; font-size: 18px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 3px 14px rgba(108,92,231,.5);
}
.pltr-btn-play:hover { transform: scale(1.1); box-shadow: 0 4px 20px rgba(108,92,231,.7); }
.pltr-btn-repeat {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.07);
    color: rgba(255,255,255,.45); opacity: .45;
    transition: opacity .2s, background .2s, box-shadow .2s, transform .12s;
}
.pltr-btn-repeat svg { width: 18px; height: 18px; }
.pltr-btn-repeat:hover { opacity: .75; background: rgba(255,255,255,.13); }
.pltr-btn-repeat.pltr-repeat-all,
.pltr-btn-repeat.pltr-repeat-one {
    opacity: 1; color: #fff;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    box-shadow: 0 2px 10px rgba(108,92,231,.5);
}
.pltr-btn-repeat.pltr-repeat-all:hover,
.pltr-btn-repeat.pltr-repeat-one:hover { transform: scale(1.08); }

.pltr-bar-vol { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
@media (max-width: 860px) { .pltr-bar-vol { display: none; } }
.pltr-vol-ico { font-size: 14px; color: rgba(255,255,255,.45); }
.pltr-vol-range { width: 72px; }

.pltr-bar-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.pltr-action-btn {
    width: 42px; height: 42px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; color: rgba(255,255,255,.45);
    transition: color .15s, background .15s, transform .12s;
}
.pltr-action-btn:hover { color: #ffffff; background: rgba(255,255,255,.08); transform: scale(1.08); }
.pltr-bar-btn-stop { color: rgba(255,100,100,.55); }
.pltr-bar-btn-stop:hover { color: #ff4757 !important; background: rgba(255,71,87,.14) !important; }

/* ════════════════════════════════════════════════════════════════
   MODO FULLSCREEN
   ════════════════════════════════════════════════════════════════ */
#pltr-full {
    display: none;
    position: fixed; inset: 0;
    z-index: 9500;
    flex-direction: column;
    background: #0d0f1a;
}
#playlister[data-mode="fullscreen"] #pltr-full { display: flex; }

/* Fundo com blur da capa */
.pltr-full-bg {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    filter: blur(60px) saturate(1.4) brightness(.35);
    transform: scale(1.1);
    pointer-events: none;
    z-index: 0;
    transition: background-image .5s;
}

/* Botões flutuantes no topo direito — sem barra, sem linha */
.pltr-full-nav {
    position: absolute; top: 16px; right: 20px; z-index: 2;
    display: flex; align-items: center; gap: 8px;
    flex-shrink: 0;
}
.pltr-nav-btn {
    width: 48px; height: 48px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,.55); font-size: 22px;
    background: rgba(0,0,0,.35);
    backdrop-filter: blur(8px);
    transition: color .15s, background .15s;
    border: 1px solid rgba(255,255,255,.07);
}
.pltr-nav-btn:hover { color: #fff; background: rgba(108,92,231,.3); border-color: rgba(108,92,231,.4); }
.pltr-nav-btn.ativo  { color: #a29bfe; background: rgba(108,92,231,.25); border-color: rgba(108,92,231,.5); }
.pltr-nav-close      { font-size: 18px; }

/* Corpo — position:relative para o nav absoluto se ancorar aqui */
.pltr-full-body {
    position: relative; z-index: 1;
    flex: 1; display: flex; min-height: 0;
    overflow: hidden;
}

/* ── Centro ── */
.pltr-full-center {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 12px; padding: 80px 32px 24px;
    overflow-y: auto;
}

.pltr-full-thumb {
    width: 220px; height: 220px;
    border-radius: 16px;
    background: #1a1d2e;
    display: flex; align-items: center; justify-content: center;
    font-size: 72px;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0,0,0,.6);
    flex-shrink: 0;
}
.pltr-full-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 16px; }
.pltr-full-thumb.yt-thumb img { transform: scale(1.36); }
.pltr-fila-item-thumb.yt-thumb img { transform: scale(1.36); }
.pltr-sb-item-thumb.yt-thumb img   { transform: scale(1.36); }
.pltr-lib-card-thumb.yt-thumb      { aspect-ratio: 16/9; }
.pltr-lib-card-thumb.yt-thumb img  { transform: none; }

/* ── Banner "Reproduzindo a Playlist" no topo da sidebar ── */
.pltr-sb-now-pl {
    background: rgba(108,92,231,.15);
    border: 1px solid rgba(108,92,231,.3);
    border-radius: 10px;
    padding: 10px 14px;
    margin: 0 14px 12px;
    display: flex; flex-direction: column; gap: 3px;
}
#playlister .pltr-sb-now-pl { margin: 0 14px 12px; padding: 10px 14px; }
.pltr-sb-now-pl-label {
    font-size: 10px; color: rgba(255,255,255,.5);
    text-transform: uppercase; letter-spacing: .5px; font-weight: 700;
}
.pltr-sb-now-pl-nome {
    font-size: 13px; color: #6c5ce7; font-weight: 800;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Rename input inline na sidebar */
#playlister .pltr-sb-rename-input {
    width: 100%; background: rgba(255,255,255,.08);
    border: 1px solid #6c5ce7; border-radius: 6px;
    color: #fff; font-size: 13px; font-weight: 700;
    padding: 4px 8px; outline: none;
}

.pltr-full-nome {
    font-size: 22px; font-weight: 800; color: #ffffff;
    text-align: center; line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0,0,0,.5);
}
.pltr-full-artista {
    font-size: 14px; color: rgba(255,255,255,.45); text-align: center;
}
.pltr-full-artista::before { content: 'por '; }

/* Equalizador canvas (Web Audio API) */
.pltr-eq-canvas {
    width: 100%; max-width: 480px;
    height: 48px;
    display: block;
    opacity: 0;
    transition: opacity .3s;
}
#playlister[data-mode="fullscreen"] .pltr-eq-canvas { opacity: 1; }

/* Seek full */
.pltr-full-seek-area {
    display: flex; align-items: center; gap: 10px;
    width: 100%; max-width: 480px;
}
.pltr-full-seek-area input[type=range] { flex: 1; }

/* Controles full */
.pltr-full-controls { display: flex; align-items: center; gap: 16px; }
.pltr-ctrl-btn {
    color: rgba(255,255,255,.45); font-size: 22px;
    padding: 8px; border-radius: 10px;
    transition: color .15s, background .15s, transform .12s; line-height: 1;
}
.pltr-ctrl-btn:hover { color: #ffffff; background: rgba(255,255,255,.08); }
.pltr-ctrl-play {
    width: 56px; height: 56px; border-radius: 50%;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe) !important;
    color: #fff !important; font-size: 22px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 20px rgba(108,92,231,.6);
}
.pltr-ctrl-play:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(108,92,231,.8); }
.pltr-ctrl-repeat {
    width: 48px; height: 48px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.07);
    color: rgba(255,255,255,.45); opacity: .45;
    transition: opacity .2s, background .2s, box-shadow .2s, transform .12s;
}
.pltr-ctrl-repeat svg { width: 26px; height: 26px; }
.pltr-ctrl-repeat:hover { opacity: .75; background: rgba(255,255,255,.13); }
.pltr-ctrl-repeat.pltr-repeat-all,
.pltr-ctrl-repeat.pltr-repeat-one {
    opacity: 1; color: #fff;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    box-shadow: 0 3px 14px rgba(108,92,231,.55);
}
.pltr-ctrl-repeat.pltr-repeat-all:hover,
.pltr-ctrl-repeat.pltr-repeat-one:hover { transform: scale(1.08); }

/* Volume full */
.pltr-full-vol-area {
    display: flex; align-items: center; gap: 8px;
    width: 100%; max-width: 220px;
}
.pltr-full-vol-area span { color: rgba(255,255,255,.45); font-size: 16px; }
.pltr-full-vol-area input[type=range] { flex: 1; }

/* ══════════════════════════════════════════════════════════════════
   PAINEL — overlay modal 100% viewport
   Fica FORA de #playlister (nenhum stacking context pai).
   ══════════════════════════════════════════════════════════════════ */


/* Resets próprios para o painel (fora de #playlister) */
.pltr-panel *, .pltr-panel *::before, .pltr-panel *::after {
    box-sizing: border-box;
    margin: 0; padding: 0;
}
.pltr-panel button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    outline: none;
}
.pltr-panel input {
    font-family: inherit;
}

.pltr-panel {
    position: fixed; inset: 0; z-index: 99999;
    background: #08080f;
    display: none;
    overflow-y: auto;
    padding: 60px 24px 40px;
}
.pltr-panel.aberto {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pltr-panel-in .22s ease both;
}
@keyframes pltr-panel-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Sem card, sem janela — conteúdo direto no escuro */
.pltr-panel-inner {
    width: 100%; max-width: 580px;
    display: flex; flex-direction: column;
    align-items: center;
    gap: 16px;
}

/* X fixo no canto superior direito da tela */
.pltr-panel-x {
    position: fixed; top: 20px; right: 24px;
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,.4); font-size: 20px;
    background: rgba(255,255,255,.06);
    transition: color .15s, background .15s;
    z-index: 1;
}
.pltr-panel-x:hover { color: #fff; background: rgba(255,255,255,.14); }

/* Logo YouTube */
.pltr-yt-logo-wrap { display: flex; justify-content: center; }
.pltr-yt-logo-wrap svg {
    width: 72px; height: 72px;
    filter: drop-shadow(0 0 20px rgba(255,0,0,.55));
}

/* Título do painel */
.pltr-panel-titulo {
    font-size: 26px; font-weight: 900; color: #fff;
    text-align: center; line-height: 1.2; letter-spacing: -.3px;
    width: 100%;
}

/* Form adicionar */
.pltr-add-form { display: flex; flex-direction: column; gap: 14px; width: 100%; }
.pltr-add-form label {
    font-size: 15px; color: rgba(255,255,255,.45);
    text-align: center; font-weight: 500;
}
.pltr-url-input {
    width: 100%; padding: 18px 22px;
    background: rgba(255,255,255,.05);
    border: 1.5px solid rgba(108,92,231,.4);
    border-radius: 14px;
    color: #fff; font-size: 16px;
    text-align: center;
    transition: border-color .15s, background .15s;
}
.pltr-url-input:focus { outline: none; border-color: #6c5ce7; background: rgba(108,92,231,.1); }
.pltr-url-input::placeholder { color: rgba(255,255,255,.22); text-align: center; }

.pltr-btn-buscar {
    width: 100%; padding: 18px; border-radius: 14px;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe) !important;
    color: #fff !important; font-size: 17px; font-weight: 800;
    letter-spacing: .3px;
    box-shadow: 0 6px 28px rgba(108,92,231,.6);
    transition: opacity .15s, transform .12s, box-shadow .15s;
    text-align: center;
}
.pltr-btn-buscar:hover  { opacity: .9; transform: translateY(-2px); box-shadow: 0 6px 28px rgba(108,92,231,.7); }
.pltr-btn-buscar:active { transform: translateY(0); }
.pltr-btn-buscar:disabled { opacity: .35; transform: none; box-shadow: none; cursor: not-allowed; }

.pltr-add-msg {
    font-size: 13px; text-align: center; padding: 10px 14px;
    border-radius: 10px; display: none; width: 100%; font-weight: 600;
}
.pltr-add-msg.ok    { display: block; background: rgba(0,184,148,.18); color: #00d4aa; border: 1px solid rgba(0,184,148,.3); }
.pltr-add-msg.erro  { display: block; background: rgba(255,71,87,.18);  color: #ff6b7a; border: 1px solid rgba(255,71,87,.3); }
.pltr-add-msg.aviso { display: block; background: rgba(253,203,110,.18); color: #fdcb6e; border: 1px solid rgba(253,203,110,.3); }

.pltr-preview-card {
    width: 100%;
    border: 1px solid rgba(108,92,231,.3); border-radius: 14px;
    overflow: hidden; background: rgba(255,255,255,.05);
    display: none; flex-direction: column;
    animation: pltr-panel-in .2s ease;
}
.pltr-preview-card.visivel { display: flex; }
.pltr-preview-card img { width: 100%; max-height: 160px; object-fit: cover; }
.pltr-preview-card-info { padding: 12px 14px; }
.pltr-preview-card-info strong { display: block; font-size: 14px; color: #fff; font-weight: 700; margin-bottom: 3px; }
.pltr-preview-card-info span  { font-size: 12px; color: rgba(255,255,255,.45); }
/* Badges de status do embed */
.pltr-embed-status { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.pltr-embed-ok   { font-size: 11px; font-weight: 700; color: #4ade80;
                   background: rgba(74,222,128,.12); border: 1px solid rgba(74,222,128,.3);
                   border-radius: 99px; padding: 2px 8px; }
.pltr-embed-warn { font-size: 11px; font-weight: 600; color: #fbbf24;
                   background: rgba(251,191,36,.10); border: 1px solid rgba(251,191,36,.25);
                   border-radius: 99px; padding: 2px 8px; cursor: help; }

/* Select de classificação do vídeo */
.pltr-cat-wrap { padding: 4px 14px 2px; display: flex; flex-direction: column; gap: 6px; }
.pltr-cat-label { font-size: 12px; color: rgba(255,255,255,.45); font-weight: 600; }
.pltr-cat-sel {
    width: 100%; padding: 10px 12px; border-radius: 10px;
    border: 1px solid rgba(108,92,231,.4); background: rgba(255,255,255,.06);
    color: #fff; font-size: 14px; font-weight: 600; cursor: pointer;
    outline: none; appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(255,255,255,.4)' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center;
}
.pltr-cat-sel:focus { border-color: rgba(108,92,231,.8); }
.pltr-cat-sel option { background: #1a1a2e; color: #fff; }

.pltr-btn-confirmar {
    margin: 12px 14px 14px;
    padding: 12px;
    border-radius: 10px;
    background: linear-gradient(135deg, #00b894, #00cec9);
    color: #fff; font-size: 14px; font-weight: 700;
    box-shadow: 0 4px 16px rgba(0,184,148,.4);
    transition: opacity .15s, transform .12s; text-align: center;
}
.pltr-btn-confirmar:hover { opacity: .9; transform: translateY(-1px); }

/* ── PLAYLISTS: lista ── */
.pltr-pl-lista { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.pltr-pl-item {
    display: flex; align-items: center; gap: 16px;
    padding: 14px 18px; border-radius: 16px;
    border: 1px solid rgba(255,255,255,.07);
    background: rgba(255,255,255,.04);
    cursor: pointer; transition: background .15s, border-color .15s;
}
.pltr-pl-item:hover { background: rgba(108,92,231,.18); border-color: rgba(108,92,231,.45); }
.pltr-pl-item.ativa  { border-color: #6c5ce7; background: rgba(108,92,231,.22); }
.pltr-pl-item-thumb {
    width: 64px; height: 64px; border-radius: 12px;
    background: rgba(255,255,255,.07);
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; flex-shrink: 0; overflow: hidden;
}
.pltr-pl-item-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.pltr-pl-item-info { flex: 1; min-width: 0; }
.pltr-pl-item-titulo {
    font-size: 16px; font-weight: 700; color: #fff;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pltr-pl-item-count { font-size: 13px; color: rgba(255,255,255,.4); margin-top: 4px; }

.pltr-btn-nova-pl {
    width: 100%; padding: 16px; border-radius: 14px;
    border: 1.5px dashed rgba(108,92,231,.4);
    color: rgba(255,255,255,.45); font-size: 15px; font-weight: 600; text-align: center;
    transition: color .15s, border-color .15s, background .15s;
}
.pltr-btn-nova-pl:hover { color: #fff; border-color: #6c5ce7; background: rgba(108,92,231,.15); }

/* Itens de playlist */
.pltr-fila-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: 10px;
    cursor: pointer; transition: background .15s;
    border: 1px solid transparent;
}
.pltr-fila-item:hover { background: rgba(255,255,255,.08); }
.pltr-fila-item.tocando { border-color: #6c5ce7; background: rgba(108,92,231,.12); }
.pltr-fila-item-thumb {
    width: 40px; height: 40px; border-radius: 8px;
    background: #1a1d2e;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; flex-shrink: 0; overflow: hidden;
}
.pltr-fila-item-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.pltr-fila-item-info { flex: 1; min-width: 0; }
.pltr-fila-item-nome {
    font-size: 13px; font-weight: 600; color: #ffffff;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pltr-fila-item-meta { font-size: 11px; color: rgba(255,255,255,.45); margin-top: 2px; }
.pltr-fila-item-rm {
    color: rgba(255,255,255,.45); font-size: 15px;
    opacity: 0; padding: 4px 6px; border-radius: 6px;
    transition: opacity .15s, color .15s, background .15s;
}
.pltr-fila-item:hover .pltr-fila-item-rm { opacity: 1; }
.pltr-fila-item-rm:hover { color: #ff4757; background: rgba(255,71,87,.12); }

/* ── Spinner ── */
.pltr-spinner {
    width: 28px; height: 28px; border-radius: 50%;
    border: 3px solid rgba(108, 92, 231, .22);
    border-top-color: #6c5ce7;
    animation: pltr-spin .7s linear infinite; margin: 12px auto;
}
@keyframes pltr-spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════════════════════════
   SIDEBAR DE PLAYLISTS (dentro do fullscreen, desliza da direita)
   ══════════════════════════════════════════════════════════════════ */
.pltr-sidebar {
    position: absolute; top: 0; right: 0; bottom: 0;
    width: 360px;
    background: rgba(7, 8, 16, 0.98);
    border-left: 1px solid rgba(108,92,231,.2);
    display: flex; flex-direction: column;
    transform: translateX(100%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    z-index: 10;
    overflow: hidden;
}
#pltr-full.sidebar-aberta .pltr-sidebar { transform: translateX(0); }

.pltr-sb-hd {
    display: flex; align-items: center; gap: 6px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(108,92,231,.15);
    flex-shrink: 0;
}
.pltr-sb-titulo {
    flex: 1; font-size: 14px; font-weight: 700; color: #fff;
    text-align: center;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pltr-sb-back {
    font-size: 18px; color: rgba(255,255,255,.45);
    width: 30px; height: 30px; border-radius: 6px; flex-shrink: 0;
    display: none; align-items: center; justify-content: center;
    transition: color .15s, background .15s;
}
#pltr-full.modo-biblioteca .pltr-sb-back { display: flex; }
.pltr-sb-back:hover { color: #fff; background: rgba(255,255,255,.08); }

.pltr-sb-corpo {
    flex: 1; overflow-y: auto; padding: 10px 0;
    display: flex; flex-direction: column; gap: 2px;
}
.pltr-sb-corpo::-webkit-scrollbar { width: 3px; }
.pltr-sb-corpo::-webkit-scrollbar-thumb { background: rgba(108,92,231,.3); border-radius: 2px; }

/* ── Override de especificidade: #playlister * reseta margin/padding com (1,0,0).
   Usando #playlister .class ficamos em (1,1,0) e vencemos o reset. ── */
#playlister .pltr-bar-body        { padding: 0 16px; }
#playlister .pltr-sb-hd          { padding: 14px 16px; }
#playlister .pltr-sb-pl-item     { padding: 9px 12px;  margin: 2px 14px; }
#playlister .pltr-sb-item        { padding: 7px 10px;  margin: 2px 14px; }
#playlister .pltr-sb-execute-wrap{ padding: 10px 14px 6px; }
#playlister .pltr-sb-drop        { padding: 13px 14px; }
#playlister .pltr-sb-pl-count    { margin-top: 2px; }
#playlister .pltr-sb-item-meta   { margin-top: 1px; }
#playlister .pltr-fila-item      { padding: 10px 12px; gap: 10px; }
#playlister .pltr-fila-item-meta { margin-top: 2px; }
#playlister .pltr-lib-card-info  { padding: 6px 8px 8px; }
#playlister .pltr-lib-card-meta  { margin-top: 3px; }

/* Botão Executar Playlist (aparece quando playlist selecionada) */
.pltr-sb-execute-wrap {
    padding: 10px 14px 6px;
    border-top: 1px solid rgba(108,92,231,.15);
    flex-shrink: 0;
    display: none;
}
.pltr-sb-execute-wrap.visivel { display: block; }
.pltr-sb-execute {
    width: 100%; padding: 12px !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe) !important;
    color: #fff !important; font-size: 14px !important; font-weight: 700 !important;
    box-shadow: 0 4px 16px rgba(108,92,231,.5) !important;
    transition: opacity .15s, transform .12s !important;
    text-align: center !important;
}
.pltr-sb-execute:hover { opacity: .9; transform: translateY(-1px); }
.pltr-sb-add-fila {
    width: 100%; margin-top: 8px !important;
    padding: 10px !important; border-radius: 12px !important;
    background: none !important;
    border: 1px solid rgba(108,92,231,.5) !important;
    color: rgba(162,155,254,.9) !important; font-size: 13px !important; font-weight: 600 !important;
    cursor: pointer; text-align: center !important;
    transition: background .15s, border-color .15s !important;
}
.pltr-sb-add-fila:hover { background: rgba(108,92,231,.15) !important; border-color: rgba(108,92,231,.8) !important; }
.pltr-sb-add-fila:disabled { opacity: .5; cursor: default; }

/* Drop zone — só visível no modo biblioteca */
.pltr-sb-drop {
    padding: 13px 10px; flex-shrink: 0;
    border-top: 1px dashed rgba(108,92,231,.25);
    text-align: center;
    transition: background .2s, border-color .2s;
    display: none;
}
#pltr-full.modo-biblioteca .pltr-sb-drop { display: block; }
.pltr-sb-drop-txt { font-size: 12px; color: rgba(255,255,255,.28); pointer-events: none; }
.pltr-sb-drop.drag-over {
    background: rgba(108,92,231,.22);
    border-color: #6c5ce7;
}
.pltr-sb-drop.drag-over .pltr-sb-drop-txt { color: #a29bfe; }

/* Busca de playlists na sidebar */
#playlister .pltr-sb-wrap {
    position: relative; margin: 0 14px 8px;
}
#playlister .pltr-sb-busca {
    display: block; width: 100%;
    margin: 0; padding: 6px 28px 6px 10px;
    border-radius: 6px;
    background: rgba(0,0,0,.25);
    border: none; outline: none;
    color: rgba(255,255,255,.75); font-size: 12px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
    transition: box-shadow .18s, background .18s;
}
#playlister .pltr-sb-busca::placeholder { color: rgba(255,255,255,.25); }
#playlister .pltr-sb-busca:focus {
    background: rgba(108,92,231,.12);
    box-shadow: inset 0 0 0 1px rgba(108,92,231,.5);
}
#playlister .pltr-sb-limpar {
    position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer;
    color: rgba(255,255,255,.35); font-size: 14px; line-height: 1;
    width: 18px; height: 18px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: color .15s, background .15s;
}
#playlister .pltr-sb-limpar:hover { color: #fff; background: rgba(255,255,255,.12); }

/* Item de playlist na sidebar (lista) */
.pltr-sb-pl-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: 10px;
    margin: 0 14px;
    border: 1px solid transparent;
    cursor: pointer; transition: background .15s, border-color .15s;
    user-select: none;
}
.pltr-sb-pl-item:hover  { background: rgba(108,92,231,.14); border-color: rgba(108,92,231,.28); }
.pltr-sb-pl-item.ativa  { border-color: #6c5ce7; background: rgba(108,92,231,.2); }
.pltr-sb-pl-thumb {
    width: 44px; height: 44px; border-radius: 8px;
    background: rgba(255,255,255,.07);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; flex-shrink: 0; overflow: hidden;
}
.pltr-sb-pl-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.pltr-sb-pl-info { flex: 1; min-width: 0; }
.pltr-sb-pl-titulo { font-size: 13px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pltr-sb-pl-count  { font-size: 11px; color: rgba(255,255,255,.38); margin-top: 2px; }
.pltr-sb-pl-edit {
    font-size: 13px; color: rgba(255,255,255,.2);
    padding: 4px 6px; border-radius: 6px; flex-shrink: 0;
    opacity: 0; transition: opacity .15s, color .15s, background .15s;
}
.pltr-sb-pl-item:hover .pltr-sb-pl-edit { opacity: 1; }
.pltr-sb-pl-edit:hover { color: #a29bfe; background: rgba(108,92,231,.18); }
.pltr-sb-pl-del {
    font-size: 13px; color: rgba(255,255,255,.2);
    padding: 4px 6px; border-radius: 6px; flex-shrink: 0;
    opacity: 0; transition: opacity .15s, color .15s, background .15s;
}
#playlister .pltr-sb-pl-del { padding: 4px 6px; }
.pltr-sb-pl-item:hover .pltr-sb-pl-del { opacity: 1; }
.pltr-sb-pl-del:hover { color: #ff4757; background: rgba(255,71,87,.12); }

/* Item dentro de uma playlist (modo biblioteca) */
.pltr-sb-item {
    display: flex; align-items: center; gap: 8px;
    padding: 7px 10px; border-radius: 8px;
    margin: 0 14px;
    transition: background .15s, box-shadow .1s;
    cursor: default;
}
.pltr-sb-item:hover { background: rgba(255,255,255,.05); }
.pltr-sb-item.drag-above { box-shadow: 0 -2px 0 0 #6c5ce7; }
.pltr-sb-item.drag-below { box-shadow: 0  2px 0 0 #6c5ce7; }
.pltr-sb-item.pltr-sb-item-dragging { opacity: .3; }
.pltr-sb-item-grip {
    color: rgba(255,255,255,.2); font-size: 14px; line-height: 1;
    cursor: grab; flex-shrink: 0; padding: 0 2px;
    user-select: none;
}
.pltr-sb-item-thumb {
    width: 34px; height: 34px; border-radius: 6px;
    background: #1a1d2e;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; flex-shrink: 0; overflow: hidden;
}
.pltr-sb-item-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.pltr-sb-item-info { flex: 1; min-width: 0; }
.pltr-sb-item-nome { font-size: 12px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pltr-sb-item-meta { font-size: 10px; color: rgba(255,255,255,.38); margin-top: 1px; }
.pltr-sb-item-rm {
    color: rgba(255,255,255,.25); font-size: 12px;
    padding: 3px 5px; border-radius: 4px;
    opacity: 0; transition: opacity .15s, color .15s;
}
.pltr-sb-item:hover .pltr-sb-item-rm { opacity: 1; }
.pltr-sb-item-rm:hover { color: #ff4757; background: rgba(255,71,87,.12); }

/* ══════════════════════════════════════════════════════════════════
   BIBLIOTECA DE ITENS (centro ao editar playlist)
   ══════════════════════════════════════════════════════════════════ */
/* Biblioteca — scroll invisível (estilo mobile) */
.pltr-library {
    display: none; flex: 1; flex-direction: column;
    align-items: center;
    overflow-y: auto; overflow-x: hidden;
    min-height: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
/* #playlister * { padding:0 } tem (1,0,0) e anula classe pura (0,1,0).
   Prefixar com #playlister dá (1,1,0) e vence o reset. */
#playlister .pltr-library { padding: 80px 64px 48px; }
.pltr-library::-webkit-scrollbar { display: none; }
#pltr-full.modo-biblioteca .pltr-full-center { display: none; }
#pltr-full.modo-biblioteca .pltr-library { display: flex; }
/* Recua o lado direito para não passar por baixo da sidebar */
#pltr-full.modo-biblioteca.sidebar-aberta .pltr-library {
    padding-right: calc(360px + 40px);
}
/* Recua quando a fila lateral está aberta junto da biblioteca */
#pltr-full.modo-biblioteca.rp-aberto .pltr-library {
    padding-right: calc(340px + 40px);
}

.pltr-lib-hd {
    display: flex; align-items: center; gap: 14px;
    flex-shrink: 0;
    width: 100%; max-width: 820px;
}
#playlister .pltr-lib-hd { padding: 0 0 22px; }
.pltr-lib-add-btn {
    flex-shrink: 0;
    width: 56px; height: 56px; border-radius: 50%;
    background: rgba(255,255,255,.12);
    color: #fff; font-size: 30px; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    border: none; cursor: pointer;
    transition: background .15s, transform .12s, box-shadow .15s;
}
.pltr-lib-add-btn:hover {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    box-shadow: 0 3px 14px rgba(108,92,231,.5);
    transform: scale(1.08);
}
.pltr-lib-search-wrap { position: relative; flex: 1; }
#playlister .pltr-lib-search-limpar {
    position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer;
    color: rgba(255,255,255,.4); font-size: 15px; line-height: 1;
    width: 22px; height: 22px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: color .15s, background .15s;
}
#playlister .pltr-lib-search-limpar:hover { color: #fff; background: rgba(255,255,255,.12); }
.pltr-lib-search {
    width: 100%; height: 56px;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 28px;
    color: #fff; font-size: 16px;
    outline: none;
    transition: border-color .15s, background .15s;
}
#playlister .pltr-lib-search { padding: 0 52px 0 24px; }
.pltr-lib-search::placeholder { color: rgba(255,255,255,.3); }
.pltr-lib-search:focus {
    border-color: rgba(108,92,231,.7);
    background: rgba(108,92,231,.1);
}

#pltr-lib-grid-wrap {
    width: 100%; max-width: 820px;
    flex: 1;
}

/* Grid de cards — 4 por linha, centralizados */
.pltr-lib-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    max-width: 820px;
    width: 100%;
}
#playlister .pltr-lib-grid { padding-bottom: 24px; }

/* Filtros da biblioteca */
.pltr-lib-filtros {
    display: flex; flex-wrap: wrap; gap: 6px;
    width: 100%; max-width: 820px;
    flex-shrink: 0; padding-bottom: 4px;
}
.pltr-lib-f {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    color: rgba(255,255,255,.6);
    border-radius: 99px;
    padding: 5px 14px; font-size: 12px; font-weight: 600;
    cursor: pointer; white-space: nowrap;
    transition: background .15s, color .15s, border-color .15s;
}
.pltr-lib-f:hover { background: rgba(255,255,255,.14); color: #fff; }
.pltr-lib-f.ativo {
    background: #6c5ce7; border-color: #6c5ce7; color: #fff;
}
.pltr-lib-subfiltros {
    display: flex; flex-wrap: wrap; gap: 5px;
    width: 100%; max-width: 820px;
    flex-shrink: 0; padding-bottom: 2px;
}
.pltr-lib-sf {
    background: rgba(108,92,231,.18);
    border: 1px solid rgba(108,92,231,.3);
    color: rgba(255,255,255,.55);
    border-radius: 99px;
    padding: 4px 12px; font-size: 11px; font-weight: 600;
    cursor: pointer; white-space: nowrap;
    transition: background .15s, color .15s;
}
.pltr-lib-sf:hover { background: rgba(108,92,231,.35); color: #fff; }
.pltr-lib-sf.ativo { background: rgba(108,92,231,.5); color: #fff; border-color: #a29bfe; }

.pltr-lib-card {
    display: flex; flex-direction: column;
    border-radius: 10px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.06);
    cursor: grab; overflow: hidden;
    user-select: none;
    transition: background .15s, border-color .15s, transform .12s;
}
.pltr-lib-card:hover {
    background: rgba(108,92,231,.15);
    border-color: rgba(108,92,231,.35);
    transform: translateY(-3px);
}
.pltr-lib-card.dragging { opacity: .3; cursor: grabbing; transform: scale(.96); }

.pltr-lib-card-thumb {
    width: 100%; aspect-ratio: 1/1;
    background: rgba(255,255,255,.07);
    display: flex; align-items: center; justify-content: center;
    font-size: 30px; overflow: hidden; flex-shrink: 0;
    position: relative;
}
.pltr-lib-play-ov {
    position: absolute; inset: 0; z-index: 3;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0); border: none; cursor: pointer; padding: 0;
    transition: background .2s;
    -webkit-tap-highlight-color: transparent;
}
.pltr-lib-card:hover .pltr-lib-play-ov { background: rgba(0,0,0,.5); }
.pltr-lib-play-ov-ico {
    width: 34px; height: 34px; border-radius: 50%;
    background: #6c5ce7;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 13px; padding-left: 2px;
    opacity: 0; transform: scale(.6);
    transition: opacity .18s, transform .18s;
    pointer-events: none;
    box-shadow: 0 2px 10px rgba(108,92,231,.6);
}
.pltr-lib-card:hover .pltr-lib-play-ov-ico { opacity: 1; transform: scale(1); }
.pltr-lib-card-thumb img { width: 100%; height: 100%; object-fit: cover; }

.pltr-lib-card-info {
    padding: 6px 8px 8px;
}
.pltr-lib-card-nome {
    font-size: 11px; font-weight: 700; color: #fff;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    line-height: 1.3;
}
.pltr-lib-card-meta {
    font-size: 10px; color: rgba(255,255,255,.42);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin-top: 3px;
}

/* ════════════════════════════════════════════════════════════════
   Painel Direito — Tocando agora / Fila / Biblioteca (#pltr-rp)
   ════════════════════════════════════════════════════════════════ */
.pltr-rp {
    position: absolute; top: 80px; right: 0; bottom: 0;
    width: 340px;
    background: rgba(7, 8, 16, 0.98);
    border-left: 1px solid rgba(108,92,231,.2);
    display: flex; flex-direction: column;
    transform: translateX(100%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    z-index: 10;
    overflow: hidden;
}
#pltr-full.rp-aberto .pltr-rp { transform: translateX(0); }
.pltr-rp.drop-ativo      { border-left-color: rgba(124,58,237,.7); background: rgba(124,58,237,.06); }
.pltr-sidebar.drop-ativo { border-left-color: rgba(124,58,237,.7); background: rgba(124,58,237,.06); transition: background .15s, border-left-color .15s; }
/* Drag de reordenação dentro da fila */
.pltr-rp-item.rp-dragging  { opacity: .35; }
.pltr-rp-item.drag-top     { border-top: 2px solid #7c3aed; }
.pltr-rp-item.drag-bot     { border-bottom: 2px solid #7c3aed; }

/* ── Cabeçalho do painel (título + fechar) ── */
.pltr-rp-hd {
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid rgba(108,92,231,.15);
    flex-shrink: 0;
}
.pltr-rp-titulo {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .5px; color: rgba(255,255,255,.5);
}
.pltr-rp-close-btn {
    background: none; border: none; color: rgba(255,255,255,.3);
    font-size: 15px; cursor: pointer; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    transition: color .15s;
}
.pltr-rp-close-btn:hover { color: #fff; }
.pltr-rp-hd-acoes {
    display: flex; align-items: center; gap: 2px;
}
.pltr-rp-hd-btn {
    background: none; border: none; color: rgba(255,255,255,.3);
    cursor: pointer; padding: 6px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    transition: color .15s, background .15s;
}
.pltr-rp-hd-btn:hover { color: #fff; background: rgba(255,255,255,.08); }

/* ── Modal salvar fila — restaura padding zerado pelo reset #playlister * ── */
#pltr-rp-salvar-modal .pltr-btn-buscar  { padding: 18px; }
#pltr-rp-salvar-modal .pltr-btn-nova-pl { padding: 16px; }
#pltr-rp-salvar-modal .pltr-url-input   { padding: 18px 22px; }

/* ── Área de conteúdo scrollável ── */
.pltr-rp-corpo { flex: 1; overflow-y: auto; }
.pltr-rp-corpo::-webkit-scrollbar { width: 3px; }
.pltr-rp-corpo::-webkit-scrollbar-thumb { background: rgba(108,92,231,.3); border-radius: 2px; }
.pltr-rp-empty {
    color: rgba(255,255,255,.28); font-size: 13px;
    text-align: center; line-height: 1.5;
}

/* ── View: Tocando agora ── */
.pltr-rp-now {
    display: flex; flex-direction: column;
    align-items: center; text-align: center;
}
.pltr-rp-now-thumb {
    border-radius: 14px; overflow: hidden;
    background: rgba(255,255,255,.06);
    display: flex; align-items: center; justify-content: center;
    font-size: 44px; flex-shrink: 0;
    width: 160px; height: 160px;
}
.pltr-rp-now-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pltr-rp-now-thumb.yt-thumb { aspect-ratio: 16/9; width: 100%; height: auto; border-radius: 10px; }
.pltr-rp-now-thumb.yt-thumb img { transform: none; }
.pltr-rp-now-nome {
    font-size: 15px; font-weight: 700; color: #fff;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    width: 100%;
}
.pltr-rp-now-meta { font-size: 12px; color: rgba(255,255,255,.42); }
.pltr-rp-now-badge {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .5px; color: #7c3aed; background: rgba(124,58,237,.15);
    border-radius: 20px;
}

/* ── Itens de fila e biblioteca ── */
.pltr-rp-item {
    display: flex; align-items: center; cursor: pointer;
    transition: background .15s; border-radius: 7px; position: relative;
}
.pltr-rp-item:hover { background: rgba(255,255,255,.06); }
.pltr-rp-item.tocando { background: rgba(108,92,231,.12); }
.pltr-rp-item-num {
    width: 22px; text-align: center;
    font-size: 11px; color: rgba(255,255,255,.28); flex-shrink: 0;
}
.pltr-rp-item.tocando .pltr-rp-item-num { color: #a78bfa; font-size: 14px; }
.pltr-rp-item-thumb {
    width: 38px; height: 38px; border-radius: 7px;
    overflow: hidden; flex-shrink: 0;
    background: rgba(255,255,255,.08);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
}
.pltr-rp-item-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pltr-rp-item-thumb.yt-thumb { aspect-ratio: 16/9; width: 64px; height: auto; border-radius: 5px; }
.pltr-rp-item-thumb.yt-thumb img { transform: none; }
.pltr-rp-item-info { flex: 1; min-width: 0; }
.pltr-rp-item-nome {
    font-size: 12px; font-weight: 600; color: #fff;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pltr-rp-item.tocando .pltr-rp-item-nome { color: #a78bfa; }
.pltr-rp-item-meta {
    font-size: 10px; color: rgba(255,255,255,.32);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pltr-rp-item-rm {
    background: none; border: none;
    color: rgba(255,255,255,.2); font-size: 11px; cursor: pointer;
    border-radius: 4px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    transition: color .15s, background .15s;
}
.pltr-rp-item-rm:hover { color: #ef4444; background: rgba(239,68,68,.1); }

/* ── Drop zone (fila vazia + drop de biblioteca) ── */
.pltr-rp-fila-drop {
    border: 1.5px dashed rgba(124,58,237,.35);
    border-radius: 8px; color: rgba(124,58,237,.55);
    font-size: 12px; text-align: center; cursor: default;
    transition: border-color .2s, background .2s, color .2s;
}
.pltr-rp-fila-drop.ativo {
    border-color: #7c3aed; background: rgba(124,58,237,.1); color: #a78bfa;
}

/* ── Biblioteca no painel — busca + itens ── */
.pltr-rp-bib-q {
    width: 100%; box-sizing: border-box;
    background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1);
    border-radius: 8px; color: #fff; font-size: 12px;
    outline: none; font-family: inherit;
    transition: border-color .2s;
}
.pltr-rp-bib-q::placeholder { color: rgba(255,255,255,.28); }
.pltr-rp-bib-q:focus { border-color: rgba(124,58,237,.5); }
.pltr-rp-bib-add {
    background: rgba(124,58,237,.7); border: none;
    border-radius: 6px; color: #fff; font-size: 17px; font-weight: 700;
    cursor: pointer; flex-shrink: 0; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s, transform .1s;
}
.pltr-rp-bib-add:hover { background: #7c3aed; transform: scale(1.08); }
.pltr-rp-bib-add.adicionado { background: rgba(34,197,94,.8); }

/* ── Especificidade: #playlister * reseta com (1,0,0) — usamos (1,1,0) ── */
#playlister .pltr-rp-hd        { padding: 0 10px; }
#playlister .pltr-rp-titulo    { padding: 10px 0; }
#playlister .pltr-rp-close-btn { padding: 10px 6px; }
#playlister .pltr-rp-corpo     { padding: 8px 0; }
#playlister .pltr-rp-empty     { padding: 28px 20px; }
#playlister .pltr-rp-now       { padding: 22px 20px; gap: 10px; }
#playlister .pltr-rp-now-nome  { margin-top: 4px; }
#playlister .pltr-rp-now-badge { padding: 3px 10px; }
#playlister .pltr-rp-item      { padding: 7px 10px; margin: 1px 8px; gap: 9px; }
#playlister .pltr-rp-item-meta { margin-top: 2px; }
#playlister .pltr-rp-item-rm   { padding: 4px 6px; }
#playlister .pltr-rp-bib-add   { padding: 5px 9px; }
#playlister .pltr-rp-fila-drop { padding: 12px 14px; margin: 4px 10px 8px; }
#playlister .pltr-rp-bib-q     { padding: 7px 10px; }

/* ── Separador "A seguir" ── */
.pltr-rp-fila-sep {
    font-size: 9px; font-weight: 800; text-transform: uppercase;
    letter-spacing: .6px; color: rgba(255,255,255,.25);
}
#playlister .pltr-rp-fila-sep  { padding: 10px 18px 2px; }

/* ════════════════════════════════════════════════════════════════
   Barra de progresso PJAX (mantida, usada pelo criaeart-pjax.js)
   ════════════════════════════════════════════════════════════════ */
#pjax-progress {
    position: fixed; top: 0; left: 0;
    height: 3px; width: 0; z-index: 99999;
    background: linear-gradient(90deg, #6c5ce7, #a29bfe, #fd79a8);
    background-size: 200% 100%;
    animation: pjax-shimmer 1.2s linear infinite;
    transition: width .4s ease, opacity .3s ease;
    pointer-events: none; border-radius: 0 2px 2px 0;
}
@keyframes pjax-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

#criaeart-content { transition: opacity .18s ease; }
#criaeart-content.pjax-saindo { opacity: 0; }
