/* ============================================================
   video.css —— 视频站专有组件（卡片 / 列表 / 播放器 / 竖屏滑动）
   只放产品样式，通用组件仍在 base.css
   ============================================================ */

/* ---------- 视频卡片 ---------- */
.vcard {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}
.vcard__cover {
    position: relative;
    background: var(--cover-fallback);
    overflow: hidden;
}
.vcard__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.vcard:hover .vcard__cover img { transform: scale(1.04); }
.vcard__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.vcard__title { font-size: 1rem; font-weight: 750; line-height: 1.4; }
.vcard__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: .76rem;
    color: var(--text-muted);
}
.vcard__meta .dot { opacity: .5; }

/* 类型胶囊 */
.type-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: var(--radius-pill);
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    background: var(--primary-soft);
    color: var(--primary);
}
.type-chip--short { background: rgba(194, 65, 12, .12); color: #b45309; }

/* 时长角标 */
.duration-badge {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 3px 8px;
    border-radius: 8px;
    background: rgba(10, 14, 30, .72);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

/* 播放三角（hover 浮现） */
.vcard__cover::after {
    content: "▶";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #fff;
    opacity: 0;
    background: rgba(10, 14, 30, .32);
    transition: opacity .25s ease;
}
.vcard:hover .vcard__cover::after { opacity: 1; }

/* ---------- 长视频列表：桌面两列 ---------- */
.grid-long {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--gap);
}
.grid-long .vcard__cover { aspect-ratio: 16 / 9; }

/* ---------- 短竖屏列表：桌面 4 列 / 平板 3 列 ---------- */
.grid-short {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--gap);
}
.grid-short .vcard__cover { aspect-ratio: 9 / 16; }
.grid-short .vcard__title { font-size: .9rem; }
@media (max-width: 1000px) { .grid-short { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- 移动端：长视频单列 ---------- */
@media (max-width: 720px) {
    .grid-long { grid-template-columns: 1fr; }
}

/* ---------- 移动端 Shorts：四向滑动 ---------- */
/* 右 / 下 → 下一个；左 / 上 → 上一个
   横向用 scroll-snap 承载，纵向手势由 shorts.js 映射为前后切换 */
@media (max-width: 720px) {
    .grid-short {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 12px;
        padding: 2px 2px 14px;
        scrollbar-width: none;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
    }
    .grid-short::-webkit-scrollbar { display: none; }
    .grid-short > * {
        flex: 0 0 78%;
        scroll-snap-align: center;
    }
    .grid-short > *:first-child { margin-left: 0; }
}
@media (max-width: 420px) {
    .grid-short > * { flex-basis: 82%; }
}

/* 滑动提示（仅在移动端出现，首次看到即淡出） */
.swipe-hint {
    display: none;
    align-items: center;
    gap: 8px;
    margin: 4px 0 12px;
    font-size: .78rem;
    color: var(--text-muted);
}
@media (max-width: 720px) { .swipe-hint { display: flex; } }

/* ---------- 播放器页 ---------- */
.player-wrap {
    max-width: 960px;
    margin: 16px auto 0;
    padding: 0 20px;
}
.player-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 20px;
    overflow: hidden;
    background: #060a18;
    box-shadow: 0 20px 54px rgba(15, 23, 42, .22);
}
.player-stage.is-short { aspect-ratio: 9 / 16; max-width: 380px; margin: 0 auto; }
.player-stage iframe { width: 100%; height: 100%; border: 0; display: block; }

/* 标题下方的元信息行（播放页用） */
.detail-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    font-size: .8rem;
    color: var(--text-muted);
}
.detail-meta .dot { opacity: .5; }
.player-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    text-align: center;
    color: #fff;
    background-size: cover;
    background-position: center;
    padding: 24px;
}
.player-fallback::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(6, 10, 24, .66);
}
.player-fallback > * { position: relative; z-index: 2; }
.player-fallback__note { font-size: .82rem; opacity: .78; max-width: 420px; }

.player-title {
    font-size: clamp(1.35rem, 3vw, 2rem);
    font-weight: 850;
    margin: 22px 0 10px;
}
.player-hook {
    font-size: .98rem;
    line-height: 1.75;
    color: var(--text-main);
    background: var(--primary-soft);
    border-left: 3px solid var(--primary);
    padding: 12px 16px;
    border-radius: 0 12px 12px 0;
    margin: 14px 0 18px;
}
.player-desc {
    font-size: .95rem;
    line-height: 1.9;
    color: var(--text-main);
    white-space: pre-wrap;
    margin: 18px 0 24px;
}
.player-sources {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 18px 0 8px;
}
.player-sources .label { font-size: .84rem; color: var(--text-muted); margin-right: 4px; }
.player-sources .chip.is-on { background: var(--primary); color: #fff; border-color: var(--primary); }
.player-foot {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin: 26px 0 10px;
    padding-top: 18px;
    border-top: 1px solid var(--card-border);
}
