/* 聊天页面样式 - 深色主题 */ @import '../../utils/constant.wxss'; .chat-container { display: flex; flex-direction: column; height: 100vh; background-color: #0d0d0d; } .message-list { flex: 1; padding: 20rpx; overflow-y: auto; padding-bottom: 140rpx; /* 为输入区域预留空间 */ } .empty-message { display: flex; justify-content: center; align-items: center; height: 400rpx; color: #555555; } .empty-text { font-size: 28rpx; color: #555555; } .history-tip { display: flex; justify-content: center; padding: 10rpx; margin: 10rpx 0; } .history-tip text { font-size: 24rpx; color: #666666; background-color: #1a1a1a; padding: 5rpx 20rpx; border-radius: 20rpx; } .message-item { display: flex; margin: 20rpx 0; align-items: flex-start; padding: 0 10rpx; } .message-left { flex-direction: row; } .message-right { flex-direction: row-reverse; } .message-avatar { width: 72rpx; height: 72rpx; margin: 0 16rpx; flex-shrink: 0; border-radius: 12rpx; overflow: hidden; } .message-avatar image { width: 100%; height: 100%; border-radius: 12rpx; } .message-content { max-width: 75%; display: flex; flex-direction: column; } .message-header { margin-bottom: 8rpx; } .message-nickname { font-size: 24rpx; color: #666666; font-weight: 500; } .message-body { padding: 20rpx 24rpx; word-wrap: break-word; position: relative; } .message-left .message-body { background-color: #1e1e1e; border-radius: 16rpx 16rpx 16rpx 4rpx; border: 2rpx solid rgba(255,255,255,0.06); } .message-right .message-body { background-color: #1677FF; border-radius: 16rpx 16rpx 4rpx 16rpx; box-shadow: 0 4rpx 16rpx rgba(22,119,255,0.25); } .message-text-container { line-height: 1.5; } .message-text { font-size: 28rpx; line-height: 1.5; } .message-left .message-text { color: #e8e8e8; } .message-right .message-text { color: white; } .message-footer { margin-top: 8rpx; display: flex; justify-content: flex-end; } .message-time { font-size: 20rpx; color: #444444; margin-right: 16rpx; } .message-image { max-width: 400rpx; max-height: 400rpx; border-radius: 12rpx; margin: 4rpx 0; } /* 代码块样式 - 深色 */ .message-code { background-color: #141414; border-radius: 12rpx; overflow: hidden; margin: 8rpx 0; border: 2rpx solid #252525; } .code-header { display: flex; justify-content: space-between; align-items: center; padding: 12rpx 16rpx; background-color: #1a1a1a; border-bottom: 2rpx solid #252525; } .code-language { font-size: 24rpx; color: #666; font-family: monospace; } .copy-btn { background: none; border: none; display: flex; align-items: center; font-size: 22rpx; color: #1677FF; padding: 0; } .copy-icon { margin-right: 4rpx; } .copy-text { font-size: 22rpx; } .code-body { padding: 16rpx; max-height: 400rpx; overflow-y: auto; background-color: #0d0d0d; } .code-text { font-size: 24rpx; line-height: 1.4; color: #a8dadc; font-family: 'Courier New', Courier, monospace; white-space: pre-wrap; } /* 按钮卡片样式 - 深色 */ .message-button-card { background-color: #1e1e1e; border-radius: 12rpx; padding: 20rpx; margin: 8rpx 0; border: 2rpx solid rgba(255,255,255,0.06); } .card-title { font-size: 26rpx; font-weight: 500; color: #ffffff; margin-bottom: 16rpx; } .card-buttons { display: flex; flex-direction: column; gap: 12rpx; } .card-button { background-color: #141414; border: 2rpx solid #252525; border-radius: 8rpx; padding: 16rpx; font-size: 26rpx; color: #1677FF; text-align: left; transition: all 0.2s ease; } .card-button:active { background-color: #f0f0f0; } /* 加载动画 */ .typing-container { margin: 20rpx 0; } .typing-indicator { display: flex; align-items: center; gap: 8rpx; margin-bottom: 8rpx; } .typing-dot { width: 12rpx; height: 12rpx; background-color: #1677FF; border-radius: 50%; animation: typing-bounce 1.4s infinite ease-in-out both; } .typing-dot:nth-child(1) { animation-delay: -0.32s; } .typing-dot:nth-child(2) { animation-delay: -0.16s; } .typing-text { font-size: 24rpx; color: #666666; } @keyframes typing-bounce { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1); } } /* 输入区域 - 深色 */ .input-container { position: fixed; bottom: 0; left: 0; right: 0; background: linear-gradient(180deg, #1a1a1a 0%, #141414 100%); border-top: 2rpx solid rgba(255,255,255,0.06); padding: 20rpx; z-index: 1000; } .input-wrapper { display: flex; align-items: flex-end; gap: 16rpx; } .message-input { flex: 1; border: 2rpx solid #252525; border-radius: 28rpx; padding: 20rpx 28rpx; font-size: 28rpx; background-color: #0d0d0d; color: #ffffff; min-height: 80rpx; max-height: 200rpx; overflow-y: auto; line-height: 1.4; } .message-input:focus { border-color: #1677FF; background-color: white; box-shadow: 0 0 0 2rpx rgba(22, 119, 255, 0.1); } .send-btn { background-color: #1677FF; color: white; border: none; border-radius: 50%; width: 80rpx; height: 80rpx; font-size: 26rpx; font-weight: 500; display: flex; align-items: center; justify-content: center; transition: all 0.3s ease; flex-shrink: 0; } .send-btn:active { transform: scale(0.95); background-color: #0e66e0; } .send-btn:disabled { background: #ccc; color: #999; transform: none; } /* 富文本样式 - 深色主题 */ rich-text { line-height: 1.5; } rich-text :deep(p) { margin: 12rpx 0; } rich-text :deep(h1), rich-text :deep(h2), rich-text :deep(h3) { font-weight: 600; margin: 16rpx 0 12rpx 0; } rich-text :deep(h1) { font-size: 32rpx; color: #ffffff; } rich-text :deep(h2) { font-size: 28rpx; color: #e5e5e5; } rich-text :deep(h3) { font-size: 26rpx; color: #cccccc; } rich-text :deep(ul), rich-text :deep(ol) { margin: 12rpx 0; padding-left: 40rpx; } rich-text :deep(li) { margin: 8rpx 0; line-height: 1.5; color: #d0d0d0; } rich-text :deep(strong) { font-weight: 600; } /* 响应式设计 */ @media (max-width: 375px) { .message-content { max-width: 70%; } .message-avatar { width: 64rpx; height: 64rpx; margin: 0 12rpx; } .message-body { padding: 16rpx 20rpx; } .message-text { font-size: 26rpx; } } @media (min-width: 768px) { .message-content { max-width: 60%; } .message-body { padding: 24rpx 28rpx; } .message-text { font-size: 30rpx; } }