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

    body {
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
      background-color: #ededed;
      -webkit-font-smoothing: antialiased;
    }

    #app {
      max-width: 600px;
      margin: 0 auto;
      background-color: #ededed;
      min-height: 100vh;
    }

    /* ========== 顶部封面 ========== */
    .cover-section {
      position: relative;
      width: 100%;
      height: 280px;
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      background-size: cover;
      background-position: center;
    }

    .user-info {
      position: absolute;
      bottom: 15px;
      right: 15px;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    /* ✅ 用户头像：改为圆形 + 白色描边 + 阴影 */
    .user-avatar {
      width: 70px;
      height: 70px;
      border-radius: 50%;
      border: 3px solid white;
      background: white;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 28px;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
      transition: transform 0.2s;
    }

    .user-avatar:hover {
      transform: scale(1.05);
    }

    .user-name {
      color: white;
      font-size: 16px;
      font-weight: 600;
      text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
    }

    /* ========== 相机按钮 ========== */
    .camera-btn {
      position: fixed;
      top: 20px;
      right: 20px;
      width: 44px;
      height: 44px;
      background: rgba(0, 0, 0, 0.4);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      z-index: 100;
      transition: all 0.2s;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }

    .camera-btn:hover {
      background: rgba(0, 0, 0, 0.6);
      transform: scale(1.1);
    }

    .camera-btn svg {
      width: 24px;
      height: 24px;
      fill: white;
    }

    /* ========== 内容区 ========== */
    .content-area {
      padding: 15px 12px;
    }

    /* ========== 朋友圈卡片 ========== */
    .moment-card {
      background: white;
      border-radius: 10px;
      padding: 15px;
      margin-bottom: 12px;
      box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    }

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

    /* ✅ 发帖者头像：圆形 + 描边 + 阴影 */
    .moment-avatar {
      width: 42px;
      height: 42px;
      border-radius: 50%;
      border: 2px solid white;
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      display: flex;
      align-items: center;
      justify-content: center;
      color: white;
      font-size: 18px;
      font-weight: 500;
      box-shadow: 0 2px 8px rgba(102, 126, 234, 0.35);
      flex-shrink: 0;
    }

    .moment-user {
      flex: 1;
    }

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

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

    .moment-content {
      font-size: 16px;
      line-height: 1.6;
      color: #333;
      margin-bottom: 14px;
      word-wrap: break-word;
    }

    /* ========== 评论区：气泡对话框风格 ========== */
    .comment-section {
      background: #f4f4f4;
      border-radius: 8px;
      padding: 10px 12px;
      position: relative;
      margin-top: 4px;
    }

    /* ✅ 气泡三角箭头 */
    .comment-section::before {
      content: '';
      position: absolute;
      top: -8px;
      left: 22px;
      width: 0;
      height: 0;
      border-left: 8px solid transparent;
      border-right: 8px solid transparent;
      border-bottom: 8px solid #f4f4f4;
    }

    /* ✅ 评论条目：带头像的气泡行 */
    .comment-item {
      display: flex;
      align-items: flex-start;
      gap: 8px;
      padding: 8px 50px 8px 0;        /* ✅ 恢复右侧 50px，为按钮预留空间 */
      cursor: default;
      transition: all 0.2s;
      border-bottom: 1px solid rgba(0, 0, 0, 0.04);
      position: relative;
    }

    .comment-item:last-child {
      border-bottom: none;
    }

    .comment-item:hover {
      background: rgba(0, 0, 0, 0.02);  /* ✅ 改为：轻微背景高亮 */
    }

    /* ========== AI 头像样式（核心新增） ========== */
    .ai-avatar {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
      color: white;
      flex-shrink: 0;                  /* ✅ 确保：头像不被挤压 */
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
      transition: transform 0.2s;
    }

    .comment-item:hover .ai-avatar {
      transform: scale(1.1);
    }

    /* ✅ 暖心 - 粉色背景 🐻 */
    .ai-avatar.positive {
      background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
      box-shadow: 0 2px 8px rgba(255, 154, 158, 0.4);
    }

    /* ✅ 毒舌 - 深灰/黑色背景 🐍 */
    .ai-avatar.negative {
      background: linear-gradient(135deg, #434343 0%, #1a1a2e 100%);
      box-shadow: 0 2px 8px rgba(67, 67, 67, 0.4);
    }

    /* ✅ 理智 - 蓝色背景 🧐 */
    .ai-avatar.neutral {
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    }

    /* ========== 评论文字区域：修复版本 ========== */
    .comment-body {
      flex: 1;
      min-width: 0;
      word-wrap: break-word;
      overflow-wrap: break-word;
      word-break: break-word;
    }

/* ========== 评论角色名：确保不换行 ========== */
.comment-role {
  color: #576b95;
  font-weight: 700;
  font-size: 13px;
  margin-right: 6px;
  display: inline;                 /* ✅ 新增：确保与文字同行 */
  white-space: nowrap;             /* ✅ 新增：角色名不换行 */
}

    .comment-text {
      color: #333;
      font-size: 14px;
      line-height: 1.5;
      word-wrap: break-word;
      overflow-wrap: break-word;
      word-break: break-word;
      display: inline;
    }

/* ========== 回复按钮 ========== */
.comment-reply-btn {
  position: absolute;              /* ✅ 保持绝对定位 */
  right: 28px;
  top: 8px;
  background: none;
  border: none;
  color: #999;
  font-size: 12px;
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s;
  padding: 0;
  text-decoration: underline;
  flex-shrink: 0;
  white-space: nowrap;             /* ✅ 新增：按钮文字不换行 */
}

.comment-item:hover .comment-reply-btn {
  opacity: 1;
  color: #576b95;
}

.comment-reply-btn:hover {
  color: #667eea;
}

/* ========== 删除按钮 ========== */
.comment-delete-btn {
  position: absolute;              /* ✅ 保持绝对定位 */
  right: 6px;
  top: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #c0c0c0;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s ease;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  flex-shrink: 0;
}

.comment-item:hover .comment-delete-btn {
  opacity: 1;
}

.comment-delete-btn:hover {
  background: #fee;
  border-color: #fa5151;
  color: #fa5151;
  transform: scale(1.15);
  box-shadow: 0 2px 8px rgba(250, 81, 81, 0.3);
}

.comment-delete-btn:active {
  transform: scale(0.95);
}

/* ========== 回复内容展示（核心修复） ========== */
.comment-reply-content {
  display: block;                  /* ✅ 保持 */
  width: 100%;                     /* ✅ 保持 */
  font-size: 12px;
  color: #999;
  margin-top: 4px;
  padding: 0;
  line-height: 1.5;
  word-wrap: break-word;           /* ✅ 保持 */
  overflow-wrap: break-word;       /* ✅ 保持 */
  word-break: break-word;          /* ✅ 新增：强制换行 */
}

.comment-reply-content strong {
  color: #576b95;
  font-weight: 600;
  font-size: 12px;
}

.comment-reply-content .reply-text {
  color: #333;
}

/* ========== 评论动画 ========== */
.comment-fade-out {
  animation: commentFadeOut 0.4s ease-out forwards;
}

@keyframes commentFadeOut {
  0% {
    opacity: 1;
    transform: translateX(0);
    max-height: 80px;
  }
  60% {
    opacity: 0;
    transform: translateX(-30px);
    max-height: 80px;
  }
  100% {
    opacity: 0;
    transform: translateX(-30px);
    max-height: 0;
    padding: 0;
    margin: 0;
    border: none;
  }
}

.comment-highlight-in {
  animation: commentHighlightIn 1.2s ease-out;
}

@keyframes commentHighlightIn {
  0% {
    background: rgba(255, 200, 100, 0.35);
    transform: scale(0.98);
  }
  50% {
    background: rgba(255, 200, 100, 0.2);
    transform: scale(1);
  }
  100% {
    background: transparent;
    transform: scale(1);
  }
}

    /* ========== 安慰评论（正能量） ========== */
    .comfort-comment {
      display: flex;
      align-items: flex-start;
      gap: 8px;
      padding: 10px 0 4px;
      font-size: 14px;
      line-height: 1.5;
      color: #ff6b35;
      animation: fadeInUp 0.5s ease-out;
      border-top: 1px dashed rgba(255, 107, 53, 0.2);
      margin-top: 4px;
    }

    .comfort-avatar {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      background: linear-gradient(135deg, #ff9a56 0%, #ff6b35 100%);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
      flex-shrink: 0;
      box-shadow: 0 2px 8px rgba(255, 107, 53, 0.35);
      animation: pulse 2s infinite;
    }

    .comfort-body {
      flex: 1;
    }

    .comfort-label {
      font-size: 12px;
      color: #ff6b35;
      font-weight: 600;
      margin-bottom: 2px;
    }

    .comfort-text {
      color: #ff6b35;
      font-size: 14px;
      line-height: 1.5;
    }

    @keyframes pulse {
      0%, 100% { box-shadow: 0 2px 8px rgba(255, 107, 53, 0.35); }
      50% { box-shadow: 0 2px 16px rgba(255, 107, 53, 0.6); }
    }

    @keyframes fadeInUp {
      from {
        opacity: 0;
        transform: translateY(12px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    /* ========== 发布弹窗 ========== */
    .modal-overlay {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.6);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 1000;
      animation: fadeIn 0.2s;
    }

    @keyframes fadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }

    .modal-content {
      background: white;
      border-radius: 14px;
      width: 90%;
      max-width: 400px;
      padding: 24px 20px;
      animation: slideUp 0.3s;
      box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    }

    @keyframes slideUp {
      from {
        opacity: 0;
        transform: translateY(20px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .modal-title {
      font-size: 17px;
      font-weight: 600;
      color: #333;
      margin-bottom: 15px;
      text-align: center;
    }

    .modal-textarea {
      width: 100%;
      min-height: 120px;
      padding: 12px;
      border: 1px solid #e5e5e5;
      border-radius: 10px;
      font-size: 15px;
      resize: vertical;
      font-family: inherit;
      outline: none;
      transition: border-color 0.2s, box-shadow 0.2s;
    }

    .modal-textarea:focus {
      border-color: #576b95;
      box-shadow: 0 0 0 3px rgba(87, 107, 149, 0.1);
    }

    .modal-buttons {
      display: flex;
      gap: 10px;
      margin-top: 15px;
    }

    .modal-btn {
      flex: 1;
      padding: 12px;
      border: none;
      border-radius: 10px;
      font-size: 15px;
      cursor: pointer;
      transition: all 0.2s;
      font-weight: 500;
    }

    .modal-btn-cancel {
      background: #f7f7f7;
      color: #666;
    }

    .modal-btn-cancel:hover {
      background: #e5e5e5;
    }

    .modal-btn-confirm {
      background: #07c160;
      color: white;
    }

    .modal-btn-confirm:hover {
      background: #06ad56;
    }

    .modal-btn-confirm:disabled {
      background: #c0c0c0;
      cursor: not-allowed;
    }

    /* ========== 删除确认弹窗 ========== */
    .delete-modal {
      background: white;
      border-radius: 14px;
      width: 80%;
      max-width: 300px;
      overflow: hidden;
      animation: slideUp 0.3s;
      box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    }

    .delete-modal-content {
      padding: 24px 20px;
      text-align: center;
      font-size: 16px;
      color: #333;
    }

    .delete-modal-buttons {
      border-top: 1px solid #e5e5e5;
      display: flex;
    }

    .delete-modal-btn {
      flex: 1;
      padding: 15px;
      border: none;
      background: white;
      font-size: 16px;
      cursor: pointer;
      transition: background 0.2s;
    }

    .delete-modal-btn:first-child {
      border-right: 1px solid #e5e5e5;
      color: #666;
    }

    .delete-modal-btn:last-child {
      color: #fa5151;
      font-weight: 600;
    }

    .delete-modal-btn:hover {
      background: #f7f7f7;
    }

    /* ========== 加载 & 空状态 ========== */
    .loading {
      text-align: center;
      padding: 40px 20px;
      color: #999;
      font-size: 14px;
    }

    .empty {
      text-align: center;
      padding: 60px 20px;
      color: #999;
      font-size: 15px;
      line-height: 1.8;
    }

    /* ========== Toast 提示 ========== */
    .toast {
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      background: rgba(0, 0, 0, 0.75);
      color: white;
      padding: 14px 24px;
      border-radius: 10px;
      font-size: 14px;
      z-index: 2000;
      animation: fadeIn 0.3s;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    /* ========== 二级嵌套评论：根评论包装器 ========== */
.root-comment-wrapper {
  margin-bottom: 8px;
}

.root-comment-wrapper:last-of-type {
  margin-bottom: 0;
}

/* ========== 二级嵌套评论：回复框容器 ========== */
.replies-box {
  background: #ffffff;
  border-radius: 4px;
  margin-left: 36px;
  margin-top: 4px;
  padding: 8px 10px;
  border-left: 2px solid #e5e5e5;
}

/* ========== 二级嵌套评论：单条回复项 ========== */
.reply-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
  line-height: 1.5;
  position: relative;
  border-bottom: 1px solid rgba(0, 0, 0, 0.02);
}

.reply-item:last-child {
  border-bottom: none;
}

.reply-item:hover {
  background: rgba(0, 0, 0, 0.01);
}

/* ========== 二级嵌套评论：回复内容 ========== */
.reply-content {
  flex: 1;
  min-width: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  padding-right: 60px;
}

/* ========== 二级嵌套评论：回复人名字 ========== */
.reply-name {
  color: #576b95;
  font-weight: 600;
  white-space: nowrap;
}

/* ========== 二级嵌套评论：被回复人提示 ========== */
.reply-to {
  color: #999;
  margin: 0 2px;
}

.reply-to .reply-name {
  color: #576b95;
}

/* ========== 二级嵌套评论：回复文本 ========== */
.reply-text {
  color: #333;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* ========== 二级嵌套评论：回复按钮 ========== */
.reply-action-btn {
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #999;
  font-size: 12px;
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s;
  padding: 0;
  text-decoration: underline;
  white-space: nowrap;
}

.reply-item:hover .reply-action-btn {
  opacity: 1;
  color: #576b95;
}

.reply-action-btn:hover {
  color: #667eea;
}

/* ========== 二级嵌套评论：删除按钮 ========== */
.reply-delete-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #c0c0c0;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s ease;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.reply-item:hover .reply-delete-btn {
  opacity: 1;
}

.reply-delete-btn:hover {
  background: #fee;
  border-color: #fa5151;
  color: #fa5151;
  transform: translateY(-50%) scale(1.15);
  box-shadow: 0 2px 8px rgba(250, 81, 81, 0.3);  /* ✅ 改为：rgba(250, 81, 81, 0.3) */
}

.reply-delete-btn:active {
  transform: translateY(-50%) scale(0.95);
}