/* Rich player visuals. All rules are scoped to the watch shell/player card. */
.vp-card {
    --vp-cyan: #4fc3f7;
    --vp-purple: #8b7cf6;
    --vp-glass: rgba(13, 17, 24, .94);
    --vp-line: rgba(113, 211, 250, .24);
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin: 0;
    overflow: hidden;
    isolation: isolate;
    color: #f5f8ff;
    background: #020406;
    border: 1px solid var(--vp-line);
    border-radius: 18px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, .28), 0 0 0 1px rgba(139, 124, 246, .05) inset;
    transition: box-shadow .45s ease, border-color .18s ease;
}
.vp-card:hover { border-color: rgba(79, 195, 247, .38); }
.vp-card.vp-vertical {
    width: min(100%, 450px, 42.75vh);
    aspect-ratio: 9 / 16;
    margin-inline: auto;
    border-radius: 22px;
}
.vp-card .vp-media,
.vp-card .vp-frame,
.vp-card .vp-quality-canvas,
.vp-card .vp-gif-snapshot {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: contain;
    background: #000;
    border: 0;
}
.vp-card .vp-media { z-index: 1; cursor: pointer; }
.vp-card .vp-frame { z-index: 1; }
.vp-card.vp-vertical .vp-media,
.vp-card.vp-vertical .vp-quality-canvas,
.vp-card.vp-vertical .vp-gif-snapshot { object-fit: cover; }
.vp-card .vp-quality-canvas,
.vp-card .vp-gif-snapshot { z-index: 2; cursor: pointer; }
.vp-card.quality-active .vp-video { visibility: hidden; }
.vp-card [hidden] { display: none !important; }
.vp-card .vp-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    color: #94a3b8;
    background: radial-gradient(circle at 50% 20%, rgba(79, 195, 247, .08), transparent 60%), #070a0f;
    text-align: center;
}

/* Status, captions and editor annotations */
.vp-card .vp-kind-badge,
.vp-card .vp-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 6;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: calc(100% - 24px);
    pointer-events: none;
}
.vp-card .vp-kind-badge:not([hidden]) + .vp-badges { top: 47px; }
.vp-card .vp-kind-badge,
.vp-card .vp-badges span {
    padding: 5px 9px;
    color: #fff;
    background: rgba(4, 9, 15, .66);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 999px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .18);
    backdrop-filter: blur(8px);
    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: .02em;
}
.vp-card .vp-kind-badge {
    color: #06111b;
    background: linear-gradient(135deg, var(--vp-cyan), var(--vp-purple));
    border-color: transparent;
}
.vp-card .vp-captions,
.vp-card .vp-annotations,
.vp-card .vp-reaction-layer {
    position: absolute;
    inset: 0;
    z-index: 5;
    overflow: hidden;
    pointer-events: none;
}
.vp-card .vp-reaction-layer { z-index: 9; }
.vp-card .vp-cue {
    position: absolute;
    display: block;
    width: max-content;
    max-width: 86%;
    padding: .1em .34em;
    line-height: 1.28;
    font-weight: 800;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    text-shadow: 0 2px 5px rgba(0, 0, 0, .95), 0 0 2px #000;
    border-radius: .18em;
    pointer-events: none;
}
.vp-card .vp-caption { z-index: 2; }
.vp-card .vp-annotation { font-weight: 900; }
.vp-card .vp-flash {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 8;
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    color: #fff;
    background: rgba(3, 7, 12, .66);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 50%;
    opacity: 0;
    transform: translate(-50%, -50%) scale(.8);
    backdrop-filter: blur(6px);
    pointer-events: none;
}
.vp-card .vp-flash.is-flashing { animation: vp-flash .5s ease both; }
@keyframes vp-flash {
    0% { opacity: .96; transform: translate(-50%, -50%) scale(.82); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.45); }
}
.vp-card .vp-big-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 6;
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    padding: 0;
    color: #fff;
    background: rgba(3, 8, 14, .64);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 50%;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .36), 0 0 40px rgba(79, 195, 247, .12);
    opacity: 1;
    transform: translate(-50%, -50%);
    backdrop-filter: blur(7px);
    cursor: pointer;
    transition: opacity .16s ease, transform .16s ease, background .16s ease;
}
.vp-card .vp-big-play:hover { background: rgba(5, 11, 19, .84); transform: translate(-50%, -50%) scale(1.06); }
.vp-card .vp-big-play .vp-icon { width: 34px; height: 34px; margin-left: 3px; }
.vp-card.is-playing .vp-big-play { opacity: 0; pointer-events: none; }
.vp-card.is-buffering::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 6;
    width: 34px;
    height: 34px;
    margin: -17px 0 0 -17px;
    border: 3px solid rgba(255, 255, 255, .22);
    border-top-color: var(--vp-cyan);
    border-radius: 50%;
    animation: vp-spin .8s linear infinite;
    pointer-events: none;
}
@keyframes vp-spin { to { transform: rotate(360deg); } }

/* Controls: hidden UI must not leave clickable/focusable descendants. */
.vp-card .vp-ui {
    position: absolute;
    inset: auto 0 0;
    z-index: 7;
    padding: 0 12px 6px;
    background: linear-gradient(transparent, rgba(2, 5, 9, .56) 42%, rgba(2, 5, 9, .9));
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}
.vp-card.ui-on .vp-ui {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    transition-delay: 0s;
}
.vp-card:not(.ui-on) .vp-ui,
.vp-card:not(.ui-on) .vp-ui * { pointer-events: none !important; }
.vp-card.is-idle,
.vp-card.nocursor { cursor: none; }
.vp-card.is-idle .vp-ui { opacity: 0; visibility: hidden; pointer-events: none; }
.vp-card .vp-progress {
    position: relative;
    display: flex;
    align-items: center;
    height: 18px;
    cursor: pointer;
    touch-action: none;
}
.vp-card .vp-track {
    position: relative;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, .28);
    border-radius: 999px;
    transition: height .12s ease;
}
.vp-card .vp-progress:hover .vp-track,
.vp-card .vp-progress:focus-visible .vp-track { height: 5px; }
.vp-card .vp-buffered,
.vp-card .vp-hover,
.vp-card .vp-played {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    border-radius: inherit;
}
.vp-card .vp-buffered-segment {
    position: absolute;
    top: 0;
    bottom: 0;
    background: rgba(255, 255, 255, .42);
    border-radius: inherit;
}
.vp-card .vp-hover { background: rgba(255, 255, 255, .26); }
.vp-card .vp-played { background: linear-gradient(90deg, var(--vp-cyan), var(--vp-purple)); transition: width .12s linear; }
.vp-card .vp-knob { transition: left .12s linear; }
.vp-card .vp-buffered-segment { transition: left .25s linear, width .25s linear; }
.vp-card .vp-buffered-label { color: rgba(255, 255, 255, .55); font-size: 10.5px; white-space: nowrap; }
.vp-card .vp-knob {
    position: absolute;
    top: 50%;
    width: 13px;
    height: 13px;
    background: #fff;
    border: 2px solid var(--vp-cyan);
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(79, 195, 247, .5);
    transform: translate(-50%, -50%) scale(0);
    transition: transform .12s ease;
}
.vp-card .vp-progress:hover .vp-knob,
.vp-card .vp-progress:focus-visible .vp-knob,
.vp-card .vp-progress:active .vp-knob { transform: translate(-50%, -50%) scale(1); }
.vp-card .vp-gap {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 2;
    width: 2px;
    background: #020406;
    opacity: .9;
    pointer-events: none;
}
.vp-card .vp-tip {
    position: absolute;
    bottom: 22px;
    z-index: 4;
    display: none;
    max-width: 260px;
    padding: 5px 8px;
    overflow: hidden;
    color: #fff;
    background: rgba(5, 9, 15, .95);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 7px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
    transform: translateX(-50%);
    pointer-events: none;
}
.vp-card .vp-tip.is-visible { display: block; }
.vp-card .vp-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 48px;
}
.vp-card .vp-controls-left,
.vp-card .vp-controls-right { display: flex; align-items: center; gap: 2px; min-width: 0; }
.vp-card .vp-controls-right { margin-left: auto; }
.vp-card .vp-control {
    position: relative;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    padding: 0;
    color: #fff;
    background: transparent;
    border: 0;
    border-radius: 50%;
    opacity: .94;
    cursor: pointer;
    transition: background .14s ease, opacity .14s ease, color .14s ease;
}
.vp-card .vp-control:hover { background: rgba(255, 255, 255, .14); opacity: 1; }
.vp-card .vp-control:active { background: rgba(255, 255, 255, .22); }
.vp-card .vp-control .vp-icon { width: 22px; height: 22px; }
.vp-card .vp-icon-filled { fill: currentColor; stroke: none; }
.vp-card .vp-icon.svg-icon { fill: none; stroke: currentColor; }
.vp-card .vp-control.is-disabled,
.vp-card .vp-control:disabled { opacity: .34; cursor: not-allowed; }
.vp-card .vp-control.cc-on::after {
    content: "";
    position: absolute;
    left: 9px;
    right: 9px;
    bottom: 5px;
    height: 2px;
    background: var(--vp-cyan);
    border-radius: 2px;
}
.vp-card .vp-control.is-active { color: var(--vp-cyan); background: rgba(79, 195, 247, .1); }
.vp-card .vp-volume { display: flex; align-items: center; min-width: 40px; }
.vp-card .vp-volume-range {
    width: 0;
    height: 20px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    accent-color: var(--vp-cyan);
    background: transparent;
    border: 0;
    opacity: 0;
    transition: width .18s ease, opacity .18s ease, margin .18s ease;
}
.vp-card .vp-volume:hover .vp-volume-range,
.vp-card .vp-volume:focus-within .vp-volume-range { width: 64px; margin: 0 7px 0 2px; opacity: 1; }
.vp-card .vp-time {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 5px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.vp-card .vp-time-total { color: rgba(255, 255, 255, .68); }
.vp-card .vp-rate-button { width: auto; min-width: 38px; padding: 0 7px; font-size: 11px; font-weight: 800; }
.vp-card .vp-chapter-chip {
    max-width: 190px;
    margin-left: 7px;
    padding: 6px 10px;
    overflow: hidden;
    color: #fff;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.vp-card.vp-vertical .vp-chapter-chip { display: none; }

/* Settings and reactions */
.vp-card .vp-settings {
    position: absolute;
    right: 12px;
    bottom: 66px;
    z-index: 10;
    width: 360px;
    max-width: calc(100% - 24px);
    max-height: min(76%, 470px);
    padding: 7px 0;
    overflow-y: auto;
    color: #f7f9ff;
    background: var(--vp-glass);
    border: 1px solid rgba(129, 207, 247, .2);
    border-radius: 14px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, .62), 0 0 40px rgba(79, 195, 247, .06);
    backdrop-filter: blur(18px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(7px);
    transition: opacity .14s ease, transform .14s ease, visibility 0s linear .14s;
}
.vp-card .vp-settings.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    transition-delay: 0s;
}
.vp-card .vp-setting-row {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    color: inherit;
    background: transparent;
    border: 0;
    text-align: left;
    cursor: pointer;
    transition: background .13s ease;
}
.vp-card .vp-setting-row:hover { background: rgba(255, 255, 255, .09); }
.vp-card .vp-setting-row:disabled,
.vp-card .vp-setting-row.is-disabled { opacity: .4; cursor: not-allowed; }
.vp-card .vp-setting-row > .vp-icon { flex: 0 0 auto; opacity: .9; }
.vp-card .vp-setting-label { flex: 1; min-width: 0; padding: 9px 0; font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.vp-card .vp-setting-value {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    flex: 0 0 auto;
    max-width: 48%;
    color: rgba(255, 255, 255, .7);
    font-size: 11px;
    line-height: 1.25;
    text-align: right;
}
.vp-card .vp-setting-header { min-height: 47px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.vp-card .vp-setting-header .vp-setting-label { font-weight: 800; }
.vp-card .vp-setting-check { display: grid; place-items: center; flex: 0 0 22px; color: var(--vp-cyan); }
.vp-card .vp-setting-note {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    min-height: 32px;
    padding: 3px 14px 9px;
    color: rgba(226, 232, 240, .58);
    font-size: 10.5px;
    line-height: 1.45;
}
.vp-card .vp-setting-note .vp-icon { flex: 0 0 auto; margin-top: 1px; opacity: .6; }
.vp-card .vp-switch {
    position: relative;
    flex: 0 0 auto;
    width: 34px;
    height: 15px;
    background: rgba(255, 255, 255, .28);
    border-radius: 999px;
    transition: background .16s ease;
}
.vp-card .vp-switch i {
    position: absolute;
    left: -1px;
    top: -3px;
    width: 21px;
    height: 21px;
    background: #cbd5e1;
    border-radius: 50%;
    box-shadow: 0 1px 5px rgba(0, 0, 0, .45);
    transition: left .16s ease, background .16s ease;
}
.vp-card .vp-switch.is-on { background: linear-gradient(90deg, var(--vp-cyan), var(--vp-purple)); }
.vp-card .vp-switch.is-on i { left: 14px; background: #fff; }
.vp-card .vp-reaction-tray {
    position: absolute;
    right: 12px;
    top: 12px;
    z-index: 10;
    display: none;
    gap: 3px;
    padding: 5px;
    background: var(--vp-glass);
    border: 1px solid rgba(129, 207, 247, .2);
    border-radius: 999px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, .45);
    backdrop-filter: blur(14px);
}
.vp-card .vp-reaction-tray.is-open { display: flex; }
.vp-card .vp-reaction-choice {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: transform .14s ease, background .14s ease;
}
.vp-card .vp-reaction-choice:hover { background: rgba(255, 255, 255, .12); transform: translateY(-2px); }
.vp-card .vp-reaction-float {
    position: absolute;
    bottom: 76px;
    font-size: 34px;
    line-height: 1;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .65));
    animation: vp-reaction-float 2.5s ease-out forwards;
}
@keyframes vp-reaction-float {
    0% { opacity: 0; transform: translateY(0) scale(.6); }
    12% { opacity: 1; transform: translateY(-14px) scale(1.15); }
    100% { opacity: 0; transform: translateY(-320px) scale(1); }
}
.vp-card .vp-message {
    position: absolute;
    left: 50%;
    bottom: 82px;
    z-index: 12;
    width: max-content;
    max-width: calc(100% - 32px);
    padding: 9px 13px;
    color: #fff;
    background: rgba(20, 10, 15, .92);
    border: 1px solid rgba(255, 123, 123, .3);
    border-radius: 9px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
    transform: translateX(-50%);
    pointer-events: none;
}

/* Keyboard focus and display modes */
.vp-card:focus-visible { outline: 2px solid var(--vp-cyan); outline-offset: 3px; }
.vp-card .vp-control:focus-visible,
.vp-card .vp-big-play:focus-visible,
.vp-card .vp-progress:focus-visible,
.vp-card .vp-setting-row:focus-visible,
.vp-card .vp-reaction-choice:focus-visible,
.vp-card .vp-volume-range:focus-visible {
    outline: 2px solid var(--vp-cyan);
    outline-offset: 2px;
}
.vp-card:fullscreen,
.vp-card.is-fullscreen {
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    aspect-ratio: auto;
    background: #000;
    border: 0;
    border-radius: 0;
}
.video-shell.video-theater .vp-card { border-color: rgba(79, 195, 247, .34); }

@media (max-width: 720px) {
    .vp-card { border-radius: 14px; }
    .vp-card .vp-ui { padding-inline: 8px; }
    .vp-card .vp-control { width: 36px; height: 36px; }
    .vp-card .vp-control .vp-icon { width: 20px; height: 20px; }
    .vp-card .vp-time { margin-left: 2px; font-size: 10.5px; }
    .vp-card .vp-rate-button,
    .vp-card .vp-chapter-chip { display: none; }
    .vp-card .vp-settings { right: 8px; bottom: 58px; max-width: calc(100% - 16px); }
    .vp-card .vp-kind-badge,
    .vp-card .vp-badges { top: 9px; left: 9px; }
    .vp-card .vp-kind-badge:not([hidden]) + .vp-badges { top: 42px; }
    .vp-card .vp-big-play { width: 64px; height: 64px; }
    .vp-card .vp-big-play .vp-icon { width: 29px; height: 29px; }
}

@media (max-width: 480px) {
    .vp-card .vp-controls-right .vp-control[data-vp-action="autoplay"],
    .vp-card .vp-controls-right .vp-control[data-vp-action="reactions"] { display: none; }
    .vp-card .vp-time-total { display: none; }
    .vp-card .vp-volume-range { display: none; }
    .vp-card .vp-badges span { padding: 4px 7px; font-size: 9px; }
    .vp-card .vp-reaction-tray { right: 8px; top: 8px; }
    .vp-card .vp-reaction-choice { width: 31px; height: 31px; font-size: 18px; }
}

@media (max-width: 380px) {
    .vp-card .vp-controls-right .vp-control[data-vp-action="pip"] { display: none; }
    .vp-card .vp-control { width: 33px; height: 34px; }
    .vp-card .vp-setting-label { font-size: 12px; }
    .vp-card .vp-setting-value { max-width: 44%; font-size: 10px; }
}

@media (hover: none) {
    .vp-card .vp-volume-range { display: none; }
    .vp-card .vp-control:hover { background: transparent; }
}

@media (prefers-reduced-motion: reduce) {
    .vp-card,
    .vp-card .vp-ui,
    .vp-card .vp-settings,
    .vp-card .vp-track,
    .vp-card .vp-knob,
    .vp-card .vp-big-play { transition: none; }
    .vp-card .vp-flash.is-flashing,
    .vp-card .vp-reaction-float,
    .vp-card.is-buffering::after { animation-duration: .01ms; animation-iteration-count: 1; }
}
