/* 视频推荐与视频卡片 — Figma PC 2506:2685 / H5 2620:9948
 * 内容区与顶栏 .hg-pc-nav-inner 同宽（--hg-pc-content = 80rem） */
body.hg-theater-page {
    --hg-theater-content: var(--hg-pc-content, 80rem);
}

/* 本页独有：撑开 #body 下主内容 container，与导航栏对齐 */
body.hg-theater-page #body>.container {
    max-width: var(--hg-theater-content) !important;
    width: min(100%, var(--hg-theater-content));
    padding-left: 0;
    padding-right: 0;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

body.hg-theater-page #body>.container>.row {
    margin-left: 0;
    margin-right: 0;
}

.hg-theater {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding: 0 0 2.5rem;
    box-sizing: border-box;
}

body.hg-theater-page .archive-nav-breadcrumb-wrap {
    margin: 1.25rem 0 1.25rem;
}

/* Figma：当前页强调色，上级链接次级色 */
body.hg-theater-page .nav-breadcrumb-wrap .action-butn {
    color: rgba(255, 255, 255, 0.6) !important;
}

body.hg-theater-page .nav-breadcrumb-wrap .name {
    color: var(--hg-accent, #fe2e62) !important;
    width: auto;
    font-weight: 600;
}

.hg-theater-sections {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    /* 稿面区块间距约 40px */
}

.hg-theater-section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    box-sizing: border-box;
    width: 100%;
    min-height: 2.25rem;
    /* 稿面 Header 36px */
    height: auto;
    margin: 0 0 1.25rem;
    /* 标题区到卡片 20px */
    padding: 0;
    overflow: visible;
}

.hg-theater-section__title-block {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    min-height: 1.875rem;
}

.hg-theater-section__accent {
    width: 0.25rem;
    height: 1.25rem;
    border-radius: 999px;
    background: var(--hg-accent, #fe2e62);
    flex-shrink: 0;
}

.hg-theater-section__title {
    margin: 0;
    padding: 0;
    font-size: 1.375rem;
    font-weight: 600;
    line-height: 1.875rem;
    color: #fff;
    letter-spacing: -0.02em;
}

/* 推荐页主标题独立于栏目标题：字号更大，且模板中不显示栏目红色竖线。 */
.hg-theater-section__title--page {
    font-size: 1.75rem;
    line-height: 2.25rem;
}

.hg-theater-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.2;
}

.hg-theater-more--pc {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    padding: 0.5rem 0.75rem;
}

.hg-theater-more--pc:hover {
    color: rgba(255, 255, 255, 0.7);
}

.hg-theater-more img {
    width: 0.875rem;
    height: 0.875rem;
    object-fit: contain;
    flex-shrink: 0;
}

.hg-theater-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.25rem;
}

.hg-theater-empty {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.875rem;
    margin: 0;
}

/* Card */
.hg-theater-card {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    background: #171616;
    border-radius: 0.625rem;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    min-width: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hg-theater-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.hg-theater-card__cover {
    position: relative;
    width: 100%;
    aspect-ratio: 272 / 362;
    overflow: hidden;
    border-radius: 0.625rem 0.625rem 0 0;
    background: #1a1a1a;
}

.hg-theater-card__img,
.hg-theater-card__placeholder {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hg-theater-card__badge {
    position: absolute;
    top: 0.625rem;
    right: 0.625rem;
    z-index: 1;
    background: var(--hg-accent, #fe2e62);
    color: #ddd;
    font-size: 0.75rem;
    line-height: 1;
    padding: 0.25rem 0.5rem;
    border-radius: 0.625rem;
}

.hg-theater-card__meta {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 2rem 0.75rem 0.75rem;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.55) 100%);
    box-sizing: border-box;
}

.hg-theater-card__heat,
.hg-theater-card__episode {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(0, 0, 0, 0.4);
    color: #ddd;
    font-size: 0.75rem;
    line-height: 1rem;
    padding: 0.125rem 0.25rem;
    border-radius: 0.3125rem;
    white-space: nowrap;
}

/* 封面右下角：更新至第几集（Figma 2508:4956） */
.hg-theater-card__episode {
    margin-left: auto;
}

.hg-theater-card__heat img {
    width: 1rem;
    height: 1rem;
    object-fit: contain;
}

.hg-theater-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0 1rem 0.9375rem;
    box-sizing: border-box;
    min-width: 0;
}

.hg-theater-card__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5rem;
    color: #eee;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hg-theater-card__tags {
    display: block;
    width: 100%;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hg-theater-card__tag {
    display: inline-block;
    vertical-align: middle;
    max-width: 100%;
    background: #292929;
    color: #ccc;
    font-size: 0.6875rem;
    line-height: 1rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.3125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

.hg-theater-card__tag+.hg-theater-card__tag {
    margin-left: 0.5rem;
}

/* H5：与 PC 一致展示全部栏目，每个栏目使用 2 列卡片。 */
@media (max-width: 767.98px) {
    body.hg-theater-page #body>.container {
        max-width: 100% !important;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .hg-theater {
        padding: 0 0 2rem;
    }

    body.hg-theater-page .archive-nav-breadcrumb-wrap {
        margin: 0.75rem 0 0.75rem;
    }

    .hg-theater-section__accent {
        display: none;
    }

    .hg-theater-section__title {
        font-size: 1rem;
        line-height: 1.4;
    }

    .hg-theater-section__title--page {
        font-size: 1.5rem;
        line-height: 1.35;
    }

    .hg-theater-section__head {
        margin-bottom: 0.875rem;
    }

    .hg-theater-more--pc {
        display: inline-flex;
    }

    .hg-theater-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.625rem;
    }

    .hg-theater-card {
        background: #171616;
        border-radius: 0.625rem;
        gap: 0;
        padding-bottom: 0.75rem;
    }

    .hg-theater-card__cover {
        border-radius: 0.625rem 0.625rem 0 0;
        aspect-ratio: 220 / 293;
    }

    .hg-theater-card__badge {
        top: 0.4rem;
        right: 0.4rem;
        left: auto;
        font-size: 0.625rem;
        padding: 0.2rem 0.4rem;
        border-radius: 0.5rem;
    }

    .hg-theater-card__meta {
        padding: 1.25rem 0.4rem 0.4rem;
        justify-content: space-between;
    }

    .hg-theater-card__episode {
        display: inline-flex;
        font-size: 0.625rem;
        line-height: 0.875rem;
        margin-left: auto;
    }

    .hg-theater-card__heat {
        font-size: 0.625rem;
    }

    .hg-theater-card__heat img {
        width: 0.75rem;
        height: 0.75rem;
    }

    .hg-theater-card__body {
        padding: 0.75rem 0.4rem 0;
        gap: 0.5rem;
    }

    .hg-theater-card__title {
        font-size: 0.6875rem;
        line-height: 1.1;
        -webkit-line-clamp: 1;
    }

    .hg-theater-card__tag {
        font-size: 0.625rem;
        padding: 0.2rem 0.4rem;
    }

    .hg-theater-sections {
        gap: 1.5rem;
    }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
    .hg-theater-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .hg-theater-card__badge {
        display: none;
        /* PC 稿面卡片无角标 */
    }
}
