
/* Grid 容器样式 */
.movie-grid-new {
    display: grid;
    gap: 1.5rem;
    row-gap: 2rem;
    width: 100%;
    padding: 0;
    margin: 0;
}

/* 广告显示控制 - 默认隐藏所有广告 */
.movie-grid-new .ads-box {
    display: none;
    grid-column: 1 / -1;
    margin: 1rem 0;
    justify-content: center;
    align-items: center;
}

/* 单个影片项目样式 */
.movie-grid-new .mgn-item {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-self: start;
    min-width: 0;
    /* 关键：允许项目缩小到比内容更小 */
}

/* 影片封面容器 - 3:2 宽高比 */
.movie-grid-new .mgn-box {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 0.5rem;
    padding-top: 66.67%;
    /* 3:2 宽高比 */
}

/* 影片图片容器 */
.movie-grid-new .mgn-picture {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

/* 封面图片样式 */
.movie-grid-new .mgn-box .mgn-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* 完整显示图片，保持比例，居中 */
    object-position: center;
    /* 确保居中对齐 */
    transition: transform 0.3s ease;
}

.movie-grid-new .mgn-box .mgn-cover:hover {
    transform: scale(1.1);
    /* 缩小缩放比例，避免竖图溢出 */
}

/* 无封面时的样式 */
.movie-grid-new .mgn-nocover {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #5c0c14;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
}

.movie-grid-new .mgn-nocover img {
    width: 40%;
    height: 60%;
    max-width: 120px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.movie-grid-new .mgn-nocover-text {
    margin-top: 10px;
    font-size: 14px;
    color: #fff;
    text-align: center;
    width: 100%;
    display: block;
    font-family: 'Noto Serif TC', serif;
    color: rgb(226, 60, 76);
    font-size: 1.2rem;
    margin-top: 0rem;
    font-weight: 900;
    letter-spacing: 2px;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.3);
}

/* 底部遮罩层样式 */
.movie-grid-new .mgn-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px 10px 5px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.95));
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

/* 演员列表样式 */
.movie-grid-new .mgn-actress {
    display: flex;
    font-size: 1rem;
    gap: 0.2rem;
}

.movie-grid-new .mgn-actress a {
    color: #fff;
    text-decoration: none;
}

.movie-grid-new .mgn-actress a:hover {
    text-decoration: underline;
}

/* 徽章样式 */
.movie-grid-new .mgn-badges {
    display: flex;
    gap: 8px;
}

/* 标题样式 */
.movie-grid-new .mgn-title {
    margin-top: 0.3rem;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    /* 明确设置宽度 */

    /* 多行省略 - 显示2行 */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-height: 1.4em;
    max-height: 2.8em;
    /* 2行的高度 = line-height × 行数 */
}

.movie-grid-new .mgn-title a {
    text-decoration: none;
    color: inherit;
}

.movie-grid-new .mgn-title a:hover {
    text-decoration: underline;
}

/* 徽章样式 - 自定义实现 */
.movie-grid-new .mgn-badge {
    display: inline-block;
    padding: 0.25em 0.4em;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
    color: #fff;
}

.movie-grid-new .mgn-badge-year {
    background-color: #000;
}

.movie-grid-new .mgn-badge-type {
    background-color: #dc3545;
}

/* 信息栏样式 */
.movie-grid-new .mgn-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

/* 桌面版显示信息栏 */
@media (min-width: 992px) {
    .movie-grid-new .mgn-info {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 0.5rem;
    }
}

.movie-grid-new .mgn-rating {}

.movie-grid-new .mgn-date {
    color: var(--fg-light3);
    font-size: 0.875rem;
    white-space: nowrap;
    /* 防止换行 */
    overflow: visible;
    /* 确保内容完整显示 */
    flex-shrink: 0;
    /* 防止被压缩 */
    min-width: max-content;
    /* 确保有足够宽度显示内容 */
    position: relative;
    /* 防止移位 */
    display: inline-flex;
    /* 使用inline-flex确保稳定显示 */
    align-items: center;
    /* 垂直居中对齐 */
}

.movie-grid-new .mgn-icon-calendar {
    margin-right: 0.25rem;
}

/* 移除 Bootstrap 的 margin-bottom */
.movie-grid-new .mgn-item.mb-5,
.movie-grid-new .mgn-item [class*="mb-"] {
    margin-bottom: 0 !important;
}

/* 移动端字体大小调整 */
@media (max-width: 768px) {

    /* 标题字体 */
    .movie-grid-new .mgn-title {
        font-size: 1.2rem;
    }

    /* 女优名称字体 */
    .movie-grid-new .mgn-actress {
        font-size: 1.2rem;
    }

    /* 徽章字体（年份、类型） */
    .movie-grid-new .mgn-badge {
        font-size: 1rem;
        padding: 0.3em 0.5em;
    }

    /* 日期字体 */
    .movie-grid-new .mgn-date {
        font-size: 1rem;
    }
}

/* 默认移动设备 - 1 列 */
.movie-grid-new {
    grid-template-columns: repeat(1, 1fr);
}

/* xs 屏幕：先隐藏其他所有尺寸的广告，再显示 xs 广告（顺序很重要！） */
.movie-grid-new .ads-sm,
.movie-grid-new .ads-md,
.movie-grid-new .ads-lg,
.movie-grid-new .ads-xl,
.movie-grid-new .ads-xxl,
.movie-grid-new .ads-xxxl {
    display: none !important;
}

.movie-grid-new .ads-xs {
    display: flex !important;
}

/* 默认隐藏超出的项目 */

/* 平板设备 - 2 列 */
@media (min-width: 481px) {
    .movie-grid-new {
        grid-template-columns: repeat(2, 1fr);
    }

    /* sm 屏幕只显示 sm 广告 */
    .movie-grid-new .ads-xs {
        display: none !important;
    }

    .movie-grid-new .ads-sm {
        display: flex !important;
    }

    /* 显示/隐藏项目 */
    .movie-grid-new .mgn-item {
        display: block;
    }
}

/* 大平板 - 3 列 */
@media (min-width: 769px) {
    .movie-grid-new {
        grid-template-columns: repeat(3, 1fr);
    }

    /* md 屏幕只显示 md 广告 */
    .movie-grid-new .ads-sm {
        display: none !important;
    }

    .movie-grid-new .ads-md {
        display: flex !important;
    }

    /* 显示/隐藏项目 */
    .movie-grid-new .mgn-item {
        display: block;
    }
}

/* 桌面设备 - 3 列 */
@media (min-width: 1025px) {
    .movie-grid-new {
        grid-template-columns: repeat(3, 1fr);
    }

    /* lg 屏幕只显示 lg 广告 */
    .movie-grid-new .ads-md {
        display: none !important;
    }

    .movie-grid-new .ads-lg {
        display: flex !important;
    }

    /* 显示/隐藏项目 */
    .movie-grid-new .mgn-item {
        display: block;
    }
}

/* 大屏幕 - 4 列 */
@media (min-width: 1201px) {
    .movie-grid-new {
        grid-template-columns: repeat(4, 1fr);
    }

    /* xl 屏幕只显示 xl 广告 */
    .movie-grid-new .ads-lg {
        display: none !important;
    }

    .movie-grid-new .ads-xl {
        display: flex !important;
    }

    /* 显示/隐藏项目 */
    .movie-grid-new .mgn-item {
        display: block;
    }
}

/* 超大屏幕 - 5 列 */
@media (min-width: 1536px) {
    .movie-grid-new {
        grid-template-columns: repeat(5, 1fr);
    }

    /* xxl 屏幕只显示 xxl 广告 */
    .movie-grid-new .ads-xl {
        display: none !important;
    }

    .movie-grid-new .ads-xxl {
        display: flex !important;
    }

    /* 显示/隐藏项目 */
    .movie-grid-new .mgn-item {
        display: block;
    }

    .movie-grid-new .mgn-item[data-index="10"] {
        display: none;
    }

    .movie-grid-new .mgn-item[data-index="11"] {
        display: none;
    }
}

/* 2K屏幕 - 6 列 */
@media (min-width: 1919px) {
    .movie-grid-new {
        grid-template-columns: repeat(6, 1fr);
    }

    /* xxxl 屏幕只显示 xxxl 广告 */
    .movie-grid-new .ads-xxl {
        display: none !important;
    }

    .movie-grid-new .ads-xxxl {
        display: flex !important;
    }

    /* 重置所有项目为显示状态 */
    .movie-grid-new .mgn-item {
        display: block !important;
    }

    /* 然后隐藏超出的项目 */
}



.movie-grid-item-new {
    width: 100%;
    aspect-ratio: 3/2;
    /* 保持3:2的宽高比 */
    position: relative;
}

.movie-placeholder {
    width: 100%;
    height: 100%;
    background-color: #5c0c14;
    /* 暗红色背景 */
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.movie-placeholder:hover {
    transform: scale(1.02);
    background-color: #7a1019;
}

.placeholder-text {
    color: #fff;
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    padding: 10px;
}

.mgn-title h3,
.mgn-title h4,
.mgn-title h5 {
    all: unset;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4em;
}


/* 平板设备 - 2 列 */
@media (min-width: 481px) {
    .movie-grid-new-list {
        grid-template-columns: repeat(2, 1fr);
    }

    /* sm 屏幕只显示 sm 广告 */
    .movie-grid-new-list .ads-xs { display: none !important; }
    .movie-grid-new-list .ads-sm { display: flex !important; }

    /* 显示/隐藏项目 */
    .movie-grid-new-list .mgn-item { display: block; }
}

/* 大平板 - 3 列 */
@media (min-width: 769px) {
    .movie-grid-new-list {
        grid-template-columns: repeat(3, 1fr);
    }

    /* md 屏幕只显示 md 广告 */
    .movie-grid-new-list .ads-sm { display: none !important; }
    .movie-grid-new-list .ads-md { display: flex !important; }

    /* 显示/隐藏项目 */
    .movie-grid-new-list .mgn-item { display: block; }
}

/* 桌面设备 - 3 列 */
@media (min-width: 1025px) {
    .movie-grid-new-list {
        grid-template-columns: repeat(3, 1fr);
    }

    /* lg 屏幕只显示 lg 广告 */
    .movie-grid-new-list .ads-md { display: none !important; }
    .movie-grid-new-list .ads-lg { display: flex !important; }

    /* 显示/隐藏项目 */
    .movie-grid-new-list .mgn-item { display: block; }
}

/* 大屏幕 - 4 列 */
@media (min-width: 1201px) {
    .movie-grid-new-list {
        grid-template-columns: repeat(4, 1fr);
    }

    /* xl 屏幕只显示 xl 广告 */
    .movie-grid-new-list .ads-lg { display: none !important; }
    .movie-grid-new-list .ads-xl { display: flex !important; }

    /* 显示/隐藏项目 */
    .movie-grid-new-list .mgn-item { display: block; }
}

/* 超大屏幕 - 3 列 */
@media (min-width: 1536px) {
    .movie-grid-new-list {
        grid-template-columns: repeat(3, 1fr);
    }

    /* xxl 屏幕只显示 xxl 广告 */
    .movie-grid-new-list .ads-xl { display: none !important; }
    .movie-grid-new-list .ads-xxl { display: flex !important; }

    /* 显示/隐藏项目 */
    .movie-grid-new-list .mgn-item { display: block; }
}

/* 2K屏幕 - 4 列 */
@media (min-width: 1919px) {
    .movie-grid-new-list {
        grid-template-columns: repeat(4, 1fr);
    }

    /* xxxl 屏幕只显示 xxxl 广告 */
    .movie-grid-new-list .ads-xxl { display: none !important; }
    .movie-grid-new-list .ads-xxxl { display: flex !important; }

    /* 重置所有项目为显示状态 */
    .movie-grid-new-list .mgn-item {
        display: block !important;
    }

    /* 然后隐藏超出的项目 */
}



/* Grid 容器样式 */
.movie-grid-new2 {
    display: grid;
    gap: 0.5rem;
    row-gap: 1rem;
    width: 100%;
    padding: 0;
    margin: 0;
}

/* 广告显示控制 - 默认隐藏所有广告 */
.movie-grid-new2 .ads-box {
    display: none;
    grid-column: 1 / -1;
    margin: 1rem 0;
    justify-content: center;
    align-items: center;
}

/* 单个影片项目样式 */
.movie-grid-new2 .mgn-item {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-self: start;
    min-width: 0;
    /* 关键：允许项目缩小到比内容更小 */
}

/* 影片封面容器 - 3:2 宽高比 */
.movie-grid-new2 .mgn-box {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 0.5rem;
    padding-top: 66.67%;
    /* 3:2 宽高比 */
}

/* 影片图片容器 */
.movie-grid-new2 .mgn-picture {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

/* 封面图片样式 */
.movie-grid-new2 .mgn-box .mgn-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* 完整显示图片，保持比例，居中 */
    object-position: center;
    /* 确保居中对齐 */
    transition: transform 0.3s ease;
}

.movie-grid-new2 .mgn-box .mgn-cover:hover {
    transform: scale(1.1);
    /* 缩小缩放比例，避免竖图溢出 */
}

/* 无封面时的样式 */
.movie-grid-new2 .mgn-nocover {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #5c0c14;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
}

.movie-grid-new2 .mgn-nocover img {
    width: 40%;
    height: 60%;
    max-width: 120px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.movie-grid-new2 .mgn-nocover-text {
    margin-top: 10px;
    font-size: 14px;
    color: #fff;
    text-align: center;
    width: 100%;
    display: block;
    font-family: 'Noto Serif TC', serif;
    color: rgb(226, 60, 76);
    font-size: 1.2rem;
    margin-top: 0rem;
    font-weight: 900;
    letter-spacing: 2px;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.3);
}

/* 底部遮罩层样式 */
.movie-grid-new2 .mgn-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px 10px 5px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.95));
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

/* 演员列表样式 */
.movie-grid-new2 .mgn-actress {
    display: flex;
    font-size: 1rem;
    gap: 0.2rem;
}

.movie-grid-new2 .mgn-actress a {
    color: #fff;
    text-decoration: none;
}

.movie-grid-new2 .mgn-actress a:hover {
    text-decoration: underline;
}

/* 徽章样式 */
.movie-grid-new2 .mgn-badges {
    display: flex;
    gap: 8px;
}

/* 标题样式 */
.movie-grid-new2 .mgn-title {
    margin-top: 0.3rem;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    /* 明确设置宽度 */

    /* 多行省略 - 显示2行 */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-height: 1.4em;
    max-height: 2.8em;
    /* 2行的高度 = line-height × 行数 */
}

.movie-grid-new2 .mgn-title a {
    text-decoration: none;
    color: inherit;
}

.movie-grid-new2 .mgn-title a:hover {
    text-decoration: underline;
}

/* 徽章样式 - 自定义实现 */
.movie-grid-new2 .mgn-badge {
    display: inline-block;
    padding: 0.25em 0.4em;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
    color: #fff;
}

.movie-grid-new2 .mgn-badge-year {
    background-color: #000;
}

.movie-grid-new2 .mgn-badge-type {
    background-color: #dc3545;
}

/* 信息栏样式 */
.movie-grid-new2 .mgn-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

/* 桌面版显示信息栏 */
@media (min-width: 992px) {
    .movie-grid-new2 .mgn-info {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 0.5rem;
    }
}

.movie-grid-new2 .mgn-rating {}

.movie-grid-new2 .mgn-date {
    color: var(--fg-light3);
    font-size: 0.875rem;
    white-space: nowrap;
    /* 防止换行 */
    overflow: visible;
    /* 确保内容完整显示 */
    flex-shrink: 0;
    /* 防止被压缩 */
    min-width: max-content;
    /* 确保有足够宽度显示内容 */
    position: relative;
    /* 防止移位 */
    display: inline-flex;
    /* 使用inline-flex确保稳定显示 */
    align-items: center;
    /* 垂直居中对齐 */
}

.movie-grid-new2 .mgn-icon-calendar {
    margin-right: 0.25rem;
}

/* 移除 Bootstrap 的 margin-bottom */
.movie-grid-new2 .mgn-item.mb-5,
.movie-grid-new2 .mgn-item [class*="mb-"] {
    margin-bottom: 0 !important;
}

/* 移动端字体大小调整 */
@media (max-width: 768px) {

    /* 标题字体 */
    .movie-grid-new2 .mgn-title {
        font-size: 1.2rem;
    }

    /* 女优名称字体 */
    .movie-grid-new2 .mgn-actress {
        font-size: 1.2rem;
    }

    /* 徽章字体（年份、类型） */
    .movie-grid-new2 .mgn-badge {
        font-size: 1rem;
        padding: 0.3em 0.5em;
    }

    /* 日期字体 */
    .movie-grid-new2 .mgn-date {
        font-size: 1rem;
    }
}

/* 默认移动设备 - 2 列 */
.movie-grid-new2 {
    grid-template-columns: repeat(2, 1fr);
}

/* 默认隐藏超出的项目 */

/* 平板设备 - 2 列 */
@media (min-width: 481px) {
    .movie-grid-new2 {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 显示/隐藏项目 */
    .movie-grid-new2 .mgn-item {
        display: block;
    }
}

/* 大平板 - 2 列 */
@media (min-width: 769px) {
    .movie-grid-new2 {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 显示/隐藏项目 */
    .movie-grid-new2 .mgn-item {
        display: block;
    }
}

/* 桌面设备 - 2 列 */
@media (min-width: 1025px) {
    .movie-grid-new2 {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 显示/隐藏项目 */
    .movie-grid-new2 .mgn-item {
        display: block;
    }
}

/* 大屏幕 - 2 列 */
@media (min-width: 1201px) {
    .movie-grid-new2 {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 显示/隐藏项目 */
    .movie-grid-new2 .mgn-item {
        display: block;
    }
}

/* 超大屏幕 - 2 列 */
@media (min-width: 1536px) {
    .movie-grid-new2 {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 显示/隐藏项目 */
    .movie-grid-new2 .mgn-item {
        display: block;
    }
}

/* 2K屏幕 - 2 列 */
@media (min-width: 1919px) {
    .movie-grid-new2 {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 重置所有项目为显示状态 */
    .movie-grid-new2 .mgn-item {
        display: block !important;
    }
}


/* Grid 容器样式 */
.movie-grid-screen {
    display: grid;
    gap: 1.5rem;
    row-gap: 2rem;
    width: 100%;
    padding: 0;
    margin: 0;
}

/* 默认移动设备 - 1 列 */
.movie-grid-screen {
    grid-template-columns: repeat(1, 1fr);
}

/* 默认隐藏超出的项目 */

/* 平板设备 - 2 列 */
@media (min-width: 481px) {
    .movie-grid-screen {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 大平板 - 3 列 */
@media (min-width: 769px) {
    .movie-grid-screen {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 桌面设备 - 3 列 */
@media (min-width: 1025px) {
    .movie-grid-screen {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 大屏幕 - 4 列 */
@media (min-width: 1201px) {
    .movie-grid-screen {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 超大屏幕 - 5 列 */
@media (min-width: 1536px) {
    .movie-grid-screen {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* 2K屏幕 - 6 列 */
@media (min-width: 1919px) {
    .movie-grid-screen {
        grid-template-columns: repeat(6, 1fr);
    }
}

    

    .movie-grid-item-new {
        width: 100%;
        aspect-ratio: 3/2;
        /* 保持3:2的宽高比 */
        position: relative;
    }

    .movie-placeholder {
        width: 100%;
        height: 100%;
        background-color: #5c0c14;
        /* 暗红色背景 */
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.3s ease;
        cursor: pointer;
    }

    .movie-placeholder:hover {
        transform: scale(1.02);
        background-color: #7a1019;
    }

    .placeholder-text {
        color: #fff;
        font-size: 1.2rem;
        font-weight: bold;
        text-align: center;
        padding: 10px;
    }

    .mgn-title h3,
    .mgn-title h4,
    .mgn-title h5 {
        all: unset;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.4em;
    }



    .movie-grid-item-new {
        width: 100%;
        aspect-ratio: 3/2;
        /* 保持3:2的宽高比 */
        position: relative;
    }

    .movie-placeholder {
        width: 100%;
        height: 100%;
        background-color: #5c0c14;
        /* 暗红色背景 */
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.3s ease;
        cursor: pointer;
    }

    .movie-placeholder:hover {
        transform: scale(1.02);
        background-color: #7a1019;
    }

    .placeholder-text {
        color: #fff;
        font-size: 1.2rem;
        font-weight: bold;
        text-align: center;
        padding: 10px;
    }

    .mgn-title h3,
    .mgn-title h4,
    .mgn-title h5 {
        all: unset;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.4em;
    }



    /* 确保 player-box 有相对定位，以便 Loading 可以绝对定位 */
    .player-box {
        position: relative;
        aspect-ratio: 16 / 9;
        background: #000;
    }

    /* ===== Swiper CSS Fallback（防止 CLS）===== */
    /* 在 Swiper CSS 加载前使用原生滚动 */
    .movie-swiper {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;  /* Firefox */
        -ms-overflow-style: none;  /* IE/Edge */
    }
    .movie-swiper::-webkit-scrollbar {
        display: none;  /* Chrome/Safari */
    }
    .movie-swiper .swiper-wrapper {
        display: flex;
        gap: 10px;
    }
    .movie-swiper .swiper-slide {
        flex-shrink: 0;
        scroll-snap-align: start;
    }
    /* 剧照 Swiper slide */
    .movie-swiper .movie-swiper-item {
        width: clamp(120px, 25vw, 200px);
        aspect-ratio: 16 / 9;
    }
    .movie-swiper .movie-swiper-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 0.5rem;
    }

    /* 播放器骨架屏 */
    .player-skeleton {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(110deg, #1a1a1a 8%, #2a2a2a 18%, #1a1a1a 33%);
        background-size: 200% 100%;
        animation: skeleton-shimmer 1.5s linear infinite;
        color: #666;
        font-size: 1rem;
    }
    @keyframes skeleton-shimmer {
        to { background-position-x: -200%; }
    }
    /* 当 iframe 加载后隐藏骨架屏 */
    .player-box iframe ~ .player-skeleton,
    .player-box:has(iframe[src]) .player-skeleton {
        display: none;
    }

.key-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
    line-height: 1.8rem;
    transition: max-height .3s ease;
}

.key-container a {
    margin-right: 0.1rem;
}

.key-container.collapsed {
    /* 3 行高度：3 × line-height + 2 × row-gap (0.25rem) */
    max-height: calc(1.8rem * 2 + 0.25rem);
    overflow: hidden;
}

/* 展開 / 收起按鈕 */
.toggle-btn {
    margin-top: 0.25rem;
    padding: 0.2rem 0.5rem;
    font-size: 0.9rem;
    border: 0;
    border-radius: 0.25rem;
    background: var(--bg-default-2);
    color: var(--fg-light5);
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease;
}

.toggle-btn:hover {
    background: var(--bg-default-2);
    color: var(--fg-light5);
}

.d-none {
    display: none;
}

 .movie-grid-new-alike {
        display: grid;
        gap: 1rem;
        row-gap: 2rem;
        width: 100%;
        padding: 0;
        margin: 0;
    }

    /* 广告显示控制 - 默认隐藏所有广告 */
    .movie-grid-new-alike .ads-box {
        display: none;
        grid-column: 1 / -1;
        margin: 1rem 0;
        justify-content: center;
        align-items: center;
    }
    
    /* 单个影片项目样式 */
    .movie-grid-new-alike .mgn-item {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-self: start;
        min-width: 0; /* 关键：允许项目缩小到比内容更小 */
    }
    
    /* 影片封面容器 - 3:2 宽高比 */
    .movie-grid-new-alike .mgn-box {
        position: relative;
        width: 100%;
        overflow: hidden;
        border-radius: 0.5rem;
        padding-top: 66.67%; /* 3:2 宽高比 */
    }
    
    /* 影片图片容器 */
    .movie-grid-new-alike .mgn-picture {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: transparent;
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        height: 100%;
    }
    
    /* 封面图片样式 */
    .movie-grid-new-alike .mgn-box .mgn-cover {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: contain;  /* 完整显示图片，保持比例，居中 */
        object-position: center;  /* 确保居中对齐 */
        transition: transform 0.3s ease;
    }

    .movie-grid-new-alike .mgn-box .mgn-cover:hover {
        transform: scale(1.1);  /* 缩小缩放比例，避免竖图溢出 */
    }
    
    /* 无封面时的样式 */
    .movie-grid-new-alike .mgn-nocover {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: #fff;
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: #5c0c14;
        text-align: center;
        padding: 20px;
        box-sizing: border-box;
    }
    
    .movie-grid-new-alike .mgn-nocover img {
        width: 40%;
        height: 60%;
        max-width: 120px;
        object-fit: contain;
        display: block;
        margin: 0 auto;
    }
    
    .movie-grid-new-alike .mgn-nocover-text {
        margin-top: 10px;
        font-size: 14px;
        color: #fff;
        text-align: center;
        width: 100%;
        display: block;
        font-family: 'Noto Serif TC', serif;
        color: rgb(226, 60, 76);
        font-size: 1.2rem;
        margin-top: 0rem;
        font-weight: 900;
        letter-spacing: 2px;
        -webkit-text-stroke: 1px rgba(255, 255, 255, 0.3);
    }
    
    /* 底部遮罩层样式 */
    .movie-grid-new-alike .mgn-overlay {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 15px 10px 5px;
        background: linear-gradient(transparent, rgba(0, 0, 0, 0.95));
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
    }
    
    /* 演员列表样式 */
    .movie-grid-new-alike .mgn-actress {
        display: flex;
        font-size: 1rem;
        gap: 0.2rem;
    }
    
    .movie-grid-new-alike .mgn-actress a {
        color: #fff;
        text-decoration: none;
    }
    
    .movie-grid-new-alike .mgn-actress a:hover {
        text-decoration: underline;
    }
    
    /* 徽章样式 */
    .movie-grid-new-alike .mgn-badges {
        display: flex;
        gap: 8px;
    }
    
    /* 标题样式 */
    .movie-grid-new-alike .mgn-title {
        margin-top: 0.3rem;
        overflow: hidden;
        text-overflow: ellipsis;
        width: 100%; /* 明确设置宽度 */

        /* 多行省略 - 显示2行 */
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-height: 1.4em;
        max-height: 2.8em; /* 2行的高度 = line-height × 行数 */
    }
    
    .movie-grid-new-alike .mgn-title a {
        text-decoration: none;
        color: inherit;
    }
    
    .movie-grid-new-alike .mgn-title a:hover {
        text-decoration: underline;
    }
    
    /* 徽章样式 - 自定义实现 */
    .movie-grid-new-alike .mgn-badge {
        display: inline-block;
        padding: 0.25em 0.4em;
        font-size: 0.75rem;
        font-weight: 700;
        line-height: 1;
        text-align: center;
        white-space: nowrap;
        vertical-align: baseline;
        border-radius: 0.25rem;
        color: #fff;
    }
    
    .movie-grid-new-alike .mgn-badge-year {
        background-color: #000;
    }
    
    .movie-grid-new-alike .mgn-badge-type {
        background-color: #dc3545;
    }
    
    /* 信息栏样式 */
    .movie-grid-new-alike .mgn-info {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 0.5rem;
    }
    
    /* 桌面版显示信息栏 */
    @media (min-width: 992px) {
        .movie-grid-new-alike .mgn-info {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 0.5rem;
        }
    }
    
    .movie-grid-new-alike .mgn-rating {
        
    }
    
    .movie-grid-new-alike .mgn-date {
        color: var(--fg-light3);
        font-size: 0.875rem;
        white-space: nowrap; /* 防止换行 */
        overflow: visible; /* 确保内容完整显示 */
        flex-shrink: 0; /* 防止被压缩 */
        min-width: max-content; /* 确保有足够宽度显示内容 */
        position: relative; /* 防止移位 */
        display: inline-flex; /* 使用inline-flex确保稳定显示 */
        align-items: center; /* 垂直居中对齐 */
    }
    
    .movie-grid-new-alike .mgn-icon-calendar {
        margin-right: 0.25rem;
    }
    
    /* 移除 Bootstrap 的 margin-bottom */
    .movie-grid-new-alike .mgn-item.mb-5,
    .movie-grid-new-alike .mgn-item [class*="mb-"] {
        margin-bottom: 0 !important;
    }

    /* 移动端字体大小调整 */
    @media (max-width: 768px) {
        /* 标题字体 */
        .movie-grid-new-alike .mgn-title {
            font-size: 1.2rem;
        }

        /* 女优名称字体 */
        .movie-grid-new-alike .mgn-actress {
            font-size: 1.2rem;
        }

        /* 徽章字体（年份、类型） */
        .movie-grid-new-alike .mgn-badge {
            font-size: 1rem;
            padding: 0.3em 0.5em;
        }

        /* 日期字体 */
        .movie-grid-new-alike .mgn-date {
            font-size: 1rem;
        }
    }

    /* 默认移动设备 - 1 列 */
    .movie-grid-new-alike {
        grid-template-columns: repeat(1, 1fr);
    }

    /* 默认隐藏超出的项目 */

    /* 平板设备 - 2 列 */
    @media (min-width: 481px) {
        .movie-grid-new-alike {
            grid-template-columns: repeat(2, 1fr);
        }

        /* 显示/隐藏项目 */
        .movie-grid-new-alike .mgn-item { display: block; }
    }

    /* 大平板 - 3 列 */
    @media (min-width: 769px) {
        .movie-grid-new-alike {
            grid-template-columns: repeat(3, 1fr);
        }

        /* 显示/隐藏项目 */
        .movie-grid-new-alike .mgn-item { display: block; }
    }

    /* 桌面设备 - 4 列 */
    @media (min-width: 1025px) {
        .movie-grid-new-alike {
            grid-template-columns: repeat(4, 1fr);
        }

        /* 显示/隐藏项目 */
        .movie-grid-new-alike .mgn-item { display: block; }
    }

    /* 大屏幕 - 3 列 */
    @media (min-width: 1201px) {
        .movie-grid-new-alike {
            grid-template-columns: repeat(3, 1fr);
        }

        /* 显示/隐藏项目 */
        .movie-grid-new-alike .mgn-item { display: block; }
    }

    /* 超大屏幕 - 4 列 */
    @media (min-width: 1536px) {
        .movie-grid-new-alike {
            grid-template-columns: repeat(4, 1fr);
        }

        /* 显示/隐藏项目 */
        .movie-grid-new-alike .mgn-item { display: block; }
    }

    /* 2K屏幕 - 5 列 */
    @media (min-width: 1919px) {
        .movie-grid-new-alike {
            grid-template-columns: repeat(5, 1fr);
        }

        /* 重置所有项目为显示状态 */
        .movie-grid-new-alike .mgn-item {
            display: block !important;
        }

        /* 然后隐藏超出的项目 */
    }