/* 消息页面容器 */
.message-container {
    display: flex;
    height: calc(100vh - 40px);
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
}

/* 群列表样式 */
.group-list {
    width: 280px;
    border-right: 1px solid #eee;
    background: white;
    height: 100vh;
    overflow-y: auto;
    flex-shrink: 0;
}

.search-box {
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
}

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

.group-items {
    flex: 1;
    overflow-y: auto;
}

.group-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    width: 100%;
}

.group-item:hover {
    background-color: #f5f5f5;
}

.group-item.active {
    background-color: #e3f2fd;
}

.group-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
}

.group-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.group-name {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.group-id {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 聊天区域样式 */
.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f5f5f5;
    position: relative;
}

.chat-header {
    padding: 16px;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    font-weight: 500;
    color: #333;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.message {
    display: flex;
    margin-bottom: 20px;
    align-items: flex-start;
}

.message-avatar {
    width: 40px;
    height: 40px;
    margin-right: 12px;
}

.message-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.message-bubble {
    max-width: 60%;
}

.message-info {
    margin-bottom: 4px;
}

.message-nickname {
    font-size: 13px;
    color: #666;
    margin-right: 8px;
}

.message-time {
    font-size: 12px;
    color: #999;
}

.message-content {
    background: #fff;
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
    max-width: 100%;
}

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

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

.message-bot .message-bubble {
    align-items: flex-end;
}

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

/* 输入区域样式 */
.chat-input {
    background: #fff;
    border-top: 1px solid #e0e0e0;
    padding: 10px;
}

.toolbar {
    padding: 8px;
    border-bottom: 1px solid #e0e0e0;
}

.toolbar-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    margin-right: 8px;
}

.toolbar-btn:hover {
    background: #f5f5f5;
    border-radius: 4px;
}

.input-area {
    display: flex;
    padding: 10px;
    gap: 10px;
}

.input-area textarea {
    flex: 1;
    height: 70px;
    padding: 10px;
    border: none;
    resize: none;
    font-size: 14px;
    line-height: 1.5;
    background: #f5f5f5;
    border-radius: 4px;
}

.input-area textarea:focus {
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
}

#sendButton {
    align-self: flex-end;
    padding: 8px 24px;
    background: #12b7f5;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#sendButton:hover {
    background: #0e9fd9;
}

#sendButton:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .message-container {
        position: relative;
        overflow: hidden;
    }

    .group-list {
        width: 100%;
        position: absolute;
        left: 0;
        top: 0;
        z-index: 10;
        transition: transform 0.3s ease;
    }

    .group-list.slide-out {
        transform: translateX(-100%);
    }

    .chat-container {
        width: 100%;
        height: 100%;
        position: absolute;
        left: 100%;
        top: 0;
        transition: transform 0.3s ease;
        background: #fff;
    }

    .chat-container.slide-in {
        transform: translateX(-100%);
    }

    /* 返回按钮样式 */
    .back-button {
        display: none;
        align-items: center;
        padding: 0 15px;
        font-size: 24px;
        cursor: pointer;
        color: #666;
    }

    @media (max-width: 768px) {
        .back-button {
            display: flex;
        }
    }

    /* 修改聊天头部样式 */
    .chat-header {
        display: flex;
        align-items: center;
        padding: 10px 0;
    }

    #selectedGroupInfo {
        flex: 1;
        margin-left: 10px;
    }
} 

.bot-offline-notice {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
}

.offline-content {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.offline-icon {
    width: 64px;
    height: 64px;
    fill: #ff4d4f;
    margin-bottom: 16px;
}

.offline-content h2 {
    color: #333;
    margin-bottom: 12px;
}

.offline-content p {
    color: #666;
    margin-bottom: 24px;
}

.refresh-btn {
    padding: 8px 24px;
    background: #1890ff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

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

/* 添加图片相关样式 */
.message-image {
    margin: 5px 0;
    max-width: 100%;
}

.message-image img {
    max-width: 300px;
    max-height: 200px;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s;
}

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

/* 图片放大显示样式 */
.image-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    cursor: pointer;
}

.full-size-image {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
}

/* 调整消息气泡样式以适应图片 */
.message-content {
    max-width: 100%;
    word-break: break-word;
}

.message-bubble {
    max-width: 60%;
} 

/* 新消息提示气泡 */
#newMessageBubble {
    display: none;
    position: absolute;
    bottom: 100px;  /* 位于输入框上方 */
    left: 50%;
    transform: translateX(-50%);
    background: rgba(18, 183, 245, 0.9);  /* 使用主题色 */
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#newMessageBubble:hover {
    background: rgba(18, 183, 245, 1);
    transform: translateX(-50%) scale(1.05);
} 

/* 表情按钮样式调整 */
.emoji-btn {
    position: relative;
}

/* emoji-mart 样式覆盖 */
.emoji-mart {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .emoji-mart {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        border-radius: 16px 16px 0 0;
        transform: translateY(0);
        transition: transform 0.3s ease;
    }
    
    .emoji-mart.hidden {
        transform: translateY(100%);
    }
} 

/* 表情选择器样式 */
.emoji-picker {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    width: 300px;
    z-index: 1000;
    overflow: hidden;
}

.emoji-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
}

.emoji-tab {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    flex: 1;
    text-align: center;
    transition: all 0.2s;
}

.emoji-tab:hover {
    background: #f0f0f0;
}

.emoji-tab.active {
    color: #1890ff;
    border-bottom: 2px solid #1890ff;
    background: white;
}

.emoji-content {
    height: 200px;
    overflow-y: auto;
}

.emoji-panel {
    display: none;
    padding: 8px;
    flex-wrap: wrap;
}

.emoji-panel.active {
    display: flex;
}

.emoji-item {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    transition: transform 0.1s;
}

.emoji-item:hover {
    transform: scale(1.2);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .emoji-picker.mobile {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        border-radius: 16px 16px 0 0;
        z-index: 1000;
    }
    
    /* 添加输入区域的过渡效果 */
    .chat-input {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        transition: transform 0.3s ease;
        z-index: 999;
    }

    /* 当表情选择器显示时，输入区域上移 */
    .chat-input.emoji-active {
        transform: translateY(-240px); /* 根据表情选择器高度调整 */
    }

    /* 调整消息区域，防止被输入框遮挡 */
    .chat-messages {
        padding-bottom: 120px; /* 根据输入框高度调整 */
    }
} 

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

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #333;
}

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

/* 公告按钮样式 */
.announce-btn {
    font-size: 18px;
} 

/* 添加头像hover效果 */
.message-avatar img:hover,
.group-avatar:hover {
    transform: scale(1.05);
    transition: transform 0.2s ease;
} 