/* Chat页面主要样式 */

/* 对话区域专用字体变量定义 */
:root {
  /* Inter - 现代、清晰的无衬线字体，用于UI元素和标题 */
  --font-family-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;

  /* Source Sans Pro - 优秀的可读性字体，用于聊天内容和长文本 */
  --font-family-content: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;

  /* 标题字体 - 使用Inter */
  --font-family-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;

  /* JetBrains Mono - 专业的等宽字体，用于代码显示 */
  --font-family-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Monaco', 'Courier New', monospace;
}

.chat-page {
  height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #f8fafc;
}

/* 侧边栏样式 - 调整为更紧凑的宽度 */
.chat-sidebar {
  background: #ffffff !important;
  border-right: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.chat-sidebar .ant-layout-sider-children {
  background: #ffffff;
  padding: 0;
}

.chat-sidebar .ant-layout-sider-trigger {
  background: #ffffff;
  color: #4b5563;
  border-top: 1px solid #e5e7eb;
}

.chat-sidebar .ant-layout-sider-trigger:hover {
  background: #f3f4f6;
}

/* 折叠状态样式 */
.chat-sidebar.ant-layout-sider-collapsed {
  background: #ffffff !important;
}

.chat-sidebar.ant-layout-sider-collapsed .ant-layout-sider-children {
  background: #ffffff;
  padding: 0;
}

/* 折叠状态图标容器 */
.sidebar-collapsed-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  padding: 12px 0;
  gap: 12px;
}

/* 折叠状态按钮样式 */
.sidebar-collapsed-btn {
  width: 32px !important;
  height: 32px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
  transition: all 0.2s ease !important;
}

.sidebar-collapsed-btn:hover {
  transform: scale(1.05);
}

.sidebar-collapsed-btn.ant-btn-primary {
  background: #1677ff;
  border-color: #1677ff;
}

.sidebar-collapsed-btn.ant-btn-text {
  color: #6b7280;
  background: transparent;
}

.sidebar-collapsed-btn.ant-btn-text:hover {
  background: #f3f4f6 !important;
  color: #374151 !important;
}

/* 用户信息区域 */
.user-info-section {
  padding: 16px;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
}

.user-avatar-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-details {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-weight: 500;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-email {
  font-size: 12px;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 用户信息区域 - 底部样式 */
.user-info-section-bottom {
  padding: 8px 12px 12px 12px;
  background: #ffffff;
  border-top: 1px solid #f0f0f0;
}

.user-info-section-bottom .ant-divider {
  margin: 8px 0 !important;
}

.user-info-section-bottom .user-avatar-container {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
  position: relative;
}

.user-info-section-bottom .user-avatar-container:hover {
  background-color: #f5f5f5 !important;
}

.user-info-section-bottom .user-details {
  flex: 1;
  min-width: 0;
}

.user-info-section-bottom .user-name {
  font-weight: 500;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
}

.user-info-section-bottom .user-email {
  font-size: 12px;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* 新建对话按钮区域 */
.new-chat-section {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
}

.new-chat-section .ant-btn {
  height: 36px;
  font-size: 14px;
}

/* 聊天历史区域 */
.chat-history-section {
  flex: 1;
  overflow: hidden;
  background: #ffffff;
}

.chat-history-header {
  padding: 8px 12px;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
}

.chat-history-list {
  height: 100%;
  overflow-y: auto;
}

/* 分组样式 */
.chat-history-group {
  margin-bottom: 2px;
}

.chat-history-group-title {
  padding: 8px 12px 4px 12px;
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid #f0f0f0;
}

.chat-history-group-title .ant-typography {
  color: #6b7280 !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  margin: 0 !important;
  line-height: 1.2 !important;
}

.chat-history-group-content {
  background: #ffffff;
}

/* 分组之间的分隔 */
.chat-history-group:not(:last-child) .chat-history-group-content::after {
  content: '';
  display: block;
  height: 1px;
  background: #f3f4f6;
  margin: 8px 0;
}

/* 置顶分组特殊样式 */
.chat-history-group:has(.chat-history-item.pinned) .chat-history-group-title {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-bottom: 1px solid #bae6fd;
}

.chat-history-group:has(.chat-history-item.pinned) .chat-history-group-title .ant-typography {
  color: #0369a1 !important;
  font-weight: 700 !important;
}

/* 聊天历史项样式 */
.chat-history-item {
  cursor: pointer;
  border: none !important;
  transition: all 0.2s ease;
  margin: 0;
  border-radius: 0;
  position: relative;
  min-height: 60px;
}

.chat-history-item:hover {
  background-color: #f9fafb !important;
}

.chat-history-item.active {
  background-color: #eff6ff !important;
  border-right: 3px solid #3b82f6 !important;
}

/* 置顶样式 */
.chat-history-item.pinned {
  background-color: #f0f9ff !important;
  border-left: 3px solid #3b82f6 !important;
}

.chat-history-item.pinned:hover {
  background-color: #e0f2fe !important;
}

.chat-history-item.pinned.active {
  background-color: #dbeafe !important;
  border-right: 3px solid #3b82f6 !important;
  border-left: 3px solid #3b82f6 !important;
}

.chat-history-content {
  width: 100%;
  padding: 8px 12px;
}

.chat-history-icon {
  color: #9ca3af;
  margin-top: 2px;
  flex-shrink: 0;
  font-size: 14px;
}

.chat-item-details {
  flex: 1;
  min-width: 0;
}

.chat-item-title {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 3px;
}

.chat-item-title {
  font-weight: 500;
  font-size: 14px;
  color: #111827;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

/* 三个点按钮样式 */
.chat-item-actions {
  opacity: 0;
  transition: opacity 0.2s ease;
  margin-left: 8px;
  flex-shrink: 0;
}

.chat-history-item:hover .chat-item-actions {
  opacity: 1;
}

.chat-item-more-btn {
  padding: 2px 6px !important;
  height: auto !important;
  min-height: 24px;
  color: #6b7280 !important;
}

.chat-item-more-btn:hover {
  background-color: #e5e7eb !important;
  color: #374151 !important;
}

.chat-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 2px;
}

/* 用户信息区域紧凑化 */
.user-info-section-bottom .user-details .user-name {
  font-weight: 500;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  line-height: 1.2;
}

.user-info-section-bottom .user-details .user-email {
  font-size: 11px;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
  line-height: 1.2;
}

/* 新建对话按钮区域 */
.new-chat-section {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
}

.new-chat-section .ant-btn {
  height: 36px;
  font-size: 14px;
}

/* 聊天历史区域 */
.chat-history-section {
  flex: 1;
  overflow: hidden;
  background: #ffffff;
}

.chat-history-header {
  padding: 8px 12px;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
}

.chat-history-list {
  height: 100%;
  overflow-y: auto;
}

/* 分组样式 */
.chat-history-group {
  margin-bottom: 2px;
}

.chat-history-group-title {
  padding: 8px 12px 4px 12px;
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid #f0f0f0;
}

.chat-history-group-title .ant-typography {
  color: #6b7280 !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  margin: 0 !important;
  line-height: 1.2 !important;
}

.chat-history-group-content {
  background: #ffffff;
}

/* 分组之间的分隔 */
.chat-history-group:not(:last-child) .chat-history-group-content::after {
  content: '';
  display: block;
  height: 1px;
  background: #f3f4f6;
  margin: 8px 0;
}

/* 置顶分组特殊样式 */
.chat-history-group:has(.chat-history-item.pinned) .chat-history-group-title {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-bottom: 1px solid #bae6fd;
}

.chat-history-group:has(.chat-history-item.pinned) .chat-history-group-title .ant-typography {
  color: #0369a1 !important;
  font-weight: 700 !important;
}

/* 聊天历史项样式 */
.chat-history-item {
  cursor: pointer;
  border: none !important;
  transition: all 0.2s ease;
  margin: 0;
  border-radius: 0;
  position: relative;
  min-height: 60px;
}

.chat-history-item:hover {
  background-color: #f9fafb !important;
}

.chat-history-item.active {
  background-color: #eff6ff !important;
  border-right: 3px solid #3b82f6 !important;
}

/* 置顶样式 */
.chat-history-item.pinned {
  background-color: #f0f9ff !important;
  border-left: 3px solid #3b82f6 !important;
}

.chat-history-item.pinned:hover {
  background-color: #e0f2fe !important;
}

.chat-history-item.pinned.active {
  background-color: #dbeafe !important;
  border-right: 3px solid #3b82f6 !important;
  border-left: 3px solid #3b82f6 !important;
}

.chat-history-content {
  width: 100%;
  padding: 8px 12px;
}

.chat-history-icon {
  color: #9ca3af;
  margin-top: 2px;
  flex-shrink: 0;
  font-size: 14px;
}

.chat-item-details {
  flex: 1;
  min-width: 0;
}

.chat-item-title {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 3px;
}

.chat-item-title {
  font-weight: 500;
  font-size: 14px;
  color: #111827;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

/* 三个点按钮样式 */
.chat-item-actions {
  opacity: 0;
  transition: opacity 0.2s ease;
  margin-left: 8px;
  flex-shrink: 0;
}

.chat-history-item:hover .chat-item-actions {
  opacity: 1;
}

.chat-item-more-btn {
  padding: 2px 6px !important;
  height: auto !important;
  min-height: 24px;
  color: #6b7280 !important;
}

.chat-item-more-btn:hover {
  background-color: #e5e7eb !important;
  color: #374151 !important;
}

.chat-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 2px;
}

/* 用户信息区域紧凑化 */
.user-info-section-bottom .user-details .user-name {
  font-weight: 500;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  line-height: 1.2;
}

.user-info-section-bottom .user-details .user-email {
  font-size: 11px;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
  line-height: 1.2;
}

/* 新建对话按钮区域 */
.new-chat-section {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
}

.new-chat-section .ant-btn {
  height: 36px;
  font-size: 14px;
}

/* 聊天历史区域 */
.chat-history-section {
  flex: 1;
  overflow: hidden;
  background: #ffffff;
}

.chat-history-header {
  padding: 8px 12px;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
}

.chat-history-list {
  height: 100%;
  overflow-y: auto;
}

/* 分组样式 */
.chat-history-group {
  margin-bottom: 2px;
}

.chat-history-group-title {
  padding: 8px 12px 4px 12px;
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid #f0f0f0;
}

.chat-history-group-title .ant-typography {
  color: #6b7280 !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  margin: 0 !important;
  line-height: 1.2 !important;
}

.chat-history-group-content {
  background: #ffffff;
}

/* 分组之间的分隔 */
.chat-history-group:not(:last-child) .chat-history-group-content::after {
  content: '';
  display: block;
  height: 1px;
  background: #f3f4f6;
  margin: 8px 0;
}

/* 置顶分组特殊样式 */
.chat-history-group:has(.chat-history-item.pinned) .chat-history-group-title {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-bottom: 1px solid #bae6fd;
}

.chat-history-group:has(.chat-history-item.pinned) .chat-history-group-title .ant-typography {
  color: #0369a1 !important;
  font-weight: 700 !important;
}

/* 聊天历史项样式 */
.chat-history-item {
  cursor: pointer;
  border: none !important;
  transition: all 0.2s ease;
  margin: 0;
  border-radius: 0;
  position: relative;
  min-height: 60px;
}

.chat-history-item:hover {
  background-color: #f9fafb !important;
}

.chat-history-item.active {
  background-color: #eff6ff !important;
  border-right: 3px solid #3b82f6 !important;
}

/* 置顶样式 */
.chat-history-item.pinned {
  background-color: #f0f9ff !important;
  border-left: 3px solid #3b82f6 !important;
}

.chat-history-item.pinned:hover {
  background-color: #e0f2fe !important;
}

.chat-history-item.pinned.active {
  background-color: #dbeafe !important;
  border-right: 3px solid #3b82f6 !important;
  border-left: 3px solid #3b82f6 !important;
}

.chat-history-content {
  width: 100%;
  padding: 8px 12px;
}

.chat-history-icon {
  color: #9ca3af;
  margin-top: 2px;
  flex-shrink: 0;
  font-size: 14px;
}

.chat-item-details {
  flex: 1;
  min-width: 0;
}

.chat-item-title {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 3px;
}

.chat-item-title {
  font-weight: 500;
  font-size: 14px;
  color: #111827;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

/* 三个点按钮样式 */
.chat-item-actions {
  opacity: 0;
  transition: opacity 0.2s ease;
  margin-left: 8px;
  flex-shrink: 0;
}

.chat-history-item:hover .chat-item-actions {
  opacity: 1;
}

.chat-item-more-btn {
  padding: 2px 6px !important;
  height: auto !important;
  min-height: 24px;
  color: #6b7280 !important;
}

.chat-item-more-btn:hover {
  background-color: #e5e7eb !important;
  color: #374151 !important;
}

.chat-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 2px;
}

/* 用户信息区域紧凑化 */
.user-info-section-bottom .user-details .user-name {
  font-weight: 500;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  line-height: 1.2;
}

.user-info-section-bottom .user-details .user-email {
  font-size: 11px;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
  line-height: 1.2;
}

/* 新建对话按钮区域 */
.new-chat-section {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
}

.new-chat-section .ant-btn {
  height: 36px;
  font-size: 14px;
}

/* 聊天历史区域 */
.chat-history-section {
  flex: 1;
  overflow: hidden;
  background: #ffffff;
}

.chat-history-header {
  padding: 8px 12px;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
}

.chat-history-list {
  height: 100%;
  overflow-y: auto;
}

/* 分组样式 */
.chat-history-group {
  margin-bottom: 2px;
}

.chat-history-group-title {
  padding: 8px 12px 4px 12px;
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid #f0f0f0;
}

.chat-history-group-title .ant-typography {
  color: #6b7280 !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  margin: 0 !important;
  line-height: 1.2 !important;
}

.chat-history-group-content {
  background: #ffffff;
}

/* 分组之间的分隔 */
.chat-history-group:not(:last-child) .chat-history-group-content::after {
  content: '';
  display: block;
  height: 1px;
  background: #f3f4f6;
  margin: 8px 0;
}

/* 置顶分组特殊样式 */
.chat-history-group:has(.chat-history-item.pinned) .chat-history-group-title {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-bottom: 1px solid #bae6fd;
}

.chat-history-group:has(.chat-history-item.pinned) .chat-history-group-title .ant-typography {
  color: #0369a1 !important;
  font-weight: 700 !important;
}

/* 聊天历史项样式 */
.chat-history-item {
  cursor: pointer;
  border: none !important;
  transition: all 0.2s ease;
  margin: 0;
  border-radius: 0;
  position: relative;
  min-height: 60px;
}

.chat-history-item:hover {
  background-color: #f9fafb !important;
}

.chat-history-item.active {
  background-color: #eff6ff !important;
  border-right: 3px solid #3b82f6 !important;
}

/* 置顶样式 */
.chat-history-item.pinned {
  background-color: #f0f9ff !important;
  border-left: 3px solid #3b82f6 !important;
}

.chat-history-item.pinned:hover {
  background-color: #e0f2fe !important;
}

.chat-history-item.pinned.active {
  background-color: #dbeafe !important;
  border-right: 3px solid #3b82f6 !important;
  border-left: 3px solid #3b82f6 !important;
}

.chat-history-content {
  width: 100%;
  padding: 8px 12px;
}

.chat-history-icon {
  color: #9ca3af;
  margin-top: 2px;
  flex-shrink: 0;
  font-size: 14px;
}

.chat-item-details {
  flex: 1;
  min-width: 0;
}

.chat-item-title {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 3px;
}

.chat-item-title {
  font-weight: 500;
  font-size: 14px;
  color: #111827;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

/* 三个点按钮样式 */
.chat-item-actions {
  opacity: 0;
  transition: opacity 0.2s ease;
  margin-left: 8px;
  flex-shrink: 0;
}

.chat-history-item:hover .chat-item-actions {
  opacity: 1;
}

.chat-item-more-btn {
  padding: 2px 6px !important;
  height: auto !important;
  min-height: 24px;
  color: #6b7280 !important;
}

.chat-item-more-btn:hover {
  background-color: #e5e7eb !important;
  color: #374151 !important;
}

.chat-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 2px;
}

/* 用户信息区域紧凑化 */
.user-info-section-bottom .user-details .user-name {
  font-weight: 500;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  line-height: 1.2;
}

.user-info-section-bottom .user-details .user-email {
  font-size: 11px;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
  line-height: 1.2;
}

/* 新建对话按钮区域 */
.new-chat-section {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
}

.new-chat-section .ant-btn {
  height: 36px;
  font-size: 14px;
}

/* 聊天历史区域 */
.chat-history-section {
  flex: 1;
  overflow: hidden;
  background: #ffffff;
}

.chat-history-header {
  padding: 8px 12px;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
}

.chat-history-list {
  height: 100%;
  overflow-y: auto;
}

/* 分组样式 */
.chat-history-group {
  margin-bottom: 2px;
}

.chat-history-group-title {
  padding: 8px 12px 4px 12px;
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid #f0f0f0;
}

.chat-history-group-title .ant-typography {
  color: #6b7280 !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  margin: 0 !important;
  line-height: 1.2 !important;
}

.chat-history-group-content {
  background: #ffffff;
}

/* 分组之间的分隔 */
.chat-history-group:not(:last-child) .chat-history-group-content::after {
  content: '';
  display: block;
  height: 1px;
  background: #f3f4f6;
  margin: 8px 0;
}

/* 置顶分组特殊样式 */
.chat-history-group:has(.chat-history-item.pinned) .chat-history-group-title {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-bottom: 1px solid #bae6fd;
}

.chat-history-group:has(.chat-history-item.pinned) .chat-history-group-title .ant-typography {
  color: #0369a1 !important;
  font-weight: 700 !important;
}

/* 聊天历史项样式 */
.chat-history-item {
  cursor: pointer;
  border: none !important;
  transition: all 0.2s ease;
  margin: 0;
  border-radius: 0;
  position: relative;
  min-height: 60px;
}

.chat-history-item:hover {
  background-color: #f9fafb !important;
}

.chat-history-item.active {
  background-color: #eff6ff !important;
  border-right: 3px solid #3b82f6 !important;
}

/* 置顶样式 */
.chat-history-item.pinned {
  background-color: #f0f9ff !important;
  border-left: 3px solid #3b82f6 !important;
}

.chat-history-item.pinned:hover {
  background-color: #e0f2fe !important;
}

.chat-history-item.pinned.active {
  background-color: #dbeafe !important;
  border-right: 3px solid #3b82f6 !important;
  border-left: 3px solid #3b82f6 !important;
}

.chat-history-content {
  width: 100%;
  padding: 8px 12px;
}

.chat-history-icon {
  color: #9ca3af;
  margin-top: 2px;
  flex-shrink: 0;
  font-size: 14px;
}

.chat-item-details {
  flex: 1;
  min-width: 0;
}

.chat-item-title {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 3px;
}

.chat-item-title {
  font-weight: 500;
  font-size: 14px;
  color: #111827;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

/* 三个点按钮样式 */
.chat-item-actions {
  opacity: 0;
  transition: opacity 0.2s ease;
  margin-left: 8px;
  flex-shrink: 0;
}

.chat-history-item:hover .chat-item-actions {
  opacity: 1;
}

.chat-item-more-btn {
  padding: 2px 6px !important;
  height: auto !important;
  min-height: 24px;
  color: #6b7280 !important;
}

.chat-item-more-btn:hover {
  background-color: #e5e7eb !important;
  color: #374151 !important;
}

.chat-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 2px;
}

/* 用户信息区域紧凑化 */
.user-info-section-bottom .user-details .user-name {
  font-weight: 500;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  line-height: 1.2;
}

.user-info-section-bottom .user-details .user-email {
  font-size: 11px;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
  line-height: 1.2;
}

/* 新建对话按钮区域 */
.new-chat-section {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
}

.new-chat-section .ant-btn {
  height: 36px;
  font-size: 14px;
}

/* 聊天历史区域 */
.chat-history-section {
  flex: 1;
  overflow: hidden;
  background: #ffffff;
}

.chat-history-header {
  padding: 8px 12px;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
}

.chat-history-list {
  height: 100%;
  overflow-y: auto;
}

/* 分组样式 */
.chat-history-group {
  margin-bottom: 2px;
}

.chat-history-group-title {
  padding: 8px 12px 4px 12px;
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid #f0f0f0;
}

.chat-history-group-title .ant-typography {
  color: #6b7280 !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  margin: 0 !important;
  line-height: 1.2 !important;
}

.chat-history-group-content {
  background: #ffffff;
}

/* 分组之间的分隔 */
.chat-history-group:not(:last-child) .chat-history-group-content::after {
  content: '';
  display: block;
  height: 1px;
  background: #f3f4f6;
  margin: 8px 0;
}

/* 置顶分组特殊样式 */
.chat-history-group:has(.chat-history-item.pinned) .chat-history-group-title {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-bottom: 1px solid #bae6fd;
}

.chat-history-group:has(.chat-history-item.pinned) .chat-history-group-title .ant-typography {
  color: #0369a1 !important;
  font-weight: 700 !important;
}

/* 聊天历史项样式 */
.chat-history-item {
  cursor: pointer;
  border: none !important;
  transition: all 0.2s ease;
  margin: 0;
  border-radius: 0;
  position: relative;
  min-height: 60px;
}

.chat-history-item:hover {
  background-color: #f9fafb !important;
}

.chat-history-item.active {
  background-color: #eff6ff !important;
  border-right: 3px solid #3b82f6 !important;
}

/* 置顶样式 */
.chat-history-item.pinned {
  background-color: #f0f9ff !important;
  border-left: 3px solid #3b82f6 !important;
}

.chat-history-item.pinned:hover {
  background-color: #e0f2fe !important;
}

.chat-history-item.pinned.active {
  background-color: #dbeafe !important;
  border-right: 3px solid #3b82f6 !important;
  border-left: 3px solid #3b82f6 !important;
}

.chat-history-content {
  width: 100%;
  padding: 8px 12px;
}

.chat-history-icon {
  color: #9ca3af;
  margin-top: 2px;
  flex-shrink: 0;
  font-size: 14px;
}

.chat-item-details {
  flex: 1;
  min-width: 0;
}

.chat-item-title {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 3px;
}

.chat-item-title {
  font-weight: 500;
  font-size: 14px;
  color: #111827;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

/* 三个点按钮样式 */
.chat-item-actions {
  opacity: 0;
  transition: opacity 0.2s ease;
  margin-left: 8px;
  flex-shrink: 0;
}

.chat-history-item:hover .chat-item-actions {
  opacity: 1;
}

.chat-item-more-btn {
  padding: 2px 6px !important;
  height: auto !important;
  min-height: 24px;
  color: #6b7280 !important;
}

.chat-item-more-btn:hover {
  background-color: #e5e7eb !important;
  color: #374151 !important;
}

.chat-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 2px;
}

/* 主内容区域 */
.chat-main-content {
  display: flex;
  flex-direction: column;
  background: #ffffff;
}

/* 顶部工具栏 */
.chat-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.chat-toolbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.chat-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-title {
  margin: 0 !important;
  color: #111827;
  font-size: 18px;
  font-weight: 600;
}

/* 对话区域 */
.chat-conversation-area {
  flex: 1;
  overflow: hidden;
  display: flex;
}

.chat-messages-container {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.chat-messages-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  background: #f8fafc;
}

.chat-messages-content {
  max-width: 1024px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 消息气泡样式 */
.message-bubble-container {
  display: flex;
}

.message-bubble-container.user {
  justify-content: flex-end;
}

.message-bubble-container.assistant {
  justify-content: flex-start;
}

.message-bubble-wrapper {
  max-width: 80%;
}

.message-bubble {
  position: relative;
}

.message-bubble .ant-bubble {
  margin-bottom: 8px;
}

.message-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding: 0 12px;
}

.message-time {
  font-size: 12px;
  color: #6b7280;
}

.message-actions {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.message-bubble:hover .message-actions {
  opacity: 1;
}

/* 对话区域布局 */
.chat-conversation-area {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* 空状态 - 输入框居中 */
.chat-empty-state {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  padding: 40px 20px;
}

.chat-input-centered {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

/* 品牌标识样式 */
.chat-brand-header {
  text-align: center;
  margin-bottom: 48px;
  animation: brandFadeIn 0.6s ease-out;
}

.brand-icon {
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
}

.brain-icon {
  width: 64px;
  height: 64px;
  font-size: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
  position: relative;
  overflow: hidden;
}

.brain-icon::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: rotate(45deg);
  animation: shimmer 2s infinite;
}

.brand-title {
  font-size: 32px;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
  font-family: var(--font-family-heading);
  letter-spacing: -0.02em;
}

@keyframes brandFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%) rotate(45deg);
  }

  100% {
    transform: translateX(100%) rotate(45deg);
  }
}

/* 有消息时的布局 */
.chat-messages-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.chat-messages-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.chat-messages-content {
  max-width: 1024px;
  margin: 0 auto;
}

/* 输入区域 */
.chat-input-area {
  border-top: 1px solid #e5e7eb;
  background: #f8fafc;
  padding: 24px;
  position: relative;
  flex-shrink: 0;
}

.chat-input-container {
  max-width: 1024px;
  margin: 0 auto;
  position: relative;
}

/* 主要的交互容器 - 带弧度的长方体 */
.chat-interaction-panel {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);
  border: 1px solid #e5e7eb;
  padding: 20px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.chat-interaction-panel:hover {
  box-shadow: 0 6px 32px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.06);
  border-color: #d1d5db;
}

.chat-interaction-panel:focus-within {
  box-shadow: 0 6px 32px rgba(59, 130, 246, 0.12), 0 4px 12px rgba(59, 130, 246, 0.08);
  border-color: #3b82f6;
}

/* 输入区域样式 */
.chat-input-section {
  margin-bottom: 16px;
}

/* 控制面板区域 */
.chat-controls-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* 左侧工具组 */
.chat-tools-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* 文件上传样式 */
.chat-attachment-upload {
  display: flex;
  align-items: center;
}

.chat-attachment-btn {
  background: #f3f4f6 !important;
  border-color: #e5e7eb !important;
  color: #6b7280 !important;
  border-radius: 50% !important;
  width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease !important;
}

.chat-attachment-btn:hover {
  background: #e5e7eb !important;
  border-color: #d1d5db !important;
  color: #374151 !important;
  transform: translateY(-1px);
}

/* 思考模式样式 */
.chat-thinking-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 12px;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.chat-thinking-toggle:hover {
  background: #f1f5f9;
  border-color: #d1d5db;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.chat-thinking-toggle.active {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 50%, #fbbf24 100%);
  border-color: #f59e0b;
  color: #92400e;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}

.chat-thinking-toggle.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.8) 0%, transparent 50%);
  pointer-events: none;
  animation: lightGlow 2s ease-in-out infinite alternate;
}

@keyframes lightGlow {
  0% {
    opacity: 0.5;
  }

  100% {
    opacity: 0.8;
  }
}

.chat-thinking-icon {
  color: inherit;
  font-size: 16px;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.chat-thinking-toggle:hover .chat-thinking-icon {
  transform: scale(1.1);
}

.chat-thinking-toggle.active .chat-thinking-icon {
  color: #d97706;
  text-shadow: 0 0 8px rgba(217, 119, 6, 0.6);
  animation: bulbPulse 1.5s ease-in-out infinite alternate;
}

@keyframes bulbPulse {
  0% {
    text-shadow: 0 0 8px rgba(217, 119, 6, 0.6);
    transform: scale(1.05);
  }

  100% {
    text-shadow: 0 0 12px rgba(217, 119, 6, 0.9), 0 0 16px rgba(245, 158, 11, 0.4);
    transform: scale(1.1);
  }
}

.chat-thinking-text {
  font-size: 13px;
  font-weight: 600;
  color: inherit;
  margin: 0;
  user-select: none;
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}

.chat-thinking-toggle.active .chat-thinking-text {
  color: #92400e;
  text-shadow: 0 1px 2px rgba(146, 64, 14, 0.3);
}

/* 右侧控制组 */
.chat-action-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 模型选择器样式 */
.chat-model-selector {
  min-width: 160px;
}

.chat-model-selector .ant-select {
  border-radius: 8px !important;
  height: 36px !important;
}

.chat-model-selector .ant-select-selector {
  border-color: #e5e7eb !important;
  background: #f8fafc !important;
  transition: all 0.2s ease !important;
}

.chat-model-selector .ant-select-selector:hover {
  border-color: #d1d5db !important;
  background: #f1f5f9 !important;
}

.chat-model-selector .ant-select-focused .ant-select-selector {
  border-color: #3b82f6 !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1) !important;
}

/* 发送按钮样式 */
.chat-send-button {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
  border: none !important;
  border-radius: 8px !important;
  height: 36px !important;
  padding: 0 20px !important;
  font-weight: 500 !important;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2) !important;
  transition: all 0.2s ease !important;
}

.chat-send-button:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3) !important;
}

.chat-send-button:active {
  transform: translateY(0) !important;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2) !important;
}

.chat-send-button:disabled {
  background: #e5e7eb !important;
  color: #9ca3af !important;
  transform: none !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
}

/* 输入框增强样式 */
.chat-input-enhanced {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 8px !important;
}

.chat-input-enhanced .ant-input {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 12px 16px !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  min-height: 44px !important;
}

.chat-input-enhanced .ant-input:focus {
  box-shadow: none !important;
  border-color: transparent !important;
}

.chat-input-enhanced .ant-input::placeholder {
  color: #9ca3af !important;
  font-size: 14px !important;
}

/* 工具提示样式 */
.chat-tool-tooltip {
  font-size: 12px;
  max-width: 200px;
}

/* 动画效果 */
.chat-empty-state {
  animation: fadeIn 0.3s ease-in-out;
}

.chat-input-centered .chat-interaction-panel {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
}

/* 响应式设计优化 */
@media (max-width: 768px) {
  .chat-empty-state {
    padding: 20px 16px;
  }

  .chat-input-centered {
    max-width: 100%;
  }

  .chat-messages-scroll {
    padding: 16px;
  }

  .chat-input-area {
    padding: 16px;
  }

  .chat-brand-header {
    margin-bottom: 32px;
  }

  .brain-icon {
    width: 56px;
    height: 56px;
    font-size: 40px;
  }

  .brand-title {
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  .chat-empty-state {
    padding: 16px 12px;
  }

  .chat-brand-header {
    margin-bottom: 24px;
  }

  .brain-icon {
    width: 48px;
    height: 48px;
    font-size: 32px;
  }

  .brand-title {
    font-size: 24px;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 覆盖 Ant Design 的一些默认样式 */
.chat-page .ant-layout-sider {
  background: #ffffff !important;
}

.chat-page .ant-layout-sider-light {
  background: #ffffff !important;
}

.chat-page .ant-layout-sider-light .ant-layout-sider-trigger {
  color: #4b5563;
  background: #ffffff;
}

.chat-page .ant-layout-content {
  background: #ffffff;
}

.chat-page .ant-typography {
  margin-bottom: 0;
}

/* 滚动条样式 */
.chat-history-list::-webkit-scrollbar,
.chat-messages-scroll::-webkit-scrollbar {
  width: 6px;
}

.chat-history-list::-webkit-scrollbar-track,
.chat-messages-scroll::-webkit-scrollbar-track {
  background: #f1f5f9;
}

.chat-history-list::-webkit-scrollbar-thumb,
.chat-messages-scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.chat-history-list::-webkit-scrollbar-thumb:hover,
.chat-messages-scroll::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* 用户菜单样式优化 */
.ant-dropdown-menu .ant-dropdown-menu-item:first-child {
  padding: 12px 16px !important;
  cursor: default !important;
}

.ant-dropdown-menu .ant-dropdown-menu-item:first-child:hover {
  background: transparent !important;
}

/* 折叠状态整体布局 */
.sidebar-collapsed-layout {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  padding: 16px 0;
}

.sidebar-collapsed-functions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  flex: 1;
  justify-content: flex-start;
  padding-top: 8px;
}

.sidebar-collapsed-user {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 8px;
}

/* 折叠状态用户头像样式 */
.sidebar-collapsed-avatar {
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.sidebar-collapsed-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 紧凑布局优化 */
.chat-sidebar .ant-layout-sider-children {
  background: #ffffff;
  padding: 0;
}

/* 空状态样式 */
.chat-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  text-align: center;
}

.chat-empty-icon {
  font-size: 24px;
  color: #d1d5db;
  margin-bottom: 8px;
}

.chat-empty-text {
  font-size: 13px;
  color: #9ca3af;
}

/* 流式输出组件样式 */
.streaming-bubble-container {
  margin-bottom: 16px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.streaming-bubble-container.fade-in {
  opacity: 1;
  transform: translateY(0);
}

.streaming-bubble-wrapper {
  display: flex;
  width: 100%;
  justify-content: flex-start;
}

.streaming-bubble-content {
  display: flex;
  max-width: 70%;
  align-items: flex-start;
  gap: 8px;
}

.streaming-avatar {
  flex-shrink: 0;
  margin-top: 4px;
}

.streaming-message {
  flex: 1;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  position: relative;
}

.streaming-message::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 12px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 8px solid #ffffff;
  z-index: 2;
}

.streaming-message::after {
  content: '';
  position: absolute;
  left: -9px;
  top: 12px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 8px solid #e5e7eb;
  z-index: 1;
}

.streaming-message-content {
  font-size: 14px;
  line-height: 1.6;
  color: #374151;
  white-space: pre-wrap;
  word-break: break-word;
}

.thinking-indicator {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #f3f4f6;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #6b7280;
}

.thinking-dots {
  display: inline-flex;
  gap: 4px;
}

.thinking-dots span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: #9ca3af;
  animation: thinking-pulse 1.4s infinite ease-in-out both;
}

.thinking-dots span:nth-child(1) {
  animation-delay: -0.32s;
}

.thinking-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes thinking-pulse {

  0%,
  80%,
  100% {
    transform: scale(0.8);
    opacity: 0.5;
  }

  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* 流式文本光标动画 */
.streaming-text .streaming-cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background-color: #1890ff;
  margin-left: 1px;
  animation: cursor-blink 1s infinite;
}

@keyframes cursor-blink {

  0%,
  50% {
    opacity: 1;
  }

  51%,
  100% {
    opacity: 0;
  }
}

/* 助手头像样式 */
.assistant-avatar {
  background-color: #f3f4f6 !important;
  color: #6b7280 !important;
}

/* 流式输出时的容器动画 */
.streaming-container {
  animation: slideInFromBottom 0.3s ease-out;
}

@keyframes slideInFromBottom {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* LiveStreamingBubble 特定样式 */
.streaming-bubble-container {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 16px;
  animation: fadeIn 0.3s ease-in;
}

.streaming-bubble-wrapper {
  display: flex;
  align-items: flex-start;
  max-width: 80%;
  min-width: 0;
}

.streaming-bubble-content {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.streaming-avatar {
  flex-shrink: 0;
  margin-top: 2px;
}

.streaming-message {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 16px;
  min-width: 0;
  flex-grow: 1;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.streaming-message-content {
  font-size: 14px;
  line-height: 1.6;
  color: #374151;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.streaming-cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background-color: #3b82f6;
  margin-left: 2px;
  vertical-align: baseline;
}

@keyframes blink {

  0%,
  50% {
    opacity: 1;
  }

  51%,
  100% {
    opacity: 0;
  }
}

.thinking-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #f3f4f6;
}

.thinking-dots {
  display: flex;
  gap: 4px;
}

.thinking-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #6b7280;
  animation: thinking-pulse 1.4s infinite ease-in-out;
}

.thinking-dots span:nth-child(1) {
  animation-delay: -0.32s;
}

.thinking-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

.thinking-dots span:nth-child(3) {
  animation-delay: 0;
}

@keyframes thinking-pulse {

  0%,
  80%,
  100% {
    opacity: 0.3;
    transform: scale(0.8);
  }

  40% {
    opacity: 1;
    transform: scale(1);
  }
}

.thinking-text {
  font-size: 12px;
  color: #6b7280;
}

/* 重新设计的流式输出组件优化样式 */
.streaming-bubble-container {
  /* 确保组件稳定性 */
  contain: layout style paint;
  transform: translateZ(0);
  /* 开启硬件加速 */
}

.streaming-message-content {
  /* 优化文本渲染 */
  text-rendering: optimizeSpeed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.streaming-cursor {
  /* 优化光标动画性能 */
  will-change: opacity;
  transform: translateZ(0);
}

/* 确保动画流畅性 */
@media (prefers-reduced-motion: no-preference) {
  .streaming-cursor {
    animation: blink 1s infinite;
  }
}

@media (prefers-reduced-motion: reduce) {
  .streaming-cursor {
    animation: none;
    opacity: 1;
  }
}

/* 防止文本选择导致的布局抖动 */
.streaming-message-content .ant-typography {
  user-select: text;
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
}

/* 现代化欢迎界面样式 */
/* 简化的欢迎页面样式 */
.chat-welcome-simple {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  background: #ffffff;
}

.welcome-content {
  text-align: center;
  padding: 40px 20px;
}

.welcome-icon-simple {
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
}

.welcome-icon-simple .anticon {
  font-size: 48px;
  color: #1677ff;
  opacity: 0.8;
}

.welcome-title-simple {
  font-size: 32px;
  font-weight: 600;
  color: #262626;
  margin: 0 0 12px 0;
  font-family: var(--font-family-heading);
}

.welcome-text {
  font-size: 16px;
  color: #8c8c8c;
  margin: 0;
  font-weight: 400;
  font-family: var(--font-family-content);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .welcome-title-simple {
    font-size: 28px;
  }

  .welcome-icon-simple .anticon {
    font-size: 40px;
  }

  .welcome-text {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .welcome-title-simple {
    font-size: 24px;
  }

  .welcome-icon-simple .anticon {
    font-size: 36px;
  }
}