body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    text-align: left;
    background-color: #f0f0f0;
}
h1 {
    color: #333;
}
.floating-dialog.collapsed {
  height: 40px;
  width: 120px;
  overflow: hidden;
}

.dialog-header {
  background: #f5f5f5;
  padding: 10px;
  cursor: move;
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid #e5e7eb; /* 合并新增样式 */
}

.toggle-dialog {
  color: #1e40af;
  border: 1px solid #bfdbfe;
  transition: transform 0.2s; /* 合并动画属性 */
}
.dialog-content {
  height: 300px;
  overflow-y: auto;
  padding: 10px;
}

.input-area {
  display: flex;
  padding: 10px;
  gap: 5px;
  border-top: 1px solid #e5e7eb;
}

#user-input {
  flex: 1;
  resize: none;
  padding: 8px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  color: #1E293B;
  background: white;
}

.chat-message {
  margin: 5px 0;
  padding: 12px 16px;
  border-radius: 12px;
  max-width: 80%;
  margin-bottom: 8px;
}

.bot-message {
  color: #3a5293;
  background: #F1F5F9;
  margin-right: auto;
}

.user-message {
  color: #1E293B;
  background: #E2E8F0;
  margin-left: auto;
  justify-content: flex-end;
}

.floating-dialog {
  transition: all 0.3s ease-in-out;
}

@media (max-width: 768px) {
  .floating-dialog {
    width: 90%;
    right: 5%;
  }
  
  .dialog-content {
    height: 250px;
  }
}

.toggle-dialog {
  transition: transform 0.2s;
}

.toggle-dialog:hover {
  transform: scale(1.1);
}
#chat-dialog {
  --primary-color: #2563eb;
  --hover-color: #1d4ed8;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.dialog-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, #3b82f6 100%);
  color: white;
  border-radius: 12px 12px 0 0;
}

.toggle-dialog {
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  width: 28px;
  height: 28px;
}

/* 添加消息加载状态指示器 */
.loading-indicator {
  display: inline-flex;
  gap: 4px;
  padding: 8px 12px;
  background: rgba(0,0,0,0.05);
  border-radius: 20px;
}

/* 优化移动端触控区域 */
@media (max-width: 768px) {
  #send-btn {
    padding: 10px 16px;
  }
}

/* 添加输入框聚焦效果 */
#user-input:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

#chat-dialog.minimized .dialog-content {
  display: none;
}

#chat-dialog:not(.minimized) {
  display: flex;
  flex-direction: column;
}

.dialog-content {
  flex: 1;
  overflow-y: auto;
}

.dialog-input {
  position: sticky;
  bottom: 0;
  background: white;
  padding-top: 10px;
}