Files
phone-app------test1-/pages/Chat/Chat.css
2026-07-31 10:24:55 +08:00

877 lines
16 KiB
CSS

.chat-page {
position: relative;
background: linear-gradient(180deg, #f5f4ff 0%, #f8f7fc 50%, #faf9fe 100%);
}
/* 笼罩层样式 */
.mask {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.45);
backdrop-filter: blur(4px);
-webkit-backdrop-filter: blur(4px);
z-index: 998;
animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
/* ================会话侧边栏样式================== */
.chat-sidebar {
position: fixed;
top: 0;
left: 0;
width: calc(100% - 100rpx);
max-width: 680rpx;
height: 100%;
transform: translateX(-100%);
transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
z-index: 999;
box-shadow: 8rpx 0 30rpx rgba(0, 0, 0, 0.06);
}
.chat-sidebar.sidebar-show {
transform: translateX(0);
}
/* =============================新建会话弹窗样式================== */
.ncd-overlay {
position: fixed;
width: 100%;
height: 100%;
left: 0;
top: 0;
display: flex;
align-items: center;
justify-content: center;
background-color: rgba(30, 30, 50, 0.35);
z-index: 9999;
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
animation: fadeIn 0.25s ease;
}
.ncd-card {
width: 90%;
height: auto;
background-color: #ffffff;
border-radius: 40rpx;
padding: 50rpx 40rpx;
box-sizing: border-box;
box-shadow: 0 20rpx 60rpx rgba(100, 100, 200, 0.12);
animation: slideUp 0.35s ease;
}
@keyframes slideUp {
from { opacity: 0; transform: translateY(40rpx) scale(0.96); }
to { opacity: 1; transform: translateY(0) scale(1); }
}
.ncd-header {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
}
.ncd-title-eng {
display: flex;
flex-shrink: 0;
background: linear-gradient(135deg, #6c63ff, #4a45d1);
padding: 6rpx 14rpx;
border-radius: 12rpx;
justify-content: center;
align-items: center;
}
.ncd-title-eng text {
color: #ffffff;
font-weight: bold;
font-size: 28rpx;
}
.ncd-title-zh {
margin-left: 10rpx;
display: flex;
flex: 1;
height: 0;
font-size: 36rpx;
font-weight: 700;
color: #1a1a2e;
align-items: center;
}
.ncd-header uni-icons {
display: flex;
flex-shrink: 0;
align-items: center;
}
.ncd-options {
display: flex;
flex-direction: column;
width: 100%;
justify-content: center;
align-items: center;
margin-top: 20rpx;
box-sizing: border-box;
}
.ncd-option {
width: 100%;
background: #f8fafc;
padding: 40rpx 30rpx;
display: flex;
border-radius: 28rpx;
margin-top: 20rpx;
box-sizing: border-box;
justify-content: center;
align-items: center;
transition: all 0.2s ease;
border: 2rpx solid transparent;
}
.ncd-option:active {
transform: scale(0.98);
}
.ncd-normal {
border: 2rpx solid #e8edf3;
}
.ncd-normal:active {
border-color: #c4c8d0;
background: #f0f3f7;
}
.ncd-opt-icon {
width: 80rpx;
height: 80rpx;
border-radius: 24rpx;
padding: 10rpx;
box-sizing: border-box;
display: flex;
flex-shrink: 0;
justify-content: center;
align-items: center;
}
.ncd-normal .ncd-opt-icon {
background: linear-gradient(135deg, #e2e8f0, #d9dfe8);
}
.ncd-opt-title {
display: flex;
flex-direction: column;
margin: 0rpx 16rpx;
box-sizing: border-box;
justify-content: center;
flex: 1;
height: 0;
}
.ncd-opt-title-1 {
font-size: 30rpx;
font-weight: 600;
color: #1a1a2e;
}
.ncd-opt-title-2 {
font-size: 24rpx;
color: #888;
margin-top: 4rpx;
}
.arrow-right-style {
display: flex;
flex-shrink: 0;
font-weight: bold !important;
font-size: 28rpx !important;
color: #999 !important;
}
.ncd-intelligence {
background: linear-gradient(135deg, #f8f5ff, #efe8ff);
border: 2rpx solid #c4b5fd;
}
.ncd-intelligence:active {
border-color: #a78bfa;
background: linear-gradient(135deg, #f3efff, #e8dcff);
}
.ncd-intelligence .ncd-opt-icon {
background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}
/* ==========新建聊天列表相关====== */
.close-option-card {
width: 100%;
display: flex;
justify-content: flex-end;
}
.close-option-card .iconfont {
color: #ff4d4f !important;
}
.chat-option-list {
display: flex;
width: 100%;
flex-direction: column;
}
.chat-option {
display: flex;
justify-content: flex-start;
align-items: center;
margin: 10rpx 0;
padding: 16rpx 20rpx;
border-radius: 20rpx;
box-sizing: border-box;
transition: all 0.15s ease;
}
.chat-option:active {
background: rgba(170, 170, 255, 0.08);
}
.chat-option .iconfont {
font-size: 30px;
}
.option-name {
font-size: 17px;
font-weight: 500;
margin-left: 12px;
box-sizing: border-box;
color: #333;
}
/* ================聊天容器============== */
.chat-wrapper {
position: relative;
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
}
/* ================聊天顶部样式============== */
.chat-hearder {
width: 100%;
height: auto;
padding: 16rpx 10rpx;
box-sizing: border-box;
display: flex;
flex-shrink: 0;
justify-content: flex-start;
align-items: center;
background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,255,255,0.8));
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
border-bottom: 1rpx solid rgba(170, 170, 255, 0.15);
}
.chat-btn-group {
width: 100%;
height: auto;
display: flex;
justify-content: flex-start;
align-items: center;
}
.head-btn {
padding: 12rpx 14rpx;
border: 1.5rpx solid rgba(170, 170, 255, 0.3);
border-radius: 18rpx;
margin: 0 10rpx;
box-sizing: border-box;
display: flex;
justify-content: center;
align-items: center;
background: rgba(255, 255, 255, 0.7);
transition: all 0.2s ease;
}
.head-btn:active {
background: rgba(170, 170, 255, 0.1);
transform: scale(0.95);
}
.chat-btn-group .head-btn:nth-child(1) .iconfont {
color: #a78bfa;
}
.chat-btn-group .head-btn:nth-child(2) .iconfont {
color: #6495ed;
}
.head-btn .iconfont {
font-size: 48rpx;
}
.log-out {
/* background: #ffd4d4; */
}
.log-out .iconfont {
color: #ff4d4f;
}
/* ==========WYXD 文件入口横幅========== */
.wyxd-banner {
display: flex;
align-items: center;
padding: 14rpx 24rpx;
margin: 6rpx 20rpx;
background: linear-gradient(135deg, #e8f4fd, #f0e6ff);
border: 1.5rpx solid rgba(120, 120, 220, 0.25);
border-radius: 16rpx;
box-shadow: 0 2rpx 8rpx rgba(100, 100, 200, 0.08);
}
.wyxd-banner:active {
background: linear-gradient(135deg, #d8eafb, #e6d8ff);
transform: scale(0.98);
}
.wyxd-banner-icon {
font-size: 32rpx;
color: #6c6ce0;
margin-right: 12rpx;
}
.wyxd-banner-text {
flex: 1;
font-size: 26rpx;
font-weight: 600;
color: #4a4ab8;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.wyxd-banner-arrow {
font-size: 24rpx;
color: #9999cc;
}
.wyxd-banner-close {
width: 36rpx;
height: 36rpx;
line-height: 36rpx;
text-align: center;
font-size: 28rpx;
color: #9999cc;
border-radius: 50%;
background: rgba(100, 100, 200, 0.08);
margin-left: 8rpx;
flex-shrink: 0;
}
.wyxd-banner-close:active {
background: rgba(100, 100, 200, 0.18);
color: #6c6ce0;
}
/* ==========聊天主体部分========== */
.main-chat {
display: flex;
flex: 1;
height: 0;
width: 100%;
flex-direction: column;
}
/* ==========加载更多提示========== */
.load-more-tip {
text-align: center;
padding: 20rpx 0;
font-size: 24rpx;
color: #999;
}
/* ==========聊天对话展示部分========== */
.chat-messages {
display: flex;
flex: 1;
height: 0;
width: 100%;
padding: 20rpx 24rpx;
box-sizing: border-box;
flex-direction: column;
overflow: auto;
}
.chat-messages::-webkit-scrollbar {
width: 6rpx;
}
.chat-messages::-webkit-scrollbar-thumb {
background: rgba(170, 170, 255, 0.3);
border-radius: 3rpx;
}
.chat-messages::-webkit-scrollbar-track {
background: transparent;
}
.chat-message {
display: flex;
align-items: flex-start;
margin: 14rpx 0;
box-sizing: border-box;
animation: msgFadeIn 0.3s ease;
}
@keyframes msgFadeIn {
from { opacity: 0; transform: translateY(10rpx); }
to { opacity: 1; transform: translateY(0); }
}
.message-user {
flex-direction: row-reverse;
}
.chat-avatar {
display: flex;
justify-content: center;
align-items: center;
width: 72rpx;
height: 72rpx;
box-sizing: border-box;
border-radius: 16rpx;
margin-right: 12rpx;
flex-shrink: 0;
}
.friend-avatar {
display: flex;
justify-content: center;
align-items: center;
border-radius: 16rpx;
width: 100%;
height: 100%;
overflow: hidden;
}
.chat-avatar-user {
margin-right: 0;
margin-left: 12rpx;
}
.chat-content {
width: auto;
max-width: calc(100% - 120rpx);
height: auto;
padding: 20rpx 24rpx;
box-sizing: border-box;
border-radius: 24rpx;
overflow-x: auto;
font-size: 32rpx;
line-height: 1.65;
position: relative;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
background: #ffffff;
border: 1rpx solid #eeeef5;
}
.chat-content-user {
background: linear-gradient(135deg, #c4b5fd, #b8a5f0);
color: #fff;
border: none;
box-shadow: 0 4rpx 12rpx rgba(170, 170, 255, 0.3);
border-bottom-right-radius: 8rpx;
}
/* AI 回复气泡满屏 */
.chat-content-assistant {
max-width: 100%;
}
.chat-content:not(.chat-content-user) {
border-bottom-left-radius: 8rpx;
}
/* 图片消息 */
.message-image {
max-width: 300rpx;
border-radius: 12rpx;
margin: 8rpx 0;
}
/* 文件列表 */
.message-file-list {
margin: 10rpx 0;
}
/* 文件项 */
.file-item {
margin: 6rpx 0;
}
/* 文件样式 */
.message-file {
display: flex;
align-items: center;
padding: 14rpx 18rpx;
background: rgba(255, 255, 255, 0.85);
border-radius: 12rpx;
max-width: 350rpx;
border: 1rpx solid #eeeef5;
}
.chat-content-user .message-file {
background: rgba(255, 255, 255, 0.25);
border-color: rgba(255, 255, 255, 0.3);
}
.file-icon {
font-size: 32rpx;
margin-right: 12rpx;
}
.file-name {
flex: 1;
font-size: 26rpx;
color: #333;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.chat-content-user .file-name {
color: #fff;
}
.file-size {
font-size: 22rpx;
color: #999;
margin-left: 8rpx;
}
.chat-content-user .file-size {
color: rgba(255, 255, 255, 0.7);
}
/* ==========聊天输入容器部分========== */
.chat-interactive-container {
display: flex;
flex-shrink: 0;
width: 100%;
padding: 16rpx 24rpx 24rpx;
box-sizing: border-box;
flex-direction: column;
background: linear-gradient(180deg, rgba(255,255,255,0.7), rgba(255,255,255,0.95));
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
border-top: 1rpx solid rgba(170, 170, 255, 0.12);
}
.chat-interactive-group {
display: flex;
width: 100%;
padding: 12rpx 0;
box-sizing: border-box;
justify-content: flex-start;
align-items: center;
}
.chat-interactive-btn {
display: flex;
align-items: center;
justify-content: center;
border: 1.5rpx solid #d4d4e0;
border-radius: 16rpx;
padding: 12rpx 20rpx;
margin-right: 16rpx;
box-sizing: border-box;
font-size: 24rpx;
color: #666;
background: #ffffff;
transition: all 0.2s ease;
}
.chat-interactive-btn:active {
border-color: #aaaaff;
background: rgba(170, 170, 255, 0.08);
transform: scale(0.96);
}
/* 思考中禁用态 */
.chat-interactive-btn.disabled {
opacity: 0.45;
pointer-events: none;
border-color: #e0dfe8;
color: #aaa;
}
.chat-input-container {
display: flex;
width: 100%;
padding: 8rpx 8rpx 8rpx 24rpx;
box-sizing: border-box;
border: 2rpx solid #e0dff5;
border-radius: 30rpx;
align-items: flex-end;
background: #ffffff;
transition: all 0.25s ease;
box-shadow: 0 2rpx 12rpx rgba(100, 100, 150, 0.06);
}
.chat-input-container:focus-within {
border-color: #aaaaff;
box-shadow: 0 0 0 4rpx rgba(170, 170, 255, 0.12), 0 4rpx 16rpx rgba(100, 100, 150, 0.08);
}
.message-input {
flex: 1;
max-height: 150rpx;
min-height: 60rpx;
overflow-y: auto;
margin: 4rpx 10rpx;
box-sizing: border-box;
font-size: 28rpx;
color: #333;
}
.message-input::placeholder {
color: #c0c0d0;
}
/* 思考中:输入容器禁态 */
.chat-input-container.input-disabled {
border-color: #eae9f2;
background: #f8f7fc;
}
/* 思考中:文本域禁用 */
.message-input[disabled] {
opacity: 0.5;
color: #bbb;
}
/* 思考中:发送按钮禁用 */
.input-btn-group.disabled {
opacity: 0.4;
pointer-events: none;
background: #c0c0d0;
box-shadow: none;
}
/* PC端中断发送按钮 */
.stop-message-btn {
background: linear-gradient(135deg, #ff4d4f, #ff6b6b);
box-shadow: 0 4rpx 12rpx rgba(255, 77, 79, 0.35);
animation: pulseStop 1.8s ease-in-out infinite;
}
.stop-message-btn:active {
transform: scale(0.92);
box-shadow: 0 2rpx 6rpx rgba(255, 77, 79, 0.25);
}
.input-btn-group {
flex-shrink: 0;
display: flex;
justify-content: center;
align-items: center;
padding: 14rpx;
box-sizing: border-box;
background: linear-gradient(135deg, #6c63ff, #8b7cfb);
border-radius: 22rpx;
width: 72rpx;
height: 72rpx;
box-shadow: 0 4rpx 12rpx rgba(108, 99, 255, 0.35);
transition: all 0.2s ease;
}
.input-btn-group:active {
transform: scale(0.92);
box-shadow: 0 2rpx 6rpx rgba(108, 99, 255, 0.25);
}
.input-btn-group .iconfont {
color: #fff;
font-size: 36rpx;
}
/* ai思考弹窗卡片 */
.ai-card {
width: auto;
border: 2rpx solid rgba(64, 158, 255, 0.3);
box-shadow: 0 8rpx 30rpx rgba(170, 170, 255, 0.2);
border-radius: 32rpx !important;
}
/* 内容布局 */
.thinking-content {
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
}
/* 加载点点动画 */
.loading-dots {
display: flex;
width: 100%;
align-items: center;
justify-content: center;
}
.dot {
width: 14rpx;
height: 14rpx;
margin: 6rpx;
border-radius: 50%;
background: linear-gradient(135deg, #409eff, #6db2ff);
animation: dotBlink 1.2s infinite ease-in-out;
}
@keyframes dotBlink {
0%, 100% {
opacity: 0.3;
transform: scale(0.7);
}
50% {
opacity: 1;
transform: scale(1.2);
}
}
.dot:nth-child(2) { animation-delay: 0.25s; }
.dot:nth-child(3) { animation-delay: 0.5s; }
/* 文字 */
.thinking-text {
margin: 20rpx 0;
font-size: 20px;
font-weight: 600;
color: #409eff;
}
/* 思考弹窗中的中断按钮 */
.stop-thinking-btn {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
padding: 22rpx 0;
margin-top: 20rpx;
border-radius: 24rpx;
font-size: 28rpx;
font-weight: 600;
color: #ff4d4f;
background: linear-gradient(135deg, rgba(255, 77, 79, 0.06), rgba(255, 77, 79, 0.02));
border: 2rpx solid rgba(255, 77, 79, 0.35);
transition: all 0.2s ease;
animation: pulseStop 2s ease-in-out infinite;
}
.stop-thinking-btn:active {
background: rgba(255, 77, 79, 0.12);
border-color: #ff4d4f;
transform: scale(0.97);
}
@keyframes pulseStop {
0%, 100% { border-color: rgba(255, 77, 79, 0.35); }
50% { border-color: rgba(255, 77, 79, 0.65); }
}
/* ========== 文件预览标签列表 ========== */
.image-list {
width: 100%;
padding: 8rpx 0 2rpx;
animation: fadeIn 0.25s ease;
}
.image-tags {
display: flex;
flex-wrap: wrap;
gap: 10rpx;
}
.image-tag {
display: flex;
align-items: center;
padding: 6rpx 8rpx 6rpx 16rpx;
background: linear-gradient(135deg, rgba(108, 99, 255, 0.07), rgba(108, 99, 255, 0.04));
border: 1rpx solid rgba(108, 99, 255, 0.18);
border-radius: 20rpx;
max-width: 220rpx;
transition: all 0.2s ease;
box-shadow: 0 1rpx 4rpx rgba(108, 99, 255, 0.04);
}
.image-tag:active {
transform: scale(0.96);
border-color: rgba(108, 99, 255, 0.4);
background: rgba(108, 99, 255, 0.1);
}
.tag-name {
font-size: 22rpx;
color: #5a52d5;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
flex: 1;
font-weight: 500;
}
.tag-close {
flex-shrink: 0;
width: 32rpx;
height: 32rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
color: #bbb;
margin-left: 6rpx;
border-radius: 50%;
line-height: 1;
transition: all 0.15s ease;
}
.tag-close:active {
color: #fff;
background: #ff4d4f;
transform: scale(1.1);
}
/* 消息详情弹窗 */
.message-detail-card {
width: 90%;
max-height: 80vh;
display: flex;
flex-direction: column;
border-radius: 40rpx;
padding: 40rpx 36rpx;
}
.message-detail-content {
flex: 1;
min-height: 200rpx;
max-height: 60vh;
overflow-y: auto;
padding: 16rpx 0;
font-size: 28rpx;
line-height: 1.7;
color: #333333;
white-space: pre-wrap;
word-break: break-all;
}