/* Контейнер превью */
.preview-container {
    position: relative;
    display: inline-block;
    margin: 20px auto;
}

.video-preview {
    width: 300px;
    cursor: pointer;
    border: 2px solid #ccc;
    border-radius: 8px;
    transition: 0.3s;
}

.video-preview:hover {
    border-color: #777;
}

/* Иконка воспроизведения */
.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: url('/images/play-icon.png') no-repeat center center;
    background-size: contain;
    pointer-events: none;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 120%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    overflow: auto;
    align-items: center;
    justify-content: center;
}

/* Контент модального окна */
.modal-content {
    position: relative;
    background: #fff;
    border-radius: 8px;
    max-width: 90vw; /* Ограничение ширины */
    max-height: 90vh; /* Ограничение высоты */
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Видео в модальном окне */
.modal-content video {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Кнопка закрытия */
.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    color: #fff;
    background: #333;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.close-btn:hover {
    background: #f00;
}
