:root {
    /* [video player variables: adjust to your liking] */
    --videoPlayer-bgColor: #000000;
    --videoPlayer-borderRadius: 0.75rem;
    --videoPlayer-width: 800px;
    --videoPlayer-height: 450px;
    --videoPlayer-color: #ffffff;
    --progressBar-bgColor: #ffffff33;
    --progressBar-borderRadius: 3px;
    --progressBar-height: 5px;
    --backdrop-filter: blur(6px);
    --progressPercentage-bgColor: #daa74b;
    --videoControls-height: 30px;
    --videoControls-color: #daa74b;
    --timeframe-fontSize: 12px;
}

/* [Video player styles: adjust with cautions] */
.videoPlayer {
    all: unset;
    display: flex;
    box-sizing: border-box;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    background-color: var(--videoPlayer-bgColor);
    border-radius: var(--videoPlayer-borderRadius);
    width: var(--videoPlayer-width);
    height: var(--videoPlayer-height);
    color: var(--videoPlayer-borderRadius);
}
.videoSection {
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: var(--videoPlayer-bgColor);
}
.videoTitle {
    all: unset;
    position: absolute;
    top: 10px;  
    left: 10px;
    color: #daa74b; 
    font-size: 21px;
    font-weight: 500;
    text-shadow: 2px 2px 5px #000000;
    pointer-events: none; 
    opacity: 1;
    transition: opacity 0.3s ease;
    padding: 0px 10px;
}
.videoTitle:not(.visible) {
    opacity: 0;
}
.corpLogo {
    all: unset;
    position: absolute;
    top: 10px;  
    right: 10px;    
    color: #daa74b; 
    font-size: 21px;
    font-weight: 500;
    text-shadow: 2px 2px 5px #000000;
    pointer-events: none; 
    opacity: 1;
    transition: opacity 0.3s ease;
    padding: 0px 10px;
    display: flex;
    justify-content: space-between;
}
.corpLogo img {
    height: 29px;
    width: 29px;
}
.videoControls {
    all: unset;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: absolute;
    bottom: 0;
    left: 0;
    max-width: 100%;
    min-width: 100%;
    gap: 10px;
    padding: 10px;
    color: var(--videoControls-color);
    opacity: 1;
    transition: opacity 0.3s ease;
}
.videoControls:not(.visible) {
    opacity: 0;
    pointer-events: none;
}
.progressBar {
    all: unset;
    width: 100%;
    height: 6px;
    appearance: none;
    background: var(--progressBar-bgColor);
    backdrop-filter: var(--backdrop-filter);
    border-radius: 3px;
    cursor: pointer;
}
.progressBar::-webkit-slider-thumb {
    appearance: none;
    width: 0; /* hide thumb */
    height: 0;
}
.progressBar::-moz-range-thumb {
    width: 0;
    height: 0;
}
.progressBar::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 3px;
}
.progressBar::-moz-range-track {
    height: 6px;
    border-radius: 3px;
}
.otherVideoControls {
    all: unset;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: var(--videoControls-height);
    box-sizing: border-box;
}
.commonVideoControls, .moreVideoControls {
    all: unset;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 10px;
    height: 100%;
    width: fit-content;
}
.playpause, .prev, .next, .sound, .settings,.fullscreen {
    height: 100%;
    cursor: pointer;
}
.playpause img,.prev img, .next img, .sound img, .settings img, .fullscreen img {
    height: 90%;
}
.timeFrame {
    all: unset;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    height: fit-content;
    font-size: var(--timeframe-fontSize);
}
.timeFrame p{
    margin: 0;
}
.sound {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    height: 100%;
}
.volumeSlider {
    all: unset;
    width: 80px;
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(
        to right,
        var(--progressPercentage-bgColor) 100%,
        var(--progressBar-bgColor) 100%
    );
    appearance: none;
    cursor: pointer;
    outline: none;
    backdrop-filter: var(--backdrop-filter);
}
.volumeSlider::-webkit-slider-thumb {
    appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--progressPercentage-bgColor);
}
.volumeSlider::-moz-range-thumb {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--progressPercentage-bgColor);
}
.settingsMenu,
.submenu {
    all: unset;
    position: absolute;
    bottom: 60px;
    right: 10px;
    background: var(--progressBar-bgColor);
    border-radius: var(--videoPlayer-borderRadius);
    padding: 5px;
    width: 170px;
    display: none;
    flex-direction: column;
    backdrop-filter: var(--backdrop-filter);
    animation: fadeIn 0.2s ease forwards;
    z-index: 100;
    gap: 5px;
}

/* make it appear when toggled */
.settingsMenu.show,
.submenu.show {
    display: flex;
}

.settingsIcon {
    width: 24px;
    cursor: pointer;
    transition: transform 0.3s;
}
.settingsIcon:hover {
    transform: rotate(30deg);
}

.settingsItem,
.submenuItem {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 5px;
    border-radius: 8px;
}
.settingsItem img,
.submenuItem img {
    width: 16px;
    margin-right: 8px;
}
.settingsItem:hover,
.submenuItem:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* toggle switch */
.switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 18px;
}
.switch input {
    display: none;
}
.slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #555;
    border-radius: 34px;
    transition: 0.3s;
}
.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: var(--videoControls-color);
}
input:checked + .slider:before {
    transform: translateX(18px);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@media (max-width: 768px){
    .videoPlayer {
        width: 100%;
        height: auto;
        overflow: visible;
    }
    .videoSection {
        width: 100%;
        height: auto;   
        object-fit: contain;
        display: block;
        border-radius: 12px;
    }
}

/* FULLSCREEN PATCH (SAFE) */
.videoPlayer:fullscreen,
.videoPlayer:-webkit-full-screen {
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100%;
  max-height: 100%;
  border-radius: 0 !important;
}

.videoPlayer:fullscreen .videoSection,
.videoPlayer:-webkit-full-screen .videoSection {
  width: 100%;
  height: 100%;
  object-fit: contain;
}