/* 页面容器样式 */
#page-primary {
    height: calc(100% + 30px);
    overflow-y: scroll;
}

#content {
    padding: 0px 20px 0px 20px;
}

/* 对话容器样式 */
.talk-container {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 对话块基本样式 */
.talk_div {
    margin-bottom: 0;
    padding: 0;
    border-radius: 8px;
    max-width: 80%;
    display: flex;
    align-items: flex-start;
    flex-wrap: nowrap;
}

/* 左侧对话样式 */
.talk_div.left {
    margin-right: auto;
    align-self: flex-start;
}

/* 右侧对话样式 */
.talk_div.right {
    margin-left: auto;
    align-self: flex-end;
}

/* 头像样式 */
.talk_div_tx {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.talk_div.left .talk_div_tx {
    margin-right: 10px;
}

.talk_div.right .talk_div_tx {
    margin-left: 10px;
    order: 2;
}

.talk_div_tx img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 对话内容包裹样式 */
.talk_oimg {
    flex: 1;
    min-width: 0;
    max-width: calc(100% - 60px);
    display: flex;
    flex-direction: column;
}

.talk_div.left .talk_oimg {
    order: 2;
}

.talk_div.right .talk_oimg {
    order: 1;
}

/* 昵称样式 */
.talk_name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.talk_div.right .talk_name {
    text-align: right;
}

/* 内容样式 */
.talk_content {
    font-size: 16px;
    line-height: 1.4;
    color: #333;
    background-color: #f0f0f0;
    padding: 12px 16px;
    border-radius: 8px;
    border-bottom-left-radius: 0;
    word-wrap: break-word;
}

.talk_div.right .talk_content {
    background-color: #e3f2fd;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 0;
}

/* 响应式调整 */
@media screen and (max-width: 768px) {
    .talk_div {
        max-width: 90%;
    }
    
    .talk_div_tx {
        width: 40px;
        height: 40px;
    }
    
    .talk_oimg {
        max-width: calc(100% - 50px);
    }
    
    .talk_div.left .talk_div_tx {
        margin-right: 8px;
    }
    
    .talk_div.right .talk_div_tx {
        margin-left: 8px;
    }
    
    .talk_content {
        padding: 10px 14px;
        font-size: 15px;
    }
    
    .talk_name {
        font-size: 13px;
        margin-bottom: 4px;
    }
}

/* 对话块包装器样式 */
.single_talk_wrapper {
    position: relative;
    margin: 10px 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #f9f9f9;
    overflow: hidden;
}

/* 对话块头部样式 */
.single_talk_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #f0f0f0;
    border-bottom: 1px solid #e0e0e0;
}

/* 对话块标题样式 */
.single_talk_title {
    font-size: 14px;
    font-weight: bold;
    color: #333;
}



/* 对话内容样式 */
.single_talk {
    padding: 15px;
}

/* 禁止编辑 */
.single_talk_wrapper[contenteditable="false"] {
    user-select: none;
}