/* ============================================================
 * 第一院线 —— 移动端 / 窄屏适配层
 * 原站是固定 1200px 的 PC 设计（手机访问有独立 /m/ 站）。
 * 本文件在不改动原 CSS 的前提下，用媒体查询把 PC 布局重排为响应式。
 * 断点：1240（容器流式）/ 1000（单列）/ 720（手机）
 * ============================================================ */

html,
body {
    overflow-x: hidden;
}

/* 移动端首屏（原站 bxslider 轮播固定 860px 宽，窄屏无法铺开，替换成静态头部） */
.yx-mhero {
    display: none;
}

/* 移动端列表（PC 列表卡片是定宽 + 大内边距布局，窄屏单独用一套纯文字列表） */
.yx-mlist {
    display: none;
}



/* ---------- 1240 以下：把固定 1200px 的容器全部改成流式 ---------- */
@media screen and (max-width: 1240px) {
    /* 头部容器原样式带 min-width:1200px */
    .header-inner {
        min-width: 0 !important;
    }

    /* 首页整页包在 .pjax-wrapper(1200px) > .pjax-content(3600px) 里，必须解开 */
    .pjax-wrapper,
    .pjax-content,
    .middle-content,
    .content,
    .content-inner,
    .header-container,
    .content-container,
    .footer-container {
        width: 100% !important;
        max-width: 1200px;
        min-height: 0 !important;
        height: auto !important;
        float: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box;
        overflow: visible;
    }

    .header-container,
    .content-container,
    .footer-container {
        padding-left: 12px;
        padding-right: 12px;
    }

    /* pjax 的加载占位会撑出 1200px 空白 */
    .prev-content,
    .next-content,
    .pjax-loading {
        display: none !important;
    }

    /* 通栏广告容器固定 1200px */
    .t-ad,
    .b-ad,
    .top-slider {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* ---------- 1000 以下：单列 ---------- */
@media screen and (max-width: 1000px) {
    /* ===== 移动端首屏 ===== */
    .i_box {
        display: none !important;
    }

    .yx-mhero {
        display: block;
        margin-bottom: 14px;
        background: #fff;
        border-radius: 5px;
        overflow: hidden;
        box-shadow: 0 1px 20px rgba(0, 0, 0, .1);
    }

    .yx-mhero-main {
        position: relative;
        display: block;
    }

    .yx-mhero-main img {
        display: block;
        width: 100%;
        height: auto;
    }

    .yx-mhero-main span {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        padding: 26px 12px 10px;
        background: linear-gradient(transparent, rgba(0, 0, 0, .78));
        color: #fff;
        font-size: 16px;
        line-height: 24px;
    }

    .yx-mhero-list {
        padding: 4px 12px;
    }

    .yx-mhero-list li {
        border-bottom: 1px solid #eee;
    }

    .yx-mhero-list li:last-child {
        border-bottom: 0;
    }

    .yx-mhero-list li a {
        display: block;
        line-height: 34px;
        font-size: 14px;
        color: #222;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* ===== 头部：logo / 搜索 / 导航 三行 ===== */
    .site-jiemian {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        padding: 8px 0;
        overflow: visible;
    }

    .site-logo {
        float: none;
        flex: 0 0 auto;
        margin-right: 12px;
    }

    .site-logo .logo img {
        height: 36px !important;
    }

    form[name="formsearch"] {
        flex: 1 1 100%;
        order: 2;
        margin: 6px 0 0;
    }

    .site-top-search {
        float: none;
        padding-top: 0;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .site-top-search .search-input {
        flex: 1 1 auto;
        width: auto !important;
        min-width: 0;
        box-sizing: border-box;
    }

    .site-top-search .search-btn1 {
        flex: 0 0 auto;
        float: none;
        margin: 0;
    }

    .nav.nav2 {
        flex: 1 1 100%;
        width: 100%;
        order: 3;
        margin-top: 8px;
    }

    .jiemian-nav {
        display: block;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .jiemian-nav .nav-list {
        display: inline-block;
        float: none;
    }

    .jiemian-nav .nav-list-inner a {
        padding: 0 10px;
        line-height: 34px;
    }

    /* ===== 首页首屏右侧三张推荐图 ===== */
    #indexAjax > div[style] {
        width: 100% !important;
        height: auto !important;
    }

    .g_box1 {
        float: none !important;
        width: 100% !important;
        height: auto !important;
    }

    .b_box1 {
        display: flex;
        gap: 10px;
        width: 100% !important;
        height: auto !important;
        padding: 0 !important;
    }

    .b_box1 li {
        flex: 1 1 0;
        float: none;
        width: auto !important;
        height: 110px;
        margin-bottom: 0;
    }

    .b_box1 li img {
        width: 100% !important;
        height: 110px !important;
        object-fit: cover;
    }

    .b_box1 li p {
        top: 66px;
        font-size: 12px;
        line-height: 16px;
        height: 36px;
    }

    /* ===== 首页正文两栏 → 单栏 ===== */
    .main-center,
    .index-left,
    .index-right {
        float: none !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 0 18px !important;
        box-sizing: border-box;
    }

    /* 卡片通用复位（原样式给标题写死 width:750px、给页脚写死绝对定位） */
    .news-view .news-header {
        float: none !important;
        width: auto !important;
        padding: 0 0 6px !important;
    }

    .news-view .news-footer {
        float: none !important;
        position: static !important;
        width: auto !important;
        padding: 0 !important;
        text-align: left !important;
    }

    .news-view .news-main {
        height: auto !important;
        overflow: visible !important;
        display: block !important;
    }

    .news-view .news-img {
        height: auto !important;
    }

    /* 首页「最新资讯」：原样式用 padding-left:194px 给 180px 图让位，窄屏改 118px 图 */
    .index-left .news-view {
        position: relative;
        padding: 0 0 10px !important;
        margin: 0 0 12px !important;
        border-bottom: 1px solid #f0f0f0;
        border-radius: 0;
        box-shadow: none;
    }

    .index-left .news-view .news-img {
        position: static !important;
        float: left !important;
        width: 118px !important;
        height: 80px !important;
        margin: 0 10px 0 0 !important;
    }

    .index-left .news-view .news-img img {
        width: 118px !important;
        height: 80px !important;
        object-fit: cover;
    }

    .index-left .news-view .news-header {
        float: none !important;
        width: auto !important;
        padding: 0 !important;
    }

    .index-left .news-view .news-main {
        padding: 4px 0 2px 128px !important;
        height: auto !important;
        overflow: visible !important;
    }

    .index-left .news-view .news-footer {
        position: static !important;
        float: none !important;
        width: auto !important;
        padding: 0 0 0 128px !important;
        text-align: left !important;
    }

    /* 影院 / 影评 小列表：图左文右 */
    .special-top .top-view .top-img {
        float: left;
        width: 80px;
        margin-right: 10px;
    }

    .special-top .top-view .top-header,
    .special-top .top-view .news-cell1 {
        margin-left: 92px;
    }

    /* 新片推荐 / 正在热映：一行两个 */
    .culture-lists .news-view {
        float: none !important;
        display: inline-block;
        vertical-align: top;
        width: 48% !important;
        margin: 0 1% 16px !important;
        box-sizing: border-box;
    }

    .culture-lists .news-view .news-img img {
        width: 100% !important;
        height: auto !important;
    }

    /* ===== 列表页：左侧频道导航改为顶部一条 ===== */
    /* 原样式用 margin-left:120px 给左侧频道栏让位 */
    .columns-view {
        margin-left: 0 !important;
    }

    .columns-left,
    .columns-view,
    .columns-center,
    .columns-center.full,
    .columns-inner {
        float: none !important;
        width: 100% !important;
        min-height: 0 !important;
        box-sizing: border-box;
    }

    .columns-left {
        margin-bottom: 10px;
    }

    .columns-left .header-nav {
        padding: 6px 0;
    }

    /* 列表卡片：原样式 padding 为「20px 280px 20px 40px」，窄屏全部复位 */
    .news-view.left {
        padding: 0 0 12px !important;
        border-bottom: 1px solid #eee;
    }

    .news-view .news-right {
        margin-left: 0 !important;
        height: auto !important;
    }

    .columns-left .header-nav h2 {
        font-size: 28px;
        line-height: 40px;
    }

    #sub-nav li {
        display: inline-block;
    }

    #load-list .news-view {
        float: none !important;
        width: 100% !important;
        margin: 0 0 12px !important;
    }

    /* 列表页窄屏：用移动端纯文字列表替换定宽卡片 */
    .yx-mlist {
        display: block;
    }

    /* 卡片/列表切换只作用于 PC 卡片流，窄屏已换成纯文字列表 */
    .card-toggler {
        display: none !important;
    }

    #load-list {
        display: none !important;
    }

    .yx-mitem {
        padding: 12px 0;
        border-bottom: 1px solid #eee;
    }

    .yx-mitem h3 {
        font-size: 17px;
        line-height: 26px;
        font-weight: 700;
        color: #141414;
    }

    .yx-mitem h3 a {
        color: #141414;
    }

    .yx-mitem p {
        margin-top: 4px;
        font-size: 13px;
        line-height: 21px;
        color: #808080;
    }

    .yx-mmeta {
        margin-top: 6px;
        font-size: 12px;
        color: #b1afaf;
    }

    .yx-mmeta i {
        margin: 0 6px;
        font-style: normal;
    }

    /* ===== 文章页：正文 + 右栏单列 ===== */
    .main-container,
    .main-right-side {
        float: none !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 20px !important;
        padding: 16px 14px 24px !important;
        box-sizing: border-box !important;
    }

    .main-mate {
        position: static !important;
        margin: 0 0 12px !important;
        left: auto !important;
        top: auto !important;
        height: auto !important;
    }

    .article-view,
    .article-main,
    .article-content {
        width: 100% !important;
    }

    .article-img img {
        width: 100% !important;
        height: auto !important;
    }

    .article-content img,
    .article-content video,
    .article-content iframe {
        max-width: 100% !important;
        height: auto !important;
    }

    .article-box {
        width: 100% !important;
    }

    .article-box .news-view {
        width: 31% !important;
        float: left;
        margin: 0 1% 14px !important;
    }

    .article-box .news-view .news-img img {
        width: 100% !important;
        height: auto !important;
    }

    /* ===== 搜索 / TAG / 404：单列 ===== */
    .search-content .columns-left,
    .search-content .columns-right,
    .tag-content .columns-left,
    .tag-content .columns-right {
        float: none !important;
        width: 100% !important;
        margin: 0 !important;
        box-sizing: border-box;
    }

    .search-content .columns-right,
    .tag-content .columns-right {
        display: none;
    }
}

/* ---------- 720 以下：手机 ---------- */
@media screen and (max-width: 720px) {
    .site-logo .logo img {
        height: 30px !important;
    }

    .jiemian-nav .nav-list-inner a {
        font-size: 13px;
        padding: 0 8px;
    }

    /* 首页 / 列表 / 搜索卡片：图再缩小一档 */
    .index-left .news-view .news-img,
    #load-list .news-view .news-img,
    .list-search-news .news-view .news-img,
    .tag-list-news .news-view .news-img {
        float: left !important;
        width: 104px !important;
        height: 72px !important;
        margin: 0 10px 0 0 !important;
    }

    .index-left .news-view .news-img img,
    #load-list .news-view .news-img img,
    .list-search-news .news-view .news-img img,
    .tag-list-news .news-view .news-img img {
        width: 104px !important;
        height: 72px !important;
        object-fit: cover;
    }

    .index-left .news-view .news-main {
        padding: 4px 0 2px 114px !important;
    }

    .index-left .news-view .news-footer {
        padding: 0 0 0 114px !important;
    }

    .list-search-news .news-view .news-header,
    .list-search-news .news-view .news-main,
    .list-search-news .news-view .news-footer,
    .tag-list-news .news-view .news-header,
    .tag-list-news .news-view .news-main,
    .tag-list-news .news-view .news-footer,
    #load-list .news-view .news-right {
        margin-left: 114px !important;
    }

    #load-list .news-view .news-img,
    .list-search-news .news-view .news-img,
    .tag-list-news .news-view .news-img {
        width: 104px !important;
    }

    .culture-lists .news-view {
        width: 100% !important;
        margin: 0 0 16px !important;
    }

    .culture-lists .news-view .news-img img {
        max-height: 220px;
        object-fit: cover;
    }

    .article-box .news-view {
        width: 100% !important;
        margin: 0 0 14px !important;
    }

    .article-header h1 {
        font-size: 23px !important;
        line-height: 34px !important;
    }

    .article-info,
    .article-header p {
        font-size: 13px;
    }

    .article-content,
    .article-content p,
    .article-content section {
        font-size: 16px !important;
        line-height: 1.9 !important;
    }

    .list-pager ul li a {
        width: 34px;
        height: 34px;
        line-height: 34px;
        font-size: 14px;
    }

    .footer-container p,
    .footer-container ul {
        text-align: center;
    }

    .footer-container ul li {
        display: inline-block;
        margin: 0 8px;
    }

    .list-search form {
        display: flex;
        gap: 8px;
    }

    .list-search .search-text {
        flex: 1 1 auto;
        width: auto !important;
    }

    .news-mate-inner span {
        font-size: 20px !important;
    }
}
