/* 视频卡片通用容器 */
.video-card-wrap {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
/* 宽卡片 */
.video-card.wide {
    display: flex;
    gap: 12px;
    background: #111;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
}
.video-card.wide {
    width: 160px;
}
/* 竖长卡片 */
.video-card.tall {
    
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    padding:10px;
    box-shadow:0px 0px 2px 2px rgba(60,60,60,0.5);
}
.video-card.tall:hover {
    box-shadow:0px 0px 0.5px 0.5px rgba(60,60,60,0.5);
}
.video-card-cover{
    width: 100%;
    height:150px;
    display: block;
    background-position:center!important;
    background-size: 100% auto!important;
    background-repeat:no-repeat!important;
    box-sizing:border-box;
    border-radius:5px;
    
}
.video-card-info {
    margin-top:5px;
    box-sizing:border-box;
    padding-left:2px;
}
.video-card-title {
    font-size: 16px;
}
.video-card-author {
    margin: 0;
    font-size: 13px;
    color: #aaa;
}

/* 模态弹窗遮罩 */
/* 遮罩层 */
.video-modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.87);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(2px);
}

.video-modal-mask.show {
    display: flex;
}

/* 弹窗播放器盒子 —— 自适应横竖屏 */
.video-modal-box {
    width: min(100%, 860px);
    max-height: 90vh;
    background: #000;
    border-radius: 12px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 80px rgba(0,0,0,0.7);
}

/* 提示文字 */
.video-modal-box::before {
    content:'由于网站带宽较小，建议等待视频载入一会儿再播放。';
    display: block;
    position: absolute;
    left: 0;
    top: -2rem;
    color: rgba(255,255,255,0.5);
    font-size: 13px;
    white-space: nowrap;
    width: 100%;
    text-align: center;
}

/* 关闭按钮 */
.video-modal-close {
    position: absolute;
    top: -38px;
    right: 0;
    color: rgba(255,255,255,0.7);
    font-size: 28px;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 10;
    line-height: 1;
}

.video-modal-close:hover {
    color: #fff;
}

/* video 标签 —— 竖屏友好 */
.video-modal-box video {
    width: 100%;
    height: auto;
    max-height: 82vh;
    display: block;
    object-fit: contain;   /* 关键：保持比例，不裁剪，不拉伸 */
    background: #000;
}

/* 竖屏视频专用优化：限制宽度，避免太高 */
.video-modal-box video[style*="aspect-ratio: 9/16"],
.video-modal-box video.portrait-video {
    width: auto;
    height: 80vh;
    max-width: 100%;
}