/* ═══ 聊天页 — Figma: 1:5411 "苹果马卡龙明快版" ═══ */

/* ---- 聊天区 ---- */
#viewChat {
  background: linear-gradient(180deg, #fffbf7 0%, #ffffff 100%);
}

/* ---- 消息行 ---- */
.msg-row { display: flex; gap: 8px; align-items: flex-end; margin: 0 20px; }
.msg-row.ai-row { align-self: flex-start; flex-direction: row; }
.msg-row.user-row { align-self: flex-end; flex-direction: row-reverse; }

/* ---- 头像 ---- */
.msg-row .icon {
  width: 30px; height: 30px; border-radius: 50%;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.msg-row.ai-row .icon { background: rgba(234,246,240,0.6); border: 1px solid rgba(255,255,255,0.8); }
.msg-row.user-row .icon { background: rgba(232,217,200,0.5); border: 1px solid rgba(113,87,69,0.1); }

/* ---- 消息体 ---- */
.msg-body { display: flex; flex-direction: column; max-width: 75%; }
.ai-row .msg-body { align-items: flex-start; }
.user-row .msg-body { align-items: flex-end; }

/* ---- 气泡 ---- */
.bubble {
  padding: 11px 16px;
  border-radius: 18px;
  line-height: 1.62; /* 24.38/15 */
  font-family: "WenQuanYi Zen Hei", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px; font-weight: 500;
  letter-spacing: -0.24px;
  word-break: break-word;
}
.bubble.ai {
  background: rgba(234,246,240,0.4); /* #eaf6f066 */
  color: #44403c;
  border: 1px solid rgba(255,255,255,0.5);
  border-bottom-left-radius: 6px;
}
.bubble.user {
  background: #ffffff;
  color: #1c1917;
  border: 1px solid rgba(113,87,69,0.08); /* #71574514 */
  border-bottom-right-radius: 6px;
}

/* ---- 时间戳 ---- */
.msg-time {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 9px; font-weight: 600;
  color: rgba(120,113,108,0.5);
  margin-top: 2px; padding: 0 4px;
}

/* ---- 系统消息 ---- */
.msg-system {
  text-align: center; padding: 8px 0; margin: 0 20px;
  color: var(--text-muted); font-size: 13px;
}

/* ---- 打字指示器 ---- */
.typing-dots { display: flex; gap: 4px; padding: 4px 16px; margin: 0 20px; }
.typing-dots span { width: 8px; height: 8px; background: var(--text-secondary); border-radius: 50%; animation: blink 1.4s infinite; }
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%,60%,100%{opacity:.3;transform:scale(.8)} 30%{opacity:1;transform:scale(1)} }

/* ---- 加载更早 ---- */
.load-more-hint {
  text-align: center; padding: 8px;
  font-size: 12px; color: var(--text-muted);
  cursor: pointer;
}
