/* LECMS 适配：补充必要的局部样式，尽量保持 Discuz 视觉 */

body { background: var(--bthy-fs, #f7f8fa); }

/* 防止导航子菜单在 LECMS 下被隐藏 */
.sub-nav { display: none; position: absolute; z-index: 1000; background: #fff; }
.ju-dh li:hover .sub-nav { display: block; }

/* 列表筛选按钮激活态 */
.list-lei.act,
.list-lei.active,
.list-tz.act,
.list-tz.active { background: #1e80ff; color: #fff; }

/* 顶部搜索与Logo强制显示 */
.mj-sq-dh .ju-logo.d-yc { display: flex !important; }
.mj-sq-dh .dhkj-so { /*display: block !important; */}
.mj-sq-dh #pc-dh { display: inline-flex !important; }
.mj-sq-dh .cebian { display: none; }
.mj-sq-dh { z-index: 70; }
.mj-sq-dh #pc-dh,
.mj-sq-dh .cebian { position: relative; z-index: 71; }
@media (max-width: 1024px) {
  .mj-sq-dh #pc-dh { display: none !important; }
  .mj-sq-dh .cebian { display: inline-flex !important; }
}

/* 侧边栏：桌面常显，移动端抽屉 */
@media (min-width: 1025px) {
  .sidebar { transform: translateX(0) !important; opacity: 1 !important; }
}
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-240px); opacity: 0; transition: all .5s; }
  .sidebar.show-sidebar { transform: translateX(0); opacity: 1; }
  /* WAP 侧边栏下移，避免遮挡顶部按钮 */
  .sidebar { padding-top: 3rem; box-sizing: border-box; }
  .sidebar .nav-dh-kz { max-height: calc(100vh - 3rem); }
}
.sidebar { z-index: 60; }
.overlay { z-index: 55; }

/* WAP 侧边栏导航（LECMS th_nav） */
.sidebar .wap_headernav { display: none; padding: 0 .5rem .6rem; }
.sidebar .nav-dh-kz { overflow-y: auto; }
.sidebar .wap_headernav .th_nav { list-style: none; margin: 0; padding: 0; display: block; }
.sidebar .wap_headernav .th_nav li { float: none; margin: 0 .4rem; white-space: nowrap; position: relative; border-bottom: 1px solid #f2f5f7; display: block; width: 100%; }
.sidebar .wap_headernav .th_nav li a { position: relative; line-height: 6rem; height: 2.2rem; width: 100%; font-size: .6rem; transition: .3s ease-out; display: inline-block; text-align: center; color: var(--bthy-z, #333); }
.sidebar .wap_headernav .th_nav li.act > a { color: #1e80ff; }
.sidebar .wap_headernav .th_nav li ul { overflow: hidden; display: block; padding: 0 .2rem .4rem; }
.sidebar .wap_headernav .th_nav li ul li { float: left; width: 48%; border-bottom: 1px dashed #cde9fd; }
.sidebar .wap_headernav .th_nav li ul li a { font-size: .8rem; line-height: 1.8rem; height: 1.8rem; }
@media (max-width: 1024px) {
  .sidebar .wap_headernav { display: block !important; visibility: visible; opacity: 1; }
  .sidebar.show-sidebar .wap_headernav { display: block !important; visibility: visible; opacity: 1; }
}

/* 面包屑：Discuz 风格 */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; list-style: none; margin: .5rem 0 1rem; padding: .2rem .6rem; background: var(--bthy-fs, #fff); border-radius: .4rem; }
.breadcrumb li { list-style: none; }
.breadcrumb li + li:before { content: "/"; margin: 0 .4rem 0 .2rem; color: var(--bthy-zcs, #9aa0a6); }
.breadcrumb a { color: var(--bthy-z, #333); text-decoration: none; }
.breadcrumb .breadcrumb-item.active a { color: var(--bthy-ys, #3858f6); }

/* 瀑布流容器回退 */
.gc-list-xx { display: block; column-count: 5; column-gap: .8rem; }
.gc-list-xx > .bktz-lb-sx { display: inline-block; width: 100%; break-inside: avoid; -webkit-column-break-inside: avoid; }
.bktz-lb-xx.pbl-5 { column-count: 5 !important; }
@media (max-width: 960px) {
  .gc-list-xx { column-count: 2; column-gap: .4rem; }
  .bktz-lb-xx.pbl-m-2 { column-count: 2 !important; }
}

/* 瀑布流卡片图片自适应 */
.gc-list-xx .nrdy-imgs { display: block; min-height: 5rem; }
.gc-list-xx .nrdy-imgs li { height: auto; }
.gc-list-xx .nrdy-imgs li:nth-child(n+2) { height: auto; flex: initial; }
.gc-list-xx .imgs-tpsc { height: auto; }
.gc-list-xx .threadlist-img { height: auto; }

/* 卡片基础与信息遮罩 */
.bktz-lb-xx .mj_forumlist_pics { position: relative; overflow: hidden; display: block; }
.bktz-lb-xx .mj_forumlist_pics img { position: relative; z-index: 1; max-width: 100%; height: auto; display: block; }
.bktz-lb-xx .zw-tx-zl,
.gc-list-xx .zw-tx-zl { position: absolute; height: auto !important; line-height: normal !important; min-height: 1.5rem; display: block !important; opacity: 1 !important; overflow: visible !important; z-index: 2; left: 0% !important; right: 0% !important; bottom: 0 !important; top: auto !important; margin-top: 0 !important; padding: .4rem 0; }
.bktz-lb-xx .zw-tx-zl .tx-zl-bt,
.bktz-lb-xx .zw-tx-zl .tx-zl-sj,
.gc-list-xx .zw-tx-zl .tx-zl-bt,
.gc-list-xx .zw-tx-zl .tx-zl-sj { display: block; line-height: 1.3; padding: 0 4px;}
.bktz-lb-xx .zw-tx-zl .tx-zl-bt em,
.gc-list-xx .zw-tx-zl .tx-zl-bt em { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal !important; overflow: hidden; font-size: .55rem; line-height: 1.25; }
.bktz-lb-xx .zw-tx-zl .tx-zl-sj,
.gc-list-xx .zw-tx-zl .tx-zl-sj { display: flex; align-items: center; justify-content: space-between; gap: .3rem; height: auto !important; line-height: 1.2; }
.bktz-lb-xx .zw-tx-zl .zl-hf-ck,
.gc-list-xx .zw-tx-zl .zl-hf-ck { flex: 0 0 auto; }

.gc-list-xx.is-text { column-count: 1; column-gap: 0; }
.gc-list-xx.is-text > .bktz-lb-sx { margin-bottom: .6rem; }
.gc-list-xx.is-text .mj_forumlist_pics{
  display:block;
  padding:.55rem .7rem;
  border:1px solid #eef1f5;
  border-radius:.5rem;
  background:#fff;
}
/* 瀑布流：仅显示第一张 */
.gc-list-xx:not(.is-text) .tupiansa img{display:none !important;}
.gc-list-xx:not(.is-text) .tupiansa img:first-child{display:block !important;}

/* 文字列表：显示多图 */
.gc-list-xx.is-text .nrdy-imgs{
  display:block;
  margin:0 0 .25rem;
  height:auto;
}
.gc-list-xx.is-text .nrdy-imgs li{
  height:auto;
  display:block;
  flex:none;
}
.gc-list-xx.is-text .entry-summary{display:block;margin:0;}
.gc-list-xx.is-text .tupiansa{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:.35rem;
}
.gc-list-xx.is-text .tupiansa img{
  display:block;
  width:100%;
  aspect-ratio:1 / 1;
  height:auto;
  object-fit:cover;
  border-radius:.4rem;
}
.gc-list-xx.is-text .tupiansa img:nth-child(n+7){display:none;}
.gc-list-xx.is-text .threadlist-img{
  width:120px;
  height:120px;
  object-fit:cover;
  border-radius:.4rem;
}
.gc-list-xx.is-text .mj-tie-top{
  position:static !important;
  margin-left:auto;
  width:auto !important;
  height:auto !important;
  pointer-events:auto;
}
.gc-list-xx.is-text .mj-tie-top .cate-badge{
  padding:.15rem .45rem;
  border-radius:999px;
  width:auto;
  height:auto;
  font-size:.48rem;
}
.gc-list-xx.is-text .zw-tx-zl {
  position:static !important;
  left:auto !important;
  right:auto !important;
  bottom:auto !important;
  top:auto !important;
  width:auto !important;
  background:none !important;
  padding:0 !important;
  margin:0 !important;
  color:inherit !important;
  flex:1;
}
.gc-list-xx.is-text .zw-tx-zl .tx-zl-bt em{
  color:#1f2d3d !important;
  font-size:.6rem;
  line-height:1.3;
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.gc-list-xx.is-text .zw-tx-zl .tx-zl-sj{
  color:#8b97a7 !important;
  font-size:.48rem;
  margin-top:.15rem;
}
.gc-list-xx.is-text .zw-tx-zl .zl-hf-ck span em,
.gc-list-xx.is-text .zw-tx-zl .forumava em{ color:#8b97a7 !important; }

@media (max-width: 768px) {
  .gc-list-xx.is-text .mj_forumlist_pics { padding:.5rem .6rem; }
  .gc-list-xx.is-text .tupiansa{ grid-template-columns:repeat(3, minmax(0, 1fr)); }
  .gc-list-xx.is-text .threadlist-img{ width:90px; height:90px; }
}

@media (min-width: 769px) {

  .gc-list-xx .nrdy-imgs{min-height: 0rem;}
  .gc-list-xx.is-text .tupiansa{height: 100px;width: 30%;}
  .gc-list-xx > .bktz-lb-sx { margin-bottom: .4rem; }
  .gc-list-xx.is-text .tupiansa img{ max-height:120px; object-fit:cover; }

}

.post-neirong img{
  -webkit-clip-path: inset(0 0 13% 0);
  clip-path: inset(0 0 13% 0);
  max-width: 100%;
  height: auto;
  display: block;
  margin: .6rem auto;
  max-height: 70vh;
  object-fit: contain;
}
@media (max-width: 768px){
  .post-neirong img{
    -webkit-clip-path: inset(0 0 15% 0);
    clip-path: inset(0 0 15% 0);
    max-height: 60vh;
  }
}

/* 统一分页样式 */
.pages { text-align: center; padding: 20px 0; }

/* 空间页：用户头部 + 瀑布流 */
.space-hero { position: relative; overflow: hidden; }
.space-cover img { width: 100%; height: 10rem; object-fit: cover; display: block; }
.space-meta { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem 1.25rem; }
.space-avatar { width: 4.2rem; height: 4.2rem; border-radius: 50%; overflow: hidden; border: 3px solid #fff; background: #fff; margin-top: -2.6rem; flex: 0 0 auto; }
.space-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.space-name h2 { margin: 0; font-size: 1.1rem; }
.space-name .space-id { font-size: .75rem; color: #98a0ab; }
.space-stats { display: flex; gap: 1rem; }
.space-stats span { display: flex; flex-direction: column; align-items: center; font-size: .75rem; color: #6b7280; }
.space-stats strong { font-size: 1rem; color: #111827; }
@media (max-width: 768px) {
  .space-meta { flex-direction: column; align-items: flex-start; }
  .space-stats { width: 100%; justify-content: space-between; }
}

/* 文章内容页：WAP 搜索与布局适配 */
.thread-wap-search { display: none; }
@media (max-width: 1024px) {
  .thread-wap-search { display: block; }
  .post-zz-zl { width: 100% !important; position: static !important; float: none !important; }
  #postlist { width: 100% !important; float: none !important; }
}

/* 内容页：WAP 作者卡片更贴近 Discuz 布局 */
@media (max-width: 1024px) {
  .zz-zl-gr { display: flex; align-items: center; gap: .75rem; padding: .9rem 1rem; }
  .zz-zl-gr .avatar { width: 3.2rem; height: 3.2rem; flex: 0 0 auto; border-radius: 50%; overflow: hidden; background: #fff; }
  .zz-zl-gr .avatar img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
  .zz-zl-gr .zl-gr { flex: 1; min-width: 0; }
  .zz-zl-gr .w-fit-content a { font-size: 1rem; }
  .zz-zl-gr .tn-sj-zs { flex-wrap: wrap; gap: .35rem .75rem; margin-top: .35rem; }
  .zz-zl-gr .tn-sj-zs a { background: #f6f7fb; padding: .2rem .55rem; border-radius: 999px; }
}

/* 内容页：WAP 热门帖子移到底部 */
.zz-zl-rd--wap { display: none; }
@media (max-width: 1024px) {
  .zz-zl-rd--pc { display: none; }
  .zz-zl-rd--wap { display: block; }
}

/* 搜索页：搜索框更明显一致 */
#scform { margin: 0 0 1rem; }
#scform_form { display: flex; align-items: center; gap: .5rem; padding: .4rem .6rem; background: #fff; border: 1px solid #e5e7eb; border-radius: 999px; }
#scform_form input { flex: 1; height: 2.2rem; border: none; outline: none; background: transparent; }
#scform_submit { height: 2.2rem; border-radius: 999px; background: #f1f5ff; border: none; padding: 0 .9rem; }
#scform_submit i { font-size: 1rem; }

/* WAP 侧边栏导航图标 */
.wap_headernav .th_nav a { display: flex; align-items: center; gap: .5rem; }
.wap_headernav .th_nav i { font-size: 1rem; }
.wap_headernav .th_nav .wap-nav-ico { width: 16px; height: 16px; object-fit: cover; border-radius: 3px; }

/* 作者卡片 VIP 图标 */
.vip-ico { font-size: 1rem; color: #ffb84d; }

/* 评论区：Discuz 风格 */
.tie-huifu{
  background:#f3f5f9;
  border-radius:12px;
  padding:16px 16px 12px;
}
.tie-huifu .tienei-post textarea{
  background:transparent;
  border:0;
  min-height:64px;
  resize:vertical;
}
.tie-huifu .tienei-post input{
  margin-bottom:10px;
}
.tie-huifu .pnpost{
  margin-top:12px;
  display:flex;
  justify-content:flex-end;
}
.tie-huifu #ctf_submit{
  background:#3a5bff;
  color:#fff;
  border-radius:10px;
  padding:10px 28px;
  font-size:14px;
}
.post-huifu.huifu-yh{
  background:#fff;
  border-radius:12px;
  padding:14px 18px;
  border:1px solid #eef0f4;
}
.post-huifu.huifu-yh + .post-huifu.huifu-yh{
  margin-top:12px;
}
.post-huifu.huifu-yh .thi-z img{
  width:36px;
  height:36px;
}
.post-huifu.huifu-yh .bklb-fy em{
  color:#a0a4ad;
}
.post-huifu.huifu-yh .t_fsz{
  margin-top:8px;
  line-height:1.6;
}
.comment-head-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.comment-head-right{
  display:flex;
  align-items:center;
  gap:12px;
}
.comment-head-right a{
  color:#9aa0a6;
  font-size:16px;
}
.comment-date{
  width:100%;
  text-align:right;
  margin-top:6px;
}
.comment-actions{
  margin-top:10px;
  border-top:1px solid #eef0f4;
  padding-top:10px;
  display:flex;
  justify-content:flex-start;
  gap:12px;
}
.comment-actions .comment-reply{
  background:#f2f4f8;
  border-radius:8px;
  padding:6px 14px;
  color:#6b7280;
}
.comment-actions .comment-reply:hover{
  color:#3a5bff;
}
.comment-more-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin:12px 0 0;
  padding:8px 16px;
  border-radius:10px;
  background:#f2f4f8;
  color:#6b7280;
}
.comment-more-btn:hover{
  background:#e9eef8;
  color:#3a5bff;
}
.comment-form{
  display:flex;
  align-items:center;
  gap:12px;
}
.comment-form .tienei-post{
  flex:1;
}
.comment-form .pnpost{
  margin:0 !important;
}
.comment-form #ctf_submit{
  min-width:96px;
  height:42px;
  border-radius:10px;
}
@media (max-width: 768px) {
  .comment-form{
    flex-direction:column;
    align-items:stretch;
  }
  .comment-form #ctf_submit{
    width:100%;
  }
  .comment-date{
    text-align:left;
  }
}
.reply-comment-box{
  background:#eef1f6;
  border-radius:10px;
  padding:10px 12px;
  margin-bottom:10px;
}
.reply-comment-title{
  display:flex;
  justify-content:space-between;
  color:#6b7280;
  font-size:12px;
  margin-bottom:6px;
}
.reply-comment-title a{ color:#6b7280; }
.reply-comment-content{
  font-size:13px;
  color:#6b7280;
  background:#f7f9fc;
  border-radius:8px;
  padding:8px 10px;
}
.reply-quote{
  background:#f6f7fb;
  border-radius:8px;
  padding:8px 10px;
  color:#6b7280;
  font-size:13px;
  margin-bottom:8px;
}
.comment-badge.author{
  background:#e8f5ee;
  color:#2f8f5b;
  font-size:12px;
  padding:2px 6px;
  border-radius:6px;
}
.comment-actions{
  margin-top:10px;
  border-top:1px solid #eef0f4;
  padding-top:10px;
  display:flex;
  justify-content:flex-end;
  gap:12px;
}
.comment-actions a{
  color:#9aa0a6;
  font-size:14px;
}
.comment-actions a.comment-reply{
  font-size:13px;
}
.comment-actions a.comment-like.is-liked{
  color:#3a5bff;
}
.comment-actions a.comment-more.is-open{
  color:#3a5bff;
}

/* Pagination (Discuz-like) */
.pg {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin: 16px 0;
  float: none !important;
}
.pg a,
.pg strong,
.pg span {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e6e6e6;
  color: #333;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  float: none !important;
}
.pg a:hover {
  border-color: var(--ls);
  color: var(--ls);
}
.pg strong {
  background: var(--ls);
  color: #fff;
  border-color: var(--ls);
}
.pg a.prev::before {
  content: "‹";
  margin-right: 6px;
}
.pg a.nxt::after {
  content: "›";
  margin-left: 6px;
}
@media (max-width: 768px) {
  .pg {
    justify-content: center;
    margin: 12px 0;
  }
  .pg a,
  .pg strong,
  .pg span {
    min-width: 26px;
    height: 26px;
    padding: 0 10px;
  }
}
