* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', sans-serif;
  background: #f7f7f7;
  color: #333;
  -webkit-font-smoothing: antialiased;
}

/* ===== 朋友圈头部 ===== */
.profile-header {
  position: relative;
  margin-bottom: 8px;
}

.profile-bg {
  height: 180px;
  background: linear-gradient(135deg, #2d5a2d 0%, #5a8f5a 50%, #8fbf8f 100%);
}

.profile-info {
  display: flex;
  align-items: center;
  padding: 0 16px;
  margin-top: -50px;
  position: relative;
  z-index: 2;
  justify-content: flex-end;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 6px;
  border: 3px solid #fff;
  overflow: hidden;
  flex-shrink: 0;
  order: 2;
  margin-left: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-name {
  text-align: right;
  order: 1;
}

.profile-name span {
  display: block;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
  line-height: 1.4;
}

.profile-name .profile-title {
  font-size: 12px;
  opacity: 0.85;
}

#profileName {
  font-size: 18px;
  font-weight: 600;
}

/* ===== 朋友圈信息流 ===== */
.moments-feed {
  padding: 0 12px;
}

.moment-item {
  background: #fff;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.moment-header {
  display: flex;
  align-items: flex-start;
  margin-bottom: 10px;
}

.moment-avatar {
  width: 42px;
  height: 42px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  margin-right: 10px;
}

.moment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.moment-nickname {
  font-size: 14px;
  font-weight: 600;
  color: #576b95;
  margin-bottom: 2px;
}

.moment-time {
  font-size: 11px;
  color: #b2b2b2;
}

.moment-content {
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 10px;
  word-break: break-word;
  white-space: pre-wrap;
}

/* 图片九宫格 */
.moment-images {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
}

.moment-images img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
  background: #f0f0f0;
  cursor: pointer;
}

/* 1张图 */
.moment-images.count-1 {
  grid-template-columns: 1fr;
  max-width: 200px;
}
.moment-images.count-1 img {
  aspect-ratio: auto;
  max-height: 260px;
  object-fit: contain;
  background: #f7f7f7;
}

/* 2张图 */
.moment-images.count-2 {
  grid-template-columns: 1fr 1fr;
  max-width: 240px;
}

/* 3张图 */
.moment-images.count-3 {
  grid-template-columns: 1fr 1fr;
  max-width: 240px;
}
.moment-images.count-3 img:first-child {
  grid-row: span 2;
  aspect-ratio: 0.75;
}

/* 4张图 */
.moment-images.count-4 {
  grid-template-columns: 1fr 1fr;
  max-width: 240px;
}

/* 5-9张图 */
.moment-images.count-5,
.moment-images.count-6,
.moment-images.count-7,
.moment-images.count-8,
.moment-images.count-9 {
  grid-template-columns: 1fr 1fr 1fr;
  max-width: 300px;
}

/* 复制文案按钮 */
.copy-btn {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: #f5f5f5;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  font-size: 12px;
  color: #666;
  cursor: pointer;
  margin-top: 4px;
  transition: all 0.2s;
}

.copy-btn:active {
  background: #e5e5e5;
  transform: scale(0.97);
}

.copy-btn.copied {
  background: #e8f5e9;
  border-color: #66bb6a;
  color: #2e7d32;
}

/* 图片预览蒙层 */
.image-viewer {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.95);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.image-viewer.show {
  display: flex;
}

.image-viewer img {
  max-width: 95%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
}

.image-viewer .close-btn {
  position: absolute;
  top: 44px;
  right: 20px;
  font-size: 28px;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-viewer .hint {
  color: rgba(255,255,255,0.5);
  font-size: 12px;
  margin-top: 12px;
}

/* 加载状态 */
.loading {
  text-align: center;
  padding: 60px 0;
  color: #999;
  font-size: 14px;
}

/* 错误页面 */
.error-page {
  text-align: center;
  padding: 80px 20px;
}

.error-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.error-text {
  font-size: 16px;
  color: #999;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #999;
  font-size: 14px;
}

.empty-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

/* 底部提示 */
.footer-hint {
  text-align: center;
  padding: 20px 0 40px;
  color: #c0c0c0;
  font-size: 12px;
}
