/* ==========================================
   Стили для видео-плеера (множественные экземпляры)
   ========================================== */

.video-player {
    width: 100%;
    margin: 0 auto 40px;
}

.video-player .video-container {
    position: relative;
    width: 90%;
    max-width: 800px;           /* ← по умолчанию для горизонтальных */
    height: auto;
    border-radius: 16px;
    margin: 0 auto;
    background: #000;
}

.video-player .my-video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 17px;
    outline: none;
}

/* ==================== НОВАЯ ЧАСТЬ ==================== */
/* Вертикальные видео на десктопе делаем уже (450px) */
@media (min-width: 601px) {
    .video-player .video-container.portrait {
        max-width: 450px;       /* ← главное изменение */
    }
}
/* ==================================================== */

.video-player .play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: opacity 0.2s ease;
}

.video-player .play-button:before {
    content: '';
    width: 0;
    height: 0;
    border-left: 30px solid white;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    margin-left: 4px;
}

.video-player .controls {
    position: absolute;
    left: 0;
    bottom: 10px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    opacity: 0;
    transition: opacity 0.3s ease;
    box-sizing: border-box;
    z-index: 2;
}

.video-player .seek-bar {
    flex: 1;
    margin-right: 10px;
    height: 5px;
    background: rgba(255, 255, 255, 0.8);
    outline: none;
    -webkit-appearance: none;
    border-radius: 3px;
    cursor: pointer;
}

.video-player .seek-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.1s ease;
}

.video-player .seek-bar::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.video-player .seek-bar::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

.video-player .time-remaining {
    color: white;
    font-family: Arial, sans-serif;
    font-size: 14px;
    padding-left: 10px;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.video-player .video-container:hover .controls {
    opacity: 1;
}

.video-player .action-button {
    display: none;
    margin: 20px auto 0;
    padding: 12px 24px;
    font-size: 16px;
    color: white;
    background-color: #007BFF;
    border: none;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.video-player .action-button:hover { background-color: #0056b3; }
.video-player .action-button:active { transform: scale(0.98); }
.video-player .action-button.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.video-player .settings-button {
    position: absolute;
    bottom: 12px;
    right: 15px;
    width: 30px;
    height: 30px;
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: background-color 0.2s ease;
}

.video-player .settings-button:hover { background-color: rgba(0, 0, 0, 0.7); }
.video-player .settings-button:before {
    content: '\2699';
    font-size: 20px;
    color: white;
    line-height: 1;
}

.video-player .settings-menu {
    position: absolute;
    bottom: 50px;
    right: 15px;
    background-color: rgba(30, 30, 30, 0.95);
    border-radius: 8px;
    padding: 8px 0;
    min-width: 120px;
    display: none;
    z-index: 4;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
}

.video-player .settings-menu button {
    display: block;
    width: 100%;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    padding: 8px 16px;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.video-player .settings-menu button:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
}

/* Адаптив для мобильных (без изменений) */
@media (max-width: 600px) {
    .video-player .play-button { width: 60px; height: 60px; }
    .video-player .play-button:before {
        border-left: 22px solid white;
        border-top: 11px solid transparent;
        border-bottom: 11px solid transparent;
    }
    .video-player .time-remaining { font-size: 12px; padding-right: 10px; }
    .video-player .settings-button {
        width: 26px;
        height: 26px;
        bottom: 8px;
        right: 10px;
    }
    .video-player .settings-button:before { font-size: 18px; }
}