/* Player VOD — fullscreen com OSD
   NOTA Chrome 63 (Tizen): `inset` shorthand NÃO é suportado — usar
   top/right/bottom/left explícitos. Sem isso, elementos não posicionam
   e OSD/poster ficam invisíveis. */
.pl-page {
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    background: #000;
    z-index: 400;
}
.pl-video {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: contain;
    background: #000;
}
.pl-osd {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease-out;
    background: linear-gradient(0deg,
        rgba(0,0,0,0.8) 0%,
        rgba(0,0,0,0) 30%,
        rgba(0,0,0,0) 70%,
        rgba(0,0,0,0.6) 100%);
    z-index: 10;
}
.pl-osd.pl-osd-visible {
    opacity: 1;
    pointer-events: auto;
}
.pl-osd-top {
    position: absolute;
    top: 0; left: 0; right: 0;
    padding: 24px 40px;
    display: flex;
    align-items: center;
    /* Chrome 63 sem gap — margin nos siblings */
}
.pl-osd-top > * + * { margin-left: 20px; }
.pl-osd-back {
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
}
.pl-osd-title {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    flex: 1;
}
.pl-osd-bottom {
    position: absolute;
    bottom: 40px;
    left: 40px;
    right: 40px;
}
.pl-progress-row {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    /* Chrome 63 sem gap */
}
.pl-progress-row > * + * { margin-left: 16px; }
.pl-time {
    color: rgba(255,255,255,0.9);
    font-size: 14px;
    font-family: 'Courier New', monospace;
    min-width: 60px;
}
.pl-progress {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.25);
    border-radius: 3px;
    overflow: hidden;
}
.pl-progress-fill {
    height: 100%;
    background: var(--color-primary);
    width: 0%;
    transition: width 0.2s linear;
}
.pl-controls {
    display: flex;
    justify-content: center;
    /* Chrome 63 (Tizen) não suporta `gap` em flex — usa margin-left em siblings */
}
.pl-controls .pl-btn + .pl-btn {
    margin-left: 16px;
}
.pl-btn {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 2px solid transparent;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease-out, background 0.15s ease-out, border-color 0.15s;
}
.pl-btn-lg {
    padding: 16px 32px;
    font-size: 24px;
    min-width: 100px;
}
.pl-btn:hover,
.pl-btn:focus,
.pl-btn.focused {
    background: rgba(255,255,255,0.35);
    transform: scale(1.08);
    outline: none;
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(79,182,227,0.5);
}
.pl-buffering {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 20px;
    background: rgba(0,0,0,0.7);
    padding: 16px 32px;
    border-radius: 12px;
    z-index: 20;
}

/* Poster overlay — mostrado quando video paused/buffering. Substitui o
   "Carregando..." genérico por identidade visual do conteúdo. */
.pl-poster-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-out;
    z-index: 5;
    overflow: hidden;
}
.pl-poster-overlay.pl-poster-visible {
    opacity: 1;
}
.pl-poster-img {
    position: absolute;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    filter: blur(2px) brightness(0.6);
}
.pl-poster-shade {
    position: absolute;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(0deg,
        rgba(0,0,0,0.85) 0%,
        rgba(0,0,0,0.35) 60%,
        rgba(0,0,0,0.6) 100%);
}
.pl-poster-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-align: center;
    text-shadow: 0 4px 24px rgba(0,0,0,0.7);
    padding: 0 40px;
    max-width: 80vw;
}
/* Logo image (Netflix-style) — mesma posição do texto, mas imagem transparente */
.pl-poster-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 60vw;
    max-height: 30vh;
    object-fit: contain;
    filter: drop-shadow(0 4px 24px rgba(0,0,0,0.7));
}
/* Logo no OSD top-left (menor, ao lado do "Voltar") */
.pl-osd-logo {
    max-height: 60px;
    max-width: 280px;
    object-fit: contain;
    flex: 1;
    align-self: center;
}

/* Painel lateral de faixas (audio/legenda) */
.pl-tracks-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 360px;
    height: 100vh;
    background: rgba(20, 20, 24, 0.94);
    color: #fff;
    padding: 32px 24px;
    z-index: 30;
    box-shadow: -8px 0 32px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
}
.pl-tracks-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}
.pl-tracks-list {
    flex: 1;
    overflow-y: auto;
}
.pl-track-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-radius: 8px;
    margin-bottom: 4px;
    font-size: 17px;
    cursor: pointer;
}
.pl-track-item > * + * { margin-left: 12px; }
.pl-track-focused {
    background: var(--color-primary);
    color: #000;
}
.pl-track-active .pl-track-check {
    color: #4fb6e3;
    font-weight: 900;
}
.pl-track-focused.pl-track-active .pl-track-check {
    color: #000;
}
.pl-track-check {
    width: 20px;
    text-align: center;
    font-size: 16px;
}
.pl-track-label {
    flex: 1;
}
.pl-track-empty {
    color: rgba(255,255,255,0.6);
    padding: 20px;
    text-align: center;
    font-style: italic;
}
.pl-tracks-hint {
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
    font-size: 13px;
    text-align: center;
}

/* HevcNotice overlay */
.hevc-notice {
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 600;
}
.hevc-notice-box {
    background: #1a1a1a;
    padding: 40px;
    border-radius: 12px;
    max-width: 500px;
    text-align: center;
    color: #fff;
}
.hevc-notice-box h2 { font-size: 24px; margin-bottom: 16px; color: var(--color-primary); }
.hevc-notice-box p { color: rgba(255,255,255,0.85); margin-bottom: 12px; line-height: 1.5; }
