/* 全局样式 */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #f4f4f9;
}

/* 标题部分样式 */
.page-header {
    background: linear-gradient(135deg, #6f86d6, #48c6ef);
    color: white;
    text-align: center;
    padding: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.page-header h1 {
    font-size: 30px;
    font-weight: bold;
    margin: 0;
}

/* 视频列表部分 */
.video-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 10px;
}

/* 单个视频项 */
.video-item {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: calc(33% - 20px);
    max-width: 300px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s;
    aspect-ratio: 9 / 16; /* 改为9:16的比例 */
    position: relative;
}

/* 视频项悬停效果 */
.video-item:hover {
    transform: translateY(-5px);
}

/* 视频缩略图：背景图片铺满整个框，并且居中显示 */
.video-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-position: center;
    background-size: cover;
}

/* 视频信息，包含标题部分 */
.video-info {
    background-color: rgba(0, 0, 0, 0.6); /* 半透明背景使标题更加醒目 */
    padding: 10px;
    color: white;
    position: absolute;
    bottom: 0;
    width: calc(100% - 20px);
}

.video-title {
    margin: 0;
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}

#video-player {
    width: 80%;
    max-width: 460px;
    height: 85%;
}

.close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 30px;
    cursor: pointer;
}

/* 响应式布局 */
@media (max-width: 768px) {
    .video-item {
        width: calc(50% - 20px);
    }
}

@media (max-width: 300px) {
    .video-item {
        width: 100%;
    }
}
