/**
 * 微信风格聊天应用样式
 * 完全离线运行，适配移动端和桌面端
 */
 *, ::before, ::after {
    box-sizing: border-box;
}

 html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #ededed;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    max-width: 100%;
    margin: 0 auto;
    background: #ededed;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 桌面端适配 */
@media (min-width: 768px) {
    body {
        max-width: 800px;
        margin: 20px auto;
        height: calc(100vh - 40px);
        border-radius: 8px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        overflow: hidden;
    }
}

/* 微信风格顶部导航 */
.top {
    background: #ededed;
    color: #111;
    height: 44px;
    line-height: 44px;
    text-align: center;
    font-size: 17px;
    font-weight: 600;
    border-bottom: 1px solid #dcdcdc;
    position: relative;
    background: linear-gradient(to bottom, #f7f7f7, #ededed);
    display: flex;
    justify-content: center;
    align-items: center;
}

.admin-link {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    padding: 4px 8px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.1);
    font-size: 12px;
    transition: background 0.2s;
}

.admin-link:hover {
    background: rgba(0, 0, 0, 0.2);
}

.top::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.8);
}

.foot {
    line-height: 50px;
    text-align: center;
    font-size: 12px;
    color: #999;
}

/* 微信风格输入区域 */
.write {
    height: auto;
    min-height: 50px;
    width: 100%;
    background: #f7f7f7;
    border-top: 1px solid #dcdcdc;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.write input {
    font-size: 16px;
    flex: 1;
    height: 34px;
    padding: 0 12px;
    border: 1px solid #dcdcdc;
    border-radius: 5px;
    outline: none;
    background: white;
    font-family: inherit;
    font-weight: 400;
    transition: border-color 0.2s ease;
    -webkit-appearance: none;
}

.write input:focus {
    border-color: #07c160;
}

.write input::placeholder {
    color: #999;
}

#fresh {
    color: #07c160;
    font-weight: 500;
}

/* 微信风格发送按钮 */
.send {
    color: white;
    text-decoration: none;
    min-width: 60px;
    background: #07c160;
    display: inline-block;
    height: 34px;
    line-height: 34px;
    text-align: center;
    border-radius: 5px;
    font-weight: 400;
    transition: background-color 0.2s ease;
    cursor: pointer;
    font-size: 16px;
    padding: 0 12px;
    border: none;
    outline: none;
    -webkit-appearance: none;
    font-family: inherit;
}

.send:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(7, 193, 96, 0.3);
}

.send:hover {
    background: #06ad56;
}

.send.disabled {
    background: #d9d9d9;
    color: #999;
    cursor: not-allowed;
}

.send.disabled:hover {
    background: #d9d9d9;
}

/* 微信风格聊天区域 */
.mk-chat-box {
    font-family: inherit;
    font-size: 16px;
    width: 100%;
    padding: 20px 12px;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    background: #ededed;
    scroll-behavior: smooth;
}
/* 微信风格消息样式 */
.mk-chat-box .msg {
    margin: 16px 0;
    position: relative;
    min-height: 50px;
    animation: fadeIn 0.3s ease;
}

.mk-chat-box .right {
    text-align: right;
    margin-left: 60px;
}

.mk-chat-box .left {
    text-align: left;
    margin-right: 60px;
}

/* 微信风格头像 */
.mk-chat-box img.head {
    width: 40px;
    height: 40px;
    top: 0;
    position: absolute;
    border-radius: 5px;
    border: none;
    user-select: none;
}

.mk-chat-box .right img.head {
    right: 0;
}

.mk-chat-box .left img.head {
    left: 0;
}

/* 微信风格昵称 */
.mk-chat-box .name {
    color: #999;
    font-size: 12px;
    display: block;
    line-height: 16px;
    font-weight: 400;
    margin-bottom: 4px;
}

.mk-chat-box .right .name {
    margin: 0 50px 4px 0;
    text-align: right;
}

.mk-chat-box .left .name {
    margin: 0 0 4px 50px;
}

/* 微信风格消息气泡 */
.mk-chat-box .content {
    word-break: break-word;
    word-wrap: break-word;
    text-align: left;
    position: relative;
    display: inline-block;
    font-size: 16px;
    line-height: 22px;
    max-width: 65%;
    padding: 10px 12px;
}

.mk-chat-box .content img {
    max-width: 200px;
    height: auto;
    border-radius: 4px;
    margin-top: 4px;
}

.mk-chat-box .content a {
    color: #576b95;
    text-decoration: none;
    word-break: break-all;
}

.mk-chat-box .content a:hover {
    text-decoration: underline;
}

/* 微信风格链接样式 */
.mk-chat-box .content a.chat-link {
    color: #576b95;
    text-decoration: none;
    background: rgba(87, 107, 149, 0.1);
    padding: 2px 4px;
    border-radius: 3px;
    transition: all 0.2s ease;
    display: inline-block;
    margin: 2px 0;
}

.mk-chat-box .content a.chat-link:hover {
    background: rgba(87, 107, 149, 0.2);
    text-decoration: none;
}

.mk-chat-box .content a.chat-link:active {
    background: rgba(87, 107, 149, 0.3);
    transform: scale(0.98);
}

/* 右侧消息（自己）- 微信绿色 */
.mk-chat-box .right .content {
    margin: 0 50px 0 0;
    background: #95ec69;
    color: #111;
    border-radius: 5px;
    position: relative;
}

.mk-chat-box .right .content::before {
    content: '';
    position: absolute;
    right: -8px;
    top: 13px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 6px 0 6px 8px;
    border-color: transparent transparent transparent #95ec69;
}

/* 左侧消息（他人）- 微信白色 */
.mk-chat-box .left .content {
    margin: 0 0 0 50px;
    background: white;
    color: #111;
    border-radius: 5px;
    position: relative;
}

.mk-chat-box .left .content::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 13px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 6px 8px 6px 0;
    border-color: transparent white transparent transparent;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* 微信风格系统提示 */
.mk-chat-box .tips {
    margin: 20px 0;
    text-align: center;
    font-size: 12px;
}

.mk-chat-box .tips span {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.05);
    color: #999;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.4;
}

.mk-chat-box .tips .tips-primary {
    background: rgba(7, 193, 96, 0.1);
    color: #07c160;
}

.mk-chat-box .tips .tips-success {
    background: rgba(7, 193, 96, 0.1);
    color: #07c160;
}

.mk-chat-box .tips .tips-info {
    background: rgba(7, 193, 96, 0.1);
    color: #07c160;
}

.mk-chat-box .tips .tips-warning {
    background: rgba(250, 173, 20, 0.1);
    color: #faad14;
}

.mk-chat-box .tips .tips-danger {
    background: rgba(245, 34, 45, 0.1);
    color: #f5222d;
}

/* 微信风格滚动条 */
.mk-chat-box::-webkit-scrollbar {
    width: 4px;
}

.mk-chat-box::-webkit-scrollbar-track {
    background: transparent;
}

.mk-chat-box::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
}

.mk-chat-box::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* 微信风格登录界面 */
.write.login {
    margin: 0;
    padding: 40px 20px;
    background: white;
    min-height: calc(100vh - 44px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-top: none;
}

.write.login input {
    width: 100% !important;
    margin-bottom: 20px !important;
    height: 44px !important;
    font-size: 16px !important;
    border-radius: 5px !important;
    border: 1px solid #dcdcdc !important;
    background: white !important;
    padding: 0 12px !important;
    transition: border-color 0.2s ease !important;
    -webkit-appearance: none !important;
    flex: none !important;
}

.write.login input:focus {
    border-color: #07c160 !important;
    outline: none !important;
}

.write.login .send {
    width: 100% !important;
    height: 44px !important;
    font-size: 17px !important;
    border-radius: 5px !important;
    background: #07c160 !important;
    color: white !important;
    font-weight: 400 !important;
    border: none !important;
    transition: background-color 0.2s ease !important;
    flex: none !important;
    line-height: 44px !important;
    text-align: center !important;
    cursor: pointer !important;
}

.write.login .send:hover {
    background: #06ad56 !important;
}

.write.login .send.disabled {
    background: #d9d9d9 !important;
    color: #999 !important;
    cursor: not-allowed !important;
}

.write.login .send.disabled:hover {
    background: #d9d9d9 !important;
}

/* 微信风格加载动画 */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(7, 193, 96, 0.3);
    border-radius: 50%;
    border-top-color: #07c160;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 在线状态指示器 */
.online-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background: #07c160;
    border: 2px solid #ededed;
    border-radius: 50%;
}

/* 打字指示器 */
.typing-indicator {
    display: none;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
    margin: 8px 60px;
    font-size: 12px;
    color: #999;
    font-style: italic;
}

.typing-indicator.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* 消息时间戳 */
.timestamp {
    font-size: 11px;
    color: #999;
    margin: 0 5px;
    display: inline-block;
}

/* 移动端优化 */
@media (max-width: 768px) {
    body {
        margin: 0;
        border-radius: 0;
        height: 100vh;
        margin-top: 0;
        margin-bottom: 0;
    }
    
    .top {
        border-radius: 0;
        height: 44px;
        line-height: 44px;
        font-size: 17px;
    }
    
    .mk-chat-box {
        padding: 16px 8px;
    }
    
    .mk-chat-box .content {
        max-width: 75%;
        font-size: 16px;
        line-height: 22px;
    }
    
    .mk-chat-box .right {
        margin-left: 50px;
    }
    
    .mk-chat-box .left {
        margin-right: 50px;
    }
    
    .mk-chat-box img.head {
        width: 40px;
        height: 40px;
    }
    
    .mk-chat-box .right .name {
        margin-right: 50px;
    }
    
    .mk-chat-box .left .name {
        margin-left: 50px;
    }
    
    .mk-chat-box .right .content {
        margin-right: 50px;
    }
    
    .mk-chat-box .left .content {
        margin-left: 50px;
    }
    
    .write {
        padding: 8px;
        min-height: 50px;
    }
    
    .write input {
        height: 36px;
        font-size: 16px;
    }
    
    .send {
        height: 36px;
        line-height: 36px;
        min-width: 50px;
        font-size: 14px;
    }
}

/* 桌面端优化 */
@media (min-width: 769px) {
    .mk-chat-box {
        padding: 20px 12px;
    }
    
    .mk-chat-box .content {
        max-width: 60%;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .send:hover {
        background: #07c160;
    }
    
    .mk-chat-box .content:hover {
        transform: none;
        box-shadow: none;
    }
    
    .mk-chat-box img.head:hover {
        transform: none;
    }
}

/* 高分辨率屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .mk-chat-box img.head {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* 小屏幕手机优化 */
@media (max-width: 375px) {
    .mk-chat-box .content {
        max-width: 70%;
        font-size: 15px;
        line-height: 20px;
    }
}

/* 防止文本选择（移动端） */
.mk-chat-box .content {
    -webkit-user-select: text;
    user-select: text;
}

.mk-chat-box img.head {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* 输入框自动聚焦优化 */
.write input:focus {
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

/* 按钮点击反馈 */
.send:active {
    transform: scale(0.98);
}

/* 消息气泡点击反馈 */
.mk-chat-box .content:active {
    transform: scale(0.98);
}

/* 滚动优化 */
.mk-chat-box {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* 防止双击缩放 */
.write input {
    touch-action: manipulation;
}

/* 文件上传按钮样式 */
.upload-btn {
    width: 34px;
    height: 34px;
    border-radius: 5px;
    border: 1px solid #dcdcdc;
    background: white;
    color: #111;
    font-size: 20px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-appearance: none;
}

.upload-btn:hover {
    background: #f5f5f5;
    border-color: #07c160;
}

.upload-btn:active {
    transform: scale(0.95);
}

/* 文件上传弹窗样式 */
.upload-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.upload-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.upload-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #dcdcdc;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: 600;
}

.upload-close {
    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: 4px;
    transition: background 0.2s;
}

.upload-close:hover {
    background: #f5f5f5;
}

.upload-area {
    padding: 40px 20px;
    text-align: center;
    border: 2px dashed #dcdcdc;
    border-radius: 8px;
    margin: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upload-area:hover {
    border-color: #07c160;
    background: rgba(7, 193, 96, 0.05);
}

.upload-area.dragover {
    border-color: #07c160;
    background: rgba(7, 193, 96, 0.1);
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.upload-area p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.upload-preview {
    padding: 0 20px 20px;
    max-height: 300px;
    overflow-y: auto;
}

.upload-file-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #f8f8f8;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 14px;
}

.upload-file-icon {
    margin-right: 12px;
    font-size: 24px;
}

.upload-file-info {
    flex: 1;
}

.upload-file-name {
    font-weight: 500;
    color: #111;
    margin-bottom: 4px;
    word-break: break-all;
}

.upload-file-size {
    color: #999;
    font-size: 12px;
}

.upload-file-remove {
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
}

/* 文件消息样式 */
.file-message {
    display: inline-flex;
    align-items: center;
    background: white;
    border-radius: 6px;
    padding: 12px;
    max-width: 250px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.file-message:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.file-message.left {
    background: white;
    color: #111;
}

.file-message.right {
    background: #95ec69;
    color: #111;
}

.file-icon {
    font-size: 32px;
    margin-right: 12px;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 4px;
    word-break: break-all;
    line-height: 1.3;
}

.file-size {
    font-size: 12px;
    color: #999;
}

/* 图片消息样式 */
.image-message {
    max-width: 200px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
}

.image-message:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.image-message img {
    width: 100%;
    height: auto;
    display: block;
}

/* 图片预览弹窗 */
.image-preview-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    cursor: pointer;
}

.image-preview-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-preview-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.image-preview-content img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.image-preview-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.image-preview-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 视频消息样式 */
.video-message {
    max-width: 250px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.video-message:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 140px;
    overflow: hidden;
}

.video-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    transition: background 0.2s ease;
}

.video-message:hover .video-play-overlay {
    background: rgba(0, 0, 0, 0.8);
}

.video-info {
    padding: 12px;
}

.video-name {
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 4px;
    word-break: break-all;
    line-height: 1.3;
    color: #111;
}

.video-size {
    font-size: 12px;
    color: #999;
}

/* 视频预览弹窗 */
.video-preview-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    cursor: pointer;
}

.video-preview-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-preview-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.video-preview-content video {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.video-preview-title {
    color: white;
    font-size: 16px;
    margin-top: 16px;
    text-align: center;
    max-width: 80%;
    word-break: break-all;
}

.video-preview-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.video-preview-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 新消息提示 */
.new-message-indicator {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: #07c160;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(7, 193, 96, 0.3);
    z-index: 100;
    transition: all 0.2s ease;
    animation: bounceIn 0.3s ease;
}

.new-message-indicator:hover {
    background: #06ad56;
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 6px 16px rgba(7, 193, 96, 0.4);
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px) scale(0.8);
    }
    50% {
        transform: translateX(-50%) translateY(-2px) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

/* 状态栏适配（iOS刘海屏） */
@supports (padding: max(0px)) {
    .top {
        padding-top: env(safe-area-inset-top);
        height: calc(44px + env(safe-area-inset-top));
        line-height: 44px;
    }
    
    .write {
        padding-bottom: calc(8px + env(safe-area-inset-bottom));
    }
}

/* 弹窗提示样式 */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    color: #111;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 3000;
    max-width: 300px;
    font-size: 14px;
    line-height: 1.4;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    border-left: 4px solid #07c160;
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-notification.tips-info {
    border-left-color: #07c160;
    background: #f0f9ff;
    color: #0c4a6e;
}

.toast-notification.tips-success {
    border-left-color: #07c160;
    background: #f0f9ff;
    color: #0c4a6e;
}

.toast-notification.tips-warning {
    border-left-color: #faad14;
    background: #fffbeb;
    color: #92400e;
}

.toast-notification.tips-danger {
    border-left-color: #f5222d;
    background: #fef2f2;
    color: #991b1b;
}

/* 移动端弹窗提示优化 */
@media (max-width: 768px) {
    .toast-notification {
        right: 10px;
        left: 10px;
        top: 10px;
        max-width: none;
        font-size: 13px;
    }
}

/* @功能样式 */
.mention-highlight {
    background: rgba(7, 193, 96, 0.1);
    color: #07c160;
    font-weight: 500;
    padding: 1px 2px;
    border-radius: 2px;
}

.mention-highlight.clickable-mention {
    cursor: pointer;
    transition: all 0.2s ease;
}

.mention-highlight.clickable-mention:hover {
    background: rgba(7, 193, 96, 0.2);
    transform: scale(1.05);
}

/* 消息高亮目标样式 */
.highlight-target {
    animation: highlightPulse 2s ease-in-out;
    position: relative;
}

.highlight-target::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    background: rgba(7, 193, 96, 0.2);
    border-radius: 8px;
    animation: highlightBorder 2s ease-in-out;
    z-index: -1;
}

@keyframes highlightPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(7, 193, 96, 0);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 20px rgba(7, 193, 96, 0.3);
    }
}

@keyframes highlightBorder {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(1.05);
    }
}

/* @用户选择列表 */
.mention-list {
    position: fixed;
    background: white;
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    font-size: 14px;
    /* 添加上方显示的箭头样式 */
    margin-bottom: 5px;
}

.mention-list::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 20px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 8px 0 8px;
    border-color: white transparent transparent transparent;
}

.mention-list::before {
    content: '';
    position: absolute;
    bottom: -9px;
    left: 19px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 9px 9px 0 9px;
    border-color: #dcdcdc transparent transparent transparent;
    z-index: -1;
}

.mention-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.mention-item:last-child {
    border-bottom: none;
}

.mention-item:hover,
.mention-item.selected {
    background: rgba(7, 193, 96, 0.1);
}

.mention-item.selected {
    background: rgba(7, 193, 96, 0.15);
}

.mention-avatar {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    margin-right: 8px;
    object-fit: cover;
}

.mention-name {
    flex: 1;
    color: #111;
    font-weight: 400;
}

/* @列表滚动条 */
.mention-list::-webkit-scrollbar {
    width: 4px;
}

.mention-list::-webkit-scrollbar-track {
    background: transparent;
}

.mention-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
}

.mention-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* 移动端@列表优化 */
@media (max-width: 768px) {
    .mention-list {
        font-size: 16px;
        max-height: 180px;
    }
    
    .mention-item {
        padding: 12px;
    }
    
    .mention-avatar {
        width: 28px;
        height: 28px;
    }
}