/* =======================================================================
   有道玩家社区(bbs)v2 皮肤
   —— 视觉规格与 v1 社区完全一致(像素级),选择器与命名全部重写
   —— 信息流卡片 + 人物 + 采纳答案的问答社区布局
   ======================================================================= */
:root {
  --c-main: #fb4a3e; --c-deep: #e23b30; --ink: #1a1a1b; --ink-2: #2a2b2e;
  --sub: #5c6066; --gray: #939599; --line: #e6e8ea; --soft: #f6f7f9;
  --blue: #2f6bff; --green: #00a870; --amber: #f0a020; --bg: #f0f2f5;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  font-size: 15px; line-height: 1.7; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img { border: 0; max-width: 100%; }
.sr2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ============ 顶栏 ============ */
.mast2 {
  position: sticky; top: 0; z-index: 100; background: #fff;
  border-bottom: 1px solid var(--line); height: 58px;
}
.mast2-in { max-width: 1180px; margin: 0 auto; height: 58px; display: flex; align-items: center; gap: 20px; padding: 0 20px; }
.logo2 { font-size: 20px; font-weight: 700; white-space: nowrap; }
.logo2 i { color: var(--c-main); font-style: normal; }
.logo2 b { font-weight: 500; color: var(--gray); font-size: 14px; margin-left: 4px; }
.seek2 { flex: 1; max-width: 560px; position: relative; }
.seek2 input {
  width: 100%; height: 38px; border: 1px solid var(--line); background: var(--soft);
  border-radius: 19px; padding: 0 44px 0 18px; font-size: 14px; font-family: inherit; outline: none;
}
.seek2 input:focus { border-color: var(--c-main); background: #fff; }
.seek2 button {
  position: absolute; right: 4px; top: 4px; width: 30px; height: 30px; border: 0; cursor: pointer;
  background: var(--c-main); border-radius: 50%; color: #fff; font-size: 15px;
}
.go2 {
  margin-left: auto; height: 38px; padding: 0 18px; border-radius: 19px; background: var(--c-main);
  color: #fff; font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px;
}
.go2:hover { background: var(--c-deep); }

/* ============ 三栏布局 ============ */
.lay { max-width: 1180px; margin: 20px auto; padding: 0 20px; display: flex; gap: 20px; align-items: flex-start; }
.rail2 { width: 200px; flex: 0 0 200px; position: sticky; top: 78px; }
.rail2-t { font-size: 12px; color: var(--gray); font-weight: 600; letter-spacing: 1px; padding: 0 12px 8px; }
.rail2 a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 12px; border-radius: 8px; font-size: 14px; color: var(--ink-2); cursor: pointer;
}
.rail2 a:hover { background: #fff; }
.rail2 a.on { background: #fff; color: var(--c-main); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.rail2 a .n2 { font-size: 12px; color: var(--gray); }
.rail2 a.on .n2 { color: var(--c-main); }
.rail2-tip { margin: 14px 12px 0; font-size: 12px; color: var(--gray); line-height: 1.7; }

.feed { flex: 1; min-width: 0; }
.rail3 { width: 240px; flex: 0 0 240px; position: sticky; top: 78px; }
@media screen and (max-width: 1080px) { .rail3 { display: none; } }
@media screen and (max-width: 860px) { .rail2 { display: none; } .lay { padding: 0 12px; } }

/* ============ 信息流:标签条 ============ */
.tab2 {
  background: #fff; border-radius: 12px; padding: 6px; display: flex; gap: 4px; margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.tab2 button {
  border: 0; background: none; font-family: inherit; font-size: 14px; color: var(--sub);
  padding: 8px 16px; border-radius: 8px; cursor: pointer;
}
.tab2 button.on { background: var(--c-main); color: #fff; font-weight: 500; }
.feed-hd { font-size: 13px; color: var(--gray); margin: 0 4px 12px; }

/* ============ 问题卡片 ============ */
.qbox {
  background: #fff; border-radius: 12px; padding: 16px 18px; margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04); transition: box-shadow .15s;
}
.qbox:hover { box-shadow: 0 4px 16px rgba(0,0,0,.09); }
.qbox-hd { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.qbox-av { width: 26px; height: 26px; border-radius: 50%; flex: 0 0 26px; }
.who2 { display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 600; font-family: sans-serif; overflow: hidden; user-select: none; }
.qbox-av.who2 { font-size: 13px; }
.qtop-av.who2 { font-size: 15px; }
.abox-av.who2 { font-size: 17px; }
.qbox-who { font-size: 13px; color: var(--sub); }
.qbox-who b { color: var(--ink-2); font-weight: 500; }
.qbox-role { color: var(--gray); }
.qbox-time { margin-left: auto; font-size: 12px; color: var(--gray); }
.qbox-q { font-size: 17px; font-weight: 600; line-height: 1.5; color: var(--ink); display: block; }
.qbox:hover .qbox-q { color: var(--c-main); }
.qbox-ex {
  margin-top: 8px; font-size: 14px; color: var(--sub); line-height: 1.75;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.qbox-ft { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.pill {
  font-size: 12px; color: var(--sub); background: var(--soft); border-radius: 6px;
  padding: 3px 10px; border: 1px solid var(--line);
}
.pill-cat { color: var(--c-main); background: #fff1ef; border-color: #ffd9d4; }
.qtop-tags { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.pill-lk { text-decoration: none; transition: all .15s; cursor: pointer; }
.pill-lk:hover { border-color: var(--c-main); color: var(--c-main); background: #fff1ef; }
.qbox-stat { margin-left: auto; display: flex; gap: 16px; font-size: 13px; color: var(--gray); }
.qbox-stat b { color: var(--ink-2); font-weight: 600; }
.ok2 {
  font-size: 12px; color: var(--green); font-weight: 600; display: inline-flex; align-items: center; gap: 4px;
}
.ok2::before { content: "✓"; display: inline-block; width: 16px; height: 16px; line-height: 16px;
  text-align: center; background: var(--green); color: #fff; border-radius: 50%; font-size: 11px; }

/* ============ 侧栏卡片 ============ */
.card2 { background: #fff; border-radius: 12px; padding: 16px; margin-bottom: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.card2-t { font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.hot2 a { display: block; font-size: 13px; color: var(--ink-2); line-height: 1.55; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.hot2 a:last-child { border-bottom: 0; }
.hot2 a:hover { color: var(--c-main); }
.hot2 .rk2 { display: inline-block; width: 18px; color: var(--c-main); font-weight: 700; font-style: italic; }
.stat3 { display: flex; justify-content: space-between; text-align: center; }
.stat3 div b { display: block; font-size: 22px; color: var(--ink); font-weight: 700; }
.stat3 div span { font-size: 12px; color: var(--gray); }

/* ============ 分页 ============ */
.pg2 { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 20px 0 10px; justify-content: center; }
.pg2 button {
  min-width: 36px; height: 36px; padding: 0 12px; border: 1px solid var(--line); background: #fff;
  border-radius: 8px; font-family: inherit; font-size: 14px; color: var(--ink-2); cursor: pointer;
}
.pg2 button:hover:not(:disabled):not(.cur) { border-color: var(--c-main); color: var(--c-main); }
.pg2 button.cur { background: var(--c-main); border-color: var(--c-main); color: #fff; font-weight: 600; }
.pg2 button:disabled { color: #c4c7ca; background: var(--soft); cursor: not-allowed; }
.pg2 .inf2 { color: var(--gray); font-size: 13px; margin-left: 8px; }
.empty2 { background: #fff; border-radius: 12px; padding: 60px; text-align: center; color: var(--gray); }
.foot2 { max-width: 1180px; margin: 20px auto; padding: 20px; text-align: center; font-size: 12px; color: var(--gray); line-height: 1.8; }

/* ======================================================================
   详情页(topic.html)
   ====================================================================== */
.wrap2 { max-width: 820px; margin: 20px auto; padding: 0 20px; }
.crumb2 { font-size: 13px; color: var(--gray); margin-bottom: 14px; }
.crumb2 a:hover { color: var(--c-main); }
.crumb2 span { margin: 0 7px; color: #ccc; }

.qtop { background: #fff; border-radius: 14px; padding: 22px 24px; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.qtop-cat { display: inline-block; font-size: 12px; color: var(--c-main); background: #fff1ef; border: 1px solid #ffd9d4; border-radius: 6px; padding: 3px 10px; }
.qtop-q { font-size: 24px; font-weight: 700; line-height: 1.45; margin: 12px 0; }
.qtop-meta { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--gray); flex-wrap: wrap; }
.qtop-av { width: 30px; height: 30px; border-radius: 50%; }
.qtop-meta b { color: var(--ink-2); font-weight: 500; }
.qtop-meta i { font-style: normal; }
.qtop-meta .dot2 { width: 3px; height: 3px; border-radius: 50%; background: #ccc; }
.qtop-ex { margin-top: 14px; padding: 14px 16px; background: var(--soft); border-radius: 10px; font-size: 15px; color: var(--ink-2); line-height: 1.85; }

.ans2-hd { display: flex; align-items: center; gap: 10px; margin: 24px 4px 12px; }
.ans2-hd b { font-size: 17px; font-weight: 700; }
.ans2-hd span { font-size: 13px; color: var(--gray); }

.abox { background: #fff; border-radius: 14px; padding: 20px 24px; margin-bottom: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.04); position: relative; }
.abox-best { border: 1px solid #b7e6cf; box-shadow: 0 2px 12px rgba(0,168,112,.12); }
.abox-badge { position: absolute; top: -10px; left: 20px; background: var(--green); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 12px; display: inline-flex; align-items: center; gap: 5px; }
.abox-who { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.abox-av { width: 34px; height: 34px; border-radius: 50%; }
.abox-name { font-size: 14px; font-weight: 600; }
.abox-role { font-size: 12px; color: var(--gray); }
.abox-time { margin-left: auto; font-size: 12px; color: var(--gray); }

.atext { font-size: 15.5px; line-height: 1.9; color: #23262a; padding-top: 6px; }
.atext p { margin: 12px 0; }
.atext h2 { font-size: 17px; font-weight: 700; margin: 20px 0 10px; padding-left: 10px; border-left: 3px solid var(--c-main); }
.atext strong { font-weight: 600; color: var(--ink); }
.atext a { color: var(--blue); }
.atext ol { counter-reset: o; margin: 10px 0; }
.atext ol li { position: relative; padding-left: 30px; margin-bottom: 9px; counter-increment: o; }
.atext ol li::before { content: counter(o); position: absolute; left: 0; top: 3px; width: 20px; height: 20px; background: var(--c-main); color: #fff; border-radius: 50%; font-size: 12px; line-height: 20px; text-align: center; }
.atext ul li { position: relative; padding-left: 18px; margin-bottom: 8px; }
.atext ul li::before { content: ""; position: absolute; left: 4px; top: 11px; width: 5px; height: 5px; border-radius: 50%; background: var(--c-main); }
.atext figure { margin: 16px 0; background: var(--soft); border-radius: 10px; padding: 14px; text-align: center; }
.atext figure img { border-radius: 6px; }
.atext figcaption { margin-top: 10px; font-size: 12px; color: var(--gray); }
.atext .tip2 { margin: 14px 0; padding: 12px 16px; background: #f2f7ff; border-left: 3px solid var(--blue); border-radius: 8px; font-size: 14px; color: #2c3238; }
.atext .tip2-w { background: #fff7e8; border-left-color: var(--amber); }
.atext table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 13.5px; }
.atext th, .atext td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; }
.atext th { background: var(--soft); font-weight: 600; }

.abox-act { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.good2 { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 16px; border: 1px solid var(--line); border-radius: 17px; font-size: 13px; color: var(--sub); cursor: pointer; background: #fff; font-family: inherit; }
.good2:hover { border-color: var(--c-main); color: var(--c-main); }
.good2.up b { color: var(--c-main); }
.abox-act .flat2 { font-size: 13px; color: var(--gray); }
.src2 { margin-top: 16px; font-size: 12px; color: var(--gray); }
.src2 a { color: var(--blue); word-break: break-all; }

.sim2 { background: #fff; border-radius: 14px; padding: 20px 24px; margin: 20px 0; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.sim2 b { font-size: 15px; font-weight: 700; }
.sim2 a { display: block; padding: 11px 0; border-bottom: 1px dashed var(--line); font-size: 14px; color: var(--ink-2); }
.sim2 a:last-child { border-bottom: 0; }
.sim2 a:hover { color: var(--c-main); }
.back2 { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0 30px; height: 38px; padding: 0 20px; border-radius: 19px; border: 1px solid var(--line); background: #fff; font-size: 14px; color: var(--ink-2); }
.back2:hover { border-color: var(--c-main); color: var(--c-main); }

@media screen and (max-width: 640px) {
  .qtop-q { font-size: 20px; } .atext { font-size: 15px; }
}
