body {
    background-color: #f5f5f5;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}
/* 设置固定尺寸并居中 */
.container {
    display: flex;
    width: 810px;
    height: 680px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin: 0;
    padding: 0;
}

/* 左侧聊天区域 */
.chat-area {
    flex: 3;
    display: flex;
    flex-direction: column;
    /* border-right: 1px solid #e0e0e0; 移到 .chat-header */
    position: relative; /* 建立新的定位上下文 */
}
.notice{
    position: absolute;
    bottom: 175px;
    left: 10px;
}

.chat-header {
    padding: 10px 15px; /* 调整内边距 */
    background-color: #2999fd; /* 客服主题色 */
    color: white;
    flex-shrink: 0; /* 防止 header 被压缩 */
    /* 使用 Flexbox 水平排列头像和文本 */
    display: flex;
    align-items: center; /* 垂直居中 */
    border-right: 1px solid #e0e0e0; /* 将边框移到这里 */
}
/* 包装标题和日期的容器 */
.header-info {
    flex: 1; /* 占据剩余空间 */
}
/* 客服头像样式 */
.header-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    margin-right: 15px; /* 头像与文字的间距 */
    object-fit: cover; /* 确保图片在圆形内正确显示 */
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
/* 标题和日期样式 */
.header-title {
    font-size: 16px;
    font-weight: bold;
    /* 移除了 padding-right */
}
.header-date {
    font-size: 12px;
    opacity: 0.9;
    margin-top: 2px; /* 与标题的间距 */
}

.chat-history {
    flex: 1;
    padding: 15px; /* 调整内边距 */
    overflow-y: auto;
    background-color: #fafafa;
}
.message {
    margin-bottom: 15px; /* 增加消息块之间的间距 */
    display: flex;
    flex-direction: column;
}
.message.sent {
    align-items: flex-end;
}
.message.received {
    align-items: flex-start;
}
/* 消息元数据：名字和时间 */
.message-meta {
    font-size: 12px;
    color: #888;
    margin-bottom: 5px; /* 增加与气泡的间距 */
}
.sent .message-meta {
    text-align: right;
}
.received .message-meta {
    text-align: left;
}
.message-bubble-container {
    display: flex;
    flex-direction: column;
    max-width: 80%;
}
.sent .message-bubble-container {
    align-items: flex-end;
}
.received .message-bubble-container {
    align-items: flex-start;
}
.message-bubble {
    padding: 10px 15px;
    border-radius: 18px;
    word-wrap: break-word;
    white-space: pre-wrap;
}
.sent .message-bubble {
    background-color: #E3F2FD; /* 用户消息颜色 */
    border-bottom-right-radius: 4px;
}
.received .message-bubble {
    background-color: #EEEEEE; /* 客服消息颜色 */
    border-bottom-left-radius: 4px;
}
/* 图片消息样式 */
.message-image {
    max-width: 300px;
    max-height: 300px;
    border-radius: 10px;
    margin-top: 5px;
}

.chat-input-area {
    padding: 10px; /* 调整内边距 */
    background-color: #fff;
    border-top: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    flex-shrink: 0; /* 防止 input area 被压缩 */
}
.input-tools {
    display: flex;
    margin-bottom: 8px; /* 调整工具栏与输入框间距 */
}
.tool-button {
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px 10px;
    margin-right: 10px;
    cursor: pointer;
    font-size: 16px;
}
.tool-button:hover {
    background-color: #f0f0f0;
}
.emoji-picker {
    position: absolute;
    display: none;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
    width: 250px;
}
.emoji-picker span {
    cursor: pointer;
    padding: 5px;
    font-size: 20px;
}
.emoji-picker span:hover {
    background-color: #f0f0f0;
}
.input-main {
    display: flex;
}
.input-main textarea {
    flex: 1;
    padding: 8px; /* 调整输入框内边距 */
    border: none;
    outline: none;
    resize: none;
    height: 60px;
    font-size: 14px;
}
.input-main button {
    margin-left: 10px;
    padding: 8px 15px; /* 调整按钮内边距 */
    background-color: #2999fd;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    align-self: flex-end;
}
.input-main button:hover {
    background-color: #1a7bd9;
}
#imageInput {
    display: none;
}

/* 右侧信息区域 */
.info-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 200px; /* 调整最小宽度 */
}
.slider-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 520px;
    -webkit-overflow-scrolling: touch;
}

#myCarousel .carousel-inner {
    width: 100%;
    height: 100%;
}

#myCarousel .carousel-item {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.carousel-indicators .active {
    background-color: #2999fd;
}

.slider {
    display: flex;
    height: 100%;
    /* 确保子项可以被吸附 */
}
.slide {
    /* 关键：定义滚动吸附点 */
    scroll-snap-align: start;
    min-width: 100%; /* 每张图片占满容器宽度 */
    height: 100%; /* 继承父级高度 */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; /* 防止 flex 项目被压缩 */
}
/* --- Banner 轮播样式结束 --- */

.info-content {
    padding: 10px; /* 调整内边距 */
    background-color: #f9f9f9;
    text-align: center;
    border-top: 1px solid #e0e0e0;
    flex-shrink: 0; /* 防止内容区被压缩 */
}
.info-content h3 {
    color: #333;
    font-size: 16px;
    height: 26px;
    line-height: 26px;
    margin-top: 10px;
}
.info-content p {
    color: #666;
    font-size: 13px; /* 调整字体大小 */
    margin: 9px 0;
}
.info-line{
    border-top: 1px solid #e0e0e0;
    margin-bottom: 15px!important;
}
.foot-area{
    height: 168px;
}