/* 视频砖墙布局 */
.video-wall-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    display: grid;
    gap: 3px;
    padding: 3px;
    box-sizing: border-box;
    position: relative;
}

.video-wall-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 250px;
    background: linear-gradient(transparent 20%, rgba(0, 0, 0, 0.95));
    pointer-events: none;
    z-index: 5;
}

.video-wall-container.no-gradient::after {
    display: none;
}

.video-card {
    position: relative;
    border-radius: 0;
    overflow: hidden;
    cursor: pointer;
    background: #1a1a1a;
    user-select: none;
    -webkit-user-select: none;
}

.video-card:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    z-index: 10;
}

/* 卡片内图片/背景 */
.video-card-inner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    width: 100%;
    height: 100%;
    background-color: #1a1a1a;
}

.video-cover {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
}

/* 播放按钮 */
.video-cover::after {
    content: "▶";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 20px;
    background: rgba(0, 0, 0, 0.6);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 10;
}

.video-card:hover .video-cover::after {
    opacity: 1;
}

/* 视频标题 */
.video-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4px 6px;
    font-size: 11px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 5;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    color: #fff;
}

.video-card.no-title .video-title {
    display: none;
}

/* 视频格式标记 */
.video-format-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background: rgba(255, 107, 107, 0.9);
    color: #fff;
    font-size: 9px;
    padding: 1px 4px;
    border-radius: 2px;
    font-weight: bold;
    z-index: 5;
}

/* 视频弹窗 */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
}

.video-modal.active {
    display: flex;
}

.video-box {
    position: relative;
    width: 90%;
    max-width: 1200px;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

#playerContainer {
    width: 100%;
    height: 100%;
}

.video-box video {
    width: 100%;
    display: block;
    outline: none;
}

/* 隐藏播放器所有控制按钮 */
.video-box video::-webkit-media-controls {
    display: none !important;
}

.video-box video::-webkit-media-controls-enclosure {
    display: none !important;
}

.video-box video::-webkit-media-controls-panel {
    display: none !important;
}

.video-box video::-webkit-media-controls-play-button,
.video-box video::-webkit-media-controls-volume-slider,
.video-box video::-webkit-media-controls-mute-button,
.video-box video::-webkit-media-controls-timeline,
.video-box video::-webkit-media-controls-current-time-display,
.video-box video::-webkit-media-controls-time-remaining-display,
.video-box video::-webkit-media-controls-fullscreen-button {
    display: none !important;
}

.video-box video::-moz-media-controls {
    display: none !important;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    background: rgba(0,0,0,0.7);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    color: #fff;
    font-size: 22px;
    line-height: 32px;
    text-align: center;
    cursor: pointer;
    z-index: 100001;
    padding: 0;
    font-family: Arial, sans-serif;
}

.close-btn:hover {
    background: rgba(200,0,0,0.8);
}

/* 视频错误提示 */
.video-error {
    background: rgba(0, 0, 0, 0.9);
    border-radius: 8px;
    padding: 40px;
    text-align: center;
}

.video-error p {
    margin: 0;
    color: #fff;
    font-size: 16px;
}

.video-error a {
    display: inline-block;
    margin-top: 15px;
    padding: 12px 24px;
    background: #ff6b6b;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
}

/* 响应式 */
@media (min-width: 769px) {
    .video-wall-container { gap: 2px; padding: 0; }
    .video-title { font-size: 12px; padding: 5px 8px; }
}

@media (max-width: 768px) {
    .video-wall-container { gap: 2px; padding: 2px; }
    .video-title { font-size: 10px; padding: 3px 5px; }
    .video-box { width: 95%; max-width: 95%; }
    .close-btn {
        width: 32px;
        height: 32px;
        font-size: 20px;
        line-height: 28px;
        top: 8px;
        right: 8px;
    }
}
