/* ==========================================================================
   论坛首页 · 视觉美化层
   --------------------------------------------------------------------------
   作用：仅覆盖 public/static/bbs/list.css 的「视觉表现」，
        不改变 DOM 结构、类名语义与 JS 交互逻辑（排序 tab 索引、ShowMoreBBs
        追加、RightBase1 悬浮、topUpCont 显隐均保持原样）。
   依赖：market.css 已定义的主题变量（--brand / --surface / --border ...），
        随 html[data-theme="dark"] 自动切换深浅色。
   注意：本文件必须在 list.css 之后加载；修改后请顶版本号。
   ========================================================================== */

/* ---------- 徽章配色（随主题切换） ---------- */
:root {
  --bbs-b-blue:  rgba(37, 99, 235, .12);
  --bbs-f-blue:  #2563eb;
  --bbs-b-pink:  rgba(219, 39, 119, .12);
  --bbs-f-pink:  #db2777;
  --bbs-b-amber: rgba(245, 158, 11, .16);
  --bbs-f-amber: #d97706;
  --bbs-b-teal:  rgba(13, 148, 136, .14);
  --bbs-f-teal:  #0d9488;
  --bbs-b-gray:  rgba(107, 114, 128, .12);
  --bbs-f-gray:  #6b7280;
}
[data-theme="dark"] {
  --bbs-b-blue:  rgba(96, 165, 250, .20);
  --bbs-f-blue:  #93c5fd;
  --bbs-b-pink:  rgba(244, 114, 182, .20);
  --bbs-f-pink:  #f9a8d4;
  --bbs-b-amber: rgba(251, 191, 36, .20);
  --bbs-f-amber: #fcd34d;
  --bbs-b-teal:  rgba(45, 212, 191, .20);
  --bbs-f-teal:  #5eead4;
  --bbs-b-gray:  rgba(148, 163, 184, .18);
  --bbs-f-gray:  #cbd5e1;
}

/* ============================ 外层容器 ============================ */
.MainContainer {
  padding: 24px 20px 44px;
  font-size: 14px;
  color: var(--text);
}

.bbsindexbanner {
  width: 1200px;
  max-width: 100%;
  margin: 0 auto 16px;
}
.bbsindexbanner img {
  display: block;
  max-width: 100%;
  border-radius: var(--radius);
}

/* ---------- 栏目导航（scroll_sort 内联样式用 .MainContainer 提权覆盖） ---------- */
.MainContainer .scroll-sort {
  width: 1200px;
  max-width: 100%;
  margin: 0 auto 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  height: auto;
  padding: 12px 10px;
}
.MainContainer .scroll-sort span {
  border-radius: 999px;
  margin-left: 8px;
  margin-top: 0;
  height: 34px;
  line-height: 34px;
  padding-left: 16px;
  padding-right: 16px;
  font-size: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: block;
  float: left;
  transition: background .18s, border-color .18s, color .18s;
}
.MainContainer .scroll-sort span a { color: var(--text-2); transition: color .18s; }
.MainContainer .scroll-sort span:hover { background: var(--brand); border-color: var(--brand); }
.MainContainer .scroll-sort span:hover a { color: #fff; }
.MainContainer .scroll-sort .choose { background: var(--brand); border-color: var(--brand); }
.MainContainer .scroll-sort .choose a { color: #fff; }

/* ============================ 主体两栏 ============================ */
.Container {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  width: 1200px;
  max-width: 100%;
  margin: auto;
}
.Container .LeftCnt,
.Container .RightCnt { display: block; vertical-align: top; }
.Container .LeftCnt { flex: 1 1 auto; min-width: 0; }
.Container .RightCnt { flex: 0 0 auto; width: 320px; padding-left: 0; }
.RightSide { width: 320px; position: relative; }

/* ---------- 今日/昨日统计条 ---------- */
.LeftCnt .BaseInfo {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 14px 20px;
  margin-bottom: 16px;
  line-height: 22px;
  word-spacing: normal;
  color: var(--text-2);
  transition: box-shadow .2s;
}
.LeftCnt .BaseInfo:hover { box-shadow: var(--shadow); }
.LeftCnt .BaseInfo dt { color: var(--text-2); }
.LeftCnt .BaseInfo dt span { color: var(--brand); font-weight: 700; padding: 0 2px; }
.LeftCnt .BaseInfo dd { color: var(--text-3); }
.LeftCnt .BaseInfo dd i { color: var(--free); padding-left: 6px; }

/* ---------- 帖子列表卡片 ---------- */
.LeftCnt .ListBox {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* 排序标签栏 */
.LeftCnt .ListBox .head {
  height: auto;
  line-height: normal;
  display: flex;
  align-items: center;
  gap: 2px;
  position: relative;
  margin: 0;
  padding: 12px 14px;
}
.LeftCnt .ListBox .head:before {
  height: 1px;
  width: auto;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--border);
}
.LeftCnt .ListBox .head span {
  display: inline-flex;
  align-items: center;
  float: none;
  padding: 0 14px;
  height: 34px;
  font-size: 14px;
  border-radius: 999px;
  color: var(--text-2);
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  transition: background .18s, color .18s;
}
.LeftCnt .ListBox .head span:hover { background: var(--brand-soft); color: var(--brand); }
.LeftCnt .ListBox .head span.ck { background: var(--brand); color: #fff; font-weight: 600; }
.LeftCnt .ListBox .head span.ck:after { display: none; }
/* 排行榜 span 有内联 style="float:right"，用它精确命中（列表页没有此 span，不会误伤） */
.LeftCnt .ListBox .head span[style*="float:right"] {
  margin-left: auto;
  padding: 0 6px;
  background: none;
  font-size: 13px;
  color: var(--text-3);
}
.LeftCnt .ListBox .head span[style*="float:right"]:hover { background: none; color: var(--brand); }
.LeftCnt .ListBox .head span[style*="float:right"] a {
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* ---------- 帖子条目 ---------- */
.ShowLists { padding: 4px 8px 6px; }
.ShowLists .list {
  display: table;
  width: 100%;
  border-bottom: 1px solid var(--border);
  border-radius: 10px;
  transition: background .18s;
}
.ShowLists > .list:last-child,
.ShowLists > span:last-child > .list:last-child { border-bottom: 0; }
.ShowLists .list:hover { background: var(--surface-2); }
.ShowLists .list li { padding: 14px 8px; vertical-align: middle; }

/* 头像 */
.ShowLists .list li.icon { width: 52px; padding: 14px 12px 14px 8px; }
.ShowLists .list li.icon a {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  box-shadow: none;
  border: 1px solid var(--border);
  background: var(--surface-2);
  transition: transform .2s, border-color .2s;
}
.ShowLists .list:hover li.icon a { border-color: var(--brand); transform: translateY(-1px); }
.ShowLists .list li.icon a img { border-radius: 14px; }

/* 标题 + 徽章 */
.ShowLists .list li.info .title {
  height: auto;
  min-height: 24px;
  line-height: 24px;
  overflow: hidden;
  margin-bottom: 4px;
}
.ShowLists .list li.info .title a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  transition: color .18s;
}
.ShowLists .list li.info .title a:hover { color: var(--brand); }
.ShowLists .list li.info .title span {
  display: inline-block;
  background: var(--bbs-b-blue);
  color: var(--bbs-f-blue);
  padding: 0 8px;
  margin-left: 6px;
  height: 20px;
  line-height: 20px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  vertical-align: 2px;
}
.ShowLists .list li.info .title span.com { background: var(--bbs-b-pink);  color: var(--bbs-f-pink); }
.ShowLists .list li.info .title span.hot { background: var(--bbs-b-amber); color: var(--bbs-f-amber); }
.ShowLists .list li.info .title span.top { background: var(--bbs-b-teal);  color: var(--bbs-f-teal); }

/* 作者 / 时间 */
.ShowLists .list li.info .more {
  height: auto;
  line-height: 20px;
  overflow: hidden;
  color: var(--text-3);
  font-size: 13px;
}
.ShowLists .list li.info .more a { color: var(--text-2); transition: color .18s; }
.ShowLists .list li.info .more a:hover { color: var(--brand); }
.ShowLists .list li.info .more i { margin-left: 10px; padding-right: 3px; }

/* 浏览 / 回复 */
.ShowLists .list li.hits,
.ShowLists .list li.reply {
  width: 78px;
  color: var(--text-3);
  text-align: right;
  line-height: 22px;
  font-size: 13px;
}
.ShowLists .list li.hits i,
.ShowLists .list li.reply i { padding-right: 4px; }
.ShowLists .list li.reply { padding-right: 8px; }

/* ---------- 查看更多 ---------- */
.ShowMoreBBs {
  text-align: center;
  padding: 20px 0 18px;
  min-height: 44px;
  color: var(--text-3);
  font-size: 14px;
}
.ShowMoreBBs button {
  display: inline-block;
  width: auto;
  min-width: 240px;
  padding: 0 32px;
  line-height: 44px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
  margin: auto;
  border-radius: 999px;
  cursor: pointer;
  outline: none;
  transition: background .2s, color .2s, border-color .2s, box-shadow .2s, transform .2s;
}
.ShowMoreBBs button:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

/* ============================ 右侧栏 ============================ */

/* 栏目小标题（带竖条） */
.RightSide .h { padding: 16px 20px 10px; }
.RightSide .h span {
  height: auto;
  line-height: 22px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  padding-left: 12px;
}
.RightSide .h span:before {
  width: 3px;
  height: 16px;
  top: 3px;
  left: 0;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
}

/* ---------- 发新贴 + 统计卡 ---------- */
.RightBase dt {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px 14px;
  margin-bottom: 16px;
}
.RightBase dt button {
  display: block;
  width: 100%;
  margin: 0 auto 14px;
  line-height: 46px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(37, 99, 235, .22);
  transition: transform .18s, box-shadow .18s, filter .18s;
}
.RightBase dt button:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(37, 99, 235, .3);
}
.RightBase dt ul {
  display: flex;
  width: auto;
  margin: 0 0 12px;
}
.RightBase dt ul ol,
.RightBase dt ul li {
  display: block;
  width: 50%;
  text-align: center;
  vertical-align: middle;
  padding: 4px 0;
}
.RightBase dt ul li { border-left: 1px solid var(--border); }
.RightBase dt ul span { color: var(--text-3); font-size: 12px; }
.RightBase dt ul em {
  display: block;
  padding-top: 4px;
  font-size: 18px;
  font-weight: 700;
  font-style: normal;
  color: var(--text);
}
.RightBase dt ul ol em { color: var(--brand); }
.RightBase dt div {
  border-top: 1px solid var(--border);
  padding: 12px 4px 2px;
  color: var(--text-3);
  font-size: 13px;
  line-height: 1.7;
  word-spacing: normal;
}
.RightBase dt div span,
.RightBase dt div a { color: var(--brand); }

/* ---------- 热门分类卡 ---------- */
.RightBase dd {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.RightBase dd ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 16px;
}
.RightBase dd ul:after { display: none; }
.RightBase dd ul li { width: auto; padding-bottom: 0; float: none; }
.RightBase dd ul li a {
  display: block;
  margin: 0;
  text-align: center;
  height: 34px;
  line-height: 32px;
  padding: 0 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-2);
  border-radius: 999px;
  overflow: hidden;
  transition: background .18s, color .18s, border-color .18s;
}
.RightBase dd ul li a.ck { background: var(--brand); border-color: var(--brand); color: #fff; }
.RightBase dd ul li a:hover { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- 通用侧栏卡片（精彩内容 / 活跃商圈 / 友链 / 二维码） ---------- */
.RightSide .SideMores,
.RightSide .WXcode {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-top: 16px;
  overflow: hidden;
}

/* 精彩内容列表 */
.RightSide .ListNewfen { padding: 0 6px 4px; }
.RightSide .ListNewfen li {
  height: auto;
  line-height: 1.5;
  padding: 8px 14px;
  margin: 2px 0;
  overflow: hidden;
  font-size: 14px;
  border-radius: 8px;
  transition: background .16s;
}
.RightSide .ListNewfen li:hover { background: var(--surface-2); }
.RightSide .ListNewfen li a { color: var(--text-2); }
.RightSide .ListNewfen li:hover a { color: var(--brand); }

/* 活跃商圈成员 */
.RightSide .ListMember {
  display: flex;
  flex-wrap: wrap;
  padding: 0 10px 8px;
}
.RightSide .ListMember:after { display: none; }
.RightSide .ListMember li { width: 33.333%; padding-bottom: 16px; float: none; }
.RightSide .ListMember li span {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-2);
  transition: transform .2s, border-color .2s;
}
.RightSide .ListMember li:hover span { transform: translateY(-3px); border-color: var(--brand); }
.RightSide .ListMember li em {
  padding: 6px 8px 0;
  height: auto;
  line-height: 1.4;
  overflow: hidden;
  font-size: 13px;
  font-style: normal;
  color: var(--text-2);
}

/* 更多按钮 */
.RightSide .MOreShow { text-align: center; padding: 6px 0 16px; }
.RightSide .MOreShow button {
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 14px;
  color: var(--text-2);
  cursor: pointer;
  outline: none;
  padding: 7px 20px;
  border-radius: 999px;
  transition: background .18s, color .18s, border-color .18s;
}
.RightSide .MOreShow button:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.RightSide .MOreShow button i { padding-left: 5px; }

/* 友情链接 */
.RightSide .FriendLink {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 16px;
}
.RightSide .FriendLink li {
  display: inline-block;
  line-height: 1.5;
  padding: 0;
  font-size: 13px;
}
.RightSide .FriendLink li a {
  display: block;
  padding: 5px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-2);
  transition: background .18s, color .18s, border-color .18s;
}
.RightSide .FriendLink li a:hover { background: var(--brand); border-color: var(--brand); color: #fff; }

/* 二维码 */
.RightSide .WXcode dt {
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  padding: 16px 0 2px;
  color: var(--text);
}
.RightSide .WXcode dd { text-align: center; padding: 8px 0 18px; }
.RightSide .WXcode dd img {
  width: 170px;
  height: 170px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
}

/* ---------- 回到顶部 ---------- */
.topUpCont {
  position: fixed;
  width: 58px;
  height: 58px;
  border: none;
  background: var(--surface);
  z-index: 10000;
  right: 24px;
  bottom: 28px;
  border-radius: 50%;
  text-align: center;
  padding: 0;
  line-height: 1.2;
  cursor: pointer;
  color: var(--text-2);
  display: none;
  box-shadow: var(--shadow);
  transition: transform .2s, background .2s, color .2s, box-shadow .2s;
}
.topUpCont ul {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 100%;
}
.topUpCont ol { padding: 0; }
.topUpCont i { font-size: 17px; }
.topUpCont li { font-size: 11px; }
.topUpCont:hover {
  border: none;
  background: var(--brand);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, .18);
}

/* ============================ 窄屏适配 ============================ */
@media (max-width: 1240px) {
  .bbsindexbanner,
  .MainContainer .scroll-sort,
  .Container { width: auto; }
}
@media (max-width: 900px) {
  .Container { flex-direction: column; }
  .Container .RightCnt,
  .RightSide { width: 100%; }
  .LeftCnt .ListBox .head { flex-wrap: wrap; row-gap: 8px; }
  .LeftCnt .ListBox .head span:last-child { margin-left: 0; }
}
