/* 现代化AI聊天室样式 - 暗色主题设计 */
/* 作者：AI助手 - 2025年10月30日 */

/* 基础重置 - 所有元素都重置一下 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

/* 页面基础样式 - 暗色主题 */
body,
html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #1a1a1a;
}

/* 顶部标题栏 - 暗色主题 */
.chat-header {
    height: 60px;
    background-color: #222222;
    color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: relative;
    z-index: 10;
    border-bottom: 1px solid #333333;
    /* 基础flex布局兼容性 */
    display: flex;
}

/* 标题文本样式 - 可点击区域 */
#headerTitle {
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    user-select: none;
}

#headerTitle:hover {
    background-color: #333333;
}

/* 音量图标样式 - 独立点击区域 */
.volume-icon {
    font-style: normal;
    cursor: pointer;
    font-size: 20px;
    padding: 8px 15px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    user-select: none;
    margin: 0 6px;
}

.volume-icon:hover {
    background-color: #333333;
}

/* 聊天内容区域 */
.chat-container {
    width: 100%;
    height: calc(100% - 60px);
    padding: 20px;
    padding-bottom: 120px;
    overflow-y: auto;
    background-color: #242526;
}

/* 输入区域 - 固定在底部 */
.chat-input-area {
    width: 100%;
    min-height: 100px;
    background-color: #2a2b2c;
    padding: 15px 20px;
    border-top: 1px solid #3e4042;
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

/* 每个聊天消息项 */
.chat-item {
    /* 确保有足够的垂直间距 */
    margin-bottom: 20px;
    margin-top: 5px;
    display: flex;
    animation: fadeInUp 0.4s ease-out;
}

/* 对方消息 - 靠左显示 */
.chat-item.other {
    align-self: flex-start;
    flex-direction: row;
}

/* 我的消息 - 靠右显示 */
.chat-item.mine {
    align-self: flex-end;
    flex-direction: row-reverse;
    margin-left: auto;
}



/* 聊天气泡基础样式 */
.chat-bubble {
    /* 增加内边距以确保内容不拥挤 */
    padding: 15px 20px;
    border-radius: 20px;
    font-size: 16px;
    line-height: 1.6;
    word-break: break-word;
    position: relative;
    z-index: 1;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    /* 增加一些额外的间距属性 */
    margin: 5px;
    display: inline-block;
    max-width: calc(100% - 10px);
}

/* 对方气泡样式 - 暗色主题 */
.other .chat-bubble {
    background-color: #3e4042;
    border: 1px solid #444444;
    border-bottom-left-radius: 6px;
    margin-left: 8px;
    color: #e0e0e0;
}

/* 我的气泡样式 - 暗色主题 */
.mine .chat-bubble {
    background-color: #0078d7;
    color: white;
    border-bottom-right-radius: 6px;
    margin-right: 8px;
}

/* 气泡容器 - 包裹气泡和三角，让三角正确显示 */
.chat-bubble-wrap {
    position: relative;
}

/* 气泡容器 - 包裹气泡和三角，让三角正确显示 */
.chat-bubble-wrap {
    position: relative;
}

/* 对方消息的三角箭头 */
.other .chat-triangle {
    position: absolute;
    top: 16px;
    left: 0;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 9px solid transparent;
    border-right: 10px solid #3e4042;
    z-index: 2;
}

/* 我的消息的三角箭头 */
.mine .chat-triangle {
    position: absolute;
    top: 16px;
    right: 0;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 9px solid transparent;
    border-left: 10px solid #0078d7;
    z-index: 2;
}

/* 聊天项容器需要相对定位，让提示框可以绝对定位 */
.chat-item {
    position: relative;
}

/* 复制提示框样式 - 放在气泡上方中间 */
.chat-copy-tip {
    position: absolute;
    top: -30px;
    /* 放在气泡上方 */
    left: 50%;
    /* 在整个聊天项容器中间 */
    transform: translateX(-50%);
    /* 向左移动自身宽度的一半，实现真正居中 */
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 6px;
    display: none;
    z-index: 5;
    /* 层级不用太高，原版就是5 */
    backdrop-filter: blur(10px);
    white-space: nowrap;
    pointer-events: none;
    /* 不干扰点击 */
}

/* 鼠标悬停时显示提示框 */
.chat-item:hover .chat-copy-tip {
    display: block;
}

/* 已复制状态的聊天气泡样式 - 对方消息 */
.chat-item.other.copied .chat-bubble {
    background-color: #2c3e50;
    border-color: #34495e;
    box-shadow: 0 0 0 2px rgba(0, 120, 215, 0.2);
}

/* 已复制状态的聊天气泡小三角 - 对方消息 */
.chat-item.other.copied .chat-triangle {
    border-right-color: #2c3e50;
}

/* 已复制状态的聊天气泡样式 - 我的消息 */
.chat-item.mine.copied .chat-bubble {
    background-color: #005a9e;
    box-shadow: 0 0 0 2px rgba(0, 120, 215, 0.4);
}

/* 已复制状态的聊天气泡小三角 - 我的消息 */
.chat-item.mine.copied .chat-triangle {
    border-left-color: #005a9e;
}

/* 主输入框样式 */
#mainInput {
    flex: 1;
    height: 50px;
    padding: 12px 18px;
    border: 1px solid #444444;
    border-radius: 25px;
    font-size: 16px;
    resize: none;
    outline: none;
    transition: all 0.3s ease;
    background-color: #3e4042;
    color: #e0e0e0;
    /* 隐藏滚动条但保留滚动功能 */
    overflow-y: auto;
    /* WebKit浏览器 (Chrome, Safari, Edge) */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
    /* 确保输入框宽度最大化利用可用空间 */
    width: calc(100% - 110px);
    /* 调整宽度计算，保持输入框与按钮之间的间距 */
}

/* WebKit浏览器滚动条样式 - 隐藏滚动条 */
#mainInput::-webkit-scrollbar {
    display: none;
    /* 隐藏滚动条 */
}

/* 输入框获得焦点时的样式 */
#mainInput:focus {
    border-color: #0078d7;
    box-shadow: 0 0 0 2px rgba(0, 120, 215, 0.2);
}

/* 限制指令输入框 */
#limitInput {
    width: 100%;
    height: 35px;
    padding: 0 18px;
    border: none;
    font-size: 13px;
    color: #a0a0a0;
    background-color: #333333;
    border-radius: 18px;
    outline: none;
    transition: background 0.3s ease;
}

/* 限制指令输入框获得焦点 */
#limitInput:focus {
    background-color: #444444;
}

/* 输入框占位符样式 */
.modal-input::placeholder,
#mainInput::placeholder,
#limitInput::placeholder,
#nicknameInput::placeholder {
    color: #888888;
}

/* 输入按钮行布局 */
.input-row {
    display: flex;
    align-items: center;
    /* 移除gap，使用按钮的margin来控制间距 */
    width: 100%;
    /* 移除额外的边距调整 */
    margin-left: 0;
    margin-right: 0;
}

/* 发送按钮样式 */
#sendBtn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: #0078d7;
    color: white;
    border: none;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 120, 215, 0.3);
    transition: all 0.3s ease;
    flex-shrink: 0;
    /* 调整边距 - 右边距更小，离边缘更近 */
    margin: 0 1px 0 10px;
}

/* 发送按钮悬停效果 */
#sendBtn:hover {
    background-color: #0064b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 120, 215, 0.4);
}

/* 发送按钮禁用状态 */
#sendBtn:disabled {
    background: #bdbdbd;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 5px rgba(189, 189, 189, 0.3);
}

/* 更多按钮样式 */
#moreBtn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: #3e4042;
    color: #e0e0e0;
    border: none;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    flex-shrink: 0;
    position: relative;
    /* 调整边距 - 左边距更小，离边缘更近 */
    margin: 0 10px 0 1px;
    z-index: 10;
}

/* 更多按钮悬停效果 */
#moreBtn:hover {
    background-color: #444444;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* 浮动菜单样式 - 调整位置避免覆盖问题 */
.more-menu {
    position: absolute;
    bottom: 120px;
    /* 减少距离使菜单向下移动5px */
    left: 8px;
    background-color: #3e4042;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border: 1px solid #555555;
    display: none;
    flex-direction: column;
    z-index: 100;
    overflow: hidden;
    min-width: 80px;
}

/* 菜单显示时的样式 */
.more-menu.show {
    display: flex;
}

/* 菜单项样式 */
.menu-item {
    padding: 12px 16px;
    border: none;
    background: none;
    color: #e0e0e0;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    white-space: nowrap;
}

/* 菜单项悬停效果 */
.menu-item:hover {
    background-color: #444444;
    color: #ffffff;
}

/* 清除按钮样式（作为菜单项） */
#clearBtn {
    padding: 12px 16px;
    border: none;
    background: none;
    color: #e0e0e0;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    white-space: nowrap;
    width: 100%;
}

#clearBtn:hover {
    background-color: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
}

/* 表情按钮样式 - 橙色 */
#emojiBtn {
    padding: 12px 16px;
    border: none;
    background: none;
    color: #e0e0e0;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    white-space: nowrap;
    width: 100%;
}

#emojiBtn:hover {
    background-color: rgba(255, 165, 0, 0.2);
    color: #ffa500;
}

/* 附件按钮样式 - 淡蓝色 */
#attachBtn {
    padding: 12px 16px;
    border: none;
    background: none;
    color: #e0e0e0;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    white-space: nowrap;
    width: 100%;
}

#attachBtn:hover {
    background-color: rgba(135, 206, 250, 0.2);
    color: #87cefa;
}

/* 语音按钮样式 - 绿色 */
#voiceBtn {
    padding: 12px 16px;
    border: none;
    background: none;
    color: #e0e0e0;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    white-space: nowrap;
    width: 100%;
}

#voiceBtn:hover {
    background-color: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

/* 表情选择器模态框样式 - 仅保留一套定义 */
#emojiPickerModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

/* 表情选择器内容区域 */
.emoji-picker-box {
    display: flex;
    flex-direction: column;
}



/* 表情选择器标题 */
.emoji-picker-box .modal-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid #3e4042;
    color: #e0e0e0;
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

/* 关闭按钮样式 - 使用更详细的定义 */
.emoji-close-btn {
    background: none;
    border: none;
    color: #a0a0a0;
    font-size: 20px;
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.emoji-close-btn:hover {
    background-color: #3e4042;
    color: #ffffff;
}

/* 表情容器 */
.emoji-picker-container {
    padding: 10px;
    overflow-y: auto;
    flex: 1;
}

/* 表情分类标签 */
.emoji-categories {
    display: flex;
    gap: 10px;
    padding: 10px;
    background-color: #2a2b2c;
    border-bottom: 1px solid #3e4042;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #4a4b4c #2a2b2c;
}

.emoji-categories::-webkit-scrollbar {
    height: 6px;
}

.emoji-categories::-webkit-scrollbar-track {
    background: #2a2b2c;
}

.emoji-categories::-webkit-scrollbar-thumb {
    background: #4a4b4c;
    border-radius: 3px;
}

.emoji-category {
    background-color: #3a3b3c;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    color: #888;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.emoji-category:hover {
    background-color: #4a4b4c;
    color: #e0e0e0;
}

.emoji-category.active {
    background-color: #0078d4;
    color: #ffffff;
}

/* 搜索框样式 */
.emoji-search-container {
    padding: 10px;
    background-color: #2a2b2c;
    border-bottom: 1px solid #3e4042;
}

.emoji-search-input {
    width: 100%;
    padding: 8px 12px;
    background-color: #3a3b3c;
    border: 1px solid #3e4042;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 14px;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.emoji-search-input::placeholder {
    color: #888;
}

.emoji-search-input:focus {
    outline: none;
    border-color: #0078d4;
    background-color: #4a4b4c;
}

/* 表情网格 */
.emoji-grid {
    padding: 15px;
    display: grid;
    grid-template-columns: repeat(8, 40px);
    gap: 8px;
    background-color: #2a2b2c;
    justify-content: center;
    box-sizing: border-box;
}



/* 分页控件 */
.emoji-pagination {
    padding: 10px;
    color: #a0a0a0;
    background-color: #2a2b2c;
    border-top: 1px solid #3e4042;
    border-radius: 0 0 16px 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

/* 分页按钮 */
.emoji-pagination button {
    background-color: #3a3b3c;
    border: 1px solid #3e4042;
    border-radius: 4px;
    padding: 6px 10px;
    color: #e0e0e0;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.emoji-pagination button:hover {
    background-color: #4a4b4c;
    border-color: #4a4b4c;
}

.emoji-pagination button.active {
    background-color: #0078d4;
    border-color: #0078d4;
    color: #ffffff;
}

.emoji-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}





/* 滚动条样式 */
.emoji-picker-container::-webkit-scrollbar {
    width: 6px;
}

.emoji-picker-container::-webkit-scrollbar-track {
    background: #2a2b2c;
    border-radius: 3px;
}

.emoji-picker-container::-webkit-scrollbar-thumb {
    background: #4a4b4c;
    border-radius: 3px;
}

.emoji-picker-container::-webkit-scrollbar-thumb:hover {
    background: #5a5b5c;
}

.emoji-close-btn {
    background: none;
    border: none;
    color: #a0a0a0;
    font-size: 20px;
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.emoji-close-btn:hover {
    background-color: #3e4042;
    color: #ffffff;
}

/* 表情容器 */
#webEmojiContainer,
#emojiContainer {
    flex: 1;
    grid-template-columns: repeat(8, 40px);
    gap: 8px;
    justify-content: center;
    align-items: start;
    box-sizing: border-box;
}

/* 表情项样式 - 统一设置 */
.emoji-item {
    user-select: none;
    background-color: transparent;
    color: #ffffff;
    opacity: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.emoji-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

/* 确保表情图片正常显示 */
.emoji-item img {
    max-width: 32px;
    max-height: 32px;
    object-fit: contain;
    display: block;
}

/* 加载提示样式 */
#webEmojiContainer.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888888;
    font-size: 14px;
}



/* 表情选择器模态框样式 - 背景层 */
/* 注：已在文件开头定义，此处省略重复代码 */

/* 动画效果 */
/* 注：已在文件开头定义，此处省略重复代码 */

/* 更多按钮引导指示器 - 手指点击动画 */
.more-btn-indicator {
    position: absolute;
    width: 50px;
    height: 50px;
    font-size: 36px;
    color: #fff;
    pointer-events: none;
    z-index: 9999;
    background-color: rgba(255, 165, 0, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(255, 165, 0, 0.8);
    opacity: 1;
    /* 直接显示，不依赖动画初始状态 */
    transform: scale(1);
}

/* 动画类 - 脉冲效果 */
.animate-pulse {
    animation: pulse 1.5s infinite;
}

/* 脉冲和点击动画 */
@keyframes pulse {
    0% {
        transform: scale(1) translateY(0);
        box-shadow: 0 0 15px rgba(255, 165, 0, 0.8);
    }

    50% {
        transform: scale(1.2) translateY(-10px);
        box-shadow: 0 0 25px rgba(255, 165, 0, 1);
    }

    100% {
        transform: scale(1) translateY(0);
        box-shadow: 0 0 15px rgba(255, 165, 0, 0.8);
    }
}

/* 文件按钮样式已移除 */

/* 滚动条样式 */
.chat-container::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.chat-container::-webkit-scrollbar-thumb {
    background: #555555;
    border-radius: 3px;
}

.chat-container::-webkit-scrollbar-track {
    background: #2a2b2c;
}

/* 时间显示样式 */
.chat-time {
    font-size: 12px;
    color: #666666;
    margin-top: 6px;
    text-align: right;
    margin-right: 8px;
}

/* 我的消息时间样式 */
.mine .chat-time {
    color: rgba(255, 255, 255, 0.6);
}

/* 对方消息时间样式 */
.other .chat-time {
    color: #777777;
}

/* 模态框遮罩层 */
.modal-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

/* 模态框输入框 */
.modal-input {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 15px;
    border: 1px solid #444444;
    border-radius: 8px;
    background-color: #3e4042;
    color: #e0e0e0;
    font-size: 16px;
    transition: all 0.3s ease;
}

/* 模态框输入框焦点效果 */
.modal-input:focus {
    outline: none;
    border-color: #0078d7;
    box-shadow: 0 0 0 2px rgba(0, 120, 215, 0.2);
}

/* 模态框文本样式 */
.modal-text {
    color: #cccccc;
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 20px;
    text-align: center;
}

/* 顶栏标题可点击样式 */
#headerTitle {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.2s ease;
}

#headerTitle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* 在线用户列表样式 */
.online-user-item {
    padding: 12px 15px;
    margin-bottom: 8px;
    background-color: #3e4042;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.online-user-item:hover {
    background-color: #444444;
    transform: translateX(5px);
}

.online-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 在线状态点 */
.online-status-dot {
    width: 10px;
    height: 10px;
    background: #48bb78;
    border-radius: 50%;
    animation: pulse 2s infinite;
    margin-right: 8px;
}

.online-user-name {
    font-size: 16px;
    color: #e0e0e0;
    font-weight: 500;
}

.online-user-time {
    font-size: 12px;
    color: #777777;
}

/* 无在线用户提示 */
.no-users-text {
    text-align: center;
    color: #777777;
    padding: 30px 15px;
    font-size: 14px;
}

/* 加载用户状态 */
.loading-users {
    text-align: center;
    color: #777777;
    font-size: 14px;
    padding: 20px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.6;
    }
}

/* 模态框内容区域 */
.modal-box {
    width: 54%;
    padding: 25px;
    background-color: #2a2b2c;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid #444444;
    animation: scaleIn 0.3s ease;
    margin: 0;
}

/* 模态框标题 */
.modal-title {
    font-size: 20px;
    color: #ffffff;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 600;
}

/* 模态框按钮组 */
.modal-btn-group {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

/* 为模态框按钮添加间距 */
.modal-btn {
    margin: 0 6px;
}

/* 模态框按钮基础样式 */
.modal-btn {
    flex: 1;
    height: 45px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

/* 取消按钮样式 */
.modal-btn.cancel {
    background-color: #3e4042;
    color: #e0e0e0;
    border: 1px solid #444444;
}

/* 取消按钮悬停效果 */
.modal-btn.cancel:hover {
    background-color: #4a4c4e;
    transform: translateY(-1px);
}

/* 确认按钮样式 */
.modal-btn.confirm {
    background-color: #0078d7;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 120, 215, 0.3);
}

/* 静音按钮样式 - 改为灰色系，与确认按钮区分 */
.modal-btn.secondary {
    background-color: #3e4042;
    color: #e0e0e0;
    border: 1px solid #444444;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* 静音按钮悬停效果 */
.modal-btn.secondary:hover {
    background-color: #4a4c4e;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* 音量控制模态框文字样式 */
.volume-control-container span {
    color: #e0e0e0;
    /* 使用明亮的文字颜色提高可读性 */
    font-size: 15px;
    font-weight: 500;
}

/* 音量滑块样式 - 完全重置样式，确保JS动态设置的渐变背景能正常显示 */
#volumeSlider {
    width: 100%;
    margin-bottom: 10px;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    /* 完全重置背景相关属性 */
    background: none !important;
    border: none;
    box-shadow: none;
}

/* 重置所有滑块轨道伪元素样式，确保不干扰JS设置的背景 */
#volumeSlider::-webkit-slider-track {
    height: 6px;
    border-radius: 3px;
    border: none;
    background: transparent !important;
}

/* 重置WebKit内核浏览器的滑块轨道运行状态 */
#volumeSlider::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 3px;
    border: none;
    background: transparent !important;
}

/* 重置Firefox浏览器的滑块轨道样式 */
#volumeSlider::-moz-range-track {
    height: 6px;
    border-radius: 3px;
    background: transparent !important;
    border: none;
}

/* 重置Firefox浏览器的滑块进度条样式 */
#volumeSlider::-moz-range-progress {
    height: 6px;
    border-radius: 3px;
    background: transparent !important;
    border: none;
}

/* 滑块拇指样式 */
#volumeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #0078d7 !important;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    margin-top: 0px;
    /* 调整位置使其更好地居中，向下移动一点 */
    /* 确保拇指样式优先级 */
    border: none !important;
    outline: none !important;
    transition: all 0.2s ease;
}

/* 滑块悬停效果 */
#volumeSlider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(0, 120, 215, 0.5);
}

/* 滑块样式 - Firefox */
#volumeSlider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #0078d7 !important;
    cursor: pointer;
    border: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    outline: none !important;
    transition: all 0.2s ease;
}

/* 滑块悬停效果 - Firefox */
#volumeSlider::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(0, 120, 215, 0.5);
}

/* 确认按钮悬停效果 */
.modal-btn.confirm:hover {
    background-color: #0064b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 120, 215, 0.4);
}

/* 头像基础样式 */
.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #444444;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid #555555;
    /* 确保头像和气泡之间有足够间距 */
    margin: 0 10px !important;
}

/* 手机图标头像 */
.avatar-phone::before {
    content: '';
    width: 14px;
    height: 22px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
}

/* 电脑图标头像 */
.avatar-pc {
    position: relative;
}

.avatar-pc::before {
    content: '';
    width: 22px;
    height: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 3px 3px 0 0;
}

.avatar-pc::after {
    content: '';
    width: 10px;
    height: 2px;
    background: #e0e0e0;
    position: absolute;
    top: 28px;
    left: 50%;
    transform: translateX(-50%);
}

/* 头像间距 */
.other .chat-avatar {
    margin-right: 10px;
}

.mine .chat-avatar {
    margin-left: 10px;
}

/* 临时隐藏元素类 - 用于复制功能等临时DOM元素 */
.temp-hidden {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    white-space: pre-wrap;
}

/* 头像提示框 */
.avatar-tooltip {
    position: absolute;
    background-color: #333333;
    color: #e0e0e0;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    white-space: nowrap;
    z-index: 100;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    border: 1px solid #444444;
}

/* 已移除CSS伪元素箭头，改为使用JS创建箭头元素 */

/* 电脑端响应式设计 - 屏幕宽度大于768px时生效 */
@media (min-width: 768px) {
    .chat-container {
        width: 70%;
        margin: 0 auto;
        max-width: 1000px;
        padding: 25px;
        padding-bottom: 120px;
    }

    .chat-input-area {
        width: 70%;
        margin: 0 auto;
        max-width: 1000px;
        padding: 20px 25px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 20px 20px 0 0;
    }

    .chat-header {
        width: 70%;
        margin: 0 auto;
        max-width: 1000px;
    }

    .chat-item {
        max-width: 70%;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 加载动画 */
.loading-dots {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 20px;
}

.loading-dots div {
    position: absolute;
    top: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0078d7;
    animation-timing-function: cubic-bezier(0, 1, 1, 0);
}

.loading-dots div:nth-child(1) {
    left: 8px;
    animation: loading-dots1 0.6s infinite;
}

.loading-dots div:nth-child(2) {
    left: 8px;
    animation: loading-dots2 0.6s infinite;
}

.loading-dots div:nth-child(3) {
    left: 32px;
    animation: loading-dots2 0.6s infinite;
}

.loading-dots div:nth-child(4) {
    left: 56px;
    animation: loading-dots3 0.6s infinite;
}

@keyframes loading-dots1 {
    0% {
        transform: scale(0);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes loading-dots2 {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(24px, 0);
    }
}

@keyframes loading-dots3 {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(0);
    }
}

/* 手机端响应式设计 - 屏幕宽度小于768px时生效 */
@media (max-width: 767px) {
    .modal-box {
        margin: 15px;
    }

    .chat-container {
        padding: 15px;
        padding-bottom: 120px;
    }

    .chat-input-area {
        padding: 12px 15px;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    .chat-header {
        height: 50px;
        font-size: 18px;
        padding: 0 15px;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    .chat-bubble {
        padding: 10px 15px;
        font-size: 15px;
    }

    /* 修复顶栏多余蓝色区域 - 强制顶栏占满屏幕 */
    .chat-header {
        width: 100% !important;
        /* 强制全屏宽度 */
        margin: 0 !important;
        /* 清除任何边距 */
        left: 0 !important;
        /* 贴紧左侧 */
        right: 0 !important;
        /* 贴紧右侧 */
    }

    .chat-input-area {
        width: 100% !important;
        /* 底栏也强制全屏 */
        left: 0 !important;
        /* 贴紧左侧 */
        right: 0 !important;
        /* 贴紧右侧 */
        transform: none !important;
        /* 清除可能的位移 */
    }

    /* 减少标题栏内边距 */
    .emoji-picker-box .modal-title {
        padding: 10px 15px;
    }

    /* 减少容器内边距 */
    .emoji-picker-container {
        padding: 5px;
        overflow-y: auto;
        -ms-overflow-style: none;
        /* IE and Edge */
        scrollbar-width: none;
        /* Firefox */
    }

    /* 隐藏滚动条 */
    .emoji-picker-container::-webkit-scrollbar {
        display: none !important;
        /* Chrome, Safari and Opera */
    }

    /* 减少分类标签内边距 */
    .emoji-categories {
        padding: 8px 5px;
        gap: 6px;
    }

    .emoji-category {
        padding: 4px 8px;
    }

    /* 减少搜索框内边距 */
    .emoji-search-container {
        padding: 8px 5px;
    }

    .emoji-search-input {
        padding: 6px 10px;
        font-size: 13px;
    }

    /* 优化表情网格布局 - 保持8列网格布局 */
    .emoji-grid {
        padding: 10px 8px;
        grid-template-columns: repeat(8, 38px);
        gap: 3px;
        width: 100%;
        box-sizing: border-box;
    }

    /* 优化表情项大小和间距 - 统一QQ表情和emoji尺寸 */
    .emoji-item {
        width: 100% !important;
        height: 36px !important;
        min-width: 36px !important;
        font-size: 20px !important;
        margin: 0 !important;
        padding: 0 !important;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
    }

    /* 确保表情图片正确显示 */
    .emoji-item img {
        max-width: 30px;
        max-height: 30px;
        object-fit: contain;
        margin: 0 auto;
    }

    /* 优化分页控件 */
    .emoji-pagination {
        padding: 8px 5px;
    }

    /* 表情容器使用8列网格布局 */
    #webEmojiContainer,
    #emojiContainer {
        grid-template-columns: repeat(8, 34px);
        gap: 8px;
        margin: 0;
    }

    .chat-container {
        padding: 15px;
        padding-bottom: 120px;
    }

    .chat-input-area {
        padding: 12px 15px;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    .chat-header {
        height: 50px;
        font-size: 18px;
        padding: 0 15px;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    .chat-bubble {
        padding: 10px 15px;
        font-size: 15px;
    }

    /* 修复顶栏多余蓝色区域 - 强制顶栏占满屏幕 */
    .chat-header {
        width: 100% !important;
        /* 强制全屏宽度 */
        margin: 0 !important;
        /* 清除任何边距 */
        left: 0 !important;
        /* 贴紧左侧 */
        right: 0 !important;
        /* 贴紧右侧 */
    }

    .chat-input-area {
        width: 100% !important;
        /* 底栏也强制全屏 */
        left: 0 !important;
        /* 贴紧左侧 */
        right: 0 !important;
        /* 贴紧右侧 */
        transform: none !important;
        /* 清除可能的位移 */
    }
}

@media (max-width: 575px) {

    /* 在手机端隐藏快捷键设置按钮 */
    #shortcutBtn {
        display: none !important;
    }

    .emoji-pagination button {
        font-size: 10px;
    }
}