/* Chat page overrides */
.chat-app .header {
  position: relative;
}

.back-link {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
}

.back-link:hover {
  color: var(--primary);
}

.section-hint {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: -0.5rem 0 1rem 0;
}

.wechat-display {
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.chat-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.conversation-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.conversation-bar-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 1;
  min-width: 0;
}

.conversation-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.conversation-select {
  flex: 1;
  min-width: 0;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
}

.conversation-select:focus {
  outline: none;
  border-color: var(--accent);
}

.chat-header-row h2 {
  margin: 0;
}

.current-user {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.chat-app .chat-section .messages {
  min-height: 280px;
  max-height: 50vh;
  margin-bottom: 1rem;
}

/* ChatGPT/DeepSeek 风格：内联 typing 指示器，无全屏蒙层 */
.message.typing {
  min-height: 2.5rem;
  display: flex;
  align-items: center;
}

.typing-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typing-bounce 1.4s ease-in-out infinite both;
}

.typing-dots span:nth-child(1) { animation-delay: 0s; }
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

/* 新对话建议卡片 */
.new-conv-suggestion {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
  padding: 14px 16px;
  background: linear-gradient(135deg, #f5f0ff, #ffe9f7);
  border: 1px solid #ddb8f5;
  border-radius: 14px;
  animation: fadeInUp 0.4s ease;
}

.new-conv-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.new-conv-text {
  flex: 1;
}

.new-conv-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #5a2d82;
}

.new-conv-subtitle {
  font-size: 0.8rem;
  color: #7c5295;
  margin-top: 2px;
}

.new-conv-btn {
  flex-shrink: 0;
  padding: 7px 14px;
  background: #7c3aed;
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.2s;
}

.new-conv-btn:hover {
  background: #6d28d9;
}

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