.vh-player {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    color: #fff;
    direction: ltr;
    outline: 0;
    isolation: isolate;
}

.vh-player > video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.vh-player__big-play {
    position: absolute;
    z-index: 5;
    top: 50%;
    left: 50%;
    display: grid;
    width: 68px;
    height: 68px;
    place-items: center;
    padding: 0 0 0 5px;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 50%;
    background: rgba(9, 12, 18, .78);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .38);
    color: #fff;
    cursor: pointer;
    font-size: 28px;
    backdrop-filter: blur(8px);
    transition: transform .18s ease, background .18s ease;
}

.vh-player__big-play[hidden] {
    display: none !important;
}

.vh-player__big-play:hover,
.vh-player__big-play:focus-visible {
    transform: translate(-50%, -50%) scale(1.07);
    background: #d41445;
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.vh-player__loader {
    position: absolute;
    z-index: 7;
    top: 50%;
    left: 50%;
    width: 42px;
    height: 42px;
    transform: translate(-50%, -50%);
    border: 4px solid rgba(255, 255, 255, .25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: vh-player-spin .75s linear infinite;
}

.vh-player__error {
    position: absolute;
    z-index: 8;
    top: 50%;
    left: 50%;
    width: min(88%, 460px);
    padding: 14px 18px;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 12px;
    background: rgba(8, 10, 14, .9);
    color: #fff;
    text-align: center;
    font: 600 14px/1.6 system-ui, sans-serif;
}

@keyframes vh-player-spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.vh-player__controls {
    position: absolute;
    z-index: 10;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 32px 12px 10px;
    transform: translateY(8px);
    background: linear-gradient(transparent, rgba(3, 7, 13, .94));
    opacity: 0;
    pointer-events: none;
    font: 600 12px/1 Arial, sans-serif;
    transition: opacity .2s ease, transform .2s ease;
}

.vh-player.controls-visible .vh-player__controls,
.vh-player:not(.is-playing) .vh-player__controls,
.vh-player:focus-within .vh-player__controls {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.vh-player.is-ad-showing .vh-player__controls {
    opacity: 0;
    pointer-events: none;
}

.vh-player__button {
    display: grid;
    flex: 0 0 36px;
    width: 36px;
    min-width: 36px;
    height: 36px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 16px;
}

.vh-player__button:hover,
.vh-player__button:focus-visible {
    background: rgba(255, 255, 255, .16);
    outline: 2px solid rgba(255, 255, 255, .9);
    outline-offset: -2px;
}

.vh-player__pause-icon,
.vh-player__muted-icon {
    display: none;
}

.vh-player.is-playing .vh-player__play-icon,
.vh-player.is-muted .vh-player__sound-icon {
    display: none;
}

.vh-player.is-playing .vh-player__pause-icon,
.vh-player.is-muted .vh-player__muted-icon {
    display: inline;
}

.vh-player__volume {
    width: 72px;
    height: 24px;
    margin: 0;
    accent-color: #ff2d55;
    cursor: pointer;
}

.vh-player__timeline {
    position: relative;
    display: flex;
    flex: 1;
    min-width: 70px;
    height: 32px;
    align-items: center;
    touch-action: none;
}

.vh-player__timeline > input {
    width: 100%;
    height: 24px;
    margin: 0;
    accent-color: #ff2d55;
    cursor: pointer;
}

.vh-player__preview {
    position: absolute;
    z-index: 15;
    bottom: 34px;
    left: var(--preview-left, 50%);
    overflow: hidden;
    transform: translateX(-50%);
    border: 2px solid rgba(255, 255, 255, .94);
    border-radius: 9px;
    background: #080a0d;
    box-shadow: 0 8px 26px rgba(0, 0, 0, .55);
    pointer-events: none;
}

.vh-player__preview-image {
    width: 160px;
    height: 90px;
    background-color: #111;
    background-repeat: no-repeat;
}

.vh-player__preview span {
    display: block;
    padding: 5px 7px;
    background: rgba(0, 0, 0, .9);
    color: #fff;
    text-align: center;
    font-size: 11px;
}

.vh-player__time {
    flex: 0 0 auto;
    white-space: nowrap;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.vh-player__speed {
    position: relative;
}

.vh-player__speed-trigger {
    font-size: 12px;
}

.vh-player__speed-menu {
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    overflow: hidden;
    min-width: 92px;
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 10px;
    background: rgba(7, 10, 15, .96);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .42);
}

.vh-player__speed-menu button {
    display: block;
    width: 100%;
    padding: 9px 12px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    text-align: center;
}

.vh-player__speed-menu button:hover,
.vh-player__speed-menu button[aria-checked="true"] {
    background: #d41445;
}

.vh-player__ad {
    position: absolute;
    z-index: 20;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 28px;
    background: rgba(0, 0, 0, .88);
    direction: rtl;
}

.vh-player__ad[hidden] {
    display: none;
}

.vh-player__ad-content {
    display: grid;
    width: min(92%, 900px);
    height: min(82%, 520px);
    place-items: center;
}

.vh-player__ad-content > a {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
}

.vh-player__ad-content img,
.vh-player__ad-content video,
.vh-player__ad-content iframe {
    display: block;
    max-width: 100%;
    max-height: 100%;
    border: 0;
    object-fit: contain;
}

.vh-player__ad-content iframe {
    width: 100%;
    height: 100%;
}

.vh-player__ad-content video {
    width: 100%;
    height: 100%;
}

.vh-player__ad-label {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font: 600 11px/1 system-ui, sans-serif;
}

.vh-player__ad-close {
    position: absolute;
    right: 12px;
    bottom: 14px;
    min-height: 42px;
    padding: 9px 14px;
    border: 1px solid rgba(255, 255, 255, .4);
    border-radius: 9px;
    background: rgba(8, 10, 14, .88);
    color: #fff;
    cursor: pointer;
    font: 700 13px/1 system-ui, sans-serif;
}

.vh-player__ad-close:hover,
.vh-player__ad-close:focus-visible {
    background: #d41445;
    outline: 2px solid #fff;
}

.vh-player__ad-pixel {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.vh-player:fullscreen {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
}

.vh-player:fullscreen > video {
    width: 100%;
    height: 100%;
}

.vh-player .player-watermark {
    z-index: 4;
    max-width: 40%;
    max-height: 24%;
}

.vh-player .player-watermark--bottom-right,
.vh-player .player-watermark--bottom-left {
    bottom: 64px;
}

@media (max-width: 680px) {
    .vh-player__controls {
        gap: 2px;
        padding: 26px 5px 6px;
    }

    .vh-player__volume,
    .vh-player__pip {
        display: none;
    }

    .vh-player__button {
        flex-basis: 36px;
        width: 36px;
        min-width: 36px;
        height: 36px;
    }

    .vh-player__time {
        font-size: 10px;
    }

    .vh-player__preview-image {
        width: 128px;
        height: 72px;
    }

    .vh-player__preview {
        transform: translateX(-50%) scale(.9);
        transform-origin: bottom center;
    }

    .vh-player__big-play {
        width: 58px;
        height: 58px;
        font-size: 23px;
    }

    .vh-player__ad {
        padding: 20px 10px;
    }

    .vh-player__ad-content {
        width: 96%;
        height: 78%;
    }

    .vh-player .player-watermark--bottom-right,
    .vh-player .player-watermark--bottom-left {
        bottom: 52px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .vh-player__big-play,
    .vh-player__controls {
        transition: none;
    }

    .vh-player__loader {
        animation-duration: 1.5s;
    }
}
