.stvr-player-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #333333;
    font-family: Arial, Helvetica, sans-serif;
    z-index: 0; /* Ensure that player itself has "normal" z-index - e.g.is behing page elements with higher z-index */
    outline: none;
}

.stvr-player-wrapper:focus {
    outline: none;
}

.stvr-player-wrapper:focus-visible {
    outline: none;
}

.stvr-player-wrapper .stvr-player-controlls{
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 44px;
    z-index: 100;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0 10px;
    gap: 8px;
    box-sizing: border-box;
}

.stvr-player-wrapper .stvr-player-controlls .stvr-player-left-buttons-wrap{
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stvr-player-wrapper .stvr-player-controlls .stvr-player-progress-bar-wrap{
    flex: 1 1 0;
    min-width: 0;
    height: 24px;
    position: relative;
}

.stvr-player-wrapper .stvr-player-controlls .stvr-player-right-buttons-wrap {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stvr-player-wrapper .stvr-player-controlls .stvr-player-progress-live-wrap {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
}

.stvr-player-wrapper .stvr-player-controlls .stvr-player-live-badge {
    background: transparent;
    border: none;
    position: relative;
    color: #ffffff;
    font-size: 12px;
    font-weight: 400;
    line-height: 24px;
    text-transform: uppercase;
    padding-left: 12px;
    cursor: pointer;
}

.stvr-player-wrapper .stvr-player-controlls .stvr-player-live-badge::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #A61927;
    transform: translateY(-50%);
}

.stvr-player-wrapper .stvr-player-controlls .stvr-player-live-badge.not-in-sync::before {
    background: #8f8f8f;
}

.stvr-player-wrapper .stvr-player-controlls .stvr-player-progress-static-wrap {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    gap: 8px;
}

.stvr-player-wrapper .stvr-player-controlls .stvr-player-current-time,
.stvr-player-wrapper .stvr-player-controlls .stvr-player-duration {
    flex: 0 0 auto;
    color: #ffffff;
    font-size: 12px;
    font-weight: 400;
    line-height: 24px;
    width: 40px;
}

.stvr-player-wrapper .stvr-player-controlls .stvr-player-current-time {
    text-align: right;
}

.stvr-player-wrapper .stvr-player-controlls .stvr-player-duration {
    text-align: left;
}

.stvr-player-wrapper .stvr-player-controlls .stvr-player-progress-rectangle {
    flex: 1 1 0;
    min-width: 0;
    position: relative;
    height: 10px;
    background: #333333;
    cursor: pointer;
    overflow: visible;
}

.stvr-player-wrapper .stvr-player-controlls .stvr-player-loaded-bar,
.stvr-player-wrapper .stvr-player-controlls .stvr-player-played-bar,
.stvr-player-wrapper .stvr-player-controlls .stvr-player-hover-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
}

.stvr-player-wrapper .stvr-player-controlls .stvr-player-loaded-bar {
    background: #7a7a7a;
    z-index: 1;
}

.stvr-player-wrapper .stvr-player-controlls .stvr-player-played-bar {
    background: #A61927;
    z-index: 2;
 }

.stvr-player-wrapper .stvr-player-controlls .stvr-player-hover-bar {
    background: rgba(255, 255, 255, 0.3);
    z-index: 3;
}

.stvr-player-wrapper .stvr-player-controlls .stvr-player-progress-tooltip {
    position: absolute;
    bottom: 14px;
    transform: translateX(-50%);
    color: #ffffff;
    background: rgba(0, 0, 0, 0.85);
    font-size: 11px;
    line-height: 16px;
    padding: 2px 6px;
    border-radius: 3px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 4;
}

.stvr-player-wrapper .stvr-player-controlls .stvr-player-button-tooltip {
    position: absolute;
    display: none;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    border-radius: 3px;
    padding: 4px 8px;
    font-size: 12px;
    line-height: 16px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.stvr-player-wrapper .stvr-player-controlls .stvr-player-left-buttons-wrap button,
.stvr-player-wrapper .stvr-player-controlls .stvr-player-right-buttons-wrap button {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 14px;
    cursor: pointer;
    height: 24px;
    line-height: 24px;
    padding: 0;
    flex-shrink: 0;
}

.stvr-player-wrapper .stvr-player-controlls img.stvr-player-control-icon {
    width: 24px !important;
    height: 24px !important;
    max-width: 24px !important;
    min-width: 24px;
    max-height: 24px;
    min-height: 24px;
    display: block;
    object-fit: contain;
}

.stvr-player-wrapper .stvr-player-screen{
    width: 100%;
    height: 100%;
    position: absolute;
    z-index: 90;
}

.stvr-player-wrapper .stvr-player-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 44px;
    z-index: 95;
    cursor: pointer;
    background: transparent;
}

.stvr-player-wrapper .stvr-player-endscreen {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 44px;
    z-index: 99;
    display: none;
    background: rgba(0, 0, 0, 0.72);
    box-sizing: border-box;
    padding: 24px;
    align-items: flex-end;
}

.stvr-player-wrapper .stvr-player-endscreen-content {
    width: 100%;
}

.stvr-player-wrapper .stvr-player-endscreen-videos-row {
    display: flex;
    gap: 12px;
    justify-content: flex-start;
    flex-wrap: nowrap;
}

.stvr-player-wrapper .stvr-player-endscreen-videos-row.stvr-player-endscreen-videos-row-hidden {
    display: none !important;
}

.stvr-player-wrapper a.stvr-player-endscreen-video-card {
    flex: 0 0 calc((100% - 24px) / 3);
    min-width: 0;
    text-decoration: none !important;
    color: #ffffff;
}

.stvr-player-wrapper a.stvr-player-endscreen-video-card:hover {
    text-decoration: none !important;
    color: #ffffff;
}

.stvr-player-wrapper a.stvr-player-endscreen-video-card .stvr-player-endscreen-video-image-wrap {
    width: 100%;
    padding-top: 56.25%;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-color: #1e1e1e;
    outline: #a6192700 solid 4px;
    outline-offset: -4px;
    transition: outline-color 0.2s ease;
}

.stvr-player-wrapper a.stvr-player-endscreen-video-card:hover .stvr-player-endscreen-video-image-wrap {
    outline-color: #A61927;

}

.stvr-player-wrapper a.stvr-player-endscreen-video-card .stvr-player-endscreen-video-title {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    white-space: normal;
    color: #ffffff;
    text-decoration: none;
}

.stvr-player-wrapper a.stvr-player-endscreen-video-card:hover .stvr-player-endscreen-video-title {
    color: #A61927;
    text-decoration: none !important;
}

.stvr-player-wrapper .stvr-player-endscreen-action-wrap {
    margin-top: 14px;
}

.stvr-player-wrapper .stvr-player-endscreen-row-action-slot {
    display: none;
    flex: 0 0 calc((100% - 24px) / 3);
    min-width: 0;
    align-items: flex-end;
    justify-content: flex-start;
}

.stvr-player-wrapper .stvr-player-endscreen-action-button {
    display: inline-block;
    text-decoration: none;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    background: #A61927;
    color: #ffffff;
    font-size: 14px;
    line-height: 20px;
    font-weight: 700;
    padding: 8px 12px;
    text-decoration: none !important;
}

.stvr-player-wrapper .stvr-player-endscreen-row-action-button {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

.stvr-player-wrapper .stvr-player-endscreen-action-button:hover {
    background: #8f1620;
    color: #ffffff !important;
}

@media (max-width: 720px) {
    .stvr-player-wrapper .stvr-player-endscreen {
        padding: 12px;
    }

    .stvr-player-wrapper .stvr-player-endscreen-videos-row {
        gap: 8px;
    }
}

.stvr-player-wrapper.stvr-player-w500 a.stvr-player-endscreen-video-card .stvr-player-endscreen-video-title {
    font-size: 12px;
    display: block;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    white-space: nowrap;
}

.stvr-player-wrapper.stvr-player-w500 .stvr-player-endscreen-action-button {
    font-size: 12px;
    line-height: 16px;
    padding: 7px 11px;
}

.stvr-player-wrapper.stvr-player-w400 a.stvr-player-endscreen-video-card .stvr-player-endscreen-video-title {
    font-size: 10px;
}

.stvr-player-wrapper.stvr-player-w400 .stvr-player-endscreen-action-button {
    font-size: 10px;
    line-height: 14px;
    padding: 6px 10px;
}

.stvr-player-wrapper.stvr-player-compact .stvr-player-endscreen-action-wrap {
    display: none !important;
}

.stvr-player-wrapper.stvr-player-compact .stvr-player-endscreen-video-card-third {
    display: none !important;
}

.stvr-player-wrapper.stvr-player-compact .stvr-player-endscreen-row-action-slot {
    display: flex;
}

/* Volume control */
.stvr-player-wrapper .stvr-player-controlls .stvr-player-volume-wrap {
    display: flex;
    align-items: center;
    width: 24px;
    overflow: hidden;
    transition: width 0.25s ease;
    flex-shrink: 0;
}

.stvr-player-wrapper .stvr-player-controlls .stvr-player-volume-wrap:hover {
    width: 120px;
}

.stvr-player-wrapper .stvr-player-controlls .stvr-player-volume-button {
    background: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
    width: 24px;
    height: 24px;
    line-height: 24px;
    padding: 0;
    flex-shrink: 0;
}

.stvr-player-wrapper .stvr-player-controlls .stvr-player-volume-slider {
    flex: 1 1 0;
    min-width: 0;
    height: 12px;
    cursor: pointer;
    margin: 0 8px;
    display: block;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    position: relative;
}

.stvr-player-wrapper .stvr-player-controlls .stvr-player-volume-slider-track {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 4px;
    transform: translateY(-50%);
    background: #ffffff;
    border-radius: 2px;
}

.stvr-player-wrapper .stvr-player-controlls .stvr-player-volume-slider-fill,
.stvr-player-wrapper .stvr-player-controlls .stvr-player-volume-slider-thumb {
    background: #A61927;
    transition: background-color 0.15s ease;
}

.stvr-player-wrapper .stvr-player-controlls .stvr-player-volume-slider-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    border-radius: 2px;
}

.stvr-player-wrapper .stvr-player-controlls .stvr-player-volume-slider-thumb {
    position: absolute;
    top: -4px;
    left: -4px;
    width: 12px;
    height: 12px;
    border-radius: 6px;
}

.stvr-player-wrapper .stvr-player-controlls .stvr-player-volume-slider:hover .stvr-player-volume-slider-fill,
.stvr-player-wrapper .stvr-player-controlls .stvr-player-volume-slider:hover .stvr-player-volume-slider-thumb {
    background: #8f1620;
}

.stvr-player-wrapper .stvr-player-controlls .stvr-player-volume-slider.active .stvr-player-volume-slider-fill,
.stvr-player-wrapper .stvr-player-controlls .stvr-player-volume-slider.active .stvr-player-volume-slider-thumb {
    background: #cf2435;
}

.stvr-player-wrapper .stvr-player-controlls .stvr-player-volume-wrap:hover .stvr-player-volume-slider {
    opacity: 1;
    pointer-events: auto;
}

.stvr-player-wrapper .stvr-player-controlls .stvr-player-settings-wrap {
    position: relative;
    flex-shrink: 0;
}

.stvr-player-wrapper .stvr-player-controlls .stvr-player-settings-button {
    background: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
    width: 24px;
    height: 24px;
    line-height: 24px;
    padding: 0;
    flex-shrink: 0;
}

.stvr-player-wrapper .stvr-player-controlls .stvr-player-settings-menu {
    position: absolute;
    bottom: 34px;
    right: 0;
    width: 200px;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 4px;
    padding: 8px 0;
    display: none;
    flex-direction: column;
    z-index: 105;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.stvr-player-wrapper .stvr-player-controlls .stvr-player-settings-wrap.open .stvr-player-settings-menu {
    display: flex;
}

.stvr-player-wrapper .stvr-player-controlls .stvr-player-settings-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 12px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.stvr-player-wrapper .stvr-player-controlls .stvr-player-settings-menu-title {
    color: #ffffff;
    font-size: 13px;
    line-height: 20px;
    font-weight: 600;
}

.stvr-player-wrapper .stvr-player-controlls .stvr-player-settings-menu-header-button {
    background: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    padding: 0;
    font-size: 16px;
    flex-shrink: 0;
}

.stvr-player-wrapper .stvr-player-controlls .stvr-player-settings-menu-header-button:hover {
    color: #a61927;
}

.stvr-player-wrapper .stvr-player-controlls .stvr-player-settings-menu-body {
    display: flex;
    flex-direction: column;
    padding: 4px 0;
}

.stvr-player-wrapper .stvr-player-controlls button.stvr-player-settings-item,
.stvr-player-wrapper .stvr-player-controlls button.stvr-player-settings-option {
    width: 100%;
    background: transparent;
    border: none;
    color: #ffffff;
    text-align: left;
    cursor: pointer;
    min-height: 34px;
    padding: 7px 12px;
    box-sizing: border-box;
    font-size: 13px;
    line-height: 20px;
}

.stvr-player-wrapper .stvr-player-controlls .stvr-player-settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.stvr-player-wrapper .stvr-player-controlls .stvr-player-settings-item-value {
    color: rgba(255, 255, 255, 0.75);
}

.stvr-player-wrapper .stvr-player-controlls .stvr-player-settings-item:hover,
.stvr-player-wrapper .stvr-player-controlls .stvr-player-settings-option:hover {
    background: rgba(255, 255, 255, 0.12);
}

.stvr-player-wrapper .stvr-player-controlls .stvr-player-settings-option.active {
    color: #a61927;
    font-weight: 700;
}

/* Controls visibility and autohide */
.stvr-player-wrapper .stvr-player-controlls {
    transition: opacity 0.3s ease, visibility 0.3s ease;
    opacity: 1;
    visibility: visible;
}

.stvr-player-wrapper .stvr-player-controlls.stvr-player-controlls-hidden,
.stvr-player-wrapper .stvr-player-controls-overlay.stvr-player-controlls-hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Controls overlay (center of video area) */
.stvr-player-wrapper .stvr-player-controls-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 44px;
    z-index: 96;
    display: none; /* none by default, flex when mobile */
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.stvr-player-wrapper .stvr-player-controls-overlay .stvr-player-controls-overlay-col {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.stvr-player-wrapper .stvr-player-controls-overlay .stvr-player-overlay-btn {
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    color: #ffffff;
    transition: background 0.2s ease, transform 0.1s ease;
    padding: 0;
}

.stvr-player-wrapper .stvr-player-controls-overlay .stvr-player-overlay-btn:active {
    background: rgba(166, 25, 39, 0.85);
    transform: scale(1.05);
}

@media (hover: hover) and (pointer: fine) {
    .stvr-player-wrapper .stvr-player-controls-overlay .stvr-player-overlay-btn:hover {
        background: rgba(166, 25, 39, 0.85);
        transform: scale(1.05);
    }
}

.stvr-player-wrapper .stvr-player-controls-overlay .stvr-player-overlay-btn img.stvr-player-control-icon {
    width: 28px !important;
    height: 28px !important;
    max-width: 28px !important;
    min-width: 28px;
    max-height: 28px;
    min-height: 28px;
}

.stvr-player-wrapper .stvr-player-controls-overlay .stvr-player-overlay-loading {
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.stvr-player-wrapper .stvr-player-controls-overlay .stvr-player-overlay-loading-spinner {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    animation: stvr-player-loading-spin 0.8s linear infinite;
}

@keyframes stvr-player-loading-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Responsive rules for player width smaller than 510px */
@media (max-width: 509px) {
    .stvr-player-wrapper .stvr-player-controlls .stvr-player-seek-back-button,
    .stvr-player-wrapper .stvr-player-controlls .stvr-player-seek-forward-button {
        display: none !important;
    }

    .stvr-player-wrapper .stvr-player-controlls .stvr-player-volume-wrap {
        width: 24px !important;
    }

    .stvr-player-wrapper .stvr-player-controlls .stvr-player-volume-wrap:hover {
        width: 24px !important;
    }

    .stvr-player-wrapper .stvr-player-controlls .stvr-player-volume-slider {
        display: none !important;
    }
}

/* Also apply when JS detects small window via container query or class */
.stvr-player-wrapper.stvr-player-mobile .stvr-player-controlls .stvr-player-seek-back-button,
.stvr-player-wrapper.stvr-player-mobile .stvr-player-controlls .stvr-player-seek-forward-button {
    display: none !important;
}

.stvr-player-wrapper.stvr-player-mobile .stvr-player-controlls .stvr-player-volume-wrap {
    width: 24px !important;
}

.stvr-player-wrapper.stvr-player-mobile .stvr-player-controlls .stvr-player-volume-wrap:hover {
    width: 24px !important;
}

.stvr-player-wrapper.stvr-player-mobile .stvr-player-controlls .stvr-player-volume-slider {
    display: none !important;
}

.stvr-player-wrapper.stvr-player-mobile .stvr-player-controlls .stvr-player-button-tooltip,
.stvr-player-wrapper.stvr-player-mobile .stvr-player-controlls .stvr-player-progress-tooltip {
    display: none !important;
}

.stvr-player-wrapper .fp-controls,
.stvr-player-wrapper .fp-middle,
.stvr-player-wrapper .fp-header {
    display: none;
}


