#video-container {
    --primary-color: rgb(35, 125, 125);
    --primary-light: rgb(57, 191, 191);
    --secondary-color: white;
}

/* Custom Media Player Wrapper Layout */
.custom-video-player {
    position: relative;
    width: 90%;
    max-width: 800px;
    margin: 0 auto;
    border-radius: 10px;
    overflow: hidden;
    background: #000000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.custom-video-player:-webkit-full-screen {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    background: #000;
}

#video-element {
    width: 100%;
    display: block;
}

/* 🎨 Centered Big Play Button Circle */
#center-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    
    /* Custom Color Configuration */
    background-color: var(--primary-color); /* Circle Color */
    color: var(--secondary-color);            /* Arrow Symbol Color */
    
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease, opacity 0.25s ease, background-color 0.2s ease;
    z-index: 2;
}

#center-play-btn:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background-color: var(--primary-light); /* Lighter circle color on hover */
}

/* Hide the giant circle smoothly once the video kicks off */
.custom-video-player.is-playing #center-play-btn {
    opacity: 0;
    pointer-events: none;
}

/* Controls Shelf Backdrop Overlay */
.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    padding: 12px 20px;
    /* gap: 15px; */
    z-index: 3;

    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.video-controls.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none; /* Prevents accidental clicks when invisible */
}

/* Standard Control Icons Styling (Play, Mute, Fullscreen) */
#play-btn, #mute-btn, #fullscreen-btn {
    background: none;
    border: none;
    color: var(--secondary-color); /* Global theme control icons color */
    cursor: pointer;
    font-size: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s ease;
}

#play-btn:hover, #mute-btn:hover, #fullscreen-btn:hover {
    transform: scale(1.1);
}

/* Timeline & Volume Range Track Base Overrides */
#seek-bar, #volume-slider {
    appearance: none;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.25);
    height: 6px;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    overflow: visible;
}

#seek-bar {
    flex-grow: 1;
}

/* Volume Layout Container */
.volume-container {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: transparent;
    padding: 0 5px;
}

#volume-slider {
    width: 60px; /* Compact width specifically for the volume bar */
    transition: width 0.2s ease;
}

/* 🎨 Custom Range Knobs - Chrome/Safari/Edge Engine */
#seek-bar::-webkit-slider-thumb, #volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary-color); /* App theme playhead knob color */
    cursor: pointer;
}

/* 🎨 Custom Range Knobs - Firefox Engine */
#seek-bar::-moz-range-thumb, #volume-slider::-moz-range-thumb {
    border: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
}

@media (max-width: 600px) {
    #center-play-btn {
        width: 60px;
        height: 60px;
        top: 45%;
    }

    .video-controls {
        flex-wrap: wrap;
        padding: 10px 12px;
        gap: 10px;
    }

    #seek-bar {
        width: 100%;
        flex-basis: 100%;
        order: -1; /* Pushes the timeline to its own full row on top */
    }

    #play-btn, #mute-btn, #fullscreen-btn {
        font-size: 22px; /* Scales down oversized tap targets */
    }

    #play-btn {
        margin-right: auto;
    }

    .volume-container {
        gap: 4px;
    }

    #volume-slider {
        width: 45px; /* Shrinks the slider to save horizontal view space */
    }
}

@media (hover: hover) and (pointer: fine) {
    /* Container holding both the video and the controls */
    #video-container:hover .video-controls {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }
}

@media (max-width: 600px) {
    #video-container:fullscreen {
        display: flex;
        flex-direction: column;
        justify-content: center; /* Vertically centers the video inside black bars */
        align-items: center;
        /* background-color: #000; */

        .video-controls {
            position: relative;
            width: 90vw;
        }

        #center-play-btn {
            top: 47vh;
        }
    }
    #video-container:-webkit-full-screen {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    
    #video-container:-webkit-full-screen .video-controls {
        position: relative;
        width: 90vw;
    }

    #video-container:-webkit-full-screen #center-play-btn {
        top: 47vh;
    }
}