chat.less 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307
  1. page {
  2. background: linear-gradient(180deg, #E3F2FD 0%, #E8F5E9 50%, #FFF3E0 100%);
  3. height: 100%;
  4. }
  5. .chat-container {
  6. display: flex;
  7. flex-direction: column;
  8. height: 100vh;
  9. padding-top: 88px;
  10. box-sizing: border-box;
  11. }
  12. .chat-scroll {
  13. flex: 1;
  14. overflow-y: auto;
  15. }
  16. .message-list {
  17. padding: 16px;
  18. }
  19. .message-row {
  20. display: flex;
  21. margin-bottom: 16px;
  22. align-items: flex-start;
  23. }
  24. .ai-row {
  25. justify-content: flex-start;
  26. }
  27. .user-row {
  28. justify-content: flex-end;
  29. }
  30. /* AI头像 - 蓝色机器人 */
  31. .avatar {
  32. width: 40px;
  33. height: 40px;
  34. border-radius: 50%;
  35. flex-shrink: 0;
  36. display: flex;
  37. align-items: center;
  38. justify-content: center;
  39. overflow: hidden;
  40. }
  41. .ai-avatar {
  42. margin-right: 10px;
  43. background: linear-gradient(135deg, #42A5F5 0%, #64B5F6 100%);
  44. border: 2px solid #fff;
  45. box-shadow: 0 2px 8px rgba(66, 165, 245, 0.3);
  46. }
  47. .ai-avatar-image {
  48. width: 70%;
  49. height: 70%;
  50. object-fit: contain;
  51. }
  52. .user-avatar {
  53. margin-left: 10px;
  54. background: linear-gradient(135deg, #66BB6A 0%, #81C784 100%);
  55. border: 2px solid #fff;
  56. box-shadow: 0 2px 8px rgba(102, 187, 106, 0.3);
  57. }
  58. .avatar-text {
  59. color: #fff;
  60. font-size: 12px;
  61. font-weight: 600;
  62. }
  63. .message-content {
  64. max-width: 75%;
  65. }
  66. /* AI消息气泡 - 白色 */
  67. .bubble {
  68. padding: 12px 16px;
  69. border-radius: 18px;
  70. word-wrap: break-word;
  71. box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  72. }
  73. .ai-bubble {
  74. background-color: #FFFFFF;
  75. border-bottom-left-radius: 4px;
  76. }
  77. /* 用户消息气泡 - 蓝色 */
  78. .user-bubble {
  79. background: linear-gradient(135deg, #2196F3 0%, #42A5F5 100%);
  80. color: #FFFFFF;
  81. border-bottom-right-radius: 4px;
  82. }
  83. .message-text {
  84. font-size: 15px;
  85. line-height: 1.5;
  86. color: inherit;
  87. }
  88. /* FAQ卡片 - 白色圆角 */
  89. .faq-card {
  90. background: rgba(255, 255, 255, 0.9);
  91. border-radius: 16px;
  92. padding: 14px 12px;
  93. margin-top: 8px;
  94. width: 280px;
  95. backdrop-filter: blur(10px);
  96. border: 1px solid rgba(255, 255, 255, 0.8);
  97. box-shadow: 0 4px 16px rgba(33, 150, 243, 0.1);
  98. }
  99. .faq-header {
  100. margin-bottom: 10px;
  101. padding-left: 2px;
  102. }
  103. .faq-title {
  104. font-size: 15px;
  105. font-weight: 700;
  106. color: #2196F3;
  107. letter-spacing: 0.5px;
  108. }
  109. .faq-list {
  110. display: flex;
  111. flex-direction: column;
  112. gap: 8px;
  113. }
  114. .faq-item {
  115. display: flex;
  116. align-items: center;
  117. padding: 10px 12px;
  118. background-color: #FFFFFF;
  119. border-radius: 10px;
  120. box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  121. cursor: pointer;
  122. transition: all 0.2s ease;
  123. }
  124. .faq-item:active {
  125. transform: scale(0.98);
  126. background-color: #F5F9FC;
  127. }
  128. .faq-icon {
  129. width: 18px;
  130. height: 18px;
  131. background: linear-gradient(135deg, #2196F3 0%, #42A5F5 100%);
  132. border-radius: 4px;
  133. display: flex;
  134. align-items: center;
  135. justify-content: center;
  136. margin-right: 10px;
  137. flex-shrink: 0;
  138. }
  139. .faq-icon-text {
  140. color: #fff;
  141. font-size: 10px;
  142. font-weight: 700;
  143. }
  144. .faq-text {
  145. flex: 1;
  146. font-size: 13px;
  147. color: #333;
  148. font-weight: 500;
  149. }
  150. .faq-arrow {
  151. font-size: 14px;
  152. color: #CCC;
  153. margin-left: 4px;
  154. }
  155. /* 用户图片 */
  156. .user-image {
  157. max-width: 180px;
  158. border-radius: 12px;
  159. overflow: hidden;
  160. box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  161. }
  162. .user-image image {
  163. width: 100%;
  164. max-height: 180px;
  165. display: block;
  166. }
  167. /* 输入区域 - 圆角灰色 */
  168. .input-area {
  169. background-color: #FFFFFF;
  170. border-top: 1px solid rgba(0,0,0,0.04);
  171. padding: 10px 16px;
  172. padding-bottom: calc(10px + env(safe-area-inset-bottom));
  173. }
  174. .input-container {
  175. display: flex;
  176. align-items: center;
  177. background-color: #F5F7FA;
  178. border-radius: 24px;
  179. padding: 6px 10px;
  180. }
  181. .input-wrapper {
  182. flex: 1;
  183. display: flex;
  184. align-items: center;
  185. padding: 0 4px;
  186. }
  187. .voice-btn {
  188. width: 30px;
  189. height: 30px;
  190. display: flex;
  191. align-items: center;
  192. justify-content: center;
  193. margin-right: 4px;
  194. }
  195. .voice-icon {
  196. font-size: 16px;
  197. color: #666;
  198. }
  199. .chat-input {
  200. flex: 1;
  201. height: 34px;
  202. font-size: 15px;
  203. color: #333;
  204. background: transparent;
  205. }
  206. .placeholder {
  207. color: #AAA;
  208. font-size: 15px;
  209. }
  210. .image-btn {
  211. width: 34px;
  212. height: 34px;
  213. display: flex;
  214. align-items: center;
  215. justify-content: center;
  216. background-color: #FFFFFF;
  217. border-radius: 50%;
  218. box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  219. margin-left: 4px;
  220. }
  221. .image-icon {
  222. font-size: 18px;
  223. color: #666;
  224. }
  225. /* 加载中状态 */
  226. .loading-row {
  227. align-items: center;
  228. }
  229. .loading-bubble {
  230. background-color: #FFFFFF;
  231. border-radius: 16px;
  232. padding: 12px 18px;
  233. border-bottom-left-radius: 4px;
  234. box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  235. }
  236. .loading-dots {
  237. display: flex;
  238. align-items: center;
  239. gap: 5px;
  240. }
  241. .dot {
  242. width: 7px;
  243. height: 7px;
  244. background: linear-gradient(135deg, #2196F3 0%, #42A5F5 100%);
  245. border-radius: 50%;
  246. animation: bounce 1.4s ease-in-out infinite both;
  247. }
  248. .dot:nth-child(1) {
  249. animation-delay: -0.32s;
  250. }
  251. .dot:nth-child(2) {
  252. animation-delay: -0.16s;
  253. }
  254. @keyframes bounce {
  255. 0%, 80%, 100% {
  256. transform: scale(0.6);
  257. opacity: 0.5;
  258. }
  259. 40% {
  260. transform: scale(1);
  261. opacity: 1;
  262. }
  263. }