/* --- 修真聊天群 伪GUI界面 CSS v3.0 --- */

/* 全局设定 */
.jiuzhou-group-window {
    font-family: "Microsoft YaHei", sans-serif;
    max-width: 800px;
    margin: 20px auto;
    border: 1px solid #ddd;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    background-color: #f7f7f7;
}

/* 头部 */
.group-header {
    background-color: #ededed;
    padding: 15px 20px;
    text-align: center;
    border-bottom: 1px solid #dcdcdc;
}
.group-name {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}
.online-status {
    font-size: 14px;
    color: #888;
    margin-left: 10px;
}

/* 消息区域 */
.group-messages {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px; /* 消息之间的间距 */
}

/* 消息块基础样式 */
.message {
    display: flex;
    max-width: 75%;
    align-items: flex-start;
}
.message-avatar {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background-color: #fff;
    border: 1px solid #eee;
}

/* NPC消息 (靠左) */
.npc-message {
    align-self: flex-start;
}
.npc-avatar {
    margin-right: 12px;
}
.npc-name {
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
    margin-left: 2px;
}
.npc-bubble {
    background-color: #ffffff;
    border-radius: 12px 12px 12px 2px;
}

/* 用户消息 (靠右) */
.user-message {
    align-self: flex-end;
    flex-direction: row-reverse; /* 关键：实现左右布局反转 */
}
.user-avatar {
    margin-left: 12px;
}
.user-bubble {
    background-color: #95ec69; /* 微信绿 */
    border-radius: 12px 12px 2px 12px;
}

/* 消息气泡 */
.message-bubble {
    padding: 10px 15px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.message-bubble p {
    margin: 0;
    line-height: 1.6;
    font-size: 15px;
    color: #333;
    white-space: pre-wrap; /* 保留换行和空格 */
    word-wrap: break-word;
}

/* 时间戳 */
.message-timestamp {
    align-self: center;
    background-color: #e0e0e0;
    color: #fff;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 15px;
    margin: 10px 0;
}