.chat-page { position: relative; display: flex; flex-direction: column; min-height: 100vh; background: #1a0710; } /* 深色渐变背景层:锁到视口,滚动时不移位 */ .hero-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: radial-gradient(120% 60% at 50% 0%, #3a0a1a 0%, #1a0710 55%, #0d0308 100%); } .hero-blob { position: absolute; border-radius: 50%; filter: blur(80rpx); opacity: 0.85; } .hero-blob.blob-1 { width: 700rpx; height: 700rpx; top: -80rpx; left: -120rpx; background: radial-gradient(circle, #c4232f 0%, rgba(196, 35, 47, 0) 70%); } .hero-blob.blob-2 { width: 620rpx; height: 620rpx; top: 220rpx; right: -160rpx; background: radial-gradient(circle, #e63946 0%, rgba(230, 57, 70, 0) 70%); opacity: 0.75; } .hero-blob.blob-3 { width: 800rpx; height: 500rpx; bottom: -100rpx; left: 50%; transform: translateX(-50%); background: radial-gradient(circle, #7a1424 0%, rgba(122, 20, 36, 0) 70%); opacity: 0.7; } .hero-noise { position: absolute; inset: 0; background-image: repeating-linear-gradient(0deg, rgba(255,255,255,0.02) 0 2rpx, transparent 2rpx 6rpx), repeating-linear-gradient(90deg, rgba(0,0,0,0.05) 0 2rpx, transparent 2rpx 6rpx); mix-blend-mode: overlay; pointer-events: none; } /* 顶部栏 */ .topbar { position: relative; z-index: 2; flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; height: 88rpx; padding: 0 32rpx; } .brand-mini { font-size: 30rpx; font-weight: 600; color: rgba(255, 255, 255, 0.92); letter-spacing: 2rpx; } /* 圆形返回按钮 */ .topbar-back { width: 64rpx; height: 64rpx; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.12); border: 1rpx solid rgba(255, 255, 255, 0.3); backdrop-filter: blur(10rpx); -webkit-backdrop-filter: blur(10rpx); } .topbar-back:active { background: rgba(255, 255, 255, 0.22); } .back-arrow { color: #fff; font-size: 44rpx; line-height: 1; margin-left: -4rpx; font-weight: 300; } /* 三点圆形按钮 */ .topbar-more { width: 64rpx; height: 64rpx; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6rpx; background: rgba(255, 255, 255, 0.12); border: 1rpx solid rgba(255, 255, 255, 0.3); backdrop-filter: blur(10rpx); -webkit-backdrop-filter: blur(10rpx); } .topbar-more:active { background: rgba(255, 255, 255, 0.22); } .topbar-more .dot { width: 8rpx; height: 8rpx; border-radius: 50%; background: #fff; } /* 消息列表 */ .messages { position: relative; z-index: 2; flex: 1; padding: 24rpx 24rpx 220rpx; box-sizing: border-box; } .msg-row { display: flex; margin-bottom: 24rpx; } .msg-row.user { justify-content: flex-end; } .msg-row.assistant { justify-content: flex-start; } .bubble { max-width: 78%; padding: 20rpx 24rpx; border-radius: 24rpx; font-size: 28rpx; line-height: 1.55; word-break: break-word; box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.25); } /* 用户气泡:品牌红 */ .bubble.user { background: linear-gradient(135deg, #e63946 0%, #c4232f 100%); color: #fff; border-top-right-radius: 8rpx; } /* 助手气泡:白色磨砂玻璃 */ .bubble.assistant { background: rgba(255, 255, 255, 0.92); color: #222; border-top-left-radius: 8rpx; border: 1rpx solid rgba(255, 255, 255, 0.4); backdrop-filter: blur(10rpx); -webkit-backdrop-filter: blur(10rpx); } .txt { white-space: pre-wrap; display: block; } .atts { display: flex; flex-wrap: wrap; gap: 12rpx; margin-bottom: 12rpx; } .att-img { width: 180rpx; height: 180rpx; border-radius: 12rpx; background: rgba(0, 0, 0, 0.2); } .refs { margin-top: 20rpx; padding-top: 16rpx; border-top: 1rpx dashed rgba(230, 57, 70, 0.3); } .refs-title { font-size: 22rpx; color: #8a8a8a; margin-bottom: 10rpx; } .ref-item { display: flex; flex-direction: column; padding: 10rpx 0; } .ref-title { font-size: 24rpx; color: var(--brand); font-weight: 500; } .ref-snippet { font-size: 22rpx; color: #666; margin-top: 4rpx; line-height: 1.5; } .anchor-end { height: 20rpx; } /* 待发送图片 */ .pending-bar { position: relative; z-index: 2; display: flex; gap: 16rpx; padding: 16rpx 24rpx; background: rgba(255, 255, 255, 0.08); border-top: 1rpx solid rgba(255, 255, 255, 0.15); overflow-x: auto; white-space: nowrap; } .pending-item { position: relative; flex: 0 0 auto; } .pending-img { width: 120rpx; height: 120rpx; border-radius: 12rpx; background: rgba(0, 0, 0, 0.2); } .pending-remove { position: absolute; top: -12rpx; right: -12rpx; width: 40rpx; height: 40rpx; line-height: 36rpx; text-align: center; background: rgba(0, 0, 0, 0.65); color: #fff; border-radius: 50%; font-size: 28rpx; } /* 录音提示 */ .recording-tip { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 16rpx; padding: 16rpx; background: rgba(255, 255, 255, 0.1); color: #fff; font-size: 26rpx; border-top: 1rpx solid rgba(255, 255, 255, 0.15); } .recording-dot { width: 16rpx; height: 16rpx; border-radius: 50%; background: #fff; animation: pulse 1s infinite; } @keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.4); opacity: 0.5; } } /* 底部吸底容器 */ .bottom-dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; padding-bottom: env(safe-area-inset-bottom); background: linear-gradient( to top, rgba(13, 3, 8, 0.85) 0%, rgba(26, 7, 16, 0.6) 60%, rgba(26, 7, 16, 0) 100% ); } /* 底部输入区 */ .input-bar { display: flex; align-items: center; gap: 16rpx; padding: 16rpx 24rpx 24rpx; } .btn-icon { flex: 0 0 auto; width: 72rpx; height: 72rpx; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255, 255, 255, 0.12); border: 1rpx solid rgba(255, 255, 255, 0.28); backdrop-filter: blur(10rpx); -webkit-backdrop-filter: blur(10rpx); } .btn-icon .icon { font-size: 36rpx; color: #fff; } .input-text { flex: 1; height: 72rpx; padding: 0 28rpx; border-radius: 36rpx; font-size: 28rpx; box-sizing: border-box; background: rgba(255, 255, 255, 0.12); border: 1rpx solid rgba(255, 255, 255, 0.28); color: #fff; backdrop-filter: blur(10rpx); -webkit-backdrop-filter: blur(10rpx); } .input-ph { color: rgba(255, 255, 255, 0.55); } .btn-send { flex: 0 0 auto; height: 72rpx; line-height: 72rpx; padding: 0 28rpx; background: var(--brand); color: #fff; border-radius: 36rpx; font-size: 28rpx; width: fit-content!important; box-shadow: 0 4rpx 16rpx rgba(230, 57, 70, 0.4); } .btn-send.disabled { background: rgba(255, 255, 255, 0.18); color: rgba(255, 255, 255, 0.5); box-shadow: none; } .voice-hold { flex: 1; height: 72rpx; line-height: 72rpx; text-align: center; border-radius: 36rpx; font-size: 28rpx; background: rgba(255, 255, 255, 0.12); color: #fff; border: 1rpx solid rgba(255, 255, 255, 0.28); backdrop-filter: blur(10rpx); -webkit-backdrop-filter: blur(10rpx); } .voice-hold.active { background: var(--brand); color: #fff; border-color: var(--brand); }