/**
 * StarBr Play — Player de Vídeo com Layout Netflix & Controles IPTV
 * Reprodução cinematográfica com alta fidelidade visual da interface oficial Netflix.
 * Otimizado para Smart TVs (LG webOS, Samsung Tizen), Android TV e Desktop/Web.
 */

#player-screen-container {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    background: #000000;
    z-index: 99999;
    contain: strict;
    transform: translateZ(0);
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    overflow: hidden;
}

/* Player Container Cinematográfico (Preto Absoluto #000000 Estilo Netflix) */
#player-screen-container {
    background: #000000 !important;
    background-color: #000000 !important;
}

/* =========================================================================
   DECODIFICADOR NATIVO SAMSUNG TIZEN (AVPLAY HARDWARE UNDERLAY)
   Permite que o vídeo decodificado por hardware (VPU Samsung) seja exibido
   através da camada transparente da webview sem tela preta.
   ========================================================================= */
html.avplay-active,
body.avplay-active {
    background: transparent !important;
    background-color: transparent !important;
}

body.avplay-active .app-screen,
body.avplay-active #home-screen,
body.avplay-active .home-backdrop-stage,
body.avplay-active .home-main-area,
body.avplay-active #details-modal,
body.avplay-active .details-modal-fullscreen,
body.player-fullscreen-active .app-screen,
body.player-fullscreen-active #home-screen,
body.player-fullscreen-active .home-backdrop-stage,
body.player-fullscreen-active .home-main-area,
body.player-fullscreen-active #details-modal,
body.player-fullscreen-active .details-modal-fullscreen {
    visibility: hidden !important;
    background: transparent !important;
    background-color: transparent !important;
}

#player-screen-container.avplay-active {
    background: transparent !important;
    background-color: transparent !important;
}

#player-screen-container.avplay-active #main-video-player {
    background: transparent !important;
    background-color: transparent !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Objeto Nativo Samsung AVPlay */
#av-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 1920px;
    height: 1080px;
    z-index: 1;
    pointer-events: none;
    background: transparent;
}

#av-player.hidden {
    display: none !important;
}

#player-screen-container.hidden {
    display: none !important;
}

#main-video-player {
    width: 100%;
    height: 100%;
    object-position: center center;
    background: #000000;
}

/* Aspect Ratios Profissionais de IPTV & Cinema */
.aspect-fit {
    object-fit: contain !important;
}

.aspect-fill {
    object-fit: fill !important;
}

.aspect-16-9 {
    object-fit: contain;
    aspect-ratio: 16/9;
}

.aspect-4-3 {
    object-fit: contain;
    aspect-ratio: 4/3;
}

.aspect-zoom {
    object-fit: cover !important;
}

/* =========================================================================
   OVERLAY OSD HUD NETFLIX (Gradiente Cinematográfico Autêntico)
   ========================================================================= */
.netflix-hud-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(24px, 3.5vw, 44px) clamp(32px, 5vw, 64px);
    background: linear-gradient(180deg,
            rgba(0, 0, 0, 0.88) 0%,
            rgba(0, 0, 0, 0.45) 18%,
            rgba(0, 0, 0, 0) 38%,
            rgba(0, 0, 0, 0) 62%,
            rgba(0, 0, 0, 0.45) 82%,
            rgba(0, 0, 0, 0.94) 100%);
    pointer-events: none;
    transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.28s;
    z-index: 50;
}

.netflix-hud-overlay.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.netflix-hud-overlay * {
    pointer-events: auto;
}

/* =========================================================================
   1. TOP BAR NETFLIX (Título, Subtítulo, Metadados e Badges)
   ========================================================================= */
.netflix-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    margin-bottom: auto;
    z-index: 100;
}

.netflix-back-btn {
    width: 56px;
    height: 56px;
    background: rgba(20, 20, 24, 0.88) !important;
    border: 2px solid rgba(255, 255, 255, 0.25) !important;
    transition: transform 0.15s ease;
}

.netflix-back-btn svg {
    width: 28px;
    height: 28px;
}

.netflix-title-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 0;
    margin-left: 10px;
}

.netflix-title-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.netflix-title-text {
    font-size: clamp(26px, 2.8vw, 36px);
    font-weight: 900;
    letter-spacing: -0.3px;
    color: #FFFFFF;
    text-shadow: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
    margin: 0;
}

.netflix-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #E50914;
    color: #FFFFFF;
    font-size: 0.875rem;
    font-weight: 900;
    padding: 5px 14px;
    border-radius: 6px;
    letter-spacing: 0.8px;
    box-shadow: 0 0 12px rgba(229, 9, 20, 0.7);
}

.netflix-live-dot {
    font-size: 0.75rem;
    animation: netflix-pulse 1.2s infinite ease-in-out;
}

@keyframes netflix-pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.35;
        transform: scale(0.8);
    }
}

.netflix-subtitle-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.netflix-subtitle-text {
    font-size: 1.063rem;
    font-weight: 700;
    color: #CCCCCC;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.netflix-specs-badges {
    display: none !important;
}

.netflix-spec-badge {
    background: rgba(255, 255, 255, 0.12);
    border: 1.5px solid rgba(255, 255, 255, 0.28);
    color: #E6E6E6;
    font-size: 0.875rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 5px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.netflix-top-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Botões Circulares Padrão Netflix */
.netflix-circle-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(24, 24, 28, 0.88);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.netflix-circle-btn svg {
    width: 26px;
    height: 26px;
}

.netflix-circle-btn:hover,
.netflix-circle-btn.tv-focused,
.netflix-circle-btn:focus {
    background: var(--primary-red, #FF1E1E) !important;
    border-color: var(--focus-border, #FFFFFF) !important;
    color: #FFFFFF !important;
    transform: scale(1.15);
    box-shadow: 0 0 20px var(--focus-glow, rgba(255, 30, 30, 0.9)), 0 0 6px #FFFFFF;
    outline: none;
}

.netflix-pill-btn {
    padding: 10px 20px;
    border-radius: 22px;
    background: rgba(24, 24, 28, 0.88);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    color: #FFFFFF;
    font-size: 0.938rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.netflix-pill-btn:hover,
.netflix-pill-btn.tv-focused,
.netflix-pill-btn:focus {
    background: var(--primary-red, #FF1E1E) !important;
    border-color: var(--focus-border, #FFFFFF) !important;
    transform: scale(1.1);
    box-shadow: 0 0 18px var(--focus-glow, rgba(255, 30, 30, 0.85));
    outline: none;
}

.netflix-close-btn {
    background: rgba(40, 10, 10, 0.7) !important;
    border-color: rgba(229, 9, 20, 0.4) !important;
}

.netflix-close-btn:hover,
.netflix-close-btn.tv-focused,
.netflix-close-btn:focus {
    background: var(--primary-red, #FF1E1E) !important;
    border-color: var(--focus-border, #FFFFFF) !important;
}

/* =========================================================================
   2. MIDDLE CONTROLS HERO NETFLIX (Play/Pause, Rewind 10s, Forward 10s)
   ========================================================================= */
.netflix-middle-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(24px, 3.5vw, 44px);
    margin: auto 0;
    z-index: 80;
}

.netflix-middle-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(20, 20, 24, 0.88);
    border: 2px solid rgba(255, 255, 255, 0.25);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.netflix-middle-btn svg {
    width: 32px;
    height: 32px;
}

.netflix-middle-btn:hover,
.netflix-middle-btn.tv-focused,
.netflix-middle-btn:focus {
    background: var(--primary-red, #FF1E1E) !important;
    border-color: var(--focus-border, #FFFFFF) !important;
    transform: scale(1.18);
    box-shadow: 0 0 22px var(--focus-glow, rgba(255, 30, 30, 0.9)), 0 0 6px #FFFFFF;
    outline: none;
}

/* Botão Central Hero Play / Pause da Netflix */
.netflix-hero-play-btn,
.player-hud-hero-play {
    width: clamp(86px, 8.5vw, 106px);
    height: clamp(86px, 8.5vw, 106px);
    border-radius: 50%;
    background: rgba(18, 18, 22, 0.92);
    border: 3px solid rgba(255, 255, 255, 0.45);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.85);
    transition: transform 0.15s ease;
}

.netflix-hero-play-btn svg,
.player-hud-hero-play svg {
    width: 44px;
    height: 44px;
}

.netflix-hero-play-btn:hover,
.netflix-hero-play-btn.tv-focused,
.netflix-hero-play-btn:focus,
.player-hud-hero-play:hover,
.player-hud-hero-play.tv-focused,
.player-hud-hero-play:focus {
    background: var(--primary-red, #FF1E1E) !important;
    border-color: var(--focus-border, #FFFFFF) !important;
    transform: scale(1.18);
    box-shadow: 0 0 32px var(--focus-glow, rgba(255, 30, 30, 0.95)), 0 0 10px #FFFFFF;
    outline: none;
}

/* =========================================================================
   3. BOTTOM BAR NETFLIX (Scrubber Vermelho, Tempo Restante e Controles IPTV)
   ========================================================================= */
.netflix-bottom-bar,
.player-bottom-bar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    margin-top: auto;
    z-index: 100;
}

/* Scrubber Row com tempo decorrido e tempo restante negativo (-01:23:45) */
.netflix-scrubber-row {
    display: flex;
    align-items: center;
    gap: 18px;
    width: 100%;
    padding: 10px 14px;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.18s ease;
}

.netflix-scrubber-row:hover,
.netflix-scrubber-row.tv-focused,
.netflix-scrubber-row:focus {
    background: rgba(255, 255, 255, 0.08);
    outline: none;
}

.netflix-time-label {
    font-size: 1.125rem;
    font-weight: 800;
    color: #FFFFFF;
    font-family: 'Roboto Mono', monospace, sans-serif;
    letter-spacing: 0.6px;
    min-width: 80px;
}

.netflix-time-remaining {
    text-align: right;
    color: #CCCCCC;
}

.netflix-progress-track {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.28);
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    transition: height 0.15s ease;
}

.netflix-scrubber-row:hover .netflix-progress-track,
.netflix-scrubber-row.tv-focused .netflix-progress-track {
    height: 12px;
}

.netflix-progress-buffer {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 4px;
    width: 0%;
}

.netflix-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: #E50914;
    border-radius: 4px;
    width: 0%;
    box-shadow: 0 0 12px rgba(229, 9, 20, 0.85);
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* Bolinha (Thumb) do Scrubber Netflix */
.netflix-scrubber-thumb {
    width: 18px;
    height: 18px;
    background: #E50914;
    border: 2.5px solid #FFFFFF;
    border-radius: 50%;
    transform: scale(0);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.8), 0 0 8px rgba(229, 9, 20, 0.9);
    transition: transform 0.15s ease;
    margin-right: -9px;
}

.netflix-scrubber-row:hover .netflix-scrubber-thumb,
.netflix-scrubber-row.tv-focused .netflix-scrubber-thumb {
    transform: scale(1);
}

/* Linha de Controles Inferiores Netflix + IPTV */
.netflix-bottom-controls-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    position: relative;
    gap: 14px;
    width: 100%;
}

.netflix-controls-group-left {
    display: none !important;
}

.netflix-volume-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    border-radius: 26px;
    background: rgba(24, 24, 28, 0.88);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.netflix-volume-box svg {
    width: 22px;
    height: 22px;
}

.netflix-volume-box:hover,
.netflix-volume-box.tv-focused,
.netflix-volume-box:focus {
    background: var(--primary-red, #FF1E1E) !important;
    border-color: var(--focus-border, #FFFFFF) !important;
    transform: scale(1.08);
    box-shadow: 0 0 18px var(--focus-glow, rgba(255, 30, 30, 0.85));
    outline: none;
}

.netflix-volume-slider-track {
    width: 84px;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    overflow: hidden;
}

.netflix-volume-slider-fill {
    height: 100%;
    background: var(--primary-red, #FF1E1E);
    border-radius: 3px;
}

.netflix-volume-box:hover .netflix-volume-slider-fill,
.netflix-volume-box.tv-focused .netflix-volume-slider-fill {
    background: #FFFFFF;
}

.netflix-controls-center-hint {
    display: flex;
    align-items: center;
    justify-content: center;
}

.netflix-nav-tip {
    font-size: 0.938rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.netflix-controls-group-right {
    display: flex;
    align-items: center;
    gap: 12px;
    position: absolute;
    right: 0;
}

.netflix-text-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 22px;
    background: rgba(24, 24, 28, 0.88);
    border: 1.5px solid rgba(255, 255, 255, 0.22);
    color: #FFFFFF;
    font-size: 0.938rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.netflix-text-btn svg {
    width: 20px;
    height: 20px;
}

.netflix-text-btn:hover,
.netflix-text-btn.tv-focused,
.netflix-text-btn:focus {
    background: var(--primary-red, #FF1E1E) !important;
    border-color: var(--focus-border, #FFFFFF) !important;
    transform: scale(1.08);
    box-shadow: 0 0 18px var(--focus-glow, rgba(255, 30, 30, 0.85));
    outline: none;
}

/* =========================================================================
   4. CHANNEL ZAPPING BANNER AO VIVO IPTV (Design Netflix Live)
   ========================================================================= */
.netflix-live-banner {
    position: absolute;
    bottom: clamp(28px, 4vh, 56px);
    left: clamp(28px, 4.5vw, 72px);
    right: clamp(28px, 4.5vw, 72px);
    z-index: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
    background: rgba(14, 14, 18, 0.96);
    border: 2px solid #E50914;
    border-radius: 18px;
    padding: 20px 32px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.95);
    animation: netflix-slide-up 0.2s ease;
}

.netflix-live-banner.hidden {
    display: none !important;
}

@keyframes netflix-slide-up {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.netflix-live-banner-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.netflix-live-num {
    font-size: 1.875rem;
    font-weight: 900;
    color: #FFFFFF;
    background: #E50914;
    padding: 10px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(229, 9, 20, 0.55);
}

.netflix-live-logo-box {
    width: 88px;
    height: 62px;
    border-radius: 10px;
    background: #000000;
    border: 1.5px solid rgba(255, 255, 255, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.netflix-live-logo-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.netflix-live-info-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.netflix-live-title-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.netflix-live-title {
    font-size: 1.625rem;
    font-weight: 900;
    color: #FFFFFF;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.netflix-live-genre-pill {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #CCCCCC;
    font-size: 0.875rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 6px;
    text-transform: uppercase;
}

.netflix-live-prog-now {
    font-size: 1.25rem;
    font-weight: 800;
    color: #FFFFFF;
}

.netflix-live-prog-track {
    width: 100%;
    height: 7px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin: 4px 0;
}

.netflix-live-prog-fill {
    height: 100%;
    background: #E50914;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.8);
}

.netflix-live-prog-next {
    font-size: 1rem;
    font-weight: 600;
    color: #A3A3A3;
}

.netflix-live-tag-live {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(229, 9, 20, 0.25);
    border: 2px solid #E50914;
    color: #FFFFFF;
    font-size: 1rem;
    font-weight: 900;
    padding: 10px 20px;
    border-radius: 10px;
    letter-spacing: 0.8px;
    box-shadow: 0 0 16px rgba(229, 9, 20, 0.4);
}

.netflix-live-pulse-dot {
    color: #E50914;
    font-size: 0.938rem;
    animation: netflix-pulse 1.2s infinite ease-in-out;
}

/* =========================================================================
   5. SPINNER & MODAIS NETFLIX
   ========================================================================= */
.netflix-spinner-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    pointer-events: none;
}

.netflix-spinner-ring {
    width: 64px;
    height: 64px;
    border: 4px solid rgba(255, 255, 255, 0.15);
    border-top-color: #E50914;
    border-radius: 50%;
    animation: netflix-spin 0.7s linear infinite;
    box-shadow: 0 0 20px rgba(229, 9, 20, 0.4);
}

@keyframes netflix-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Modal de Erro do Player — 100% Fidelidade a _buildErrorView em video_player_screen.dart */
.player-error-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1300;
    padding: 24px;
}

.player-error-card {
    max-width: 600px;
    width: 100%;
    background: rgba(10, 16, 29, 0.96);
    border-radius: 24px;
    border: 2px solid rgba(255, 193, 7, 0.4);
    box-shadow: 0 0 32px rgba(0, 0, 0, 0.87), 0 0 20px rgba(255, 193, 7, 0.12);
    padding: 34px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.player-error-icon-box {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: rgba(255, 193, 7, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}

.player-error-title {
    color: #FFFFFF;
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.3px;
    margin-bottom: 10px;
}

.player-error-item-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #CAD5E2;
    font-size: 0.938rem;
    font-weight: 700;
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 16px;
}

.player-error-desc {
    color: #CBD5E1;
    font-size: 1rem;
    line-height: 1.55;
    margin-bottom: 16px;
}

.player-error-suggestion {
    color: #94A3B8;
    font-size: 0.938rem;
    line-height: 1.45;
    white-space: pre-line;
    text-align: left;
    background: rgba(0, 0, 0, 0.35);
    padding: 12px 18px;
    border-radius: 10px;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 24px;
    border-left: 4px solid #FFC107;
}

.player-error-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: 100%;
}

.btn-error-retry {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-red, #FF1E1E);
    color: #FFFFFF;
    font-size: 1rem;
    font-weight: 800;
    padding: 14px 26px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(255, 30, 30, 0.4);
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.btn-error-retry:hover,
.btn-error-retry.tv-focused {
    background: #FFFFFF;
    color: #000000;
    transform: scale(1.08);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
    outline: none;
}

.btn-error-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #FFFFFF;
    font-size: 1rem;
    font-weight: 800;
    padding: 14px 26px;
    border-radius: 12px;
    border: 1.5px solid rgba(255, 255, 255, 0.24);
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.btn-error-close:hover,
.btn-error-close.tv-focused {
    border-color: #FFFFFF;
    background: rgba(255, 255, 255, 0.24);
    transform: scale(1.08);
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.5);
    outline: none;
}

/* Next Episode Modal Netflix */
.netflix-next-ep-card {
    position: absolute;
    bottom: clamp(36px, 5vh, 68px);
    right: clamp(36px, 5vw, 68px);
    background: rgba(18, 18, 18, 0.96);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 28px 36px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.95);
    z-index: 2000;
    animation: netflix-slide-up 0.25s ease-out;
}

.netflix-next-ep-header {
    font-size: 1.5rem;
    font-weight: 900;
    color: #FFFFFF;
    margin-bottom: 8px;
}

.netflix-next-ep-sub {
    font-size: 1.063rem;
    color: #CCCCCC;
    margin-bottom: 20px;
}

.netflix-next-ep-sub strong {
    color: #E50914;
}

.netflix-next-ep-actions {
    display: flex;
    gap: 14px;
}

.netflix-btn-primary {
    background: #E50914;
    border: 1.5px solid transparent;
    color: #FFFFFF;
    font-size: 1rem;
    font-weight: 800;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.18s ease;
}

.netflix-btn-primary:hover,
.netflix-btn-primary.tv-focused {
    border-color: #FFFFFF;
    transform: scale(1.08);
    box-shadow: 0 0 20px rgba(229, 9, 20, 0.9);
}

.netflix-btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    color: #FFFFFF;
    font-size: 1rem;
    font-weight: 700;
    padding: 12px 22px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.18s ease;
}

.netflix-btn-secondary:hover,
.netflix-btn-secondary.tv-focused {
    background: rgba(255, 255, 255, 0.25);
    border-color: #FFFFFF;
    transform: scale(1.08);
}

.netflix-btn-secondary:hover,
.netflix-btn-secondary.tv-focused {
    background: rgba(255, 255, 255, 0.25);
    border-color: #FFFFFF;
    transform: scale(1.08);
}

/* Toast Temporário */
.netflix-player-toast {
    position: fixed;
    bottom: clamp(36px, 5vh, 60px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(18, 18, 18, 0.95);
    border: 1.5px solid #E50914;
    border-radius: 24px;
    padding: 12px 28px;
    color: #FFFFFF;
    font-size: 0.938rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.9), 0 0 20px rgba(229, 9, 20, 0.4);
    z-index: 100000;
    pointer-events: none;
    animation: netflix-toast-fade 0.2s ease-out;
}

@keyframes netflix-toast-fade {
    from {
        opacity: 0;
        transform: translate(-50%, 12px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* Numeric Zapping Badge Flutuante */
.tv-numeric-zapping-badge {
    position: fixed;
    top: 40px;
    right: 50px;
    background: rgba(14, 14, 14, 0.95);
    border: 2px solid #E50914;
    border-radius: 16px;
    padding: 12px 26px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #FFFFFF;
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 1.5px;
    z-index: 100000;
    box-shadow: 0 0 28px rgba(229, 9, 20, 0.5), 0 8px 32px rgba(0, 0, 0, 0.95);
    animation: netflix-slide-up 0.15s ease-out;
}

/* Ocultação forçada da barra superior em modo Live TV contínuo */
.live-fullscreen-mode .player-top-bar,
.player-top-bar.hidden-on-live {
    display: none !important;
}

/* =========================================================================
   AÇÕES INFERIORES VOD (RELACIONADOS / EPISÓDIOS / PRÓXIMO CAPÍTULO)
   ========================================================================= */
.netflix-bottom-actions-group {
    display: flex;
    align-items: center;
    gap: 14px;
    z-index: 10;
}

.netflix-pill-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 22px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.12);
    border: 1.5px solid rgba(255, 255, 255, 0.28);
    color: #FFFFFF;
    font-size: 0.938rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(8px);
}

.netflix-pill-action-btn svg {
    flex-shrink: 0;
}

.netflix-pill-action-btn:hover,
.netflix-pill-action-btn.tv-focused,
.netflix-pill-action-btn:focus {
    background: var(--primary-red, #FF1E1E) !important;
    border-color: #FFFFFF !important;
    transform: scale(1.08);
    box-shadow: 0 0 20px var(--focus-glow, rgba(255, 30, 30, 0.85));
    outline: none;
    color: #FFFFFF !important;
}

/* =========================================================================
   GAVETA INFERIOR (BOTTOM DRAWER): FILMES RELACIONADOS E EPISÓDIOS
   ========================================================================= */
.player-bottom-drawer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 380px;
    background: linear-gradient(0deg, rgba(8, 8, 12, 0.98) 0%, rgba(14, 14, 20, 0.96) 75%, rgba(14, 14, 20, 0.88) 100%);
    backdrop-filter: blur(16px);
    border-top: 1.5px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 -12px 36px rgba(0, 0, 0, 0.92);
    z-index: 500;
    display: flex;
    flex-direction: column;
    padding: 20px 48px 28px 48px;
    box-sizing: border-box;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease;
    transform: translateY(0);
    opacity: 1;
}

.player-bottom-drawer.hidden {
    transform: translateY(105%) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

.player-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    width: 100%;
}

.player-drawer-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.player-drawer-badge {
    background: var(--primary-red, #FF1E1E);
    color: #FFFFFF;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 4px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.player-drawer-title {
    font-size: 1.188rem;
    font-weight: 800;
    color: #FFFFFF;
    letter-spacing: 0.6px;
    margin: 0;
    text-transform: uppercase;
}

.player-drawer-header-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

.player-drawer-tip {
    font-size: 0.875rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.5px;
}

.player-drawer-close-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.18s ease;
}

.player-drawer-close-btn:hover,
.player-drawer-close-btn.tv-focused {
    background: var(--primary-red, #FF1E1E) !important;
    border-color: #FFFFFF !important;
    transform: scale(1.12);
    box-shadow: 0 0 14px var(--focus-glow, rgba(255, 30, 30, 0.85));
    outline: none;
}

/* Scroller Horizontal de Itens */
.player-drawer-items-scroller {
    display: flex;
    align-items: center;
    gap: 18px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding: 8px 4px 14px 4px;
    scrollbar-width: none;
}

.player-drawer-items-scroller::-webkit-scrollbar {
    display: none;
}

/* Card de Filme Relacionado */
.player-drawer-movie-card {
    flex: 0 0 135px;
    height: 200px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    background: #18181E;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.player-drawer-movie-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.player-drawer-movie-card .drawer-movie-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 8px 8px;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.95) 70%);
    box-sizing: border-box;
}

.player-drawer-movie-card .drawer-movie-title {
    font-size: 0.813rem;
    font-weight: 700;
    color: #FFFFFF;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-drawer-movie-card:hover,
.player-drawer-movie-card.tv-focused {
    transform: scale(1.08) translateY(-4px);
    border-color: #FFFFFF !important;
    box-shadow: 0 0 20px var(--focus-glow, rgba(255, 30, 30, 0.9));
    outline: none;
    z-index: 10;
}

/* Card de Episódio de Série */
.player-drawer-episode-card {
    flex: 0 0 240px;
    height: 165px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    background: #18181E;
    border: 2px solid rgba(255, 255, 255, 0.12);
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.player-drawer-episode-thumb {
    width: 100%;
    height: 115px;
    object-fit: cover;
    display: block;
    background: #202028;
}

.player-drawer-episode-info {
    padding: 8px 10px;
    background: rgba(18, 18, 24, 0.95);
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.player-drawer-episode-num {
    font-size: 0.688rem;
    font-weight: 800;
    color: var(--primary-red, #FF1E1E);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.player-drawer-episode-title {
    font-size: 0.813rem;
    font-weight: 700;
    color: #FFFFFF;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.player-drawer-episode-card.is-current {
    border-color: var(--primary-red, #FF1E1E);
}

.player-drawer-episode-card.is-current::after {
    content: "REPRODUZINDO";
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--primary-red, #FF1E1E);
    color: #FFFFFF;
    font-size: 0.625rem;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 3px;
    letter-spacing: 0.5px;
}

.player-drawer-episode-card:hover,
.player-drawer-episode-card.tv-focused {
    transform: scale(1.06) translateY(-4px);
    border-color: #FFFFFF !important;
    box-shadow: 0 0 20px var(--focus-glow, rgba(255, 30, 30, 0.9));
    outline: none;
    z-index: 10;
}

/* =========================================================================
   MODAL DE ÁUDIO E LEGENDAS (DESIGN CINEMATOGRÁFICO ESTILO NETFLIX)
   ========================================================================= */
.player-audio-subs-modal {
    position: absolute;
    inset: 0;
    z-index: 750;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    animation: netflix-fade-in 0.2s ease;
}

.player-audio-subs-modal.hidden {
    display: none !important;
}

.player-audio-subs-card {
    width: min(780px, 90vw);
    max-height: 82vh;
    background: rgba(20, 20, 26, 0.96);
    border: 2px solid rgba(255, 255, 255, 0.18);
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.95);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.player-audio-subs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 28px 18px;
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.1);
}

.player-audio-subs-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.player-audio-subs-title {
    font-size: 1.25rem;
    font-weight: 900;
    color: #FFFFFF;
    letter-spacing: 1px;
    margin: 0;
    text-transform: uppercase;
}

.player-audio-subs-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 24px 28px;
    overflow-y: auto;
    flex: 1;
}

.player-audio-subs-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.player-audio-subs-col-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.player-audio-subs-col-badge {
    background: rgba(255, 255, 255, 0.15);
    color: #CCCCCC;
    font-size: 0.688rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.6px;
}

.player-audio-subs-col-title {
    font-size: 1rem;
    font-weight: 800;
    color: #FFFFFF;
    letter-spacing: 0.8px;
}

.player-audio-subs-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.player-audio-track-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: #E6E6E6;
    font-size: 0.938rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.player-audio-track-item.is-selected {
    background: rgba(229, 9, 20, 0.22);
    border-color: var(--primary-red, #FF1E1E);
    color: #FFFFFF;
    font-weight: 800;
}

.player-audio-track-check {
    font-size: 1rem;
    color: var(--primary-red, #FF1E1E);
    font-weight: 900;
}

.player-audio-track-item:hover,
.player-audio-track-item.tv-focused {
    background: var(--primary-red, #FF1E1E) !important;
    border-color: #FFFFFF !important;
    color: #FFFFFF !important;
    transform: scale(1.03);
    box-shadow: 0 0 16px var(--focus-glow, rgba(255, 30, 30, 0.85));
    outline: none;
}

.player-audio-track-item:hover .player-audio-track-check,
.player-audio-track-item.tv-focused .player-audio-track-check {
    color: #FFFFFF !important;
}

.player-audio-subs-footer {
    padding: 14px 28px 18px;
    border-top: 1.5px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    font-size: 0.813rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.6px;
    text-transform: uppercase;
}
