


/* Видео контейнер */
.video-container {
    aspect-ratio: 16/9;
    width: 100%;
    max-width: 1200px;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    background: #000;
    position: relative;
}

#videoPlayer {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

/* Панель выбора (верхняя) */
.selection-panel {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    display: flex;
    gap: 12px;
    z-index: 100;
    pointer-events: none;
    z-index: 777;
}

.selection-panel > * {
    pointer-events: auto;
}

.selection-group {
    position: relative;
}
.selection-group-flex {
    position: relative;
    width: 100%;
    flex: 1;
    box-sizing: border-box;
    display: flex;
    flex-direction: column-reverse;
    gap: 12px;
    justify-content: flex-end;
    align-items: flex-end
}

.selection-group-flex > .dropdown-toggle {
    min-width: max-content;
}

.dropdown-top {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 16px;
    background: rgb(27 29 42 / 50%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: #fff;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.dropdown-toggle:hover {
    background: rgb(27 29 42 / 70%);
    border-color: rgba(255, 255, 255, 0.25);
}

.dropdown-toggle:active {
    transform: translateY(0);
}

.dropdown-toggle span {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.dropdown-arrow {
    transition: transform 0.3s ease;
    opacity: 0.7;
}

.dropdown-toggle.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu-list {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 150px;
    max-height: 300px;
    background: rgb(27 29 42 / 95%);
    backdrop-filter: blur(5px) saturate(200%);
    -webkit-backdrop-filter: blur(5px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.dropdown-menu-list.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Скрываем скроллбар */
.dropdown-menu-list::-webkit-scrollbar {
    display: none;
}

.dropdown-menu-list {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.dropdown-item {
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1em;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.dropdown-item.active {
    background: rgba(96, 127, 242, 0.2);
    color: #607FF2;
    position: relative;
}


/* Нижняя панель управления */
.section-panel-bottom {
    position: absolute;
    bottom: 15px;
    left: 15px;
    right: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 16px;
    z-index: 100;
}

/* затемнее */
.section-panel-background::before {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    content: '';
    display: block;
    background: #10121f;
    background: -webkit-linear-gradient(270deg, rgba(16, 18, 31, 0) 0%, var(--color-bg-primary) 300%);
    height: 100%;
    z-index: 1;
}
.section-panel-background::after {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    content: '';
    display: block;
    background: #10121f;
    background: -webkit-linear-gradient(120deg, rgba(16, 18, 31, 0) 0%, var(--color-bg-primary) 300%);
    height: 100%;
    z-index: 1;
}

.section-panel-info {
    position: absolute;
    bottom: 20%;
    left: 15px;
    right: 15px;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgb(27 29 42 / 50%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    padding: 25px;
    display: flex;
    flex-direction: column;
}
.section-panel-info p {
    font-size: 1.1em;
    font-weight: 400;
    color: var(--text-muted);
    overflow-wrap: break-word;
    margin: 0px;
    padding: 0px;
}



/* Кнопки управления */
.button-container {
    position: relative;
}

.control-button {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgb(27 29 42 / 50%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.control-button:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
}

.control-button:active {
    transform: translateY(0);
}

/* Прогресс бар */
.progress-container {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    overflow: visible;
}

.progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: #607FF2;
    border-radius: 3px;
    transition: width 0.1s linear;
    z-index: 2;
}

.progress-bar::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translate(50%, -50%);
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(96, 127, 242, 0.5);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.progress-container:hover .progress-bar::after {
    opacity: 1;
}

.progress-hover {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}

.progress-time-tooltip {
    position: absolute;
    bottom: 15px;
    left: 0;
    transform: translateX(-50%);
    padding: 6px 10px;
    background: rgb(27 29 42 / 95%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    font-size: 1em;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
    z-index: 1000;
    pointer-events: none;
    color: #ffffff;
}

.progress-time-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgb(27 29 42);
}


/* Индикатор загруженного видео (буферизация) */
.progress-loaded {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 3px;
    z-index: 1;
    pointer-events: none;
    transition: width 0.1s linear;
}

.progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: #607FF2;
    border-radius: 3px;
    transition: width 0.1s linear;
    z-index: 2; /* Увеличьте z-index чтобы был поверх загрузки */
}






/* Стили для прогресс-бара таймингов */
.progress-timings {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2; /* Важно: между progress-loaded (1) и progress-bar (3) */
}

.timing-range {
    position: absolute;
    height: 100%;
    opacity: 0.5; /* Увеличил opacity для лучшей видимости */
    border-radius: 3px; /* Чтобы соответствовать стилю прогресс-бара */
}

.timing-opening {
    background-color: rgb(0 0 0 / 55%); /* Более яркий красный */
}

.timing-ending {
    background-color: rgb(0 0 0 / 55%); /* Более яркий синий */
}

/* Кнопки пропуска */
.skip-buttons {
    position: absolute;
    top: -50px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 100;
}

/* Меню качества */
.quality-container {
    position: relative;
}
.button-quality {
    width: 60px;
}
.quality-text {
    font-size: 1em;
    font-weight: 500;
}

.quality-menu {
    position: absolute;
    bottom: calc(100% + 10px);
    right: 50%;
    transform: translateX(50%);
    min-width: 80px;
    background: rgb(27 29 42 / 95%);
    backdrop-filter: blur(5px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: none;
    z-index: 1000;
    overflow: hidden;
    transition: none !important;
    animation: none !important;
}

.quality-menu.show {
    display: block;
}

.quality-option {
    padding: 5px 8px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quality-option:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.quality-option.active {
    background: rgba(96, 127, 242, 0.2);
    color: #607FF2;
    position: relative;
}


/* Отображение времени */
.time-display {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 1em;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    font-variant-numeric: tabular-nums;
}

.current-time {
    color: #fff;
}

.time-separator {
    color: rgba(255, 255, 255, 0.5);
}

.duration {
    color: rgba(255, 255, 255, 0.7);
}

/* Контейнер скорости */
.speed-container {
    position: relative;
}

.button-speed {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    padding: 0 12px;
    min-width: 60px;
}

.speed-text {
    font-size: 1em;
    font-weight: 500;
}

.speed-menu {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    min-width: 80px;
    background: rgb(27 29 42 / 95%);
    backdrop-filter: blur(5px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.speed-container:hover .speed-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.speed-option {
    padding: 10px 16px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1em;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

.speed-option:last-child {
    border-bottom: none;
}

.speed-option:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.speed-option.active {
    background: rgba(96, 127, 242, 0.2);
    color: #607FF2;
}

/* Контейнер громкости */
.volume-container {
    position: relative;
}

.volume-slider-container {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    right: 50%;
    transform: translateX(-50%);
    width: 44px;
    height: 80px;
    background: rgb(27 29 42 / 95%);
    backdrop-filter: blur(5px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 20px 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.volume-container:hover .volume-slider-container {
    opacity: 1;
    visibility: visible;
}

.volume-slider-vertical {
    position: relative;
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.volume-slider {
    width: 100px;
    height: 4px;
    transform: rotate(-90deg);
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
    z-index: 2;
    margin: 0;
    padding: 0;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #607FF2;
    box-shadow: 0 0 0 2px rgba(96, 127, 242, 0.3);
    transition: all 0.2s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 0 0 3px rgba(96, 127, 242, 0.4);
}

.volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #607FF2;
    box-shadow: 0 0 0 2px rgba(96, 127, 242, 0.3);
    transition: all 0.2s ease;
}

.volume-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 0 0 3px rgba(96, 127, 242, 0.4);
}

.volume-slider-track {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 100px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

.volume-slider-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70%;
    background: #607FF2;
    border-radius: 2px;
    transition: height 0.2s ease;
}

/* Индикатор текущего значения громкости */
.volume-value-indicator {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 1em;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.volume-slider:active ~ .volume-value-indicator,
.volume-slider:hover ~ .volume-value-indicator {
    opacity: 1;
}

/* Адаптивность */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .video-container {
        border-radius: 12px;
        font-size: 0.85em;
    }
    
    .selection-panel {
        top: 3px;
        left: 3px;
        right: 3px;
        gap: 8px;
    }
    
    .dropdown-toggle {
        padding: 8px 12px;
        font-size: 1em;
        min-width: 100px;
    }
    .dropdown-menu-list {
        max-height: 150px;
    }
    .dropdown-item {
        padding: 5px 8px;
    }
    
    .section-panel-bottom {
        bottom: 3px;
        left: 3px;
        right: 3px;
        gap: 8px;
    }
    
    .control-button {
        width: 36px;
        height: 36px;
    }
    
    .time-display {
        min-width: 80px;
        font-size: 1em;
    }
    
    .progress-container {
        height: 5px;
    }
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.video-container * {
    animation: fadeIn 0.3s ease;
}



