.player {
    position: relative;
    width: 80%;
    max-width: 960px;
    width: 400px;
    background: #000;
    overflow: visible !important;
}

video {
    width: 100%;
    display: block;
}

.controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: linear-gradient(to top, rgba(0, 0, 0, .7), transparent);
}

.controls-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.right-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.progress {

    transition: none !important;
    -webkit-appearance: none;
    /* убираем стандартный стиль браузера */
    width: 100%;
    height: 6px;
    /* толщина дорожки */
    background: rgb(124, 124, 124);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    background: linear-gradient(to right, #666 0%, #666 50%, #aaa 50%, #aaa 100%);
}


/* Ползунок (thumb) для Chrome, Safari, Edge */
.progress::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    /* размер ползунка */
    height: 12px;
    background: #ffffff;
    /* темно-серый круглый */
    border-radius: 50%;
    cursor: pointer;
    margin-top: -3px;
    /* центрирование по высоте дорожки */
    transition: none !important;
}

/* Для Firefox */
.progress::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #666;
    border-radius: 50%;
    cursor: pointer;
}

/* Для IE */
.progress::-ms-thumb {
    width: 12px;
    height: 12px;
    background: #666;
    border-radius: 50%;
    cursor: pointer;
}

/* Дорожка для Chrome/Safari */
.progress::-webkit-slider-runnable-track {
    height: 6px;
    background: rgb(183, 183, 183);
    border-radius: 3px;
}

.progress::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #ffffff;
    border-radius: 50%;
    margin-top: -3px;
    cursor: pointer;
}


.controls button {
    background: none;
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
}

.controls input[type=range] {
    flex: 1;
}

.menu {
    position: absolute;
    right: 10px;
    bottom: 50px;
    background: #1f1f1f;
    color: #fff;
    padding: 10px;
    width: 180px;
    border-radius: 6px;
    z-index: 99999 !important;
    display: block;
}

.menu.hidden {
    display: none;
}

.section {
    margin-bottom: 10px;
}

.video-title {
    font-size: 12px;
    opacity: .7;
    margin-bottom: 5px;
}

.menu button {
    width: 94%;
    background: #333;
    border: none;
    color: #fff;
    padding: 6px;
    margin-bottom: 4px;
    cursor: pointer;
}

.menu button.active {
    background: #555;
}

.menu button:hover {
    background: #444;
}

.player:fullscreen {
    width: 100vw;
    height: 100vh;
}

.player:fullscreen video {
    height: 100%;
    object-fit: contain;
}

.player:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
}

.volume {
    position: relative;
    display: flex;
    align-items: center;
}

.volume input {
    width: 0;
    opacity: 0;
    transition: width 0.2s ease, opacity 0.2s ease;
    margin-left: 4px;
    margin-top: 6px;
}

.volume.show input {
    width: 80px;
    opacity: 1;
}

.volume input {
    -webkit-appearance: none;
    /* убираем стандартный стиль браузера */
    height: 6px;
    /* толщина дорожки */
    background: rgb(255, 255, 255);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}


/* Ползунок (thumb) для Chrome, Safari, Edge */
.volume input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    /* размер ползунка */
    height: 12px;
    background: #ffffff;
    /* темно-серый круглый */
    border-radius: 50%;
    cursor: pointer;
    margin-top: -3px;
    /* центрирование по высоте дорожки */
}

/* Для Firefox */
.volume input::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #666;
    border-radius: 50%;
    cursor: pointer;
}

/* Для IE */
.volume input::-ms-thumb {
    width: 12px;
    height: 12px;
    background: #666;
    border-radius: 50%;
    cursor: pointer;
}

/* Дорожка для Chrome/Safari */
.volume input::-webkit-slider-runnable-track {
    height: 6px;
    background: rgb(185, 185, 185);
    border-radius: 3px;
}

.volume input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: rgb(253, 253, 253);
    border-radius: 50%;
    margin-top: -3px;
    cursor: pointer;
}

.time {
  color: #ccc;
  font-size: 15px;
  min-width: 90px;
  text-align: left;
  user-select: none;
}

.player {
    position: relative;
}

.loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top: 5px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10;
}

.loader.hidden {
    display: none;
}

.hidden {
    display: none;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}
