/* ============================================================
   社区页样式
   依赖 css/index.css 中的变量与基础组件
   ============================================================ */

/* ---------- 导航当前页标记 ---------- */
.nav-links a.is-current{
  color:var(--text);
  background:rgba(255,255,255,.08);
  position:relative;
}
.nav-links a.is-current::after{
  content:"";position:absolute;left:50%;bottom:3px;
  width:14px;height:2px;margin-left:-7px;border-radius:2px;
  background:var(--grad);
}

/* ---------- Hero 微调 ---------- */
.cm-hero{padding-bottom:72px}
.cm-hero .sub{margin-bottom:50px}

/* ---------- 讨论流预览 ---------- */
.feed-demo{
  max-width:760px;margin:0 auto;
  border:1px solid var(--line-hi);border-radius:22px;
  overflow:hidden;
  background:
    radial-gradient(ellipse 70% 100% at 0% 0%,rgba(46,230,255,.05),transparent 55%),
    linear-gradient(180deg,rgba(12,16,26,.96),rgba(8,11,19,.96));
  box-shadow:0 30px 80px rgba(0,0,0,.45);
  text-align:left;
}

/* 头部 */
.feed-head{
  display:flex;align-items:center;justify-content:space-between;
  gap:18px;flex-wrap:wrap;
  padding:16px 22px;
  border-bottom:1px solid var(--line);
  background:rgba(255,255,255,.022);
}
.feed-title{
  display:flex;align-items:center;gap:10px;
  font-size:13px;font-weight:620;
  letter-spacing:-.008em;
}
.feed-pulse{
  width:7px;height:7px;border-radius:50%;
  background:#3ddc97;box-shadow:0 0 10px #3ddc97;
  animation:pulse 2.2s ease-in-out infinite;
  flex-shrink:0;
}
.feed-tabs{display:flex;gap:4px}
.feed-tab{
  font-size:12px;color:var(--muted-2);
  padding:5px 12px;border-radius:999px;
  cursor:pointer;
  transition:color .22s,background .22s;
}
.feed-tab:hover{color:var(--muted);background:rgba(255,255,255,.04)}
.feed-tab.active{
  color:var(--text);
  background:rgba(46,230,255,.09);
  border:1px solid rgba(46,230,255,.22);
}

/* 列表 */
.feed-list{display:flex;flex-direction:column}
.feed-item{
  display:flex;gap:16px;align-items:flex-start;
  padding:20px 22px;
  border-bottom:1px solid var(--line);
  transition:background .3s;
}
.feed-item:last-child{border-bottom:none}
.feed-item:hover{background:rgba(255,255,255,.024)}

.fi-avatar{
  flex-shrink:0;
  width:36px;height:36px;border-radius:11px;
  display:flex;align-items:center;justify-content:center;
  font-size:14px;font-weight:680;
  color:#04060c;
  background:var(--av);
  box-shadow:0 4px 14px rgba(0,0,0,.3);
}
.fi-body{flex:1;min-width:0}
.fi-top{
  display:flex;align-items:center;gap:9px;
  flex-wrap:wrap;margin-bottom:7px;
}
.fi-author{
  font-size:13px;font-weight:640;
  letter-spacing:-.008em;
}
.fi-tag{
  font-size:10.5px;font-weight:650;
  letter-spacing:.06em;
  padding:2px 9px;border-radius:999px;
}
.fi-tag.exp{
  color:var(--c1);
  background:rgba(46,230,255,.09);
  border:1px solid rgba(46,230,255,.22);
}
.fi-tag.ask{
  color:#ffb86b;
  background:rgba(255,183,107,.09);
  border:1px solid rgba(255,183,107,.24);
}
.fi-tag.share{
  color:#b98cff;
  background:rgba(165,107,255,.09);
  border:1px solid rgba(165,107,255,.24);
}
.fi-time{
  font-size:11.5px;color:var(--muted-2);
  margin-left:auto;
  white-space:nowrap;
}
.fi-title{
  font-size:14.5px;font-weight:560;
  line-height:1.55;letter-spacing:-.008em;
  margin-bottom:7px;
  color:#dde4f0;
}
.fi-meta{
  display:flex;align-items:center;gap:9px;
  font-size:11.5px;color:var(--muted-2);
  flex-wrap:wrap;
}
.fi-dot{
  width:3px;height:3px;border-radius:50%;
  background:var(--muted-2);
  flex-shrink:0;
}

/* 底部 */
.feed-foot{
  display:flex;align-items:center;justify-content:space-between;
  gap:14px;flex-wrap:wrap;
  padding:16px 22px;
  border-top:1px solid var(--line);
  font-size:12.5px;color:var(--muted-2);
}
.feed-more{
  color:var(--c1);font-weight:600;
  transition:gap .25s;
}

/* ---------- 讨论分区 ---------- */
.ch-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:16px;
}
.ch-item{
  display:flex;flex-direction:column;
  padding:28px 24px;border-radius:18px;
  border:1px solid var(--line);background:var(--card);
  transition:border-color .34s,background .34s,transform .34s cubic-bezier(.22,1,.36,1);
  position:relative;overflow:hidden;
}
.ch-item::before{
  content:"";position:absolute;top:0;left:0;right:0;height:2px;
  background:var(--grad);
  transform:scaleX(0);transform-origin:left;
  transition:transform .42s cubic-bezier(.22,1,.36,1);
}
.ch-item:hover{
  border-color:var(--line-hi);
  background:var(--card-hi);
  transform:translateY(-4px);
}
.ch-item:hover::before{transform:scaleX(1)}

.ch-icon{
  width:42px;height:42px;border-radius:12px;
  display:flex;align-items:center;justify-content:center;
  background:rgba(46,230,255,.08);
  border:1px solid rgba(46,230,255,.2);
  margin-bottom:20px;
  flex-shrink:0;
}
.ch-icon svg{width:20px;height:20px;stroke:var(--c1)}

.ch-item h3{
  font-size:16px;font-weight:650;
  letter-spacing:-.015em;margin-bottom:10px;
}
.ch-item p{
  font-size:13.5px;color:var(--muted);
  line-height:1.72;flex:1;
}
.ch-meta{
  margin-top:18px;padding-top:14px;
  border-top:1px solid var(--line);
  font-size:11.5px;color:var(--muted-2);
  letter-spacing:.02em;
  font-variant-numeric:tabular-nums;
}

/* 最后一格：指引 */
.ch-item.ch-guide{
  background:
    linear-gradient(160deg,rgba(46,230,255,.06),rgba(165,107,255,.03) 65%,transparent),
    var(--card);
  border-color:rgba(46,230,255,.22);
}
.ch-item.ch-guide:hover{
  border-color:rgba(46,230,255,.42);
}
.ch-item.ch-guide .ch-meta{
  color:var(--c1);font-weight:600;
  letter-spacing:.06em;
}

/* ---------- 经验分享 ---------- */
.share-list{
  display:flex;flex-direction:column;gap:16px;
}
.sh-item{
  padding:30px 32px;border-radius:20px;
  border:1px solid var(--line);background:var(--card);
  transition:border-color .34s,background .34s,transform .34s cubic-bezier(.22,1,.36,1);
}
.sh-item:hover{
  border-color:var(--line-hi);
  background:var(--card-hi);
  transform:translateY(-3px);
}
.sh-head{
  display:flex;align-items:center;gap:14px;
  margin-bottom:16px;flex-wrap:wrap;
}
.sh-tag{
  font-size:11px;font-weight:650;
  letter-spacing:.1em;
  padding:4px 12px;border-radius:999px;
  color:var(--c1);
  background:rgba(46,230,255,.09);
  border:1px solid rgba(46,230,255,.22);
  flex-shrink:0;
}
.sh-tag.alt{
  color:#b98cff;
  background:rgba(165,107,255,.09);
  border-color:rgba(165,107,255,.24);
}
.sh-tag.warn{
  color:#ffb86b;
  background:rgba(255,183,107,.09);
  border-color:rgba(255,183,107,.24);
}
.sh-item h3{
  font-size:17px;font-weight:660;
  letter-spacing:-.018em;
}
.sh-item p{
  font-size:14.5px;color:var(--muted);
  line-height:1.78;
  padding-left:18px;
  border-left:2px solid rgba(46,230,255,.2);
  font-style:normal;
}
.sh-foot{
  display:flex;align-items:center;gap:10px;
  flex-wrap:wrap;
  margin-top:18px;
  padding-top:16px;
  border-top:1px solid var(--line);
  font-size:12px;color:var(--muted-2);
}
.sh-dot{
  width:3px;height:3px;border-radius:50%;
  background:var(--muted-2);flex-shrink:0;
}

/* ---------- 提问对照 ---------- */
.ask-wrap{
  display:grid;grid-template-columns:1fr 1fr;gap:18px;
}
.ask-col{
  padding:32px 30px;border-radius:20px;
  border:1px solid var(--line);
  transition:transform .34s cubic-bezier(.22,1,.36,1),border-color .34s,background .34s;
}
.ask-col:hover{transform:translateY(-4px)}
.ask-col.bad{
  background:linear-gradient(160deg,rgba(255,107,138,.045),rgba(255,255,255,.01));
  border-color:rgba(255,107,138,.2);
}
.ask-col.bad:hover{
  border-color:rgba(255,107,138,.38);
  background:linear-gradient(160deg,rgba(255,107,138,.07),rgba(255,255,255,.016));
}
.ask-col.good{
  background:linear-gradient(160deg,rgba(95,214,168,.045),rgba(255,255,255,.01));
  border-color:rgba(95,214,168,.2);
}
.ask-col.good:hover{
  border-color:rgba(95,214,168,.38);
  background:linear-gradient(160deg,rgba(95,214,168,.07),rgba(255,255,255,.016));
}

.ask-head{
  display:flex;align-items:center;gap:14px;
  padding-bottom:22px;margin-bottom:20px;
  border-bottom:1px solid var(--line);
}
.ask-icon{
  display:flex;align-items:center;justify-content:center;
  width:38px;height:38px;border-radius:11px;flex-shrink:0;
}
.ask-icon svg{width:19px;height:19px}
.ask-col.bad .ask-icon{
  background:rgba(255,107,138,.1);
  border:1px solid rgba(255,107,138,.26);
}
.ask-col.bad .ask-icon svg{stroke:#ff8fa5}
.ask-col.good .ask-icon{
  background:rgba(95,214,168,.1);
  border:1px solid rgba(95,214,168,.26);
}
.ask-col.good .ask-icon svg{stroke:#5fd6a8}

.ask-title{
  font-size:16px;font-weight:660;
  letter-spacing:-.014em;
}
.ask-col.bad .ask-title{color:#ff9eb2}
.ask-col.good .ask-title{color:#7fe0b8}

.ask-list{
  list-style:none;
  display:flex;flex-direction:column;gap:14px;
}
.ask-list li{
  position:relative;
  padding-left:24px;
  font-size:14px;color:var(--muted);
  line-height:1.7;
}
.ask-list li::before{
  content:"";position:absolute;left:0;top:9px;
  width:5px;height:5px;border-radius:50%;flex-shrink:0;
}
.ask-col.bad .ask-list li::before{background:#ff8fa5}
.ask-col.good .ask-list li::before{background:#5fd6a8}

/* ---------- 社区守则 ---------- */
.rules-list{
  display:flex;flex-direction:column;gap:0;
  border:1px solid var(--line);border-radius:20px;
  overflow:hidden;
  background:linear-gradient(180deg,rgba(255,255,255,.04),rgba(255,255,255,.01));
}
.rule-item{
  display:flex;gap:26px;align-items:flex-start;
  padding:28px 32px;
  border-bottom:1px solid var(--line);
  transition:background .3s,padding-left .3s;
}
.rule-item:last-child{border-bottom:none}
.rule-item:hover{
  background:rgba(255,255,255,.026);
  padding-left:38px;
}
.rule-num{
  flex-shrink:0;
  font-size:26px;font-weight:750;
  letter-spacing:-.04em;line-height:1;
  background:var(--grad);
  -webkit-background-clip:text;background-clip:text;
  -webkit-text-fill-color:transparent;
  font-variant-numeric:tabular-nums;
  min-width:48px;
}
.rule-item h3{
  font-size:16.5px;font-weight:660;
  letter-spacing:-.016em;margin-bottom:9px;
}
.rule-item p{
  font-size:14px;color:var(--muted);
  line-height:1.76;max-width:760px;
}

/* ---------- FAQ 折叠 ---------- */
.faq{display:flex;flex-direction:column;gap:12px}
.faq details{
  border:1px solid var(--line);border-radius:16px;
  background:var(--card);overflow:hidden;
  transition:border-color .3s,background .3s;
}
.faq details[open]{
  border-color:rgba(46,230,255,.28);
  background:var(--card-hi);
}
.faq summary{
  list-style:none;cursor:pointer;position:relative;
  padding:20px 56px 20px 24px;
  font-size:15.5px;font-weight:600;
  letter-spacing:-.012em;
  transition:color .24s;
}
.faq summary::-webkit-details-marker{display:none}
.faq summary:hover{color:var(--c1)}
.faq summary::after{
  content:"";position:absolute;right:26px;top:50%;
  width:9px;height:9px;margin-top:-6px;
  border-right:1.8px solid var(--muted);
  border-bottom:1.8px solid var(--muted);
  transform:rotate(45deg);
  transition:transform .3s cubic-bezier(.22,1,.36,1),border-color .3s;
}
.faq details[open] summary::after{
  transform:rotate(-135deg);
  margin-top:-2px;
  border-color:var(--c1);
}
.faq .ans{
  padding:0 24px 22px;
  font-size:14.5px;color:var(--muted);line-height:1.78;
  max-width:820px;
}

/* ---------- 响应式 ---------- */
@media(max-width:1000px){
  .ch-grid{grid-template-columns:repeat(2,1fr)}
  .ask-wrap{grid-template-columns:1fr}
}

@media(max-width:680px){
  .cm-hero{padding-bottom:48px}
  .cm-hero .sub{margin-bottom:36px}

  .feed-head{padding:14px 16px;gap:10px}
  .feed-tabs{width:100%;overflow-x:auto;scrollbar-width:none}
  .feed-tabs::-webkit-scrollbar{display:none}
  .feed-item{padding:16px;gap:13px}
  .fi-avatar{width:32px;height:32px;font-size:13px}
  .fi-time{margin-left:0;width:100%;margin-top:2px}
  .fi-title{font-size:14px}

  .ch-grid{grid-template-columns:1fr}
  .ch-item{padding:24px 22px}

  .sh-item{padding:24px 22px}
  .sh-item p{padding-left:14px}

  .ask-col{padding:24px 22px}

  .rule-item{padding:22px 22px;gap:18px}
  .rule-item:hover{padding-left:26px}
  .rule-num{font-size:22px;min-width:38px}

  .faq summary{padding:18px 50px 18px 20px;font-size:15px}
  .faq .ans{padding:0 20px 20px}
}

@media(prefers-reduced-motion:reduce){
  .feed-pulse{animation:none}
}