.netflix-player-host {
    --netflix-red: #e50914;
    --netflix-muted: rgba(255,255,255,.72);
    /* Material 3 dark-scheme roles, as Compose's darkColorScheme() uses them. */
    --m3-on-surface: #e6e0e9;
    --m3-on-surface-variant: #cac4d0;
    --m3-inverse-surface: #e6e0e9;
    --m3-inverse-on-surface: #322f35;
    --m3-inverse-primary: #6750a4;
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    min-width: 320px;
    min-height: 220px;
    overflow: hidden;
    color: #fff;
    background: #000;
    font-family: Inter, Arial, sans-serif;
}

.netflix-player-host *,
.netflix-player-host *::before,
.netflix-player-host *::after { box-sizing: border-box; }

.netflix-player-provider { display: contents; }

.netflix-media-container {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    outline: none;
}

.netflix-hls-media {
    display: block;
    width: 100%;
    height: 100%;
    background: #000;
    --media-object-fit: contain;
    --media-object-position: center;
}

.netflix-top-gradient,
.netflix-bottom-gradient {
    position: absolute;
    right: 0;
    left: 0;
    z-index: 10;
    pointer-events: none;
    transition: opacity .2s ease;
}

.netflix-top-gradient {
    top: 0;
    height: 35%;
    background: linear-gradient(to bottom, rgba(0,0,0,.82), transparent);
}

.netflix-bottom-gradient {
    bottom: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,.98), rgba(0,0,0,.5), transparent);
}

.netflix-player-top-bar {
    position: absolute;
    inset: 0 0 auto;
    z-index: 30;
    display: flex;
    gap: 12px;
    align-items: center;
    min-height: 72px;
    padding: max(14px, env(safe-area-inset-top))
             max(28px, env(safe-area-inset-right))
             14px
             max(16px, env(safe-area-inset-left));
    font-family: Inter, Roboto, Arial, sans-serif;
    /* The page centers its text (index.html): keep the title next to the back arrow */
    text-align: left;
    transition: opacity .2s ease, transform .2s ease;
}

.netflix-top-button,
.netflix-control-button {
    border: 0;
    color: #fff;
    background: transparent;
    cursor: pointer;
}

.netflix-top-button,
.netflix-control-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform .14s ease, background-color .14s ease;
}

.netflix-control-button:hover { transform: scale(1.1); }

.netflix-control-button svg { width: 27px; height: 27px; fill: currentColor; }

/* Back: a plain arrow with a soft circle on hover */
.netflix-top-button {
    position: relative;
    flex: none;
    width: 44px;
    height: 44px;
    padding: 0;
    color: #fff;
    border-radius: 50%;
    -webkit-tap-highlight-color: transparent;
}

.netflix-top-button:hover { background: rgba(255,255,255,.1); }
.netflix-top-button:active { background: rgba(255,255,255,.16); }

.netflix-top-button svg { width: 26px; height: 26px; fill: currentColor; }

.netflix-player-metadata { flex: 1; min-width: 0; }

.netflix-player-title {
    overflow: hidden;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    line-height: 22px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.netflix-player-secondary-title {
    overflow: hidden;
    color: rgba(255,255,255,.6);
    font-size: 12.5px;
    font-weight: 500;
    line-height: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.netflix-player-secondary-title:empty,
.netflix-player-description { display: none; }

/* An open panel must sit above the centre play button */
.netflix-player-top-bar:has(.vp-panel:not(.netflix-hidden)) { z-index: 50; }

.vp-top-actions { display: flex; flex: none; gap: 8px; align-items: center; }

.vp-action-container { position: relative; }

.vp-action {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    height: 36px;
    padding: 0 12px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: transparent;
    cursor: pointer;
    font: 600 13px/1 Inter, Roboto, Arial, sans-serif;
    transition: background-color .15s ease;
}

.vp-action:hover,
.vp-action-open { background: rgba(255,255,255,.1); }

.vp-action svg { width: 20px; height: 20px; fill: currentColor; }

.vp-action .netflix-quality-label { color: rgba(255,255,255,.55); font-weight: 500; }

.vp-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 110;
    width: max-content;
    min-width: 300px;
    max-width: min(420px, calc(100vw - 32px));
    padding: 14px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
    color: #fff;
    background: rgba(28,28,28,.97);
    box-shadow: 0 18px 48px rgba(0,0,0,.6);
    backdrop-filter: blur(16px);
    font-family: Inter, Roboto, Arial, sans-serif;
    text-align: left;
}

.vp-panel-columns { display: flex; }

.vp-panel-section {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 150px;
    padding: 0 10px;
}

.vp-panel-section + .vp-panel-section { border-left: 1px solid rgba(255,255,255,.08); }

.vp-panel-heading {
    padding: 2px 10px 10px;
    color: rgba(255,255,255,.45);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.vp-panel-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 260px;
    overflow-y: auto;
}

.vp-panel .netflix-menu-item {
    padding: 9px 12px;
    border-radius: 8px;
    color: rgba(255,255,255,.85);
    font-size: 13px;
}

.vp-panel .netflix-menu-item:hover { background: rgba(255,255,255,.07); }
.vp-panel .netflix-menu-item-selected { color: #fff; background: rgba(255,255,255,.12); font-weight: 600; }
.vp-panel .netflix-menu-item-copy strong { font-weight: inherit; }
.vp-panel .netflix-menu-item-copy small { color: rgba(255,255,255,.45); font-size: 10.5px; }
.vp-panel .netflix-menu-check { display: none; }

.vp-panel-empty {
    padding: 22px 12px;
    color: rgba(255,255,255,.45);
    font-size: 12.5px;
    line-height: 1.5;
    text-align: center;
}

.vp-upload-button {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    padding: 9px 12px;
    border: 1px dashed rgba(255,255,255,.22);
    border-radius: 8px;
    color: rgba(255,255,255,.75);
    background: transparent;
    cursor: pointer;
    font: 500 12.5px Inter, Roboto, Arial, sans-serif;
}

.vp-upload-button:hover { color: #fff; border-color: rgba(255,255,255,.4); }
.vp-upload-button svg { width: 15px; height: 15px; }

.vp-panel-links {
    margin-top: 14px;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,.08);
}

.vp-panel-link,
.vp-panel-back {
    display: flex;
    gap: 10px;
    align-items: center;
    width: 100%;
    padding: 10px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: transparent;
    cursor: pointer;
    font: 500 13px Inter, Roboto, Arial, sans-serif;
    text-align: left;
}

.vp-panel-link:hover,
.vp-panel-back:hover { background: rgba(255,255,255,.07); }
.vp-panel-link span { flex: 1; }
.vp-panel-link svg,
.vp-panel-back svg { width: 16px; height: 16px; color: rgba(255,255,255,.65); }
.vp-panel-link .vp-chevron { color: rgba(255,255,255,.4); }
.vp-panel-back { margin-bottom: 8px; font-weight: 600; }

.vp-speed-row,
.vp-option-row {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}

.vp-speed-row {
    margin-top: 14px;
    padding: 12px 10px 0;
    border-top: 1px solid rgba(255,255,255,.08);
}

.vp-option-row { padding: 8px 0; }
.vp-speed-row .vp-panel-heading,
.vp-option-row .vp-panel-heading { padding: 0; }

.vp-chips { display: flex; gap: 4px; align-items: center; }

.vp-chip {
    min-width: 38px;
    height: 28px;
    padding: 0 9px;
    border: 0;
    border-radius: 14px;
    color: rgba(255,255,255,.7);
    background: transparent;
    cursor: pointer;
    font: 600 11.5px Inter, Roboto, Arial, sans-serif;
}

.vp-chip:hover { color: #fff; background: rgba(255,255,255,.08); }
.vp-chip-selected,
.vp-chip-selected:hover { color: #000; background: #fff; }

.vp-swatch {
    min-width: 22px;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 50%;
    background: var(--swatch) content-box;
}

.vp-swatch:hover { background: var(--swatch) content-box; border-color: rgba(255,255,255,.35); }
.vp-swatch.vp-chip-selected { background: var(--swatch) content-box; border-color: #fff; }

/* Subtitle latency and the profile buttons (Customize appearance) */
.vp-latency { padding: 8px 0 4px; }
.vp-latency .vp-panel-heading { padding: 0 0 10px; }

.vp-latency-row { display: flex; gap: 8px; align-items: center; }

.vp-latency-step,
.vp-latency-value,
.vp-wide-button {
    height: 36px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 18px;
    color: rgba(255,255,255,.75);
    background: rgba(255,255,255,.04);
    font: 500 13px Inter, Roboto, Arial, sans-serif;
}

.vp-latency-step { flex: none; padding: 0 14px; cursor: pointer; }
.vp-latency-step:hover { color: #fff; background: rgba(255,255,255,.09); }

.vp-latency-value {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.vp-wide-button {
    width: 100%;
    margin-top: 12px;
    cursor: pointer;
}

.vp-wide-button:hover { color: #fff; background: rgba(255,255,255,.09); }

.vp-wide-button-primary,
.vp-wide-button-primary:hover {
    height: 40px;
    margin-top: 10px;
    border-color: #fff;
    border-radius: 20px;
    color: #000;
    background: #fff;
    font-weight: 600;
}

.vp-wide-button-primary:hover { background: #e6e6e6; }

/* OpenSubtitles results */
.vp-subtitle-results { max-height: 300px; }
.vp-loading { opacity: .6; pointer-events: none; }

/* Casting: the button stays highlighted while a TV plays the video */
.vp-cast-button.vp-action-open .vp-action-label { color: #fff; }
.vp-player-casting .netflix-hls-media { opacity: .25; }

/* Material 3 Snackbar */
.m3-snackbar {
    position: absolute;
    bottom: 112px;
    left: 50%;
    z-index: 120;
    display: flex;
    gap: 4px;
    align-items: center;
    width: max-content;
    max-width: min(600px, calc(100% - 24px));
    min-height: 48px;
    padding: 4px 8px 4px 16px;
    color: var(--m3-inverse-on-surface);
    background: var(--m3-inverse-surface);
    border-radius: 4px;
    box-shadow: 0 3px 5px -1px rgba(0,0,0,.2), 0 6px 10px rgba(0,0,0,.14), 0 1px 18px rgba(0,0,0,.12);
    font-family: Roboto, Inter, Arial, sans-serif;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 8px);
    transition: opacity .2s ease, transform .2s ease;
}

.m3-snackbar-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

/* bodyMedium */
.m3-snackbar-text {
    padding: 10px 0;
    font-size: 14px;
    line-height: 20px;
    letter-spacing: .25px;
    text-align: start;
}

/* TextButton, labelLarge */
.m3-snackbar-action {
    position: relative;
    flex: none;
    height: 40px;
    padding: 0 12px;
    color: var(--m3-inverse-primary);
    background: transparent;
    border: 0;
    border-radius: 20px;
    cursor: pointer;
    font: 500 14px/20px Roboto, Inter, Arial, sans-serif;
    letter-spacing: .1px;
}

.m3-snackbar-action:hover { background: rgba(103,80,164,.08); }
.m3-snackbar-action:active { background: rgba(103,80,164,.12); }





.netflix-media-controls {
    position: absolute;
    inset: auto 0 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    padding: 0 max(28px, env(safe-area-inset-right))
             max(10px, env(safe-area-inset-bottom))
             max(28px, env(safe-area-inset-left));
    font-family: Inter, Roboto, Arial, sans-serif;
    transition: opacity .2s ease, transform .2s ease;
}

.vp-time {
    align-self: flex-end;
    color: rgba(255,255,255,.85);
    font-size: 12px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.vp-time .netflix-time-divider { margin: 0 4px; color: rgba(255,255,255,.55); }

.netflix-progress-row {
    position: relative;
    width: 100%;
    padding: 9px 0 6px;
}

.netflix-time-slider,
.netflix-volume-slider {
    appearance: none;
    -webkit-appearance: none;
    display: block;
    margin: 0;
    border: 0;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

/* Thin white line: played, buffered, rest */
.netflix-time-slider {
    width: 100%;
    height: 3px;
    background:
        linear-gradient(to right,
            #fff 0%,
            #fff var(--netflix-progress, 0%),
            rgba(255,255,255,.45) var(--netflix-progress, 0%),
            rgba(255,255,255,.45) var(--netflix-buffered, 0%),
            rgba(255,255,255,.2) var(--netflix-buffered, 0%),
            rgba(255,255,255,.2) 100%);
    transition: height .12s ease;
}

.netflix-time-slider:hover { height: 5px; }

.netflix-time-slider::-webkit-slider-thumb,
.netflix-volume-slider::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
}

.netflix-time-slider::-moz-range-thumb,
.netflix-volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 50%;
    background: #fff;
}

.netflix-seek-tooltip {
    position: absolute;
    bottom: 22px;
    z-index: 60;
    padding: 5px 8px;
    transform: translateX(-50%);
    border-radius: 6px;
    color: #000;
    background: #fff;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 5px 15px rgba(0,0,0,.4);
}

.netflix-control-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
}

.netflix-control-group { display: flex; gap: 6px; align-items: center; }

.netflix-control-button {
    min-width: 36px;
    height: 36px;
    padding: 6px;
    border-radius: 50%;
}

.netflix-control-button:hover { background: rgba(255,255,255,.12); }

.netflix-control-button svg { width: 24px; height: 24px; fill: currentColor; }

.vp-seek-icon text { fill: currentColor; font: 700 6.5px Inter, Arial, sans-serif; }

.netflix-volume-container { display: flex; gap: 8px; align-items: center; }

.netflix-volume-slider {
    width: 50px;
    height: 3px;
    background:
        linear-gradient(to right,
            #fff 0%,
            #fff var(--netflix-volume, 100%),
            rgba(255,255,255,.25) var(--netflix-volume, 100%),
            rgba(255,255,255,.25) 100%);
}

.netflix-time-label { color: inherit; }

.netflix-live-badge {
    display: inline-flex;
    gap: 7px;
    align-items: center;
    margin-left: 8px;
    padding: 5px 9px;
    border-radius: 4px;
    background: rgba(0,0,0,.48);
    font-size: 12px;
    font-weight: 800;
}

.netflix-live-badge span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--netflix-red);
}

/* Behind live after a pause: a button back to what's on now */
.netflix-live-badge.netflix-live-behind {
    cursor: pointer;
    background: rgba(255,255,255,.16);
    pointer-events: auto;
}

.netflix-live-badge.netflix-live-behind:hover {
    background: rgba(255,255,255,.28);
}

.netflix-live-badge.netflix-live-behind span {
    background: #9a9a9a;
}

.netflix-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.netflix-menu-item-copy { display: flex; flex-direction: column; gap: 2px; }

.netflix-live-program-panel {
    position: absolute;
    left: max(24px, env(safe-area-inset-left));
    bottom: 92px;
    z-index: 28;
    width: min(480px, calc(100% - 48px));
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
}

.netflix-program-label {
    margin-bottom: 4px;
    color: rgba(255,255,255,.65);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.netflix-current-program-title {
    font-size: clamp(18px, 2vw, 26px);
    font-weight: 750;
}

.netflix-next-program-title {
    font-size: clamp(14px, 1.4vw, 18px);
    font-weight: 650;
}

.netflix-program-time { margin-top: 3px; color: rgba(255,255,255,.7); font-size: 13px; }

.netflix-program-progress {
    width: 100%;
    height: 4px;
    margin: 10px 0 13px;
    overflow: hidden;
    border-radius: 10px;
    background: rgba(255,255,255,.25);
}

.netflix-program-progress-fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--netflix-red);
    transition: width 1s linear;
}

/* Same look as the hero buttons: solid white main action, translucent grey for the rest */
.vp-next-button {
    display: inline-flex;
    flex: 1;
    gap: 8px;
    align-items: center;
    justify-content: center;
    height: 38px;
    border: 0;
    border-radius: 6px;
    color: #fff;
    background: rgba(109,109,109,.7);
    cursor: pointer;
    font: 600 13px Inter, Roboto, Arial, sans-serif;
}

.vp-next-button:hover { background: rgba(109,109,109,.55); }
.vp-next-button svg { width: 16px; height: 16px; fill: currentColor; }

/* Skip intro: bottom right, above the play controls */
.vp-intro {
    position: absolute;
    right: max(24px, env(safe-area-inset-right));
    bottom: 96px;
    z-index: 33;
    display: flex;
    gap: 8px;
    font-family: Inter, Roboto, Arial, sans-serif;
}

.vp-intro .vp-next-button {
    flex: none;
    height: 44px;
    padding: 0 20px;
    border: 1px solid rgba(255,255,255,.35);
    background: rgba(24,24,24,.82);
    backdrop-filter: blur(12px);
    font-size: 14px;
}

.vp-intro .vp-next-button:hover { background: rgba(60,60,60,.9); }
.vp-intro .vp-intro-skip { color: #000; border-color: #fff; background: #fff; }
.vp-intro .vp-intro-skip:hover { background: #e2e2e2; }

.vp-preview:not(.vp-fullscreen) .vp-intro { display: none; }

/* While counting down to the next episode the top bar stays up, so the countdown shows */
.vp-next-countdown .netflix-player-top-bar,
.vp-next-countdown .netflix-top-gradient {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
}

.netflix-subtitle-overlay {
    --subtitle-background: rgba(0,0,0,.65);
    position: absolute;
    left: 50%;
    bottom: 102px;
    z-index: 32;
    display: none;
    max-width: min(88%, 1100px);
    padding: .18em .42em;
    transform: translateX(-50%);
    border-radius: .15em;
    background: var(--subtitle-background);
    font-weight: 650;
    line-height: 1.35;
    text-align: center;
    white-space: pre-line;
    text-shadow: 0 2px 3px rgba(0,0,0,.75);
    pointer-events: none;
}

.netflix-subtitle-visible { display: block; }

.netflix-buffering-overlay {
    position: absolute;
    inset: 0;
    z-index: 34;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.netflix-player-buffering .netflix-buffering-overlay { display: flex; }

.netflix-buffering-spinner {
    width: 58px;
    height: 58px;
    border: 5px solid rgba(255,255,255,.25);
    border-top-color: var(--netflix-red);
    border-radius: 50%;
    animation: netflix-spin .75s linear infinite;
}

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

.netflix-controls-hidden .netflix-player-top-bar,
.netflix-controls-hidden .netflix-media-controls,
.netflix-controls-hidden .netflix-live-program-panel,
.netflix-controls-hidden .netflix-top-gradient,
.netflix-controls-hidden .netflix-bottom-gradient {
    opacity: 0;
    pointer-events: none;
}

.netflix-controls-hidden .netflix-player-top-bar { transform: translateY(-12px); }
.netflix-controls-hidden .netflix-media-controls,
.netflix-controls-hidden .netflix-live-program-panel { transform: translateY(12px); }

/* The pointer hides with the controls; moving it brings both back */
.netflix-controls-hidden .netflix-media-container { cursor: none; }

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

/* Live page preview: only the fullscreen button until it goes fullscreen */
.vp-preview:not(.vp-fullscreen) :is(
    .netflix-player-top-bar,
    .netflix-live-program-panel,
    .netflix-top-gradient,
    .vp-time,
    .netflix-progress-row,
    .netflix-left-controls
) { display: none !important; }

.vp-preview:not(.vp-fullscreen) .netflix-bottom-gradient { height: 30%; }
.vp-preview:not(.vp-fullscreen) .netflix-control-row { justify-content: flex-end; }
.vp-preview:not(.vp-fullscreen) .netflix-media-controls { padding: 0 10px 8px; }
.vp-preview:not(.vp-fullscreen) .netflix-media-container { cursor: pointer; }

.netflix-player-host .vp-disabled { display: none !important; }

.netflix-player-host button:focus-visible,
.netflix-player-host input:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

@media (max-width: 760px) {
    .netflix-player-top-bar { min-height: 60px; padding: 8px 12px 8px 6px; }
    .vp-action-label,
    .vp-action .netflix-quality-label { display: none; }
    .vp-action { padding: 0 9px; }
    .vp-panel { right: -6px; min-width: 0; }
    .m3-snackbar { bottom: 84px; }
    .netflix-player-description { display: none; }
    .netflix-media-controls { padding: 0 14px 6px; }
    .netflix-volume-slider { display: none; }
    .netflix-live-program-panel { left: 14px; bottom: 74px; width: calc(100% - 28px); }
    .netflix-subtitle-overlay { bottom: 78px; max-width: 94%; }

    /* Full player on a narrow screen: bigger buttons in the bar
       (the small live preview keeps its own layout) */
    .netflix-player-host:not(.vp-preview) .netflix-control-group { gap: 10px; }
    .netflix-player-host:not(.vp-preview) .netflix-control-button {
        min-width: 44px;
        height: 44px;
        padding: 6px;
    }
    .netflix-player-host:not(.vp-preview) .netflix-control-button svg { width: 30px; height: 30px; }
    .netflix-player-host:not(.vp-preview) .netflix-left-controls > .netflix-control-button:first-child svg {
        width: 34px;
        height: 34px;   /* play / pause stands out */
    }
}

/* ---------- Next Episode (top bar) ---------- */

/* The countdown fills the button from the left */
.vp-next-episode-button.vp-next-counting {
    background: linear-gradient(to right,
        rgba(255,255,255,.24) 0%, rgba(255,255,255,.24) var(--vp-next-progress, 0%),
        rgba(255,255,255,.08) var(--vp-next-progress, 0%), rgba(255,255,255,.08) 100%);
}

/* ---------- Episodes (bottom bar) ---------- */

.vp-bottom-center {
    position: absolute;
    left: 50%;
    display: flex;
    align-items: center;
    transform: translateX(-50%);
}

.vp-episodes-button {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    height: 36px;
    padding: 0 12px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: transparent;
    cursor: pointer;
    font: 600 15px/1 Inter, Roboto, Arial, sans-serif;
    white-space: nowrap;
    transition: background-color .15s ease;
}

.vp-episodes-button:hover,
.vp-episodes-button-open { background: rgba(255,255,255,.1); }
.vp-episodes-button svg { width: 16px; height: 16px; transition: transform .2s ease; }
.vp-episodes-button-open svg { transform: rotate(180deg); }

.vp-preview:not(.vp-fullscreen) .vp-bottom-center { display: none; }

/* ---------- Episodes panel ---------- */

.vp-episodes {
    position: absolute;
    inset: 0;
    z-index: 120;
    display: flex;
    flex-direction: column;
    padding: max(32px, env(safe-area-inset-top)) max(40px, env(safe-area-inset-right))
             max(24px, env(safe-area-inset-bottom)) max(40px, env(safe-area-inset-left));
    color: #fff;
    background: rgba(20,20,20,.97);
    backdrop-filter: blur(18px);
    font-family: Inter, Roboto, Arial, sans-serif;
    text-align: left;
    cursor: auto;
    animation: vp-episodes-in .2s ease;
}

@keyframes vp-episodes-in { from { opacity: 0; transform: translateY(12px); } }

.vp-episodes:focus { outline: none; }

/* The pointer hides with the controls, but not over the panel */
.vp-episodes-open .netflix-media-container { cursor: auto; }

.vp-episodes-header {
    display: flex;
    flex: none;
    gap: 20px;
    align-items: center;
    margin-bottom: 24px;
}

.vp-episodes-heading { flex: 1; min-width: 0; }

.vp-episodes-title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
}

.vp-episodes-show {
    overflow: hidden;
    margin-top: 4px;
    color: rgba(255,255,255,.6);
    font-size: 13px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vp-auto-next {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    color: rgba(255,255,255,.7);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

.vp-switch {
    position: relative;
    width: 34px;
    height: 20px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255,255,255,.22);
    cursor: pointer;
    transition: background-color .15s ease;
}

.vp-switch-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    transition: transform .15s ease;
}

.vp-switch[aria-checked="true"] { background: var(--netflix-red); }
.vp-switch[aria-checked="true"] .vp-switch-thumb { transform: translateX(14px); }

.vp-episodes-close {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(255,255,255,.1);
    cursor: pointer;
}

.vp-episodes-close:hover { background: rgba(255,255,255,.18); }
.vp-episodes-close svg { width: 18px; height: 18px; }

.vp-episodes-body {
    display: grid;
    flex: 1;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 32px;
    min-height: 0;
}

.vp-seasons,
.vp-episode-list {
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.25) transparent;
}

.vp-seasons {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-right: 10px;
}

.vp-season {
    display: flex;
    flex: none;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    padding: 11px 12px;
    border: 0;
    border-radius: 6px;
    color: rgba(255,255,255,.7);
    background: transparent;
    cursor: pointer;
    font: 500 13px Inter, Roboto, Arial, sans-serif;
    text-align: left;
}

.vp-season:hover { color: #fff; background: rgba(255,255,255,.05); }
.vp-season-selected,
.vp-season-selected:hover { color: #fff; background: rgba(255,255,255,.1); font-weight: 600; }
.vp-season-count { color: rgba(255,255,255,.5); font-size: 11px; font-weight: 500; white-space: nowrap; }

.vp-episode-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 8px;
}

.vp-episode {
    display: grid;
    flex: none;
    grid-template-columns: 34px 152px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 10px 16px 10px 8px;
    border-radius: 8px;
    background: #232323;
    cursor: pointer;
    transition: background-color .15s ease;
}

.vp-episode:hover { background: #2c2c2c; }
.vp-episode:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.vp-episode-current { background: #2a2a2a; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }

.vp-episode-number {
    color: rgba(255,255,255,.7);
    font-size: 20px;
    font-weight: 600;
    text-align: center;
}

.vp-episode-thumb {
    position: relative;
    overflow: hidden;
    width: 152px;
    aspect-ratio: 16 / 9;
    border-radius: 4px;
    background: #333;
}

.vp-episode-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }

.vp-dot {
    display: inline-block;
    flex: none;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--netflix-red);
}

.vp-episode-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    display: inline-flex;
    gap: 5px;
    align-items: center;
    padding: 3px 7px;
    border-radius: 4px;
    background: rgba(0,0,0,.75);
    font-size: 10px;
    font-weight: 600;
}

.vp-episode-progress {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255,255,255,.3);
}

.vp-episode-progress-fill { display: block; width: 0; height: 100%; background: var(--netflix-red); }

.vp-episode-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.vp-episode-title { overflow: hidden; font-size: 14px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }

.vp-episode-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    color: rgba(255,255,255,.55);
    font-size: 11.5px;
    font-weight: 500;
}

/* "• Watching" next to the details: narrow screens only (wide ones badge the picture) */
.vp-episode-watching { display: none; gap: 5px; align-items: center; color: #fff; font-weight: 600; }

.vp-episode-description {
    margin-top: 4px;
    color: rgba(255,255,255,.75);
    font-size: 12.5px;
    line-height: 1.5;
}

.vp-episode-expand,
.vp-episode-more { display: none; }

/* ---------- small screens ---------- */

@media (max-width: 760px) {
    /* The countdown still says how long is left, even without the label */
    .vp-next-episode-button.vp-next-counting .vp-action-label { display: inline; }

    .vp-episodes { padding: max(18px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom)); }

    .vp-episodes-header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 14px 12px;
        margin-bottom: 16px;
    }
    .vp-episodes-heading { grid-column: 1; grid-row: 1; }
    .vp-episodes-close { grid-column: 2; grid-row: 1; width: 40px; height: 40px; }
    .vp-auto-next { grid-column: 1 / -1; grid-row: 2; font-size: 13px; }
    .vp-episodes-title { font-size: 24px; }

    .vp-episodes-body { display: flex; flex-direction: column; gap: 12px; }

    /* Seasons become a row of chips */
    .vp-seasons {
        flex: none;
        flex-direction: row;
        gap: 8px;
        padding: 0 0 4px;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
    }
    .vp-seasons::-webkit-scrollbar { display: none; }
    .vp-season {
        padding: 9px 14px;
        border: 1px solid rgba(255,255,255,.22);
        border-radius: 999px;
        font-size: 13px;
        font-weight: 600;
        white-space: nowrap;
    }
    .vp-season-selected,
    .vp-season-selected:hover { color: #141414; border-color: #fff; background: #fff; }
    .vp-season-count { display: none; }

    .vp-episode-list { flex: 1; padding-right: 2px; }

    .vp-episode {
        grid-template-columns: 112px minmax(0, 1fr) 32px;
        gap: 12px;
        padding: 8px;
    }
    .vp-episode-number,
    .vp-episode-badge { display: none; }
    .vp-episode-thumb { width: 112px; border-radius: 6px; }
    .vp-episode-title { font-size: 15px; }
    .vp-episode-meta { font-size: 12.5px; }
    .vp-episode-current .vp-episode-watching { display: inline-flex; }

    /* Descriptions open with the chevron, on a line under the row */
    .vp-episode-description { display: none; }
    .vp-episode-expanded .vp-episode-more {
        display: block;
        grid-column: 1 / -1;
        padding: 2px 4px 4px;
        color: rgba(255,255,255,.75);
        font-size: 13px;
        line-height: 1.5;
    }

    .vp-episode-expand {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        padding: 0;
        border: 0;
        border-radius: 50%;
        color: rgba(255,255,255,.6);
        background: transparent;
        cursor: pointer;
    }
    .vp-episode-expand svg { width: 18px; height: 18px; transition: transform .2s ease; }
    .vp-episode-expanded .vp-episode-expand svg { transform: rotate(180deg); }
}

/* Phones: Episodes joins the bar instead of floating in its middle */
@media (max-width: 520px) {
    .vp-bottom-center { position: static; margin-left: auto; transform: none; }
    .vp-episodes-button { padding: 0 10px; font-size: 14px; }
}

/* ---------- Watch Party: the host keeps control ---------- */

.vp-lock-badge {
    display: inline-flex;
    gap: 7px;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    color: #fff;
    background: rgba(255,255,255,.1);
    font: 600 13px Inter, Roboto, Arial, sans-serif;
    white-space: nowrap;
}
.vp-lock-badge svg { width: 14px; height: 14px; }

.vp-playback-locked .netflix-left-controls > .netflix-control-button,
.vp-playback-locked .netflix-time-slider { opacity: .45; cursor: not-allowed; }

@media (max-width: 520px) {
    .vp-lock-badge span { display: none; }
}

/* ---------- Watch Party: people panel ---------- */

.vp-party-count {
    min-width: 20px;
    padding: 2px 6px;
    border-radius: 999px;
    background: var(--netflix-red);
    font-size: 11px;
    text-align: center;
}

.vp-party {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 115;
    display: flex;
    flex-direction: column;
    width: min(380px, 100%);
    padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 20px 20px;
    border-left: 1px solid rgba(255,255,255,.08);
    color: #fff;
    background: rgba(20,20,20,.97);
    backdrop-filter: blur(18px);
    box-shadow: -18px 0 48px rgba(0,0,0,.5);
    font-family: Inter, Roboto, Arial, sans-serif;
    text-align: left;
    cursor: auto;
    animation: vp-party-in .2s ease;
}
.vp-party:focus { outline: none; }

@keyframes vp-party-in { from { opacity: 0; transform: translateX(24px); } }

.vp-party-open .netflix-media-container { cursor: auto; }

.vp-party-header { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.vp-party-heading { flex: 1; min-width: 0; }
.vp-party-title { font-size: 20px; font-weight: 700; }
.vp-party-room { overflow: hidden; color: rgba(255,255,255,.6); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }

.vp-party-list {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 4px;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.25) transparent;
}

.vp-party-member {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 9px 8px;
    border-radius: 10px;
}
.vp-party-member:hover { background: rgba(255,255,255,.05); }

.vp-party-avatar {
    position: relative;
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}

.vp-party-dot {
    position: absolute;
    right: -3px;
    bottom: -3px;
    width: 12px;
    height: 12px;
    border: 2px solid #141414;
    border-radius: 50%;
    background: #5a5a5a;
}
.vp-party-dot-here { background: #34c759; }

.vp-party-who { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.vp-party-name { display: flex; gap: 6px; align-items: center; min-width: 0; font-size: 14px; font-weight: 600; }
.vp-party-name-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vp-party-status { color: rgba(255,255,255,.55); font-size: 12px; }

.vp-party-badge {
    flex: none;
    padding: 2px 6px;
    border-radius: 4px;
    background: #3a3a3a;
    font-size: 10.5px;
    font-weight: 700;
}
.vp-party-badge-host { background: var(--netflix-red); }

.vp-party-remove {
    flex: none;
    padding: 6px 10px;
    border: 0;
    border-radius: 6px;
    color: #ff6b6b;
    background: transparent;
    cursor: pointer;
    font: 600 13px Inter, Roboto, Arial, sans-serif;
}
.vp-party-remove:hover { background: rgba(255,107,107,.12); }
.vp-party-confirm .vp-party-remove { color: #fff; background: #d32f2f; }

.vp-party-controls {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-top: 12px;
    padding: 14px;
    border-radius: 12px;
    background: rgba(255,255,255,.06);
}
.vp-party-controls-text { display: flex; flex: 1; flex-direction: column; gap: 3px; }
.vp-party-controls-text strong { font-size: 13.5px; }
.vp-party-controls-text span { color: rgba(255,255,255,.6); font-size: 12px; line-height: 1.4; }

/* Phones: a sheet from the bottom, over most of the picture */
@media (max-width: 760px) {
    .vp-party {
        top: auto;
        left: 0;
        width: 100%;
        max-height: 78%;
        padding: 18px 16px max(16px, env(safe-area-inset-bottom));
        border-top: 1px solid rgba(255,255,255,.1);
        border-left: 0;
        border-radius: 18px 18px 0 0;
        animation-name: vp-party-up;
    }
    /* The count still shows next to the icon when the label hides */
    .vp-party-button .vp-party-count { display: inline-block; }
}

@keyframes vp-party-up { from { opacity: 0; transform: translateY(32px); } }

/* ---------- Watch Party: make host, reactions, waiting ---------- */

.vp-party-actions { display: flex; flex: none; gap: 2px; }
.vp-party-make-host {
    flex: none;
    padding: 6px 10px;
    border: 0;
    border-radius: 6px;
    color: #fff;
    background: transparent;
    cursor: pointer;
    font: 600 13px Inter, Roboto, Arial, sans-serif;
}
.vp-party-make-host:hover { background: rgba(255,255,255,.1); }
.vp-party-make-host.vp-confirming { color: #000; background: #fff; }
.vp-party-remove.vp-confirming { color: #fff; background: #d32f2f; }

.vp-react-wrap { position: relative; display: inline-flex; }
.vp-react-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 36px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    font-size: 20px;
}
.vp-react-button:hover { background: rgba(255,255,255,.1); }

.vp-react-picker {
    position: absolute;
    /* Above the whole bar: clear of the seek line and the time over it, which sit above the buttons */
    bottom: calc(100% + 56px);
    left: 50%;
    z-index: 60;
    display: flex;
    gap: 2px;
    padding: 6px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 999px;
    background: rgba(28,28,28,.97);
    box-shadow: 0 12px 32px rgba(0,0,0,.5);
    transform: translateX(-50%);
}
.vp-react-emoji {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    font-size: 22px;
    transition: transform .12s ease, background-color .12s ease;
}
.vp-react-emoji:hover { background: rgba(255,255,255,.1); transform: scale(1.18); }

.vp-reactions {
    position: absolute;
    right: max(32px, env(safe-area-inset-right));
    bottom: 110px;
    z-index: 40;
    width: 120px;
    height: 0;
    pointer-events: none;
}
.vp-reaction {
    position: absolute;
    bottom: 0;
    left: calc(50% + var(--vp-reaction-x, 0px));
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translateX(-50%);
    animation: vp-reaction-rise 3.2s ease-out forwards;
}
.vp-reaction-emoji { font-size: 38px; line-height: 1; filter: drop-shadow(0 4px 10px rgba(0,0,0,.5)); }
.vp-reaction-name {
    max-width: 120px;
    margin-top: 4px;
    padding: 2px 8px;
    overflow: hidden;
    border-radius: 999px;
    color: #fff;
    background: rgba(0,0,0,.6);
    font: 600 11px Inter, Roboto, Arial, sans-serif;
    text-overflow: ellipsis;
    white-space: nowrap;
}
@keyframes vp-reaction-rise {
    0% { opacity: 0; transform: translate(-50%, 0) scale(.6); }
    12% { opacity: 1; transform: translate(-50%, -30px) scale(1.1); }
    75% { opacity: 1; }
    100% { opacity: 0; transform: translate(-50%, -300px) scale(1); }
}

.vp-party-notice {
    position: absolute;
    top: 84px;
    left: 50%;
    z-index: 45;
    max-width: calc(100% - 32px);
    padding: 10px 18px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 999px;
    color: #fff;
    background: rgba(20,20,20,.88);
    backdrop-filter: blur(12px);
    font: 600 14px Inter, Roboto, Arial, sans-serif;
    text-overflow: ellipsis;
    white-space: nowrap;
    transform: translateX(-50%);
}

@media (max-width: 760px) {
    .vp-reactions { right: 12px; bottom: 90px; }
    .vp-reaction-emoji { font-size: 30px; }
    .vp-party-notice { top: 68px; font-size: 13px; }
    .vp-party-actions { flex-direction: column; align-items: flex-end; }
}

/* Phones: the reaction button sits at the right of the bar, so the picker opens leftwards from it */
@media (max-width: 520px) {
    .vp-react-picker { right: -4px; left: auto; transform: none; }
    .vp-react-emoji { width: 36px; height: 36px; font-size: 20px; }
}

/* Someone buffering: the room may be waiting for them */
.vp-party-dot-loading { background: #ffb74d; }
.vp-party-status-loading { color: #ffb74d; }

/* ---------- Watch Party: tabs, voice chat, chat ---------- */

.vp-party-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 14px;
    padding: 4px;
    border-radius: 10px;
    background: rgba(255,255,255,.06);
}
.vp-party-tab {
    position: relative;
    flex: 1;
    padding: 8px 10px;
    border: 0;
    border-radius: 7px;
    color: rgba(255,255,255,.65);
    background: transparent;
    font: 600 13.5px Inter, Roboto, Arial, sans-serif;
    cursor: pointer;
}
.vp-party-tab[aria-selected="true"] { color: #fff; background: rgba(255,255,255,.14); }

.vp-party-view { display: flex; flex: 1; flex-direction: column; min-height: 0; }

.vp-chat-badge {
    display: inline-block;
    min-width: 18px;
    margin-left: 6px;
    padding: 1px 5px;
    border-radius: 999px;
    color: #fff;
    background: var(--netflix-red);
    font-size: 11px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    vertical-align: middle;
}

/* Voice chat */
.vp-voice {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255,255,255,.06);
}
.vp-voice-row { display: flex; gap: 12px; align-items: center; }
.vp-voice-icon, .vp-voice-icon svg { width: 20px; height: 20px; flex: none; }
.vp-voice-text { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.vp-voice-text strong { font-size: 13.5px; }
.vp-voice-text span { color: rgba(255,255,255,.6); font-size: 12px; }
.vp-switch:disabled { opacity: .5; cursor: default; }

.vp-voice-mic {
    display: flex;
    gap: 10px;
    align-items: center;
    width: 100%;
    padding: 9px 12px;
    border: 0;
    border-radius: 9px;
    color: #fff;
    background: rgba(255,255,255,.08);
    font: 500 13px Inter, Roboto, Arial, sans-serif;
    text-align: left;
    cursor: pointer;
    transition: box-shadow .12s ease;
}
.vp-voice-mic svg { width: 18px; height: 18px; flex: none; }
.vp-voice-mic span { flex: 1; }
.vp-voice-mic em { color: rgba(255,255,255,.7); font-style: normal; font-weight: 600; }
.vp-voice-mic:hover { background: rgba(255,255,255,.13); }
.vp-voice-mic-off { color: #ff8a8a; background: rgba(255,107,107,.16); }
.vp-voice-mic.vp-speaking { box-shadow: inset 0 0 0 2px #34c759; }

/* Who's talking: a green ring */
.vp-party-avatar { transition: box-shadow .12s ease; }
.vp-party-avatar.vp-speaking { box-shadow: 0 0 0 2px #141414, 0 0 0 4px #34c759; }

.vp-party-mic-off { display: inline-flex; color: #ff8a8a; }
.vp-party-mic-off svg { width: 14px; height: 14px; }

.vp-party-voice-controls { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.vp-party-peer-mute {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(255,255,255,.1);
    cursor: pointer;
}
.vp-party-peer-mute svg { width: 15px; height: 15px; }
.vp-party-peer-mute:hover { background: rgba(255,255,255,.18); }
.vp-party-peer-muted { color: #ff8a8a; background: rgba(255,107,107,.18); }

.vp-party-volume {
    flex: 1;
    min-width: 0;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(to right, var(--netflix-red) var(--vp-fill, 100%), rgba(255,255,255,.22) var(--vp-fill, 100%));
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}
.vp-party-volume:disabled { opacity: .35; cursor: default; }
.vp-party-volume::-webkit-slider-thumb {
    width: 13px;
    height: 13px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    -webkit-appearance: none;
}
.vp-party-volume::-moz-range-thumb { width: 13px; height: 13px; border: 0; border-radius: 50%; background: #fff; }

/* Chat */
.vp-chat-list {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 12px;
    min-height: 120px;
    padding: 4px 2px 8px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.25) transparent;
}
.vp-chat-empty { margin: auto; color: rgba(255,255,255,.55); font-size: 13px; }
.vp-chat-line { display: flex; gap: 10px; align-items: flex-start; }
.vp-chat-avatar {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}
.vp-chat-body { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.vp-chat-name { font-size: 12.5px; font-weight: 600; }
.vp-chat-mine .vp-chat-name { color: rgba(255,255,255,.65); }
.vp-chat-text { color: rgba(255,255,255,.9); font-size: 14px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }

.vp-chat-form { display: flex; gap: 8px; align-items: flex-end; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.08); }
.vp-chat-input {
    flex: 1;
    min-width: 0;
    max-height: 110px;
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 10px;
    color: #fff;
    background: rgba(0,0,0,.35);
    font: 14px/1.4 Inter, Roboto, Arial, sans-serif;
    resize: none;
}
.vp-chat-input:focus { border-color: rgba(255,255,255,.4); outline: none; }
.vp-chat-send {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: var(--netflix-red);
    cursor: pointer;
}
.vp-chat-send svg { width: 18px; height: 18px; }

/* New messages over the video while the chat is closed */
.vp-chat-toasts {
    position: absolute;
    left: max(24px, env(safe-area-inset-left));
    bottom: 120px;
    z-index: 42;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: min(360px, calc(100% - 48px));
    pointer-events: none;
}
.vp-chat-toast {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 14px;
    color: #fff;
    background: rgba(20,20,20,.88);
    backdrop-filter: blur(12px);
    font-family: Inter, Roboto, Arial, sans-serif;
    text-align: left;
    cursor: pointer;
    pointer-events: auto;
    animation: vp-chat-toast-in .25s ease;
    transition: opacity .4s ease, transform .4s ease;
}
.vp-chat-toast .vp-chat-text { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.vp-chat-toast-out { opacity: 0; transform: translateX(-16px); }
@keyframes vp-chat-toast-in { from { opacity: 0; transform: translateY(12px); } }
.vp-party-open .vp-chat-toasts { display: none; }

@media (max-width: 760px) {
    .vp-chat-toasts { left: 12px; bottom: 96px; max-width: calc(100% - 24px); }
    .vp-chat-list { min-height: 160px; }
}

/* ---------- OpenSubtitles results: a flag and the language, one row per file ---------- */

.vp-back-pill {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    align-self: flex-start;
    margin: 4px 0 10px;
    padding: 8px 16px 8px 12px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 999px;
    color: rgba(255,255,255,.85);
    background: rgba(255,255,255,.05);
    font: 500 13px Inter, Roboto, Arial, sans-serif;
    cursor: pointer;
}
.vp-back-pill:hover { color: #fff; background: rgba(255,255,255,.1); }
.vp-back-pill svg { width: 14px; height: 14px; }

.vp-subtitle-search { display: flex; flex-direction: column; }
.vp-subtitle-results { display: flex; flex-direction: column; gap: 2px; max-height: 360px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.3) transparent; }

.vp-sub-result {
    display: flex;
    flex: none;
    gap: 12px;
    align-items: center;
    width: 100%;
    padding: 9px 12px;
    border: 0;
    border-radius: 8px;
    color: rgba(255,255,255,.88);
    background: transparent;
    font: 400 13.5px Inter, Roboto, Arial, sans-serif;
    text-align: left;
    cursor: pointer;
}
.vp-sub-result:hover, .vp-sub-result:focus-visible { color: #fff; background: rgba(255,255,255,.07); outline: none; }
.vp-flag {
    flex: none;
    width: 20px;
    height: 14px;
    border-radius: 2px;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(255,255,255,.12);
}
.vp-flag-none { display: inline-flex; align-items: center; justify-content: center; color: rgba(255,255,255,.5); box-shadow: none; }
.vp-flag-none svg { width: 15px; height: 15px; }
.vp-sub-result-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vp-sub-result-tag {
    flex: none;
    padding: 1px 5px;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 4px;
    color: rgba(255,255,255,.6);
    font-size: 10px;
    font-weight: 600;
}
.vp-sub-result small { flex: none; color: rgba(255,255,255,.55); font-size: 12px; }
.vp-sub-result small:empty { display: none; }

/* ---------- Downloading ffmpeg (first time only): under the spinner ---------- */

.vp-engine-status {
    position: absolute;
    top: calc(50% + 48px);
    left: 50%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    width: min(360px, calc(100% - 32px));
    padding: 14px 18px;
    border-radius: 12px;
    color: #fff;
    background: rgba(20,20,20,.86);
    backdrop-filter: blur(10px);
    font-family: Inter, Roboto, Arial, sans-serif;
    text-align: center;
    transform: translateX(-50%);
}
.vp-engine-status strong { font-size: 14px; font-weight: 600; }
.vp-engine-status span { color: rgba(255,255,255,.7); font-size: 12.5px; }
.vp-engine-status small { color: rgba(255,255,255,.55); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.vp-engine-bar { width: 100%; height: 4px; margin-top: 4px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.18); }
.vp-engine-bar div { width: 0; height: 100%; border-radius: inherit; background: var(--netflix-red); transition: width .2s ease; }

/* ---------- Age rating, as a title starts ("RATED TV-MA / violence, fear") ---------- */

.vp-rating {
    position: absolute;
    top: max(92px, calc(env(safe-area-inset-top) + 76px));
    left: max(48px, env(safe-area-inset-left));
    z-index: 38;
    display: flex;
    flex-direction: column;
    gap: 3px;
    max-width: min(460px, calc(100% - 96px));
    padding: 4px 0 4px 14px;
    border-left: 3px solid var(--netflix-red, #e50914);
    color: #fff;
    font-family: Inter, Roboto, Arial, sans-serif;
    text-align: left;
    text-shadow: 0 1px 6px rgba(0, 0, 0, .75);
    pointer-events: none;
}
.vp-rating-title { font-size: 19px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.vp-rating-detail { color: rgba(255, 255, 255, .88); font-size: 14px; line-height: 1.35; }
.vp-rating-detail:empty { display: none; }
.vp-rating-in { animation: vp-rating-in .45s cubic-bezier(.2, .7, .2, 1) both; }
.vp-rating-out { opacity: 0; transform: translateX(-10px); transition: opacity .55s ease, transform .55s ease; }
@keyframes vp-rating-in { from { opacity: 0; transform: translateX(-14px); } }

@media (max-width: 760px) {
    .vp-rating { top: max(70px, calc(env(safe-area-inset-top) + 58px)); left: max(16px, env(safe-area-inset-left)); max-width: calc(100% - 32px); }
    .vp-rating-title { font-size: 16px; }
    .vp-rating-detail { font-size: 12.5px; }
}
@media (prefers-reduced-motion: reduce) {
    .vp-rating-in { animation: none; }
    .vp-rating-out { transform: none; }
}

/* The seek tooltip with a picture of the hovered moment (videojs-player.mjs: seekThumb) */
.netflix-seek-thumb { display: none; }
.netflix-seek-tooltip.vp-has-thumb {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0 0 6px;
    overflow: hidden;
    color: #fff;
    background: #000;
    border: 1px solid rgba(255,255,255,.15);
}
.vp-has-thumb .netflix-seek-thumb {
    display: block;
    width: 180px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #000;
}
