文件
2026-06-04 22:42:27 +08:00

1724 行
28 KiB
CSS

/* 全局样式 */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
background-color: #f5f5f5;
color: #333;
line-height: 1.6;
}
/* 登录/注册页面样式 */
.login-container {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background: linear-gradient(135deg, #07c160 0%, #00a86b 100%);
}
.login-box {
background: white;
border-radius: 10px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
padding: 30px;
width: 100%;
max-width: 400px;
}
.app-title {
text-align: center;
color: #07c160;
font-size: 28px;
margin-bottom: 20px;
font-weight: bold;
}
.login-tabs {
display: flex;
margin-bottom: 20px;
border-bottom: 1px solid #eee;
}
.tab-btn {
flex: 1;
background: none;
border: none;
padding: 10px;
font-size: 16px;
color: #666;
cursor: pointer;
transition: all 0.3s ease;
}
.tab-btn.active {
color: #07c160;
border-bottom: 2px solid #07c160;
font-weight: bold;
}
.tab-content {
display: none;
}
.tab-content.active {
display: block;
}
.input-group {
position: relative;
margin-bottom: 20px;
}
.input-group i {
position: absolute;
left: 15px;
top: 50%;
transform: translateY(-50%);
color: #999;
}
.input-group input {
width: 100%;
padding: 12px 15px 12px 45px;
border: 1px solid #ddd;
border-radius: 25px;
font-size: 16px;
transition: all 0.3s ease;
}
.input-group input:focus {
outline: none;
border-color: #07c160;
box-shadow: 0 0 0 2px rgba(7, 193, 96, 0.1);
}
.login-btn {
width: 100%;
padding: 12px;
background: #07c160;
color: white;
border: none;
border-radius: 25px;
font-size: 16px;
font-weight: bold;
cursor: pointer;
transition: all 0.3s ease;
}
.login-btn:hover {
background: #06ad56;
}
.error {
background: #ffebee;
color: #c62828;
padding: 10px;
border-radius: 5px;
margin-bottom: 15px;
font-size: 14px;
}
/* 邮箱绑定提醒横幅样式 */
.email-banner {
background: #fff3cd;
border-bottom: 1px solid #ffeeba;
padding: 15px 20px;
display: flex;
justify-content: center;
align-items: center;
z-index: 1000;
}
.banner-content {
display: flex;
align-items: center;
max-width: 1200px;
width: 100%;
}
.banner-content i {
font-size: 24px;
color: #856404;
margin-right: 15px;
}
.banner-text {
flex: 1;
}
.banner-text h4 {
margin: 0 0 5px 0;
color: #856404;
font-size: 16px;
font-weight: 600;
}
.banner-text p {
margin: 0;
color: #856404;
font-size: 14px;
}
.banner-btn {
background: #ffc107;
color: #856404;
border: none;
border-radius: 4px;
padding: 8px 16px;
font-size: 14px;
font-weight: 500;
cursor: pointer;
transition: all 0.3s ease;
}
.banner-btn:hover {
background: #e0a800;
}
/* 主聊天界面样式 */
.chat-app {
display: flex;
height: 100vh;
background: white;
}
/* 当横幅存在时调整高度 */
.email-banner + .chat-app {
height: calc(100vh - 70px);
}
/* 左侧边栏样式 */
.sidebar {
width: 350px;
border-right: 1px solid #e0e0e0;
display: flex;
flex-direction: column;
background: white;
flex-shrink: 0;
}
.sidebar-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 15px;
background: #fafafa;
border-bottom: 1px solid #e0e0e0;
}
.user-info {
display: flex;
align-items: center;
}
.avatar {
position: relative;
width: 40px;
height: 40px;
border-radius: 50%;
background: #07c160;
color: white;
display: flex;
align-items: center;
justify-content: center;
font-size: 20px;
margin-right: 10px;
}
.username {
font-weight: bold;
color: #333;
}
.header-actions, .chat-actions {
display: flex;
gap: 10px;
}
.action-btn {
width: 40px;
height: 40px;
border: none;
background: none;
border-radius: 50%;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
color: #666;
transition: all 0.3s ease;
}
.action-btn:hover {
background: #f0f0f0;
color: #333;
}
/* 搜索框样式 */
.search-box {
position: relative;
padding: 10px;
background: #fafafa;
border-bottom: 1px solid #e0e0e0;
}
/* 标签切换样式 */
.chat-tabs {
display: flex;
background: #fafafa;
border-bottom: 1px solid #e0e0e0;
}
.chat-tabs .tab-btn {
flex: 1;
background: none;
border: none;
padding: 12px;
font-size: 14px;
color: #666;
cursor: pointer;
transition: all 0.3s ease;
}
.chat-tabs .tab-btn.active {
color: #07c160;
border-bottom: 2px solid #07c160;
font-weight: bold;
}
.chat-tabs .tab-btn:hover {
background: #f0f0f0;
color: #333;
}
.search-box i {
position: absolute;
left: 20px;
top: 50%;
transform: translateY(-50%);
color: #999;
}
.search-box input {
width: 100%;
padding: 10px 15px 10px 40px;
border: 1px solid #ddd;
border-radius: 20px;
font-size: 14px;
background: white;
}
.search-box input:focus {
outline: none;
border-color: #07c160;
}
/* 好友列表样式 */
.friends-list {
flex: 1;
overflow-y: auto;
}
.friend-item {
display: flex;
align-items: center;
padding: 15px;
cursor: pointer;
border-bottom: 1px solid #f0f0f0;
transition: all 0.3s ease;
}
.friend-item:hover {
background: #f5f5f5;
}
.friend-item.active {
background: #e8f5e8;
}
/* 群组列表样式 */
.groups-list {
flex: 1;
overflow-y: auto;
}
.group-item {
display: flex;
align-items: center;
padding: 15px;
cursor: pointer;
border-bottom: 1px solid #f0f0f0;
transition: all 0.3s ease;
}
.group-item:hover {
background: #f5f5f5;
}
.group-item.active {
background: #e8f5e8;
}
.group-info {
flex: 1;
}
.group-name {
font-weight: bold;
margin-bottom: 5px;
color: #333;
}
.group-last-message {
font-size: 13px;
color: #999;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.group-time {
font-size: 12px;
color: #bbb;
}
.friend-info {
flex: 1;
}
.friend-name {
font-weight: bold;
margin-bottom: 5px;
color: #333;
}
.friend-last-message {
font-size: 13px;
color: #999;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.friend-time {
font-size: 12px;
color: #bbb;
}
.online-status {
width: 10px;
height: 10px;
background: #07c160;
border-radius: 50%;
margin-left: 10px;
border: 2px solid white;
box-shadow: 0 0 0 1px #e0e0e0;
}
/* 右侧聊天区域样式 */
.chat-main {
flex: 1;
display: flex;
flex-direction: column;
background: #fafafa;
}
.chat-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 15px;
background: white;
border-bottom: 1px solid #e0e0e0;
}
/* 聊天搜索栏样式 */
.chat-search {
background: white;
border-bottom: 1px solid #e0e0e0;
padding: 10px 15px;
}
.chat-search .search-box {
position: relative;
margin: 0;
background: #f5f5f5;
border-radius: 20px;
padding: 5px 15px;
display: flex;
align-items: center;
}
.chat-search .search-box i {
position: static;
margin-right: 10px;
color: #999;
}
.chat-search .search-box input {
flex: 1;
border: none;
background: transparent;
padding: 8px 0;
font-size: 14px;
outline: none;
}
.chat-search .close-search-btn {
width: 30px;
height: 30px;
border: none;
background: none;
border-radius: 50%;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
color: #999;
transition: all 0.3s ease;
margin-left: 5px;
}
.chat-search .close-search-btn:hover {
background: #e0e0e0;
color: #333;
}
/* 搜索结果样式 */
.search-results {
margin-top: 10px;
max-height: 300px;
overflow-y: auto;
}
.search-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 0;
border-bottom: 1px solid #f0f0f0;
font-size: 14px;
color: #666;
}
.search-count {
color: #07c160;
font-weight: bold;
}
.search-list {
margin-top: 10px;
}
.search-item {
padding: 12px;
border-bottom: 1px solid #f0f0f0;
cursor: pointer;
transition: background-color 0.3s ease;
}
.search-item:hover {
background: #f9f9f9;
}
.search-item-content {
font-size: 14px;
line-height: 1.4;
margin-bottom: 5px;
}
.search-item-time {
font-size: 12px;
color: #999;
}
.search-highlight {
background: #fff9c4;
color: #ff6f00;
padding: 0 2px;
border-radius: 2px;
}
.chat-user-info {
display: flex;
align-items: center;
}
/* 聊天内容样式 */
.chat-content {
flex: 1;
padding: 20px;
overflow-y: auto;
background: #f5f5f5;
}
.empty-chat {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
color: #999;
}
.empty-chat i {
font-size: 64px;
margin-bottom: 20px;
opacity: 0.5;
}
.message {
display: flex;
margin-bottom: 20px;
align-items: flex-start;
}
.message.sent {
flex-direction: row-reverse;
}
.message.received {
flex-direction: row;
}
.message-avatar {
width: 35px;
height: 35px;
border-radius: 50%;
background: #07c160;
color: white;
display: flex;
align-items: center;
justify-content: center;
font-size: 16px;
margin: 0 10px;
}
.message-content {
max-width: 60%;
}
.message-text {
padding: 12px 16px;
border-radius: 18px;
font-size: 14px;
line-height: 1.4;
word-wrap: break-word;
}
.message.sent .message-text {
background: #07c160;
color: white;
border-top-right-radius: 4px;
}
.message.received .message-text {
background: white;
color: #333;
border-top-left-radius: 4px;
}
.message-sender {
font-size: 12px;
color: #666;
margin-bottom: 4px;
font-weight: 500;
}
.message-time {
font-size: 11px;
color: #999;
margin-top: 5px;
text-align: right;
display: flex;
align-items: center;
justify-content: flex-end;
gap: 4px;
}
.message.received .message-time {
text-align: left;
justify-content: flex-start;
}
/* 消息状态指示器 */
.message-status {
display: inline-flex;
align-items: center;
font-size: 11px;
}
.message-status i {
margin-left: 2px;
}
/* 图片消息样式 */
.message-image {
position: relative;
max-width: 200px;
border-radius: 10px;
overflow: hidden;
cursor: pointer;
}
.message-image img {
width: 100%;
height: auto;
border-radius: 10px;
transition: all 0.3s ease;
}
.message-image img:hover {
opacity: 0.9;
}
.message-image img.expanded {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
max-width: 90%;
max-height: 90vh;
z-index: 9999;
border-radius: 5px;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}
/* 发送的图片消息样式 */
.message.sent .message-image {
background: #07c160;
padding: 4px;
border-bottom-right-radius: 4px;
}
/* 接收的图片消息样式 */
.message.received .message-image {
background: white;
padding: 4px;
border-bottom-left-radius: 4px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
/* 在线状态样式 */
.online-indicator {
position: absolute;
bottom: 0;
right: 0;
width: 10px;
height: 10px;
background: #07c160;
border-radius: 50%;
border: 2px solid white;
box-shadow: 0 0 0 1px #e0e0e0;
}
.online-status-text {
font-size: 12px;
color: #07c160;
margin-left: 8px;
font-weight: normal;
}
/* 设置菜单样式 */
.settings-menu {
position: fixed;
background: white;
border-radius: 5px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
z-index: 9999;
display: none;
min-width: 150px;
}
.settings-menu.active {
display: block;
}
.settings-menu ul {
list-style: none;
padding: 0;
margin: 0;
}
.settings-menu li {
padding: 10px 15px;
cursor: pointer;
font-size: 14px;
transition: all 0.3s ease;
}
.settings-menu li:hover {
background: #f5f5f5;
}
/* 右键菜单样式 */
.context-menu {
position: fixed;
background: white;
border-radius: 5px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
z-index: 9999;
display: none;
min-width: 120px;
}
.context-menu.active {
display: block;
}
.context-menu ul {
list-style: none;
padding: 0;
margin: 0;
}
.context-menu li {
padding: 8px 12px;
cursor: pointer;
font-size: 14px;
transition: all 0.3s ease;
}
.context-menu li:hover {
background: #f5f5f5;
}
/* 头像上传样式 */
.avatar-upload-container {
text-align: center;
margin-bottom: 20px;
}
.avatar-preview {
width: 120px;
height: 120px;
border-radius: 50%;
background: #f0f0f0;
margin: 0 auto 20px;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
border: 2px solid #e0e0e0;
}
.avatar-preview img {
width: 100%;
height: 100%;
object-fit: cover;
}
#choose-avatar-btn {
margin-top: 10px;
}
/* Emoji选择器样式 */
.emoji-selector {
position: absolute;
bottom: 100px;
left: 20px;
width: 300px;
background: white;
border-radius: 10px;
box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
z-index: 1000;
display: none;
animation: slideUp 0.3s ease;
}
.emoji-selector.active {
display: block;
}
.emoji-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 15px;
border-bottom: 1px solid #f0f0f0;
}
.emoji-header h4 {
margin: 0;
color: #333;
font-size: 14px;
}
.close-emoji {
background: none;
border: none;
font-size: 18px;
cursor: pointer;
color: #999;
width: 24px;
height: 24px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s ease;
}
.close-emoji:hover {
background: #f0f0f0;
color: #333;
}
.emoji-categories {
display: flex;
padding: 10px;
border-bottom: 1px solid #f0f0f0;
gap: 5px;
}
.emoji-category {
width: 36px;
height: 36px;
border: none;
background: #f5f5f5;
border-radius: 6px;
font-size: 16px;
cursor: pointer;
transition: all 0.3s ease;
}
.emoji-category:hover {
background: #e0e0e0;
}
.emoji-category.active {
background: #07c160;
color: white;
}
.emoji-content {
padding: 10px;
max-height: 200px;
overflow-y: auto;
display: grid;
grid-template-columns: repeat(8, 1fr);
gap: 5px;
}
.emoji-item {
width: 36px;
height: 36px;
border: none;
background: none;
border-radius: 6px;
font-size: 18px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s ease;
}
.emoji-item:hover {
background: #f0f0f0;
transform: scale(1.2);
}
/* 聊天输入框样式 */
.chat-input-container {
background: white;
padding: 15px;
border-top: 1px solid #e0e0e0;
}
.input-tools {
display: flex;
gap: 10px;
margin-bottom: 10px;
}
.tool-btn {
width: 40px;
height: 40px;
border: none;
background: none;
border-radius: 50%;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
color: #666;
transition: all 0.3s ease;
}
.tool-btn:hover {
background: #f0f0f0;
color: #333;
}
.input-wrapper {
display: flex;
align-items: center;
gap: 10px;
background: #f5f5f5;
border-radius: 25px;
padding: 5px 10px;
}
#message-input {
flex: 1;
border: none;
background: transparent;
padding: 10px;
font-size: 14px;
resize: none;
outline: none;
}
.send-btn {
width: 35px;
height: 35px;
border: none;
background: #07c160;
color: white;
border-radius: 50%;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s ease;
}
.send-btn:hover {
background: #06ad56;
}
/* 模态框样式 */
.modal {
display: none;
position: fixed;
z-index: 1000;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
animation: fadeIn 0.3s ease;
}
.modal.active {
display: flex;
justify-content: center;
align-items: center;
}
.modal-content {
background: white;
border-radius: 10px;
box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
width: 90%;
max-width: 400px;
animation: slideUp 0.3s ease;
}
.modal-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px;
border-bottom: 1px solid #eee;
}
.modal-header h3 {
margin: 0;
color: #333;
}
.close-btn {
background: none;
border: none;
font-size: 24px;
cursor: pointer;
color: #999;
padding: 0;
width: 30px;
height: 30px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
transition: all 0.3s ease;
}
.close-btn:hover {
background: #f0f0f0;
color: #333;
}
.modal-body {
padding: 20px;
}
.modal-footer {
display: flex;
justify-content: flex-end;
gap: 10px;
padding: 20px;
border-top: 1px solid #eee;
}
.btn {
padding: 10px 20px;
border: none;
border-radius: 5px;
font-size: 14px;
cursor: pointer;
transition: all 0.3s ease;
}
.btn-cancel {
background: #f5f5f5;
color: #666;
}
.btn-cancel:hover {
background: #e0e0e0;
}
.btn-primary {
background: #07c160;
color: white;
}
.btn-primary:hover {
background: #06ad56;
}
/* 动画效果 */
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
@keyframes slideUp {
from {
opacity: 0;
transform: translateY(30px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* 滚动条样式 */
::-webkit-scrollbar {
width: 6px;
}
::-webkit-scrollbar-track {
background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
background: #c1c1c1;
border-radius: 3px;
}
/* @mention功能样式 */
.mention-dropdown {
position: absolute;
background: white;
border: 1px solid #ddd;
border-radius: 4px;
box-shadow: 0 2px 8px rgba(0,0,0,0.15);
max-height: 200px;
overflow-y: auto;
z-index: 1000;
min-width: 200px;
}
.mention-user-item {
padding: 8px 12px;
cursor: pointer;
display: flex;
align-items: center;
transition: background-color 0.2s ease;
}
.mention-user-item:hover {
background-color: #f5f5f5;
}
.mention-user-item.selected {
background-color: #f0f9ff;
}
.mention-user-item img {
width: 32px;
height: 32px;
border-radius: 50%;
margin-right: 8px;
object-fit: cover;
}
/* 消息中的@提及样式 */
.mention {
color: #1890ff;
font-weight: 500;
cursor: pointer;
}
.mention:hover {
text-decoration: underline;
}
::-webkit-scrollbar-thumb:hover {
background: #a8a8a8;
}
/* 响应式设计 */
@media (max-width: 768px) {
.sidebar {
width: 100%;
position: absolute;
z-index: 100;
height: 100vh;
transform: translateX(-100%);
transition: transform 0.3s ease;
}
.sidebar.active {
transform: translateX(0);
}
.chat-main {
width: 100%;
}
/* 手机端侧边栏切换按钮 */
.toggle-sidebar-btn {
display: flex !important;
margin-right: 10px;
}
/* 调整聊天头部布局 */
.chat-header {
padding: 10px 15px !important;
}
.chat-user-info {
flex: 1;
overflow: hidden;
}
.chat-user-info .username {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.chat-actions {
gap: 5px !important;
}
.chat-actions .action-btn {
width: 32px !important;
height: 32px !important;
}
}
/* 引用消息样式 */
.message-quote {
margin-bottom: 8px;
padding: 8px 12px;
border-left: 3px solid #d9d9d9;
background: #f5f5f5;
border-radius: 8px;
font-size: 13px;
line-height: 1.3;
word-wrap: break-word;
}
.sent .message-quote {
background: rgba(255, 255, 255, 0.9);
border-left-color: #07c160;
}
.quote-header {
font-weight: 500;
margin-bottom: 4px;
color: #999;
font-size: 12px;
}
.sent .quote-header {
color: #666;
}
.quote-content {
color: #666;
}
.sent .quote-content {
color: #333;
}
/* 输入框中的引用样式 */
.quote-input-container {
margin: 10px 15px;
padding: 10px;
border: 1px solid #e8e8e8;
border-radius: 8px;
background: #f9f9f9;
font-size: 14px;
}
.quote-input-container .quote-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 6px;
}
.quote-input-container .quote-header span {
font-weight: 500;
color: #666;
}
.quote-input-container .close-quote {
background: none;
border: none;
font-size: 16px;
color: #999;
cursor: pointer;
padding: 0;
width: 20px;
height: 20px;
display: flex;
align-items: center;
justify-content: center;
}
.quote-input-container .close-quote:hover {
color: #333;
}
.quote-input-container .quote-content {
color: #333;
word-wrap: break-word;
line-height: 1.3;
}
/* 群组成员列表样式 */
.group-member-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px;
border-bottom: 1px solid #f0f0f0;
}
.group-member-item:hover {
background: #f5f5f5;
}
.member-info {
display: flex;
align-items: center;
}
.member-info .avatar {
width: 36px;
height: 36px;
border-radius: 50%;
background: #f0f0f0;
display: flex;
align-items: center;
justify-content: center;
margin-right: 12px;
font-size: 16px;
}
.member-info .avatar img {
width: 100%;
height: 100%;
border-radius: 50%;
object-fit: cover;
}
.member-info div {
display: flex;
flex-direction: column;
}
.member-info div div:first-child {
font-weight: 500;
color: #333;
margin-bottom: 2px;
}
.member-info div div:last-child {
font-size: 12px;
color: #999;
}
/* 成员操作按钮容器 */
.member-actions {
display: flex;
gap: 8px;
}
/* 禁言按钮样式 */
.btn-warning {
background-color: #faad14;
color: white;
}
.btn-warning:hover {
background-color: #d48806;
}
/* 解禁按钮样式 */
.btn-success {
background-color: #52c41a;
color: white;
}
.btn-success:hover {
background-color: #389e0d;
}
/* 邀请好友复选框样式 */
.friend-checkbox-item {
display: flex;
align-items: center;
padding: 10px;
border-bottom: 1px solid #f0f0f0;
cursor: pointer;
transition: background-color 0.2s ease;
}
.friend-checkbox-item:hover {
background-color: #f5f5f5;
}
/* 邀请好友复选框 */
.invite-friend-checkbox {
margin-left: 10px;
cursor: pointer;
}
/* 邀请好友复选框标签 */
.invite-friend-checkbox + label {
margin-left: 5px;
cursor: pointer;
}
/* 好友请求列表样式 */
.friend-request-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px;
border-bottom: 1px solid #f0f0f0;
}
.friend-request-item:hover {
background: #f5f5f5;
}
.request-info {
display: flex;
align-items: center;
flex: 1;
}
.request-info .avatar {
width: 40px;
height: 40px;
border-radius: 50%;
background: #f0f0f0;
display: flex;
align-items: center;
justify-content: center;
margin-right: 12px;
font-size: 18px;
}
.request-info .avatar img {
width: 100%;
height: 100%;
border-radius: 50%;
object-fit: cover;
}
.request-info div {
flex: 1;
}
.request-actions {
display: flex;
gap: 8px;
}
/* 好友列表项样式 */
.friend-item {
position: relative;
}
.friend-actions {
display: flex;
gap: 5px;
margin-right: 10px;
opacity: 0;
transition: opacity 0.3s ease;
}
.friend-item:hover .friend-actions {
opacity: 1;
}
.delete-friend-btn {
width: 30px;
height: 30px;
border: none;
background: none;
border-radius: 50%;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
color: #999;
transition: all 0.3s ease;
}
.delete-friend-btn:hover {
background: #ffebee;
color: #ff4d4f;
}
/* 按钮样式 */
.btn-danger {
background-color: #ff4d4f;
color: white;
}
.btn-danger:hover {
background-color: #ff7875;
}
.btn-sm {
padding: 6px 12px;
font-size: 12px;
}
/* 好友请求徽章样式 */
#request-badge {
position: absolute;
top: 0;
right: 0;
background: #ff4d4f;
color: white;
border-radius: 50%;
width: 16px;
height: 16px;
font-size: 10px;
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
}
.action-btn {
position: relative;
}
/* 手机端侧边栏切换按钮 */
.toggle-sidebar-btn {
display: none;
}
/* 下拉菜单容器 */
.dropdown-menu-container {
position: relative;
}
/* 下拉菜单 */
.dropdown-menu {
position: absolute;
top: 100%;
right: 0;
background: white;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
min-width: 160px;
margin-top: 5px;
z-index: 1000;
display: none;
animation: slideDown 0.3s ease;
}
.dropdown-menu.active {
display: block;
}
/* 下拉菜单列表 */
.dropdown-menu ul {
list-style: none;
padding: 8px 0;
margin: 0;
}
/* 下拉菜单项 */
.dropdown-menu li {
padding: 10px 16px;
display: flex;
align-items: center;
cursor: pointer;
transition: background-color 0.2s ease;
}
.dropdown-menu li:hover {
background-color: #f5f5f5;
}
/* 下拉菜单项图标 */
.dropdown-menu li i {
margin-right: 10px;
font-size: 14px;
color: #666;
}
/* 下拉菜单项文本 */
.dropdown-menu li span {
font-size: 14px;
color: #333;
}
/* 分隔线 */
.dropdown-menu li.divider {
height: 1px;
background: #e8e8e8;
margin: 8px 0;
padding: 0;
cursor: default;
}
.dropdown-menu li.divider:hover {
background: #e8e8e8;
}
/* 动画 */
@keyframes slideDown {
from {
opacity: 0;
transform: translateY(-10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* 分享群组样式 */
.share-group-info {
padding: 20px 0;
}
.share-group-info h4 {
margin-bottom: 20px;
color: #333;
font-size: 18px;
}
.share-link-container {
display: flex;
margin: 15px 0;
}
.share-link-input {
flex: 1;
padding: 10px 15px;
border: 1px solid #d9d9d9;
border-radius: 4px 0 0 4px;
font-size: 14px;
color: #333;
}
.share-link-input:focus {
outline: none;
border-color: #1890ff;
box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}
.share-tip {
margin-top: 15px;
font-size: 14px;
color: #999;
line-height: 1.5;
}
/* 二维码相关样式 */
.qrcode-section {
margin-top: 30px;
padding-top: 20px;
border-top: 1px solid #f0f0f0;
}
.qrcode-container {
position: relative;
margin: 20px 0;
}
#qrcode {
display: flex;
justify-content: center;
align-items: center;
padding: 20px;
background: white;
border-radius: 8px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
#qrcode canvas {
max-width: 200px;
max-height: 200px;
}
.qrcode-loading {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(255, 255, 255, 0.9);
display: flex;
justify-content: center;
align-items: center;
border-radius: 8px;
font-size: 14px;
color: #666;
}
.qrcode-actions {
display: flex;
gap: 10px;
margin: 20px 0;
justify-content: center;
}
.qrcode-actions .btn {
flex: 1;
max-width: 150px;
}
/* 辅助类 */
.btn-secondary {
background-color: #6c757d;
color: white;
}
.btn-secondary:hover {
background-color: #5a6268;
}