 * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
        }
        body {
            background-color: #f5f5f5;
            color: #333;
            font-size: 14px;
        }

        /* 聊天窗口样式 */
        .chat-container {
            /*max-width: 600px;  移除最大宽度限制 */
            /*margin: 20px auto; 移除外边距 */
            background-color: #fff;
            border-radius: 0px; /* 将圆角设置为0，可以完全贴合屏幕 */
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
            overflow: hidden; /* 防止内容超出 */
            display: flex;
            flex-direction: column;
            height: 100vh; /* 占据整个屏幕高度 */
            width: 100vw;   /* 占据整个屏幕宽度 */
            position: fixed;  /* 添加固定定位 */
            top: 0;          /* 顶部对齐 */
            left: 0;         /* 左侧对齐 */
            z-index: 1000;    /* 确保在其他内容之上 */
        }

        .chat-header {
            background-color: #1890ff;
            color: white;
            padding: 15px;
            text-align: center;
            font-weight: bold;
            border-bottom: 1px solid #eee;
            position: relative; /*为了让返回按钮可以相对于header定位*/
        }

        .chat-messages {
            flex-grow: 1;
            padding: 15px;
            overflow-y: auto; /* 允许滚动 */
        }

      .message {
  position: relative; /* 关键 */
  margin-bottom: 10px;
  padding: 10px 16px;
  border-radius: 18px;
  max-width: 70%;
  word-wrap: break-word;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  font-size: 14px;
  line-height: 1.4;
}



   .user-message {
  background: linear-gradient(135deg, #1890ff, #40a9ff);
  color: white;
  text-align: right;
  margin-left: auto;
  border-bottom-right-radius: 2px; /* 气泡尾巴效果 */
  box-shadow: 0 2px 8px rgba(24, 144, 255, 0.5);
}


       .ai-message {
  background: linear-gradient(135deg, #f0f0f0, #d9d9d9);
  color: #333;
  text-align: left;
  margin-right: auto;
  border-bottom-left-radius: 2px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
/* 用户消息尾巴：右侧小三角 */
.user-message::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: -8px; /* 控制尾巴横向位置 */
  width: 0;
  height: 0;
  border-top: 10px solid #40a9ff; /* 尾巴颜色，和气泡主色调接近 */
  border-left: 10px solid transparent;
}

/* AI消息尾巴：左侧小三角 */
.ai-message::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: -8px; /* 控制尾巴横向位置 */
  width: 0;
  height: 0;
  border-top: 10px solid #d9d9d9; /* 尾巴颜色，和气泡主色调接近 */
  border-right: 10px solid transparent;
}


        /* 聊天输入区 */
        .chat-input {
            padding: 10px;
            border-top: 1px solid #eee;
            display: flex;
            align-items: center;
        }

        .input-field {
            flex-grow: 1;
            border: 1px solid #ccc;
            border-radius: 20px;
            padding: 8px 15px;
            font-size: 14px;
            outline: none;
        }

        .send-button {
            background-color: #1890ff;
            color: white;
            border: none;
            border-radius: 20px;
            padding: 8px 15px;
            margin-left: 10px;
            cursor: pointer;
        }

        .send-button:hover {
            background-color: #0d79d9;
        }

        /* AI建议/快捷回复 */
        .ai-suggestions {
            padding: 10px;
            display: flex;
            flex-wrap: wrap;
            gap: 5px;
        }

        .suggestion-button {
            background-color: #fff;
            border: 1px solid #1890ff;
            color: #1890ff;
            border-radius: 20px;
            padding: 5px 10px;
            cursor: pointer;
            font-size: 12px;
        }

        .suggestion-button:hover {
            background-color: #e6f7ff;
        }

        /* 功能按钮 */
        .function-buttons {
            padding: 10px;
            display: flex;
            justify-content: space-around;
            border-top: 1px solid #eee;
        }

        .function-button {
            background-color: #fff;
            border: 1px solid #ccc;
            color: #333;
            border-radius: 8px;
            padding: 8px 12px;
            cursor: pointer;
            font-size: 14px;
        }

        .function-button:hover {
            background-color: #f0f0f0;
        }