/**
 * 视频播放器样式
 */

/* 视频播放弹窗 */
.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 3000;
    align-items: center;
    justify-content: center;
}

.video-modal.show {
    display: flex;
}

.video-modal-content {
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.video-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.8);
}

.video-modal-title {
    color: white;
    font-size: 15px;
    font-weight: 500;
    max-width: 80%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-modal-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 24px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.video-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.video-modal-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    min-height: 300px;
}

#video-modal-player {
    width: 100%;
    max-height: 70vh;
    outline: none;
}

/* 视频消息样式优化 */
.video-message {
    display: block;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
    max-width: 280px;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 160px;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.video-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

.video-thumbnail.video-error {
    background: linear-gradient(135deg, #2c3e50, #1a1a2e);
}

.video-thumbnail.video-error::before {
    content: '🎬';
    font-size: 48px;
    opacity: 0.5;
}

/* 视频播放按钮 */
.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 5;
    backdrop-filter: blur(4px);
}

.video-message:hover .video-play-overlay {
    background: rgba(0, 0, 0, 0.8);
    transform: translate(-50%, -50%) scale(1.1);
}

/* 视频信息 */
.video-info {
    padding: 10px 12px;
    background: #fff;
}

.video-name {
    font-size: 13px;
    color: #333;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.video-size {
    font-size: 12px;
    color: #999;
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    .video-modal-content {
        width: 100%;
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
    }
    
    #video-modal-player {
        max-height: 50vh;
    }
    
    .video-message {
        max-width: 240px;
    }
    
    .video-thumbnail {
        height: 140px;
    }
}

/* Plyr 自定义样式 */
.plyr {
    width: 100%;
}

.plyr--video {
    background: #000;
}

.plyr__control--overlaid {
    background: rgba(0, 0, 0, 0.6) !important;
}

.plyr--full-ui input[type=range] {
    color: #07c160;
}

.plyr__control:hover {
    background: #07c160 !important;
}
