/* 搜索用户页面样式 */ .search-container { height: 100vh; background-color: #000000; display: flex; flex-direction: column; overflow-x: hidden; box-sizing: border-box; } /* 搜索区域 */ .search-section { width: 100%; display: flex; justify-content: center; align-items: center; margin: 0 auto; } .search-box { margin: 0 auto; width: 100%; height: 80rpx; display: flex; align-items: center; justify-content: center; gap: 12rpx; } .search-box-top{ margin-top: 350rpx; } .search-btn { height: 80rpx; padding: 0 28rpx; border-radius: 12rpx; display: flex; align-items: center; justify-content: center; transition: transform .15s, opacity .2s; max-width: 168rpx; } .search-btn-text { width: 20px; height: 20px; font-size: 26rpx; font-weight: 600; color: #fff; letter-spacing: 2rpx; } .btn-hover, .search-btn:active { opacity: .85; transform: scale(.96); } .search-input-wrapper { /* flex: 1; */ width: 654rpx; height: 74rpx; line-height: 74rpx; /* position: relative; */ /* background: #f8f9fa; */ border-radius: 35rpx; padding: 0 32rpx; display: flex; align-items: center; justify-content: center; border: 1px solid #D9D9D9; /* position: relative; */ } .search-icon-buttom{ width: 40px; height: 40px; position: absolute; right: 15px; display: flex; justify-content: center; align-items: center; } .search-icon-buttom:active{ background-color: #353535; width: 40px; height: 40px; border-radius: 12px; } .search-icon { width: 20px; height: 20px; color: #999; margin-right: 6rpx; } .search-input { flex: 1; font-size: 27rpx; } .placeholder-style { color: #B3B3B3; opacity: 1; } /* 结果容器 */ .results-container { flex: 1; padding: 0 32rpx; width: 100%; box-sizing: border-box; } /* 加载中 */ .loading-container { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 120rpx 0; } .loading-spinner { width: 60rpx; height: 60rpx; border: 4rpx solid #f3f3f3; border-top: 4rpx solid #667eea; border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 24rpx; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } .loading-text { font-size: 28rpx; color: #999; } /* 搜索提示 */ .search-tips { display: flex; flex-direction: column; align-items: center; padding: 120rpx 0; text-align: center; } .tips-icon { width: 80px; height: 80px; margin-bottom: 32rpx; } .tips-title { font-size: 36rpx; font-weight: 600; color: #333; margin-bottom: 16rpx; } .tips-desc { font-size: 28rpx; color: #666; margin-bottom: 48rpx; } .tips-list { display: flex; flex-direction: column; gap: 16rpx; } .tip-item { font-size: 26rpx; color: #999; text-align: left; } /* 无结果 */ .no-results { display: flex; flex-direction: column; align-items: center; padding: 120rpx 0; text-align: center; } .no-results-icon { font-size: 120rpx; margin-bottom: 32rpx; opacity: 0.6; } .no-results-title { font-size: 36rpx; font-weight: 600; color: #333; margin-bottom: 16rpx; } .no-results-desc { font-size: 28rpx; color: #666; } /* 结果列表 */ .results-list { padding: 32rpx 0; } .result-item { background: white; border-radius: 24rpx; padding: 32rpx; margin-bottom: 24rpx; box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05); display: flex; align-items: center; justify-content: space-between; /* 避免内容撑宽导致容器超出屏幕 */ width: 100%; box-sizing: border-box; } /* 用户信息 */ .user-info { display: flex; align-items: center; /* background-color: red; */ flex: 1; margin-right: 24rpx; /* 允许在弹性布局中缩小,避免长昵称/签名把容器撑宽 */ min-width: 0; } .user-avatar { position: relative; margin-right: 24rpx; } .avatar-image { width: 96rpx; height: 96rpx; border-radius: 48rpx; } .avatar-placeholder { width: 96rpx; height: 96rpx; border-radius: 48rpx; background: #e0e0e0; display: flex; align-items: center; justify-content: center; } .avatar-text { font-size: 36rpx; font-weight: 600; color: #666; white-space: nowrap; border: 1px red solid; } .member-badge { position: absolute; bottom: -4rpx; right: -4rpx; background: linear-gradient(135deg, #ffd700, #ffb300); border-radius: 20rpx; padding: 4rpx 8rpx; } .member-text { font-size: 20rpx; /* color: white; */ font-weight: 600; } .user-details { flex: 1; /* 防止内部文本造成横向溢出 */ min-width: 0; } .user-name-row { display: flex; align-items: center; margin-bottom: 8rpx; min-width: 0; } .user-nickname { font-size: 32rpx; font-weight: 600; color: #333; margin-right: 16rpx; /* 长名称省略避免溢出 */ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .gender-icon { width: 32rpx; height: 32rpx; display: flex; align-items: center; justify-content: center; } .gender-icon-img { width: 32rpx; height: 32rpx; } .user-meta { display: flex; align-items: center; /* gap: 4rpx; */ gap: 16rpx; margin-bottom: 8rpx; } .user-id { font-size: 24rpx; /* color: #999; */ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .match-type { font-size: 24rpx; color: #2196f3; background: #e3f2fd; padding: 4rpx 12rpx; border-radius: 12rpx; /* border: 1px solid red; */ white-space: nowrap; } .user-bio { font-size: 26rpx; /* color: #666; */ margin-bottom: 8rpx; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-all; line-height: 1.5; } .status-message { font-size: 24rpx; /* color: #999; */ overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; word-break: break-all; } /* 操作按钮 */ .action-buttons { display: flex; flex-direction: column; gap: 16rpx; } .action-btn { width: 80px; height: 40px; /* padding: 16rpx 32rpx; */ line-height: 40px; border-radius: 12rpx; text-align: center; min-width: 120rpx; } .add-btn.enabled { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); } .add-btn.disabled { background: #f0f0f0; } .pending-btn { background: #fff3e0; border: 2rpx solid #ff9800; } .friend-btn { background: #e8f5e8; border: 2rpx solid #4caf50; } .message-btn { background: #e3f2fd; border: 2rpx solid #2196f3; } .btn-text { width: 60px; height: 60px; font-size: 26rpx; font-weight: 600; } .add-btn.enabled .btn-text { color: white; } .add-btn.disabled .btn-text { color: #999; } .pending-btn .btn-text { color: #ff9800; } .friend-btn .btn-text { color: #4caf50; } .message-btn .btn-text { color: #2196f3; } /* 加载更多 */ .load-more { display: flex; align-items: center; justify-content: center; padding: 32rpx 0; gap: 16rpx; } .load-more-text { font-size: 28rpx; /* color: #999; */ } .no-more { display: flex; justify-content: center; padding: 32rpx 0; } .no-more-text { font-size: 28rpx; /* color: #ccc; */ } /* ================== 暗色主题覆盖(社交-用户搜索) ================== */ .search-container .search-input-wrapper { background: black; border: 1px solid white; } .search-container .search-input { color: white; } .search-container .search-icon { color: #888; } .search-container .results-list .result-item { background: #1e1e1e; border: 1rpx solid #2a2a2a; box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.55); } .search-container .user-nickname { color: #f5f5f5; } .search-container .user-id, .search-container .user-bio, .search-container .status-message { color: #b0b0b0; } .search-container .avatar-placeholder { background: #303030; } .search-container .add-btn.disabled { background: #2a2a2a; } .search-container .pending-btn { background: #4a3720; border-color: #ffb347; } .search-container .friend-btn { background: #1f3321; border-color: #57c765; } .search-container .message-btn { background: #1d3050; border-color: #246bff; } .search-container .add-btn.enabled { background: linear-gradient(135deg, #4d7dff, #246bff); box-shadow: 0 4rpx 12rpx rgba(36, 107, 255, 0.35); } .search-container .loading-text, .search-container .tips-desc, .search-container .tip-item, .search-container .no-results-desc { color: #9e9e9e; } .search-container .tips-title, .search-container .no-results-title { color: #f5f5f5; } .search-container .tips-icon, .search-container .no-results-icon { opacity: .8; } .search-container .load-more-text { color: #888; } .search-container .no-more-text { color: #555; } /* ===== 添加好友对话框 ===== */ .add-dialog-mask { position: fixed; left: 0; right: 0; top: 0; bottom: 0; background: rgba(0,0,0,0.55); display: flex; align-items: center; justify-content: center; z-index: 9999; padding: 0 32rpx; box-sizing: border-box; } .add-dialog { width: 100%; max-width: 640rpx; background: #1e1e1e; border: 1rpx solid #2a2a2a; border-radius: 24rpx; padding: 32rpx; box-shadow: 0 10rpx 30rpx rgba(0,0,0,0.45); box-sizing: border-box; } .add-dialog-title { font-size: 32rpx; font-weight: 600; /* color: #f5f5f5; */ margin-bottom: 16rpx; word-wrap: break-word; } .add-dialog-input { width: 100%; min-height: 140rpx; max-height: 360rpx; padding: 20rpx; background: #262626; /* color: #e0e0e0; */ border-radius: 16rpx; border: 1rpx solid #2f2f2f; box-sizing: border-box; word-wrap: break-word; } .add-dialog-actions { display: flex; justify-content: flex-end; gap: 16rpx; margin-top: 20rpx; } .add-dialog-btn { min-width: 160rpx; height: 72rpx; border-radius: 40rpx; font-size: 28rpx; font-weight: 600; } .add-dialog-btn.cancel { background: #2a2a2a; /* color: #ccc; */ } .add-dialog-btn.confirm { background: linear-gradient(135deg, #4d7dff, #246bff); /* color: #fff; */ }