/* ============================================================
   moments.css — 朋友圈
   ============================================================ */

.moments-page { height: 100%; display: flex; flex-direction: column; background: var(--wx-bg); }

/* 朋友圈头图 */
.moments-hero {
  height: 300px;
  background: linear-gradient(160deg, #7EC8A8, #3A7D5E);
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
}
.moments-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.25), transparent 60%);
}
.moments-hero .mh-camera {
  position: absolute;
  right: 14px;
  top: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  z-index: 3;
}
.moments-hero .mh-camera svg { width: 20px; height: 20px; }
.moments-hero .mh-me {
  position: absolute;
  right: 16px;
  bottom: 14px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  z-index: 3;
}
.moments-hero .mh-me .mh-name { color: #fff; font-size: 18px; font-weight: 600; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); }
.moments-hero .mh-me img {
  width: 66px;
  height: 66px;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  object-fit: cover;
  cursor: pointer;
}

/* 动态列表 */
.moments-feed { flex: 1; overflow-y: auto; background: var(--wx-bg); }
.moment-item { background: var(--wx-card); padding: 14px 16px 10px; position: relative; }
.moment-item + .moment-item::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 0;
  top: 0;
  height: 1px;
  background: var(--wx-line);
  transform: scaleY(0.5);
}
.moment-item .mi-top { display: flex; gap: 12px; }
.moment-item .mi-main { flex: 1; min-width: 0; }
.moment-item .mi-author { font-size: 16px; font-weight: 600; color: var(--wx-link); cursor: pointer; }
.moment-item .mi-text { font-size: 15px; margin-top: 6px; white-space: pre-wrap; word-break: break-word; line-height: 1.55; }
.moment-item .mi-imgs { display: grid; gap: 5px; margin-top: 8px; }
.moment-item .mi-imgs.n1 { grid-template-columns: 1fr; max-width: 300px; }
.moment-item .mi-imgs.n2 { grid-template-columns: 1fr 1fr; }
.moment-item .mi-imgs.n3, .moment-item .mi-imgs.n4, .moment-item .mi-imgs.n6 { grid-template-columns: repeat(3, 1fr); }
.moment-item .mi-imgs.n5 { grid-template-columns: repeat(3, 1fr); }
.moment-item .mi-imgs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; cursor: pointer; background: var(--wx-input-bg); }
.moment-item .mi-imgs.n1 img { max-height: 320px; aspect-ratio: auto; }
.moment-item .mi-foot { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 12px; color: var(--wx-light); }
.moment-item .mi-time { flex: 1; }
.moment-item .mi-ops { display: flex; gap: 14px; }
.moment-item .mi-ops .mo-btn { display: flex; align-items: center; gap: 3px; cursor: pointer; color: var(--wx-sub); }
.moment-item .mi-ops .mo-btn svg { width: 14px; height: 14px; }
.moment-item .mi-ops .mo-btn.liked { color: var(--wx-orange); }
.moment-item .mi-ops .mo-btn.liked svg { fill: var(--wx-orange); }

/* 点赞 + 评论区 */
.moment-box { margin-top: 8px; background: var(--wx-input-bg); border-radius: 6px; padding: 8px 10px; }
.moment-box .mb-likes { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--wx-link); padding-bottom: 6px; }
.moment-box .mb-likes svg { width: 13px; height: 13px; color: var(--wx-orange); flex-shrink: 0; }
.moment-box .mb-likes .mb-names { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.moment-box .mb-comments { border-top: 1px solid var(--wx-line); padding-top: 6px; }
.moment-box .mb-comment { font-size: 14px; line-height: 1.5; margin-bottom: 2px; word-break: break-word; }
.moment-box .mb-comment .mc-name { color: var(--wx-link); font-weight: 500; }

/* 发表动态弹层 */
.post-overlay { position: absolute; inset: 0; background: var(--wx-bg); z-index: 60; display: flex; flex-direction: column; animation: pageIn 0.25s ease; }
.post-overlay .po-body { flex: 1; overflow-y: auto; padding: 14px; }
.post-overlay textarea { width: 100%; min-height: 120px; font-size: 16px; line-height: 1.6; background: transparent; }
.post-overlay .po-imgs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.post-overlay .po-imgs .pi-box { position: relative; aspect-ratio: 1; }
.post-overlay .po-imgs img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.post-overlay .po-imgs .pi-del {
  position: absolute;
  right: -6px;
  top: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
}
.post-overlay .po-add {
  aspect-ratio: 1;
  border: 1px dashed var(--wx-line-deep);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--wx-light);
  font-size: 12px;
  gap: 4px;
  cursor: pointer;
  background: transparent;
}
.post-overlay .po-add svg { width: 24px; height: 24px; }

/* 移动端朋友圈返回按钮 */
.moments-back {
  position: fixed; top: 14px; left: 14px; z-index: 40;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(0,0,0,0.35); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; line-height: 1;
}
