.video-container {
    /* max-width: 100%; */
    margin: 0 auto;
    /* height: 88%; */
    background: black;
    position: relative;
}

.vjs-big-play-button {
    display: none !important;
}

.progress-bar {
    position: absolute;
    bottom: 40px;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 20;
}

.progress-fill {
    height: 100%;
    background: red;
    width: 0%;
}

.video-js .vjs-progress-control {
    cursor: pointer;
    display: flex;
    align-items: center;
    touch-action: none;
    width: 100%;
    flex-basis: 100%;
    min-height: 14px;
    padding: 8px 0;
    z-index: 0;
    order: -1;
    bottom: 30px;
}

.video-js .vjs-control-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 4px;
}

.video-js .vjs-control-bar .vjs-button {
    white-space: nowrap;
    width: 25px;
    cursor: pointer;
}
 .vjs-icon-cog{
    display: none !important;
 }
.video-js .vjs-volume-panel,
.video-js .vjs-fullscreen-control {
    margin-left: auto;
}

.video-js .vjs-volume-panel {
    margin-right: 5px;
    /* Reduce default space */
    flex: none;
    /* Prevent volume from expanding */
}

.video-js .vjs-volume-panel .vjs-volume-control {
    max-width: 60px;
    /* Or reduce this further */
}

.video-js .vjs-fullscreen-control {
    margin-left: 0px;
    /* Remove unwanted gap */
}

.video-js .vjs-play-progress,
.video-js .vjs-slider {
    transition: width 0.1s linear;
}

.seek-hold-forward {
    position: absolute;
    top: 25%;
    left: 0;
    width: 25%;
    height: 50%;
    z-index: 10;
    cursor: pointer;
}

.seek-hold-forward::after {
    content: "";
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    margin-left: -30px;
    margin-top: -30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    animation: ripple 0.6s linear infinite;
}

.seek-hold-forward.holding::after {
    display: block;
}

@keyframes ripple {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }

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

.video-js {
    touch-action: none;
    /* Disables all native gestures */
    overscroll-behavior: contain;
    /* Prevents scroll bounce */
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: #121115;
    overflow: hidden;
}

.video-container.custom-fullscreen {
    /* position: fixed; */
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: 9999;
    max-width: 380px;
}
.video-detail-wraper .left:has(.custom-fullscreen){
    padding: 20px 0px;
}
 @media screen and (max-width: 767px) {
          .video-detail-wraper .left{
            padding: 20px 50px;
          } 
}
.video-container.custom-fullscreen video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.custom-fullscreen-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 6px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.video-js.vjs-fluid:not(.vjs-audio-only-mode),
.video-js.vjs-16-9:not(.vjs-audio-only-mode),
.video-js.vjs-4-3:not(.vjs-audio-only-mode),
.video-js.vjs-9-16:not(.vjs-audio-only-mode),
.video-js.vjs-1-1:not(.vjs-audio-only-mode) {
    height: calc(100% - 40px);
}

.vjs-http-source-selector {
    right: 0;
}

.showEpisodes,
.likeVideo,
.mute,
.zoomOut {
    position: absolute;
    background-color: transparent;
    width: 50px !important;
    height: 50px;
    border: none;
    display: none;
    right: 5px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    z-index: 99;
}

.showEpisodes {
    bottom: 165px;
}

.likeVideo {
    bottom: 297px
}

.zoomOut {
    bottom: 100px;
}

.mute {
    bottom: 230px;
}
.likeVideo.liked svg path {
    fill: url(#gradient);
    stroke: transparent;
}

/* .likeVideo.liked svg path {
    fill: #ea224a;
    stroke: transparent;
} */
/* .likeVideo.liked {
    background: linear-gradient(to right, #FF823980, #FF009980);
} */

.showEpisodes img {
    width: 100%;
    height: 100%;
}

#custom-progress-bar-range {
    display: none;
}

#custom-progress-bar-range::-webkit-slider-runnable-track {
    border-radius: 0;
}

.playPauseScreen {
    display: block;
    position: absolute;
    width: 100%;
    height: calc(100% - 60px);
    z-index: 1;
    top: 0;
    left: 0;
    cursor: pointer;
}
/* Play icon overlay when video is paused */
.playPauseScreen::after {
    content: '';
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 40px 40px;
    pointer-events: none;
}
.video-container.rs-player-paused .playPauseScreen::after {
    display: block;
}
/* Hide play icon during initial load (before video has started) */
.video-container.rs-player-paused:not(.rs-player-has-started) .playPauseScreen::after {
    display: none;
}

.topup_popup {
    position: absolute;
    height: 100%;
    top: 50%;
    left: 50%;
    width: 100%;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    background-color: rgba(0, 0, 0, 0.7);
    gap: 15px;
    opacity: 0;
    pointer-events: none;
}

.topup_popup.active {
    opacity: 1;
    pointer-events: all;
    z-index: 99;
}

.topup_popup  button {
    width: 100%;
    padding: 10px 0;
    font-size: 16px;
    background: linear-gradient(to right, #fe7940, #ff0893);
    border: 0;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
}

.topup_popup p {
    color: #ffffff90;
}
.video_duration_container {
    display: none;
    padding-inline: 4px;
}
.video_duration_container span {
    font-size: 10px;
    color: #fff;
    display: block;
    background-color: #00000030;
    padding: 2px 4px;
    backdrop-filter: blur(5px);
    border-radius: 2px;
}
.video_updown_control {
    display: none;
}
/* .vjs-progress-control.vjs-control{
    display: none;
} */
@media screen and (min-width: 768px) {
    .vjs-control-bar .vjs-progress-control.vjs-control,  .vjs-control-bar .vjs-progress-control.vjs-control * {
        display: flex !important;
    }

    .video-js .vjs-play-progress {
        background: linear-gradient(87.39deg, #9A43D3 1.02%, #F75B88 98.54%);
    }

    .video-js .vjs-play-progress::before {
        color: #d051a7;
    }

    .video_updown_control {
        display: flex;
        flex-direction: column;
        gap: 20px;
        position: absolute;
        right: 50px;
        top: 35%;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .video_updown_control * {
        cursor: pointer;
        border: 1px solid #ffffff29;
        border-radius: 50%;
    }

    /* Bottom control bar: time left | icons center | time right */
    .video_duration_container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        position: absolute;
        /* Match the control bar's bottom offset so the time labels align with
           the lifted controls pill and clear the rounded-corner clipping. */
        bottom: 12px;
        left: 0;
        height: 60px;
        padding: 0 12px;
        pointer-events: none;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }
    .video_duration_container span {
        font-size: 13px;
        color: #fff;
        background: transparent;
        backdrop-filter: none;
        pointer-events: none;
    }
    /* Ensure the video-js element is the positioned, full-size box so its
       control bar (position:absolute; bottom:0) anchors to the video area and
       not to the browser window. Without an explicit positioned ancestor of
       the correct height, the control bar detaches and sticks to the bottom
       of the viewport. */
    .rs-page__player .video-container,
    .rs-page__player .video-js {
        position: relative !important;
    }
    .video-js .vjs-control-bar {
        display: flex !important;
        justify-content: center;
        align-items: center;
        gap: 12px;
        background: transparent !important;
        height: 60px;
        padding: 0;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        /* Pin near the bottom of the video-js element (its offset parent).
           A small bottom offset keeps the controls pill clear of the
           video-container's rounded corners + overflow:hidden clipping,
           which was cutting off the bottom of the controls. */
        position: absolute !important;
        bottom: 12px !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        width: 100% !important;
        z-index: 2;
    }
    .video-js .vjs-control-bar::after{
        content: "";
        height: 100px;
        width: 100%;
        background: linear-gradient(0deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 100%);
        /* position: absolute; */
        bottom: 0;
        left: 0;
    }
    .vjs-icons-center-wrap {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 20px;
        background: rgba(255, 255, 255, 0.2);
        backdrop-filter: blur(8px);
        border-radius: 50px;
        padding: 6px 16px;
        margin: 0 auto;
        height: 36px;
        flex-wrap: nowrap;
        position: absolute;
        overflow: visible;
    }
    .vjs-icons-center-wrap .vjs-control,
    .vjs-icons-center-wrap .vjs-button,
    .vjs-icons-center-wrap .vjs-volume-panel,
    .vjs-icons-center-wrap > * {
        width: 24px !important;
        height: 24px !important;
        min-width: 24px !important;
        max-width: 24px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex: none !important;
        margin: 0 !important;
        padding: 0 !important;
        flex-direction: row !important;
    }
    .vjs-icons-center-wrap .vjs-icon-placeholder::before,
    .vjs-icons-center-wrap .vjs-button .vjs-icon-placeholder::before {
        font-size: 18px !important;
        line-height: 24px !important;
        width: 24px !important;
        height: 24px !important;
    }
    .vjs-icons-center-wrap svg {
        width: 18px !important;
        height: 18px !important;
    }
    .vjs-icons-center-wrap .vjs-volume-panel .vjs-volume-control {
        display: none !important;
    }
    .vjs-icons-center-wrap .vjs-volume-panel .vjs-mute-control {
        width: 24px !important;
        height: 24px !important;
    }
    .video-js .vjs-control-bar .vjs-play-control,
    .video-js .vjs-control-bar .vjs-current-time,
    .video-js .vjs-control-bar .vjs-time-divider,
    .video-js .vjs-control-bar .vjs-duration,
    .video-js .vjs-control-bar .vjs-remaining-time,
    .video-js .vjs-control-bar .vjs-total-time-display,
    .video-js .vjs-control-bar .vjs-fullscreen-control {
        display: none !important;
    }
    .video-js .vjs-progress-control {
        display: none !important;
    }
    .video-js .vjs-control-bar .vjs-volume-panel {
        margin-left: 0;
        width: 25px;
        height: 25px;
        flex: none;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
    }
    .video-js .vjs-control-bar .vjs-volume-panel .vjs-mute-control {
        width: 25px;
        height: 25px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
    }
    .video-js .vjs-control-bar .vjs-volume-panel .vjs-volume-control {
        display: none;
    }
    .video-js .vjs-control-bar .vjs-volume-panel:hover .vjs-volume-control {
        display: flex;
        position: absolute;
        bottom: 100%;
        left: 50%;
        transform: translateX(-50%);
        width: 30px;
        height: 80px;
        background: rgba(30, 30, 30, 0.9);
        border-radius: 4px;
        padding: 8px 4px;
        margin-bottom: 8px;
        flex-direction: column;
    }
    .video-js .vjs-control-bar .vjs-fullscreen-control {
        margin-left: 0;
    }
    /* Desktop auto-hide: hide controls after inactivity */
    .video-container.rs-desktop-controls-hidden .vjs-control-bar {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
    .video-container.rs-desktop-controls-hidden ~ .video_updown_control {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
    .video-container.rs-desktop-controls-hidden .video_duration_container {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
    .video-container.rs-desktop-controls-hidden .playPauseScreen {
        cursor: none;
    }
    .video-container.rs-desktop-controls-hidden .rs-desktop-settings-popup {
        display: none !important;
    }
    .video-container.rs-desktop-controls-hidden .rs-subtitle-display {
        bottom: 20px;
    }
}
@media screen and (max-width: 900px) {
    .video-container.custom-fullscreen {
        position: fixed;
        left: 0;
        right: 0;
        max-width: 100vw;
    }

    /* .video-js.vjs-fluid:not(.vjs-audio-only-mode),
    .video-js.vjs-16-9:not(.vjs-audio-only-mode),
    .video-js.vjs-4-3:not(.vjs-audio-only-mode),
    .video-js.vjs-9-16:not(.vjs-audio-only-mode),
    .video-js.vjs-1-1:not(.vjs-audio-only-mode) {
        height: 100%;
    } */

    /* .showEpisodes.show, .likeVideo.show {
        display: block;
    } */
}
@media screen and (max-width: 768px) {
    .video-container.custom-fullscreen {
        max-width: 75vw!important;
    }
     .video-container.custom-fullscreen::after {
        content: "";
        width: 100%;
        height: 100dvh;
        background: #000;
        position: absolute;
        top: 0;
        left: 0;
        z-index: -1;
    }
}
@media screen and (max-width: 767px) {
    .video-container.custom-fullscreen {
        max-width: 100vw!important;
    }

    /* .showEpisodes {
        bottom: 100px;
    } */
    .tab-container.scrollToTop .tab-menu ul li {
        width: fit-content;
    }

    .tab-container.scrollToTop .tab-menu a {
        white-space: nowrap;
    }

    .custom-fullscreen .mute {
        position: absolute;
        right: 6px;
        background-color: rgba(0, 0, 0, 0.6);
        border-radius: 50%;
        height: 50px;
        width: 50px !important;
        z-index: 99;
        border: none;
        display: none;
    }

    .custom-fullscreen .mute.show,
    .custom-fullscreen .zoomOut.show,
    .custom-fullscreen .showEpisodes.show,
    .custom-fullscreen .likeVideo.show {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* .custom-fullscreen .video-js.vjs-has-started.vjs-user-inactive .vjs-control-bar {
        opacity: 1 !important;
        visibility: visible !important;
        transition: none !important;
    } */

    .custom-fullscreen .vjs-control-bar {
        opacity: 0 !important;
    }

    .custom-fullscreen #custom-progress-container {
        width: 100%;
        height: 4px;
        background-color: #ddd;
        position: absolute;
        top: 0px;
    }

    .custom-fullscreen .video_duration_container.show {
        display: flex;
        justify-content: space-between;
        width: 100%;
        position: absolute;
        top: 10px;
        left: 0;
    }
    /* .custom-fullscreen #custom-progress-bar {
        height: 100%;
        width: 0%;
        background: linear-gradient(to right, #FF8239 0%, #FF0099 100%);
        transition: width 0.1s linear;
    } */

    .custom-fullscreen #custom-progress-bar-range {
        -webkit-appearance: none;
        width: 100%;
        height: 6px;
        background: transparent;
        cursor: pointer;
        position: absolute;
        top: 0;
        left: 0;
        z-index: 2;
        display: initial;

    }

    .custom-fullscreen #custom-progress-bar-range::-webkit-slider-thumb {
        -webkit-appearance: none;
        height: 14px;
        width: 14px;
        background: transparent;
        border-radius: 50%;
        margin-top: -4px;
        cursor: pointer;
        border: none;
    }

    .custom-fullscreen #custom-progress-bar-range::-webkit-slider-runnable-track {
        height: 6px;
        background: linear-gradient(to right, #FF8239 0%, #FF0099 var(--progress), #ccc var(--progress), #ccc 100%);
        border-radius: 3px;
    }

    .custom-fullscreen .playPauseScreen {
        display: block;
        position: absolute;
        width: 100%;
        height: 100%;
        z-index: 1;
        top: 0;
        left: 0;
    }
}

.vjs-error-display.vjs-modal-dialog > .vjs-modal-dialog-content, .vjs-error-display.vjs-modal-dialog::before {
    display: none !important;
}

/* CC/Subtitle button - in Video.js control bar (Desktop) */
.rs-cc-btn-controlbar {
    cursor: pointer;
    display: none !important;
    align-items: center;
    justify-content: center;
    width: 36px;
    min-width: 36px;
    height: 100%;
    padding: 0;
    border: none;
    background: none;
    color: #fff;
    opacity: 0.8;
    transition: opacity 0.2s;
}
.rs-cc-btn-controlbar:hover {
    opacity: 1;
}
.rs-cc-btn-controlbar.active {
    color: #a855f7;
    opacity: 1;
}

/* Playback Speed button - in Video.js control bar (Desktop) - hidden, moved to settings */
.rs-speed-btn-controlbar {
    cursor: pointer;
    display: none !important;
    align-items: center;
    justify-content: center;
    width: 36px;
    min-width: 36px;
    height: 100%;
    padding: 0;
    border: none;
    background: none;
    color: #fff;
    opacity: 0.8;
    transition: opacity 0.2s;
}
.rs-speed-btn-controlbar:hover {
    opacity: 1;
}
.rs-speed-btn-label {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    pointer-events: none;
}

/* Settings Gear Button in Video.js control bar (Desktop) */
.rs-settings-gear-btn {
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 30px;
    min-width: 30px;
    height: 100%;
    padding: 0;
    border: none;
    background: none;
    color: #fff;
    opacity: 0.8;
    transition: opacity 0.2s;
}
.rs-settings-gear-btn:hover {
    opacity: 1;
}

/* Desktop Settings Popup */
.rs-desktop-settings-popup {
    display: none;
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(12px);
    border-radius: 10px;
    overflow: hidden;
    min-width: 220px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.rs-desktop-settings-popup.active {
    display: block;
}
.rs-desktop-settings-popup__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}
.rs-desktop-settings-popup__close {
    width: 28px;
    height: 28px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
}
.rs-desktop-settings-popup__close:hover {
    background: rgba(255,255,255,0.2);
}
.rs-desktop-settings-popup__item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    text-align: left;
}
.rs-desktop-settings-popup__item:hover {
    background: rgba(255,255,255,0.06);
}
.rs-desktop-settings-popup__item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.rs-desktop-settings-popup__item span {
    margin-left: auto;
    color: rgba(255,255,255,0.5);
    font-size: 12px;
}
.rs-desktop-settings-popup__item.active {
    color: #a855f7;
}
.rs-desktop-settings-popup__item.active::after {
    content: '✓';
    margin-left: auto;
    color: #a855f7;
}
.rs-desktop-settings-back {
    background: none;
    border: none;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
}
.rs-desktop-settings-back:hover {
    opacity: 0.8;
}

/* Speed Dropdown for desktop - hidden, moved to settings */
.rs-speed-dropdown {
    display: none !important;
}

/* CC Dropdown for desktop - hidden, moved to settings */
.rs-cc-dropdown {
    display: none !important;
}

/* Subtitle display overlay */
.rs-subtitle-display {
    position: absolute;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    max-width: 90%;
    text-align: center;
    pointer-events: none;
    transition: bottom 0.3s ease;
}
.rs-subtitle-display span {
    display: inline-block;
    color: #fff;
    text-shadow: 0 0 5px #00000096;
}  
