/* ============================================================
 * mobile-v12.css — 手机端分集剧情页全新模板专用样式
 * 独立作用域：全部使用 m12- 前缀，不依赖任何旧 CSS
 * 修复：横向溢出 / 字号失控 / 加载全文悬浮 / 乱码顶条
 * ============================================================ */
html body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html body .m12-app,
html body .m12-app * {
  box-sizing: border-box;
}
html body .m12-app {
  min-height: 100vh;
  background: #eef1f6;
  color: #2b2f3a;
  font: 15px/1.75 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  word-break: break-word;
  overflow-wrap: anywhere;
}
html body .m12-app img,
html body .m12-app video,
html body .m12-app table {
  max-width: 100% !important;
  height: auto !important;
}
html body .m12-app a {
  color: inherit;
  text-decoration: none;
}

/* ---------- 顶部栏 ---------- */
html body .m12-hd {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  height: 50px;
  padding: 0 14px;
  background: linear-gradient(135deg, #1f2a44, #30456e);
  color: #fff;
  box-shadow: 0 2px 10px rgba(20, 30, 55, .25);
}
html body .m12-hd-logo {
  flex: 0 0 auto;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .5px;
  color: #fff !important;
}
html body .m12-hd-logo i {
  font-style: normal;
  color: #ffc44d;
}
html body .m12-hd-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  padding-left: 14px;
  overflow-x: auto;
  white-space: nowrap;
}
html body .m12-hd-nav a {
  font-size: 14px;
  color: rgba(255, 255, 255, .9) !important;
}

/* ---------- 二级频道 tab ---------- */
html body .m12-subnav {
  display: flex;
  gap: 4px;
  padding: 0 12px;
  height: 46px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  background: #fff;
  border-bottom: 1px solid #e8ebf1;
  -webkit-overflow-scrolling: touch;
}
html body .m12-subnav::-webkit-scrollbar {
  display: none;
}
html body .m12-subnav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 0 12px;
  height: 46px;
  font-size: 14px;
  color: #6b7280 !important;
}
html body .m12-subnav a.on {
  color: #2563eb !important;
  font-weight: 700;
}
html body .m12-subnav a.on::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: #2563eb;
}

/* ---------- 内容容器 ---------- */
html body .m12-wrap {
  padding: 12px;
  max-width: 720px;
  margin: 0 auto;
}

/* 标题栏 */
html body .m12-titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 6px rgba(30, 45, 80, .06);
}
html body .m12-titlebar .m12-bar {
  flex: 0 0 auto;
  width: 4px;
  height: 20px;
  border-radius: 4px;
  background: #2563eb;
}
html body .m12-titlebar h1 {
  flex: 1 1 auto;
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  color: #1f2430;
}
html body .m12-epbtn {
  flex: 0 0 auto;
  padding: 7px 14px;
  border: 0;
  border-radius: 18px;
  background: #2563eb;
  color: #fff !important;
  font-size: 13px;
  font-weight: 700;
}

/* ---------- 正文卡片 ---------- */
html body .m12-article {
  margin-top: 12px;
  padding: 16px 16px 4px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 6px rgba(30, 45, 80, .06);
}
html body .m12-article-bd {
  position: relative;
  font-size: 16px;
  line-height: 1.9;
  color: #2b2f3a;
  overflow: hidden;
}
html body .m12-article-bd.fold {
  max-height: 560px;
}
html body .m12-article-bd.fold::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 90px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 85%);
  pointer-events: none;
}
html body .m12-article-bd p {
  margin: 0 0 12px;
}
html body .m12-article-bd img {
  display: block;
  margin: 12px auto;
  border-radius: 8px;
}
html body .m12-article-bd .keylink,
html body .m12-article-bd a {
  color: #2563eb !important;
}
html body .m12-article-bd hr {
  border: 0;
  border-top: 1px dashed #e2e6ee;
  margin: 18px 0;
}
html body .m12-article-bd .m12-copy {
  padding: 8px 12px;
  margin: 0 0 12px;
  background: #f7f8fb;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.7;
  color: #e05252;
}
html body .m12-more {
  display: block;
  width: 100%;
  padding: 12px 0 14px;
  border: 0;
  background: transparent;
  color: #2563eb !important;
  font-size: 14px;
  font-weight: 700;
}
html body .m12-more::after {
  content: " \25BE";
}

/* ---------- 翻页 ---------- */
html body .m12-pager {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
html body .m12-pager a {
  flex: 1 1 0;
  padding: 12px 6px;
  text-align: center;
  border-radius: 10px;
  background: #fff;
  color: #374151 !important;
  font-size: 14px;
  box-shadow: 0 1px 6px rgba(30, 45, 80, .06);
}
html body .m12-pager a.m12-next {
  background: #2563eb;
  color: #fff !important;
  font-weight: 700;
}
html body .m12-pager a.m12-disabled {
  opacity: .45;
  pointer-events: none;
}

/* ---------- 相关看点 ---------- */
html body .m12-rel {
  margin-top: 16px;
  padding: 16px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 6px rgba(30, 45, 80, .06);
}
html body .m12-rel h2 {
  margin: 0 0 12px;
  padding-left: 10px;
  border-left: 4px solid #2563eb;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  color: #1f2430;
}
html body .m12-rel ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
html body .m12-rel li {
  padding: 10px 0;
  border-bottom: 1px solid #f0f2f6;
}
html body .m12-rel li:last-child {
  border-bottom: 0;
}
html body .m12-rel li a {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
html body .m12-rel .m12-thumb {
  flex: 0 0 96px;
  width: 96px;
  height: 62px;
  border-radius: 8px;
  overflow: hidden;
  background: #eef1f6;
}
html body .m12-rel .m12-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
html body .m12-rel .m12-info {
  flex: 1 1 auto;
  min-width: 0;
}
html body .m12-rel .m12-info h3 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  color: #2b2f3a;
}
html body .m12-rel .m12-info time {
  font-size: 12px;
  color: #9aa1ae;
}

/* ---------- 选集浮层 ---------- */
html body .m12-epmask {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: none;
  background: rgba(15, 22, 40, .55);
}
html body .m12-epmask.open {
  display: block;
}
html body .m12-eppanel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 72vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
}
html body .m12-eppanel-hd {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #eef0f5;
  font-size: 16px;
  font-weight: 700;
  color: #1f2430;
}
html body .m12-eppanel-hd button {
  border: 0;
  background: transparent;
  font-size: 14px;
  color: #6b7280 !important;
}
html body .m12-eplist {
  flex: 1 1 auto;
  overflow-y: auto;
  list-style: none;
  margin: 0;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
html body .m12-eplist li a {
  display: block;
  padding: 10px 0;
  text-align: center;
  border-radius: 8px;
  background: #f3f5f9;
  color: #374151 !important;
  font-size: 14px;
}
html body .m12-eplist li.on a {
  background: #2563eb;
  color: #fff !important;
  font-weight: 700;
}
html body .m12-eplist li.yu a::after {
  content: "·预告";
  display: block;
  font-size: 9px;
  color: #e05252;
}

/* ---------- 页脚 ---------- */
html body .m12-ft {
  padding: 22px 14px 28px;
  text-align: center;
  color: #9aa1ae;
  font-size: 12px;
  line-height: 2;
}
html body .m12-ft a {
  color: #6b7280 !important;
  margin: 0 6px;
}

/* 隐藏 nginx sub_filter 全局注入的乱码推广条（内容已乱码且非本站导航） */
html body #wbzt-bar{display:none!important}

/* ============================================================
 * 简介页专用组件（同样 m12- 作用域）
 * ============================================================ */

/* 影片信息卡 */
html body .m12-hero {
  display: flex;
  gap: 14px;
  padding: 14px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 6px rgba(30,45,80,.06);
}
html body .m12-hero-poster {
  flex: 0 0 104px;
  width: 104px;
  border-radius: 10px;
  overflow: hidden;
  background: #eef1f6;
}
html body .m12-hero-poster img {
  display: block;
  width: 100%;
  height: 142px;
  object-fit: cover;
}
html body .m12-hero-info {
  flex: 1 1 auto;
  min-width: 0;
}
html body .m12-hero-info h1 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  color: #1f2430;
}
html body .m12-hero-meta {
  margin: 0;
  font-size: 13px;
  line-height: 1.85;
  color: #2b2f3a;
}
html body .m12-hero-meta div {
  white-space: normal;
}
html body .m12-hero-meta label {
  display: inline-block;
  min-width: 42px;
  color: #9aa1ae;
}
html body .m12-hero-meta a {
  color: #2563eb !important;
  margin-right: 4px;
}

/* 通用卡片 */
html body .m12-card {
  margin-top: 12px;
  padding: 16px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 6px rgba(30,45,80,.06);
}
html body .m12-card h2 {
  margin: 0 0 12px;
  padding-left: 10px;
  border-left: 4px solid #2563eb;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  color: #1f2430;
}

/* 剧情简介 */
html body .m12-synopsis {
  position: relative;
  font-size: 15px;
  line-height: 1.9;
  color: #3a4150;
  overflow: hidden;
}
html body .m12-synopsis.fold {
  max-height: 76px;
}
html body .m12-synopsis.fold::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 40%;
  height: 38px;
  background: linear-gradient(to right, rgba(255,255,255,0), #fff 90%);
  pointer-events: none;
}
html body .m12-card .m12-more {
  padding: 10px 0 0;
}

/* 分集网格 */
html body .m12-eps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
}
html body .m12-eps a {
  display: block;
  padding: 10px 2px;
  text-align: center;
  border-radius: 8px;
  background: #f3f5f9;
  color: #374151 !important;
  font-size: 13px;
  white-space: nowrap;
}
html body .m12-eps a:nth-child(4n+1) { background: #eaf1ff; color: #2563eb !important; }

/* 演员横向卡片 */
html body .m12-cast {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}
html body .m12-cast::-webkit-scrollbar { display: none; }
html body .m12-cast .m12-cast-item {
  flex: 0 0 86px;
  width: 86px;
  text-align: center;
}
html body .m12-cast .m12-cast-item img {
  display: block;
  width: 86px;
  height: 110px;
  object-fit: cover;
  border-radius: 8px;
  background: #eef1f6;
}
html body .m12-cast .m12-cast-item b {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #2b2f3a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html body .m12-cast .m12-cast-item span {
  display: block;
  font-size: 12px;
  color: #9aa1ae;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================
 * 整站手机端统一自适应（作用于所有旧模板 class）
 * 仅 768px 以下生效，PC 端完全不受影响；高优先级覆盖旧样式
 * ============================================================ */
@media (max-width:768px){
  /* 基础：所有手机页统一浅色底、深色字、禁止横向溢出 */
  html{overflow-x:hidden}
  html body{
    margin:0!important;
    overflow-x:hidden!important;
    background:#eef1f6!important;
    color:#2b2f3a!important;
    font:15px/1.75 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",Arial,sans-serif!important;
    -webkit-text-size-adjust:100%!important;
  }
  html body img,html body video{max-width:100%!important;height:auto!important}

  /* 顶部：统一深色导航栏（覆盖旧 header） */
  html body header,html body #box_head{
    display:flex!important;align-items:center!important;
    min-height:50px!important;height:auto!important;padding:0 14px!important;
    background:linear-gradient(135deg,#1f2a44,#30456e)!important;
    box-shadow:0 2px 10px rgba(20,30,55,.25)!important;
    overflow:visible!important;
  }
  html body header .logo,html body header .logo img{max-height:26px!important;width:auto!important;max-width:130px!important}
  html body header nav{display:flex!important;gap:14px!important;padding-left:10px!important;overflow-x:auto!important;white-space:nowrap!important}
  html body header nav ul{display:flex!important;gap:14px!important;margin:0!important;padding:0!important;list-style:none!important}
  html body header nav a,html body header .right_nav a,html body header .search_btn,html body header .nav_button{
    color:#fff!important;font-size:14px!important;text-decoration:none!important;
  }
  html body header .right_nav,html body header .nav_bg,html body header .nav_button{display:none!important}

  /* 二级 tab（tv_nav）统一横滑胶囊 */
  html body .tv_nav{background:#fff!important;border-bottom:1px solid #e8ebf1!important;overflow-x:auto!important;overflow-y:hidden!important;white-space:nowrap!important;padding:0!important}
  html body .tv_nav .owl-carousel{display:flex!important;gap:4px!important;padding:0 12px!important}
  html body .tv_nav .item{flex:0 0 auto!important}
  html body .tv_nav .item a{display:inline-block!important;padding:12px 10px!important;font-size:14px!important;color:#6b7280!important;text-decoration:none!important;border-bottom:3px solid transparent!important}
  html body .tv_nav .item.on a{color:#2563eb!important;font-weight:700!important;border-bottom-color:#2563eb!important}

  /* 内容容器与卡片 */
  html body .container{width:100%!important;padding:0 0!important;margin:0!important}
  html body .container>.box,html body .box{
    width:auto!important;margin:12px!important;padding:14px!important;
    background:#fff!important;border:0!important;border-radius:12px!important;
    box-shadow:0 1px 6px rgba(30,45,80,.06)!important;color:#2b2f3a!important;
  }
  html body .boxspacing{height:0!important;margin:0!important;padding:0!important;border:0!important}
  html body .titline{margin:0 0 12px!important;border:0!important;padding:0 0 8px!important}
  html body .titline .line,html body .titline b.line{display:inline-block!important;width:4px!important;height:16px!important;background:#2563eb!important;border-radius:3px!important;vertical-align:-2px!important;margin-right:8px!important}
  html body .titline h1,html body .titline h3,html body .titline h2{display:inline!important;font-size:16px!important;font-weight:700!important;color:#1f2430!important;line-height:1.4!important}

  /* 正文 */
  html body .info_font,html body .ysindex_jqjj,html body .content{
    height:auto!important;max-height:none!important;
    font-size:15px!important;line-height:1.9!important;color:#3a4150!important;
  }
  html body .info_font a,html body .keylink{color:#2563eb!important}

  /* 列表/图文条目 */
  html body .news_lis ul,html body .yanyuan_lis ul,html body #list_huaxu{padding:0!important;margin:0!important;list-style:none!important}
  html body .news_lis li,html body .news_lis ul li{padding:10px 0!important;border-bottom:1px solid #f0f2f6!important}
  html body .news_lis li a{display:flex!important;gap:10px!important;align-items:flex-start!important;color:#2b2f3a!important;text-decoration:none!important}
  html body .news_lis .small_img_1,html body .small_img_1,html body .big_img_1{
    flex:0 0 96px!important;width:96px!important;height:62px!important;
    border-radius:8px!important;overflow:hidden!important;background:#eef1f6!important;
  }
  html body .small_img_1 img,html body .big_img_1 img{width:100%!important;height:100%!important;object-fit:cover!important}
  html body .news_lis h3{margin:0 0 6px!important;font-size:14px!important;font-weight:500!important;line-height:1.45!important;color:#2b2f3a!important}
  html body .news_lis .time{font-size:12px!important;color:#9aa1ae!important}

  /* 影片头部信息块（简介页 tv_imgf）：改浅色卡片横排 */
  html body .tv_imgf{background:#fff!important;color:#2b2f3a!important;padding:14px!important;border-radius:12px!important}
  html body .tv_imgf h1{font-size:18px!important;font-weight:700!important;color:#1f2430!important;margin:0 0 8px!important}
  html body .tv_imgf .lis,html body .tv_imgf .lis li{list-style:none!important;margin:0!important;padding:0!important;color:#3a4150!important;font-size:13px!important;line-height:1.85!important}
  html body .tv_imgf .lis label{color:#9aa1ae!important;min-width:42px!important;display:inline-block!important}
  html body .tv_imgf .lis a{color:#2563eb!important}

  /* 选集/分页 */
  html body .ji_lis a,html body .changpage a,html body .page a{
    display:inline-block!important;margin:4px 6px 4px 0!important;padding:8px 12px!important;
    background:#f3f5f9!important;color:#374151!important;border-radius:8px!important;text-decoration:none!important;font-size:14px!important;
  }
  html body .xuanji>a.more,html body .starfon .more>a,html body .news_lis .more>a{
    display:block!important;position:static!important;width:100%!important;padding:12px 0!important;margin:0!important;
    background:transparent!important;color:#2563eb!important;font-size:14px!important;text-align:center!important;font-weight:700!important;
  }

  /* 演员横向卡片 */
  html body .yanyuan_lis .swiper-container{overflow-x:auto!important}
  html body .yanyuan_lis .swiper-wrapper{display:flex!important;gap:12px!important}
  html body .yanyuan_lis .swiper-slide{flex:0 0 86px!important;width:86px!important;text-align:center!important}
  html body .yanyuan_lis .swiper-slide img{width:86px!important;height:110px!important;object-fit:cover!important;border-radius:8px!important}
  html body .yanyuan_lis .swiper-slide b{display:block!important;font-size:13px!important;color:#2b2f3a!important}

  /* 友情链接/页脚 */
  html body footer,html body #links{background:#1f2430!important;color:#c9cfda!important;padding:18px 14px!important;text-align:center!important;font-size:12px!important}
  html body footer a,html body #links a{color:#9fb3d9!important;margin:0 6px!important}
  html body #links .title_links{border:0!important;padding:0 0 10px!important}
  html body #links .title_links b,html body #links .title_links span{color:#c9cfda!important;display:block!important;float:none!important}
}

/* ===== 演员表页专用（m12-cast / m12-castall） ===== */
.m12-cast,.m12-castall{margin:14px 12px;padding:14px;background:#fff;border-radius:12px;box-shadow:0 1px 6px rgba(30,45,80,.06)}
.m12-cast h2,.m12-castall h2{margin:0 0 12px;font-size:16px;font-weight:700;color:#1f2430;padding-left:10px;border-left:4px solid #2563eb;line-height:1.3}
.m12-cast-card{display:flex;gap:12px;padding:10px 0;border-bottom:1px solid #f0f2f6;align-items:flex-start}
.m12-cast-card:last-child{border-bottom:0}
.m12-cast-pic{flex:0 0 84px;width:84px;height:112px;border-radius:8px;overflow:hidden;background:#eef1f6;display:flex;align-items:center;justify-content:center}
.m12-cast-pic img{width:100%;height:100%;object-fit:cover;display:block}
.m12-cast-ph{font-size:12px;color:#9aa1ae;text-align:center;padding:6px;line-height:1.4}
.m12-cast-info{flex:1;min-width:0}
.m12-cast-info h3{margin:0 0 4px;font-size:15px;font-weight:700;color:#1f2430;line-height:1.4}
.m12-cast-info h3 a,.m12-cast-role a{color:#2563eb;text-decoration:none}
.m12-cast-role{margin:0 0 6px;font-size:13px;color:#6b7280}
.m12-cast-desc{margin:0;font-size:13px;line-height:1.7;color:#4b5563;word-break:break-word}
.m12-castall ul{list-style:none;margin:0;padding:0}
.m12-castall li{padding:10px 0;border-bottom:1px solid #f0f2f6;font-size:13px;line-height:1.6}
.m12-castall li:last-child{border-bottom:0}
.m12-castall li>div{margin:0 0 2px;word-break:break-word}
.m12-castall-name{font-size:14px!important;font-weight:700;color:#1f2430!important}
.m12-castall-name a,.m12-castall-star a{color:#2563eb!important;text-decoration:none}
.m12-castall-star{color:#6b7280!important}
.m12-castall-desc{color:#4b5563!important}

/* 强制修正：演员卡容器不能被旧规则变成 flex 横排 */
html body section.m12-cast{display:block!important;width:auto!important}
html body .m12-cast-card{display:flex!important;flex-direction:row!important;align-items:flex-start!important;width:100%!important}
html body .m12-cast h2{display:block!important;width:auto!important}
html body .m12-cast-info{flex:1 1 auto!important;min-width:0!important;display:block!important;width:auto!important}
html body .m12-cast-desc{display:block!important;width:auto!important;white-space:normal!important}
/* PC 模板在窄屏下：固定宽度容器自适应 */
@media(max-width:768px){
  html body .w1000,html body .w684,html body .w980,html body .w1200{
    width:100%!important;max-width:100%!important;margin:0 auto!important;box-sizing:border-box!important;
  }
  html body .row1,html body .row2,html body .row3,html body .row4{
    width:100%!important;max-width:100%!important;box-sizing:border-box!important;
  }
  html body .fl{float:none!important;width:100%!important;max-width:100%!important;box-sizing:border-box!important}
  html body .clearfix:after{content:"";display:table;clear:both}
}
