
.video-element-wrapper {
    display: flex;
    position: relative;
    border-radius: 16px;
    height: 50vh;
    min-width: 687.11px; 
    max-width: 100%; 
}

.video-element {
    width: 100%;
    height: 100%;
    opacity: 1;
    border-radius: 16px;
    object-fit: contain;
    background-color: #000000;
}

.video-element-controls {
    width: calc(100% - 48px);
    position: absolute;
    display: flex;
    flex-direction: column;
    gap: 10px;
    left: 24px;
    bottom: 16px;
}

.video-progress-container {
    display: flex;
    gap: 28px;
    align-items: center;
}

.video-progress-bar {
    position: relative;
    flex-grow: 1;
    height: 2px;
    background-color: var(--Text-50, rgba(230, 236, 241, 0.4));
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
}

.video-progress-filled {
    position: absolute;
    left: 0;
    top: 0;
    width: 30%;
    height: 100%;
    border-radius: 10px;
    z-index: 20;
    background: var(--Primary-500, #008cff);
}

.video-progress-loaded {
    position: absolute;
    left: 0;
    top: 0;
    width: 60%;
    height: 100%;
    border-radius: 10px;
    z-index: 15;
    background-color: var(--Text-50, rgba(230, 236, 241, 0.6));
}

.video-left-btns,
.video-right-btns {
    display: flex;
    gap: 20px;
    align-items: center;
}

.video-left-btns img,
.video-right-btns img {
    cursor: pointer;
}

.main-play-pause-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    opacity: 0.8;
    display: none; /* hidden by default, shown by JS when appropriate */
    pointer-events: auto;
    cursor: pointer;
    z-index: 30;
    transition: opacity 150ms ease;
}

.setting-menu {
    position: absolute;
    bottom: 65px;
    right: 24px;
    max-width: 240px;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    z-index: 30;
    padding: 4px 2px;
    display: none; /* hidden by default, toggled by JS */
    flex-direction: column;
}

.setting-menu.open {
    display: flex;
}

.setting-menu:has(.playback-view) {
    max-width: 180px;
}

.playback-list {
    display: none; /* hidden until the playback row is clicked */
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
}

.playback-list.open {
    display: flex;
}

/* Playback view (full list with back header) */
.playback-view {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 2px;
}

.playback-view-header {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 4px;
}

.back-btn {
    background: transparent;
    border: none;
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.playback-view-title {
    color: #ffffff;
    font-weight: 600;
}

.back-icon {
    width: 16px;
    height: 16px;
    transform: rotate(180deg);
    display: inline-block;
}

.playback-speed-item {
    background: transparent;
    border: none;
    color: #ffffff;
    text-align: left;
    padding: 4px 6px;
    border-radius: 6px;
    cursor: pointer;
}

.playback-speed-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.playback-speed-item.active {
    font-weight: 700;
}

.playback-container {
    display: flex;
    gap: 12px;
    align-items: center;
}

.playback-selected-option {
    display: flex;
    gap: 4px;
    align-items: center;
}

.playback-container img {
    width: 20px;
    height: 20px;
}

.playback-selected-option img {
    width: 12px;
    height: 12px;
}

.setting-menu-options {
    display: flex;
    justify-content: space-between;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 8px;
}

.setting-menu-options:hover {
    background-color: rgba(255, 255, 255, 0.1);
}



@media (max-width: 576px) {
    .video-element-wrapper {
        min-width: unset;
    }
}