.player-container {
    position: relative;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

#videoPlayer {
    width: 100%;
    height: auto;
    max-height: 100%;
    display: block;
    cursor: pointer;
}

/* Кастомные контролы */
.custom-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    padding: 20px 15px 10px;
    opacity: 0;
    transition: opacity 0.3s;
}

.player-container:hover .custom-controls {
    opacity: 1;
}

/* Прогресс-бар */
.progress-bar {
    position: relative;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    margin-bottom: 15px;
    cursor: pointer;
}

.progress-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 2px;
}

.progress-filled {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: #e50914;
    border-radius: 2px;
    width: 0%;
}

.progress-thumb {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: #e50914;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s;
}

.progress-bar:hover .progress-thumb {
    opacity: 1;
}

.progress-slider {
    position: absolute;
    top: -6px;
    left: 0;
    width: 100%;
    height: 20px;
    opacity: 0;
    cursor: pointer;
}

/* Нижние контролы */
.controls-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.left-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.right-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Кнопки */
.control-btn {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

#subtitles-btn {
    font-size: 2rem;
}

.noSub {
    text-decoration: line-through;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Слайдер громкости */
.volume-control {
    width: 80px;
}

.volume-slider {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #e50914;
    border-radius: 50%;
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #e50914;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Время */
.time-display {
    color: white;
    font-size: 14px;
    font-family: monospace;
}

/* Выпадающие списки */
.quality-dropdown,
.audio-dropdown {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    color: white;
    padding: 6px 10px;
    font-size: 12px;
    cursor: pointer;
}

.quality-dropdown:hover,
.audio-dropdown:hover {
    background: rgba(0, 0, 0, 0.9);
}

/* Статус панель */
.status-panel {
    background: #2a2a2a;
    padding: 15px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
}

.status-panel div {
    margin-bottom: 5px;
}

.status-panel div:last-child {
    margin-bottom: 0;
}

/* Адаптивность */
@media (max-width: 768px) {
    .custom-controls {
        padding: 15px 10px 8px;
    }

    .left-controls {
        gap: 10px;
    }

    .right-controls {
        gap: 8px;
    }

    .volume-control {
        width: 60px;
    }

    .quality-dropdown,
    .audio-dropdown {
        font-size: 11px;
        padding: 4px 8px;
    }
}

.container-srt {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.player-container {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
}

video {
    margin: auto;
    height: auto;
    aspect-ratio: 16/9;
    width: 100%;
}

.controls {
    display: flex;
    gap: 10px;
    padding: 15px;
    background: #2a2a2a;
    border-radius: 5px;
}

/* Текстовое поле для субтитров */
.subtitles-text {
    background: rgba(37, 113, 177, 0.7);
    height: 25%;
    width: 100%;
    overflow-y: auto;
    /*        white-space: pre-wrap; */
    color: #fff;
    padding: 12px 24px;
    text-align: center;
    min-height: 2em;
    max-height: 6em;
    overflow-y: scroll;
    line-height: 1em;
    text-shadow: 1px 1px 2px rgba(14, 21, 36, 0.566);
}

/* Hide overlay by default */
#subtitles-overlay {
    position: absolute;
    font-size: 1.25rem;
    left: 0;
    right: 0;
    bottom: 11.5%;
    width: 100%;
    justify-content: center;
    /* Your existing styles (position, font, etc.) */
}

.hidden {
    display: none !important;
    /* or visibility: hidden; for layout preservation */
}