body {
    /*overflow-x: hidden;*/
    padding: 0;
    margin: 0;
    background-color: #f5f5f5; /* 背景色 */
    display: flex;
    justify-content: center;
    min-height: 100vh;
}
.page-wrapper {
    width: 100%;
    max-width: 630px; /* 最大宽度限制 */
    background-color: white; /* 聊天区域背景色 */
    height: 100vh;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* 可选：添加阴影增强视觉效果 */
}
.chat-container {
    height: 100%;
    width: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background-color: white; /* 确保聊天区域背景色 */
}
.chat-header {
    position: sticky;
    top: 0;
    z-index: 10;
    flex-shrink: 0;
    background-color: #1486f8;
    color: white;
    padding: 6px 15px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    cursor: pointer; /* 添加这一行，表示可点击 */
    user-select: none; /* 防止用户选中文字 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px; /* 添加这个关键属性，控制子元素间距 */
}
.group-name {
    font-size: 16px;
    font-weight: bold;
    /*margin-bottom: 2px;*/
    line-height: 1.2; /* 确保行高合适 */
}

.group-owner {
    font-size: 12px;
    font-weight: bold;
    font-weight: normal;
    line-height: 1; /* 确保行高合适 */
    color: #eee;
    text-align: center;
    background-color: #1486f8;
    padding-bottom:10px;
    /*background-color: red;  临时调试 */
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
.message {
    display: flex;
    margin-bottom: 12px;
    padding: 0 8px;
    align-items: flex-start;
    overflow: visible; /* 确保不裁剪子元素 */
}
.message-time {
    font-size: 11px;
    color: #aaa;
    margin-top: 2px;
    padding: 0 4px;
}
.assistant .message-time {
    text-align: left;
    padding-left: 8px;
}
.user .message-time {
    text-align: right;
    padding-right: 8px;
}
.message-avatar {
    width: 32px;
    height: 32px;
    /*border-radius: 60%; 圆形头像 */
    object-fit: cover; /*保持比例并填满容器 */
    flex-shrink: 0;
    overflow: hidden;    /*确保图片不会超出圆形边界 */
}
.message-content-container {
    /* max-width: 70%; */
    display: flex;
    flex-direction: column;
}
.message-content {
    /* max-width: 85%; */
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    border-radius: 12px;
    margin-bottom: 0;
}
.assistant {
    flex-direction: row;
}
.assistant .message-avatar {
    margin-right: 10px;
}
.assistant .message-content-container {
    margin-left: 8px;
    align-items: flex-start;
}
.assistant .message-content {
    background-color: #f1f1f1;
    color: #333;
    border-top-left-radius: 0;
    border-bottom-right-radius: 0;
}
.user {
    justify-content: flex-end;
}
.user .message-content-container {
    align-items: flex-end;
}
.user .message-content {
    background-color: hwb(210 33% 6%);
    color: white;
    border-top-right-radius: 0;
    border-bottom-left-radius: 0;
}
.user .message-avatar {
    margin-left: 10px;
}
.chat-input {
    position: sticky;
    bottom: 0;
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
    padding: 10px;
    flex-shrink: 0;
    z-index: 10;
    display: flex;
    justify-content: center;
    position: relative; /* 为绝对定位的子元素提供参照 */
}
.view-only-notice {
    display: none;
    font-size: 14px;
    color: #666;
    text-align: center;
    width: 100%;
    padding: 10px;
}

/* 当仅查看模式时的样式 */
.view-only-mode #CallBackBtn {
    display: none !important;
}

.view-only-mode .view-only-notice {
    display: block;
}
@media (min-width: 631px) {
    body {
        background-color: #f0f2f5; /* 大屏幕背景色 */
    }
    
    .page-wrapper {
        height: 95vh;
        margin-top: 2.5vh;
        border-radius: 8px; /* 可选：圆角效果 */
    }
}
#messageInput {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
}
#sendButton {
    margin-left: 10px;
    padding: 10px 15px;
    background-color: oklab(62.456% -0.05208 -0.18675);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
}
#sendButton:hover {
    background-color: #1070c9;
}
#CallBackBtn {
    margin-left: 10px;
    padding: 10px 15px;
    background-color: hwb(210 6% 10%);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    display: none; /* 默认隐藏 */
}
#CallBackBtn:hover {
    background-color: #1070c9;
}
.loading {
    text-align: center;
    padding: 10px;
    color: #999;
    font-size: 14px;
}
.error {
    text-align: center;
    padding: 10px;
    color: #ff4d4f;
    font-size: 14px;
}