/* ============================================================
   ВИДЕО-ПЛЕЕР В МОДАЛЬНОМ ОКНЕ (style.css)
   ============================================================ */

/* Оверлей модального окна */
.player-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.player-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Контент модального окна */
.modal-content {
    background: #1a1a1a;
    border-radius: 16px;
    max-width: 900px;
    width: 92%;
    max-height: 90vh;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    overflow: hidden;
}

/* Заголовок */
.modal-header {
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: #222;
}

.modal-header h3 {
    color: #fff;
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    padding: 0 8px;
    transition: transform 0.2s;
    opacity: 0.7;
}

.modal-close:hover {
    transform: rotate(90deg);
    opacity: 1;
}

/* Тело модального окна */
.modal-body {
    padding: 0;
    position: relative;
    background: #000;
}

#videoWrapper {
    position: relative;
    width: 100%;
    background: #000;
}

#videoPlayer {
    width: 100%;
    display: block;
    max-height: 70vh;
    background: #000;
    outline: none;
}

/* Кнопки навигации */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 0;
    font-size: 30px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.1);
}

.nav-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.nav-btn.prev {
    left: 15px;
}

.nav-btn.next {
    right: 15px;
}

/* Счётчик видео */
.video-counter {
    position: absolute;
    top: 25px;
    right: 25px;
    color: #fff;
    background: rgba(0, 0, 0, 0.75);
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 5;
    user-select: none;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .modal-content {
        width: 98%;
        border-radius: 12px;
    }

    .modal-header h3 {
        font-size: 17px;
    }

    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 22px;
    }

    .nav-btn.prev {
        left: 8px;
    }

    .nav-btn.next {
        right: 8px;
    }

    .video-counter {
        top: 15px;
        right: 15px;
        font-size: 12px;
        padding: 4px 14px;
    }

    .btn-ghost {
        padding: 12px 28px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .nav-btn {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }

    .modal-header {
        padding: 12px 16px;
    }

    .modal-close {
        font-size: 26px;
    }
}