/* 整体容器样式 */
body {
    margin: 0;
    padding: 0;
    background: #f7f7f7;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.chat-container {
    max-width: 800px;
    margin: 0 auto;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f7f7f7;
}

/* 顶部用户信息栏 */
.user-info {
    padding: 12px 20px;
    background: #ededed;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #d6d6d6;
    flex-wrap: wrap;
}

.user-info .avatar {
    width: 40px;
    height: 40px;
    border-radius: 20px;
    cursor: pointer;
}

#userName {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

/* 消息区域 */
.messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f7f7f7;
    display: flex;
    flex-direction: column;
    padding-bottom: 50px;
}

.message {
    margin: 15px 0 5px;
    display: flex;
    align-items: flex-start;
    position: relative;
    padding-top: 18px;
}

/* 图片消息样式 */
.image-container {
    position: relative;
    display: inline-block;
}

.image-thumbnail {
    transition: transform 0.2s ease;
}

.image-thumbnail:hover {
    transform: scale(1.02);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px;
    border-radius: 4px;
}
.image-container:hover .image-overlay {
    opacity: 1;
}

.image-info-overlay {
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.image-name-overlay {
    font-weight: bold;
    margin-bottom: 5px;
}

.image-size-overlay {
    font-size: 12px;
}

.view-btn-overlay {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    align-self: flex-start;
    transition: background-color 0.2s ease;
}

.view-btn-overlay:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.message .avatar {
    width: 40px;
    height: 40px;
    border-radius: 3px;
    margin-right: 12px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.message-content {
    background: white;
    padding: 8px 12px;
    border-radius: 4px;
    position: relative;
    max-width: 60%;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    word-break: break-all;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.message.self {
    flex-direction: row-reverse;
}

.message.self .avatar {
    margin-right: 0;
    margin-left: 12px;
}

.message-content::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    margin-top: -6px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 6px 8px 6px 0;
    border-color: transparent white transparent transparent;
}

.message.self .message-content {
    background: #95ec69;
}

.message.self .message-content::before {
    left: auto;
    right: -8px;
    border-width: 6px 0 6px 8px;
    border-color: transparent transparent transparent #95ec69;
}

.message-content strong {
    display: none;
}

.message-content p {
    margin: 0;
    color: #333;
    font-size: 14px;
    line-height: 1.4;
    word-break: break-all;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.message-time {
    font-size: 12px;
    color: #999;
    display: block;
    margin-top: 2px;
    margin-left: 52px;
    position: absolute;
    bottom: -18px;
}

.message.self .message-time {
    right: 52px;
    left: auto;
    margin-left: 0;
}

/* 输入区域 */
.input-area {
    background: #f7f7f7;
    border-top: 1px solid #d6d6d6;
    padding: 12px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-wrapper {
    flex: 1;
    background: white;
    border-radius: 4px;
    /* padding: 6px 10px; */
    display: flex;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

#messageInput {
    flex: 1;
    border: none;
    padding: 8px 10px;
    height: 20px;
    line-height: 20px;
    font-size: 15px;
    background: transparent;
}

#messageInput:focus {
    outline: none;
}

#sendButton {
    padding: 0;
    width: 60px;
    height: 36px;
    line-height: 36px;
    background: #07c160;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    flex-shrink: 0;
    text-align: center;
    transition: background-color 0.2s ease;
}

#sendButton:hover {
    background: #06ae56;
    transform: none;
    box-shadow: none;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    background: white;
    width: 320px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 3px;
    overflow: hidden;
}

.modal-header {
    padding: 15px 20px;
    background: #f7f7f7;
    border-bottom: 1px solid #e5e5e5;
}

.modal-header h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.close-modal {
    position: absolute;
    right: 15px;
    top: 12px;
    font-size: 20px;
    color: #999;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.close-modal:hover {
    color: #666;
}

.modal-body {
    padding: 20px;
}

/* .input-group {
    margin-bottom: 20px;
} */

.input-group label {
    display: block;
    color: #666;
    font-size: 14px;
    margin-bottom: 8px;
}

.input-group input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e5e5e5;
    border-radius: 3px;
    font-size: 14px;
    box-sizing: border-box;
}

.input-group input:focus {
    outline: none;
    border-color: #07c160;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e5e5e5;
    text-align: right;
}

#saveUserInfo {
    background: #07c160;
    color: white;
    border: none;
    padding: 8px 22px;
    border-radius: 3px;
    font-size: 14px;
    cursor: pointer;
}

#saveUserInfo:hover {
    background: #06ae56;
}

#cancelUserInfo {
    background: #f2f2f2;
    color: #333;
    border: none;
    padding: 8px 22px;
    border-radius: 3px;
    font-size: 14px;
    cursor: pointer;
    margin-right: 10px;
}

#cancelUserInfo:hover {
    background: #e5e5e5;
}

/* 滚动条 */
.messages::-webkit-scrollbar {
    width: 6px;
}

.messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.messages::-webkit-scrollbar-track {
    background: transparent;
}

/* 添加用户名显示样式 */
.message .username {
    position: absolute;
    font-size: 12px;
    color: #999;
    white-space: nowrap;
    top: 0;
    left: 52px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.message.self .username {
    right: 52px;
    left: auto;
    text-align: right;
}

/* 在线人数显示样式 */
.online-count {
    padding: 6px 12px;
    background: rgba(7, 193, 96, 0.1);
    border-radius: 5px;
    font-size: 13px;
    color: #07c160;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 100;
    width: fit-content;
    margin: 0 auto 0;
}

#onlineCount {
    font-weight: 500;
}

/* 退出按钮样式 */
.logout-btn {
    padding: 6px 12px;
    background: #f5f5f5;
    border: none;
    border-radius: 4px;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    margin-left: 15px;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background: #e0e0e0;
    color: #333;
}

/* 公告区域样式 */
.announcement-area {
    background: #fff5e6;
    padding: 5px 5px;
    border-bottom: 1px solid #ffe0b2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    flex-wrap: wrap;
    gap: 10px;
    overflow: hidden;
}

.announcement-content {
    color: #666;
    flex: 1;
    line-height: 1.5;
    min-width: 200px;
    white-space: nowrap;
    animation: marquee 30s linear infinite;
    padding-left: 100%;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-200%);
    }
}

/* 当鼠标悬停时暂停动画 */
.announcement-content:hover {
    animation-play-state: paused;
}

.edit-announcement-btn {
    padding: 4px 10px;
    background: #ff9800;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    margin-left: 15px;
}

.edit-announcement-btn:hover {
    background: #f57c00;
}

/* 公告编辑框样式 */
.modal-body textarea {
    width: 93%;
    padding: 10px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    resize: vertical;
    min-height: 100px;
    font-size: 14px;
    font-family: inherit;
}

.modal-body textarea:focus {
    outline: none;
    border-color: #07c160;
}

/* 公告确定 */
#saveAnnouncement {
    background: #07c160;
    color: white;
    border: none;
    padding: 8px 22px;
    border-radius: 3px;
    font-size: 14px;
    cursor: pointer;
}

#saveAnnouncement:hover {
    background: #06ae56;
}

/* 公告取消 */
#cancelAnnouncement {
    background: #f2f2f2;
    color: #333;
    border: none;
    padding: 8px 22px;
    border-radius: 3px;
    font-size: 14px;
    cursor: pointer;
    margin-right: 10px;
}

#cancelAnnouncement:hover {
    background: #e5e5e5;
}

/* 管理按钮样式 */
.admin-btn {
    padding: 4px 10px;
    background: #1976d2;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    margin-left: 15px;
}

.admin-btn:hover {
    background: #1565c0;
}

/* 添加响应式设计 */
@media screen and (max-width: 480px) {
    .chat-container {
        height: 100vh;
        max-width: 100%;
    }
    
    .user-info {
        padding: 8px 12px;
        gap: 8px;
    }
    
    .user-info .avatar {
        width: 32px;
        height: 32px;
    }
    
    #userName {
        font-size: 14px;
    }
    
    .online-count {
        /* padding: 4px 8px; */
        font-size: 12px;
        margin: 0 auto 0;
    }
    
    .logout-btn {
        padding: 4px 8px;
        font-size: 12px;
        margin-left: 5px;
    }
    
    .announcement-area {
        padding: 8px 12px;
    }
    
    .announcement-content {
        font-size: 13px;
        width: 100%;
    }
    
    .edit-announcement-btn {
        padding: 3px 8px;
        font-size: 11px;
        margin-left: auto;
    }
    
    .admin-btn {
        padding: 3px 8px;
        font-size: 11px;
        margin-left: 8px;
    }
}

/* 管理员列表样式 */
.admin-list {
    margin-top: 20px;
    border-top: 1px solid #e5e5e5;
    padding-top: 15px;
}

.admin-list-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.admin-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.admin-avatar {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    margin-right: 10px;
    object-fit: cover;
}

.admin-item:last-child {
    border-bottom: none;
}

.admin-name {
    font-size: 14px;
    color: #333;
}

.remove-admin {
    padding: 4px 8px;
    background: #f5f5f5;
    border: none;
    border-radius: 3px;
    color: #ff4d4f;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.remove-admin:hover {
    background: #fff1f0;
}

/* 微信风格的按钮样式 */
.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e5e5e5;
    text-align: right;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

#saveSetAdmin {
    background: #07c160;
    color: white;
    border: none;
    padding: 0 24px;
    height: 36px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#saveSetAdmin:hover {
    background: #06ae56;
}

#cancelSetAdmin {
    background: #f2f2f2;
    color: #333;
    border: none;
    padding: 0 24px;
    height: 36px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#cancelSetAdmin:hover {
    background: #e5e5e5;
}

/* 输入框样式优化 */
#newAdminUsername {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

#newAdminUsername:focus {
    outline: none;
    border-color: #07c160;
    box-shadow: 0 0 0 2px rgba(7, 193, 96, 0.1);
}

/* 响应式适配 */
@media screen and (max-width: 480px) {
    .admin-item {
        padding: 6px 0;
    }
    
    .admin-name {
        font-size: 13px;
    }
    
    .remove-admin {
        padding: 3px 6px;
        font-size: 11px;
    }
    
    #saveSetAdmin,
    #cancelSetAdmin {
        padding: 0 16px;
        height: 32px;
        font-size: 13px;
    }
}

/* 系统设置按钮样式 */
/*.settings-btn {*/
/*    padding: 6px 12px;*/
/*    background: #1976d2;*/
/*    border: none;*/
/*    border-radius: 4px;*/
/*    color: white;*/
/*    font-size: 13px;*/
/*    cursor: pointer;*/
/*    margin-left: 15px;*/
/*    transition: all 0.2s ease;*/
/*}*/

/*.settings-btn:hover {*/
/*    background: #1565c0;*/
/*}*/

/* 系统设置模态框样式 */
/*.settings-modal {*/
/*    width: 448px;*/
/*    max-width: 91vw;*/
/*}*/

/*.settings-tabs {*/
/*    display: flex;*/
/*    flex-wrap: wrap;*/
/*    gap: 0;*/
/*    margin-bottom: 25px;*/
/*    border-bottom: 1px solid #e5e5e5;*/
/*    padding-bottom: 0;*/
/*}*/

/*.tab-btn {*/
/*    padding: 10px 20px;*/
/*    background: #f5f5f5;*/
/*    border: 1px solid #e5e5e5;*/
/*    border-radius: 0;*/
/*    color: #666;*/
/*    font-size: 14px;*/
/*    cursor: pointer;*/
/*    transition: all 0.3s ease;*/
/*    margin-right: -1px;*/
/*    margin-bottom: -1px;*/
/*    position: relative;*/
/*    min-width: 100px;*/
/*    text-align: center;*/
/*}*/

/*.tab-btn:hover {*/
/*    background: #e8e8e8;*/
/*    color: #333;*/
/*    z-index: 1;*/
/*}*/

/*.tab-btn.active {*/
/*    background: white;*/
/*    color: #07c160;*/
/*    border-bottom: 2px solid #07c160;*/
/*    z-index: 2;*/
/*}*/

/*.tab-content {*/
/*    display: none;*/
/*}*/

/*.tab-content.active {*/
/*    display: block;*/
/*}*/

/* 系统设置按钮样式 */
.settings-btn {
    padding: 6px 12px;
    background: #1976d2;
    border: none;
    border-radius: 4px;
    color: white;
    font-size: 13px;
    cursor: pointer;
    margin-left: 15px;
    transition: all 0.2s ease;
}

.settings-btn:hover {
    background: #1565c0;
}

/* 系统设置模态框样式 */
.settings-modal {
    width: 448px;
    max-width: 91vw;
    overflow: hidden;
}

.modal-content {
    overflow: hidden;
}

/* 新增：系统设置标签左右箭头容器样式 */
.settings-tabs-wrapper {
    position: relative;
    display: flex;
    /* align-items: center; */
    gap: 4px;
}

.tabs-nav-btn {
    width: 20px;
    height: 35px;
    border: none;
    /* border-radius: 14px; */
    background: #f0f0f0;
    color: #666;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex: 0 0 auto;
}

.tabs-nav-btn:hover { background: #e6e6e6; color: #333; }
.tabs-nav-btn:disabled { opacity: 0.4; cursor: default; }

.settings-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    margin-bottom: 25px;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    width: 100%;
    white-space: nowrap;
    flex: 1 1 auto;
    position: relative;
    z-index: 1;
}

.settings-tabs::-webkit-scrollbar { display: none; }

.tab-btn {
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-radius: 0;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 16px;
    margin-bottom: -1px;
    position: relative;
    white-space: nowrap;
    text-align: center;
    flex: 0 0 auto;
}

.tab-btn:hover { background: #e8e8e8; color: #333; z-index: 1; }

.tab-btn.active {
    background: transparent;
    color: #07c160;
    font-weight: 500;
    border-bottom: 2px solid #07c160;
    z-index: 2;
}

/* 小屏隐藏箭头，保持可滑动 */
@media screen and (max-width: 480px) {
  .tabs-nav-btn { display: none; }
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

#saveSettings {
    background: #07c160;
    color: white;
    border: none;
    padding: 8px 22px;
    border-radius: 3px;
    font-size: 14px;
    cursor: pointer;
}

#saveSettings:hover {
    background: #06ae56;
}

#cancelSettings {
    background: #f2f2f2;
    color: #333;
    border: none;
    padding: 8px 22px;
    border-radius: 3px;
    font-size: 14px;
    cursor: pointer;
    margin-right: 10px;
}

#cancelSettings:hover {
    background: #e5e5e5;
}

/* 响应式适配优化 */
@media screen and (max-width: 480px) {
    .settings-btn {
        padding: 4px 8px;
        font-size: 12px;
        margin-left: 8px;
    }
    
    .settings-modal {
        width: 91vw;
    }
    
    .tab-btn {
        padding: 8px 12px;
        font-size: 13px;
        min-width: auto;
    }
}

/* 成员管理样式 */
.members-search {
    margin-bottom: 15px;
}

.members-search input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.members-search input:focus {
    outline: none;
    border-color: #07c160;
    box-shadow: 0 0 0 2px rgba(7, 193, 96, 0.1);
}

.members-list {
    max-height: 400px;
    overflow-y: auto;
}

.members-list-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e5e5;
}

.member-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #f5f5f5;
    transition: background-color 0.2s ease;
}

.member-item:hover {
    background-color: #f9f9f9;
}

.member-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.member-avatar {
    width: 32px;
    height: 32px;
    border-radius: 4px;
}

.member-name {
    font-size: 14px;
    color: #333;
}

.member-status {
    font-size: 12px;
    color: #999;
    margin-left: 8px;
}

.member-status.muted {
    color: #ff4d4f;
}

.member-status.admin {
    color: #07c160;
}

.member-actions {
    display: flex;
    gap: 8px;
}

.member-action-btn {
    padding: 4px 8px;
    border: none;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.delete-member {
    background: #fff1f0;
    color: #ff4d4f;
}

.delete-member:hover {
    background: #ffccc7;
}

.mute-member {
    background: #f5f5f5;
    color: #666;
}

.mute-member:hover {
    background: #e8e8e8;
}

.mute-member.muted {
    background: #ff4d4f;
    color: white;
}

.mute-member.muted:hover {
    background: #ff7875;
}

/* 响应式适配 */
@media screen and (max-width: 480px) {
    .member-item {
        padding: 8px;
    }
    
    .member-avatar {
        width: 28px;
        height: 28px;
    }
    
    .member-name {
        font-size: 13px;
    }
    
    .member-action-btn {
        padding: 3px 6px;
        font-size: 11px;
    }
}

/* 聊天记录管理样式 */
.messages-management {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.messages-actions {
    display: flex;
    gap: 15px;
}

.clear-all-btn {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(to right, #ff4d4f, #ff7875);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(255, 77, 79, 0.2);
}

.clear-all-btn:hover {
    background: linear-gradient(to right, #ff7875, #ff9c9d);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 77, 79, 0.3);
}

.time-range-clear {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.time-inputs {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.time-input {
    width: calc(50% - 15px);
    min-width: 200px;
    padding: 10px 15px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #f9f9f9;
}

.time-input:focus {
    outline: none;
    border-color: #07c160;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(7, 193, 96, 0.1);
}

.time-separator {
    color: #999;
    font-size: 14px;
    font-weight: 500;
}

.clear-range-btn {
    margin-top: 20px;
    padding: 12px 20px;
    background: linear-gradient(to right, #ff4d4f, #ff7875);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 2px 6px rgba(255, 77, 79, 0.2);
}

.clear-range-btn:hover {
    background: linear-gradient(to right, #ff7875, #ff9c9d);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 77, 79, 0.3);
}

.messages-stats {
    background: linear-gradient(135deg, #f0f9eb, #e1f3d8);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e1f3d8;
    box-shadow: 0 2px 8px rgba(103, 194, 58, 0.1);
}

.stats-item {
    font-size: 15px;
    color: #67c23a;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stats-item:last-child {
    margin-bottom: 0;
}

.stats-item span {
    font-weight: 600;
    color: #529b2e;
    background: rgba(103, 194, 58, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
}

/* 响应式适配优化 */
@media screen and (max-width: 480px) {
    .settings-tabs {
        gap: 0;
    }

    .tab-btn {
        padding: 8px 12px;
        font-size: 13px;
        min-width: auto;
    }

    .time-inputs {
        flex-direction: column;
        gap: 10px;
    }

    .time-input {
        width: 100%;
        min-width: auto;
    }
    
    .time-separator {
        display: none;
    }
    
    .clear-all-btn,
    .clear-range-btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .time-range-clear {
        padding: 15px;
    }
}

/* 黑名单管理样式 */
.blacklist-management {
    padding: 15px;
}

.block-user-input {
    display: flex;
    gap: 10px;
}

.block-user-input input {
    flex: 1;
}

.block-user-input button {
    padding: 5px 15px;
    background-color: #ff4d4f;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.block-user-input button:hover {
    background-color: #c82333;
}

.blacklist-container {
    margin-top: 20px;
}

.blacklist-title {
    font-weight: bold;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #ddd;
}

.blacklist-users {
    max-height: 300px;
    overflow-y: auto;
}

.blacklist-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.blacklist-item:hover {
    background-color: #f8f9fa;
}

.unblock-btn {
    padding: 3px 10px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.unblock-btn:hover {
    background-color: #5a6268;
}

/* 消息头像样式 */
.message .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.message .avatar:hover {
    transform: scale(1.1);
}

/* 禁言管理弹窗样式 */
.mute-user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
}

.mute-user-info .member-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.mute-user-info .member-name {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

#muteMinutes {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

#muteMinutes:focus {
    border-color: #1890ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

#confirmMute {
    background: #ff4d4f;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

#confirmMute:hover {
    background: #ff7875;
}

#cancelMute {
    background: #f5f5f5;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

#cancelMute:hover {
    background: #e8e8e8;
}

/* 禁言图标样式 */
.mute-icon {
    display: inline-block;
    margin-left: 5px;
    font-size: 12px;
    cursor: help;
    opacity: 0.8;
    vertical-align: middle;
}

.upload-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    margin-right: 5px;
    color: #666;
    transition: all 0.2s ease;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-btn:hover {
    color: #333;
    background-color: #f0f0f0;
}

.upload-btn i {
    font-size: 18px;
}

.upload-btn:active {
    transform: scale(0.95);
}

.message-content.image {
    display: flex;
    flex-direction: column;
    background-color: #f5f5f5;
    padding: 10px;
    border-radius: 5px;
    gap: 8px;
    max-width: 300px;
}

.image-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.image-name {
    font-weight: bold;
    word-break: break-all;
    display: flex;
    align-items: center;
    gap: 5px;
}

.image-name i {
    color: #666;
    font-size: 14px;
}

.image-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.image-size {
    font-size: 12px;
    color: #666;
}



.view-btn {
    background-color: #1890ff;
    color: white;
    border: none;
    padding: 3px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.view-btn:hover {
    background-color: #40a9ff;
}

/* 修改长按弹窗的样式 */
.message-actions {
    position: absolute;
    display: none;
    gap: 10px;
    background: rgba(0, 0, 0, 0.8);
    padding: 5px 10px;
    border-radius: 5px;
    z-index: 100;
    top: 100%;
    margin-top: 5px;
}

/* 非自己的消息，弹窗靠左对齐消息框 */
.message:not(.self) .message-actions {
    left: 52px;
}

/* 自己的消息，弹窗靠右对齐消息框 */
.message.self .message-actions {
    right: 52px;
}

.message-actions button {
    background: none;
    border: none;
    color: white;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.message-actions button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.message-actions .copy-message {
    color: #4CAF50;
}

.message-actions .recall-message {
    color: #f44336;
}

/* 防止消息操作按钮被遮挡 */
.messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f7f7f7;
    display: flex;
    flex-direction: column;
    padding-bottom: 50px;
}

/* 在线用户列表样式 */
.online-users-container {
    display: flex;
    flex-direction: column;
    max-height: 70vh;
    background: #fff;
}

.online-users-header {
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-bottom: 1px solid #eee;
}

.online-stats {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #495057;
    font-size: 15px;
    font-weight: 500;
}

.online-stats i {
    color: #07c160;
    font-size: 20px;
}

.online-users-list {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 20px;
    gap: 15px;
}

.online-user-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #fff;
    border-radius: 15px;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.online-user-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
    border-color: #07c160;
}

.online-user-item .user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    border-radius: 10px;
}

.online-user-item .user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.online-user-item:hover .user-avatar {
    transform: scale(1.05);
}

.online-user-item .user-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.user-name-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.online-user-item .user-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.online-user-item .admin-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: linear-gradient(45deg, #ffd700, #ffa500);
    color: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(255, 165, 0, 0.3);
}

.online-user-item .admin-badge i {
    font-size: 11px;
}

.online-user-item .user-status {
    display: flex;
    align-items: center;
    gap: 6px;
}

.online-user-item .status-dot {
    width: 8px;
    height: 8px;
    background: #07c160;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(7, 193, 96, 0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(7, 193, 96, 0.4);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(7, 193, 96, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(7, 193, 96, 0);
    }
}

.online-user-item .status-text {
    font-size: 13px;
    color: #07c160;
}

/* 修改弹窗样式 */
#onlineUsersModal .modal-content {
    max-width: 420px;
    width: 90%;
    max-height: 80vh;
    border-radius: 20px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

#onlineUsersModal .modal-header {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 20px;
    position: relative;
}

#onlineUsersModal .modal-header h3 {
    color: #333;
    font-size: 18px;
    margin: 0;
    text-align: center;
    font-weight: 600;
}

#onlineUsersModal .close-modal {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 22px;
    color: #999;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    transition: all 0.3s ease;
}

#onlineUsersModal .close-modal:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #666;
    transform: translateY(-50%) rotate(90deg);
}

#onlineUsersModal .modal-body {
    padding: 0;
}

/* 自定义滚动条 */
.online-users-list::-webkit-scrollbar {
    width: 5px;
}

.online-users-list::-webkit-scrollbar-track {
    background: transparent;
}

.online-users-list::-webkit-scrollbar-thumb {
    background: #e0e0e0;
    border-radius: 3px;
    transition: background 0.3s ease;
}

.online-users-list::-webkit-scrollbar-thumb:hover {
    background: #bdbdbd;
}

/* 响应式适配 */
@media (max-width: 480px) {
    #onlineUsersModal .modal-content {
        width: 95%;
        max-height: 85vh;
    }
    
    .online-users-header {
        padding: 15px;
    }
    
    .online-users-list {
        padding: 15px;
        gap: 12px;
    }
    
    .online-user-item {
        padding: 12px;
    }
    
    .online-user-item .user-avatar {
        width: 42px;
        height: 42px;
    }
    
    .online-user-item .user-name {
        font-size: 15px;
    }
    
    .online-stats {
        font-size: 14px;
    }
    
    .online-stats i {
        font-size: 18px;
    }
}

.avatar-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.avatar-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    cursor: pointer;
    overflow: hidden;
}

.preview-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.3s ease;
}

.avatar-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.avatar-hover i {
    font-size: 24px;
    margin-bottom: 5px;
}

.avatar-hover span {
    font-size: 12px;
}

.avatar-wrapper:hover .preview-avatar {
    filter: blur(1px);
}

.avatar-wrapper:hover .avatar-hover {
    opacity: 1;
}

.upload-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 24px;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.progress-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: #4CAF50;
    transition: width 0.3s ease;
}

.progress-text {
    color: white;
    font-size: 12px;
    position: relative;
    z-index: 3;
}

/* 下拉菜单样式 */
.dropdown {
    position: relative;
    display: inline-flex;
    margin-left: auto;
    align-items: center;
}

.menu-btn {
    background: transparent;
    color: #555;
    padding: 6px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    width: 32px;
}

.menu-btn i {
    font-size: 20px;
}

.menu-btn:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 5px);
    background-color: #fff;
    min-width: 100px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
    z-index: 1000;
    border-radius: 6px;
    padding: 4px 0;
    border: 1px solid rgba(0,0,0,0.08);
}

.dropdown-content::before {
    content: '';
    position: absolute;
    top: -4px;
    right: 13px;
    width: 8px;
    height: 8px;
    background: #fff;
    transform: rotate(45deg);
    border-left: 1px solid rgba(0,0,0,0.08);
    border-top: 1px solid rgba(0,0,0,0.08);
}

.dropdown-content a {
    color: #333;
    padding: 7px 15px;
    text-decoration: none;
    display: block;
    font-size: 13.5px;
    transition: all 0.15s ease;
    position: relative;
    margin: 0;
    white-space: nowrap;
}

.dropdown-content a:hover {
    background-color: #f6f6f6;
}

/* .dropdown-content a#logoutBtn {
    color: #ff4d4f;
} */

.dropdown:hover .dropdown-content {
    display: block;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-3px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 移除旧的按钮样式 */
.settings-btn, .logout-btn {
    display: none;
}

/* 响应式适配 */
@media screen and (max-width: 480px) {
    .menu-btn {
        height: 30px;
        width: 30px;
        padding: 5px;
    }
    
    .menu-btn i {
        font-size: 16px;
    }
    
    .dropdown-content {
        min-width: 90px;
        right: -5px;
    }
    
    .dropdown-content::before {
        right: 11px;
    }
    
    .dropdown-content a {
        padding: 6px 12px;
        font-size: 13px;
    }
}

.announcement-actions {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
}

.delete-announcement-btn {
    background-color: #ff4d4f;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.delete-announcement-btn:hover {
    background-color: #ff7875;
}

.delete-announcement-btn i {
    font-size: 14px;
}

/* 响应式适配 */
@media screen and (max-width: 480px) {
    .delete-announcement-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .delete-announcement-btn i {
        font-size: 13px;
    }
}


/* 消息提示组件样式 */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    border-radius: 4px;
    color: white;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
    max-width: 300px;
}

.toast i {
    margin-right: 8px;
    font-size: 16px;
}

.toast.success {
    background: #07c160;
}

.toast.error {
    background: #ff4d4f;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* 仿微信公告弹窗样式 */
.wx-announcement {
    width: 320px;
    max-width: 90vw;
    border-radius: 8px;
    overflow: hidden;
}

.wx-announcement-header {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #f7f7f7;
    border-bottom: 1px solid #e5e5e5;
    padding: 12px 16px;
}

.wx-announcement-header h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
    font-weight: 600;
}

.wx-announcement-header .close-modal {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.wx-announcement-body {
    display: flex;
    gap: 12px;
    padding: 16px;
    align-items: flex-start;
}

.wx-announcement-icon {
    width: 36px;
    height: 36px;
    border-radius: 18px;
    background: rgba(7,193,96,0.1);
    color: #07c160;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.wx-announcement-icon i { font-size: 16px; }

.wx-announcement-text {
    font-size: 14px;
    color: #333;
    line-height: 1.6;
    word-break: break-word;
}

.wx-announcement-footer { justify-content: center; }

.wx-primary {
    background: #07c160;
    color: #fff;
    border: none;
    padding: 8px 22px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

.wx-primary:hover { background: #06ae56; }

@media (max-width: 480px) {
    .wx-announcement { width: 90vw; }
}