/**
 * Video card v2 — 独立样式，不依赖 .video-item / common.css 老卡规则
 * JS 契约：.video-items .poster / .video-preview（video_helper.js）
 * 设计基准：346 × 235 @ 1920 壳层 1440（4 列 + gap 17）；宽度由网格撑满，不写死卡宽
 *
 * 主题色：预览条 .poster::before、标题 hover 写死 #f93c79（未接 --dx-primary-color）。
 * 改色见 common.css【改色地图】及本文件内搜索 #f93c79。
 */

/* ===== 列表网格 ===== */
.list-page-v2__body .video-items-v2 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 17px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.list-page-v2__body .video-items-v2 > li {
    min-width: 0;
}

/* ===== 卡片：固定总高 235px ===== */
.video-card-v2 {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 235px;
    box-sizing: border-box;
    -webkit-user-select: none;
    user-select: none;
}

/* 文案区固定 63.5px = 标题 39 + 间距 8 + meta 16.5；封面区占余下 166.5px */
.video-card-v2__thumb {
    flex: 0 0 166.5px;
    height: 166.5px;
    border-radius: 10px;
    overflow: hidden;
}

/* 覆盖 common.css aspect 占位，改由固定高度控制 */
.video-card-v2__thumb.aspect-w-16 {
    padding-bottom: 0;
}

.video-card-v2__cover {
    object-fit: cover;
    transition: opacity 0.2s;
}

.video-card-v2__duration {
    position: absolute;
    right: 7px;
    bottom: 3px;
    z-index: 1;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.65);
    font-family: 'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 500;
    font-size: 12px;
    line-height: 16.5px;
    letter-spacing: 0;
    color: #ffffff;
    pointer-events: none;
}

/* hover 预览进度条 — 与 video_helper .preloading 配合 */
.video-card-v2 .poster::before {
    width: 0;
    height: 3px;
    background-color: #f93c79;
    content: '';
    display: block;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 2;
}

.video-card-v2 .poster.preloading::before {
    animation: video-card-v2-preview 2s forwards;
}

@keyframes video-card-v2-preview {
    0% {
        width: 0%;
    }

    100% {
        width: 100%;
    }
}

/* ===== 文案：固定高度，单行标题不缩卡 ===== */
.video-card-v2__info {
    flex: 0 0 63.5px;
    height: 63.5px;
    margin-top: 5px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.video-card-v2__title {
    flex: 0 0 39px;
    height: 39px;
    margin: 0;
    overflow: hidden;
}

.video-card-v2__title a {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    height: 39px;
    max-height: 39px;
    font-family: 'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 19.5px;
    letter-spacing: 0;
    text-align: justify;
    color: #eeeeee;
    text-decoration: none;
}

.video-card-v2__title a:hover {
    color: #f93c79;
}

.video-card-v2__meta {
    flex: 0 0 16.5px;
    height: 16.5px;
    margin: 8px 0 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-family: 'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 400;
    font-size: 13px;
    line-height: 16.5px;
    letter-spacing: 0;
    color: #666666;
}
