/* ===== 全局样式 ===== */
:root {
  /* 调整为黑白灰色调 */
  --primary-light: #8a8a8a24;
  --primary-dark: #0d0d0d;
  --primary-light-border: #ccd8cf;
  --primary-dark-border: #1b1b1b;
  --text-light: #333;
  --text-dark: #e0e0e0;
  --bg-light: #f9f9f9;
  --bg-dark: #020000;
  --input-area-light: #f5f5f5;
  --input-area-dark: #161616;
  --meta-light: #666;
  --meta-dark: #999;
  --mobile-nav-height: 64px;
  --mobile-breakpoint: 480px;
  
  /* 调整对话气泡变量为黑白灰 */

  --message-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --message-padding: 18px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 100vh;
  line-height: 1.6;
}

.dark-theme {
  background-color: var(--bg-dark);
  color: var(--text-dark);
}

.light-theme {
  background-color: var(--bg-light);
  color: var(--text-light);
}

.left-panel.collapsed {
  width: 0;
  min-width: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.right-panel {
  transition: all 0.3s ease;
}

/* ===== 主容器布局 ===== */
.container {
  display: flex;
  width: 100vw;
  height: 100vh;
  box-shadow: none;
  border-radius: 0;
  margin: 0 auto;
}

.left-panel {
  width: 240px;
  position: relative;
  left: 50px;
  background-color: #f0f0f0;
  border-right: 1px solid var(--primary-light-border);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

.left-panel.collapsed {
  width: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateX(-100%);
}

.dark-theme .left-panel {
  border-right-color: var(--primary-dark-border);
  background-color: #0b0b0b;
}

.button-panel {
  position: fixed;
  left: 0;
  top: 0;
  width: 50px;
  height: 100vh;
  background: #010c00;
  border-right: 1px solid var(--primary-dark-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.button-panel button {
  width: 36px;
  height: 36px;
  margin: 16px 0;
  border: none;
  color: transparent;
  background: var(--text-dark);
  -webkit-background-clip: text;
  background-clip: text;
  font-size: x-large;
}

.dark-theme .button-panel button {
  border: none;
  color: transparent;
  background: var(--text-dark);
  -webkit-background-clip: text;
  background-clip: text;
}

.button-panel button:hover {

  background: var(--meta-dark);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.user-avatar-container {
  margin-top: auto;
  padding: 10px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #ccc;
}

.nav-header {
 display: flex;
 position: relative;
 justify-content: flex-end;
 align-items: center;
 padding: 8px; 
 background: var(--primary-light);
 height: 48px;
 border-bottom: 1px solid var(--primary-light-border);
}

.dark-theme .nav-header {
  padding: 16px; 
  background: var(--primary-dark);
  border-color: var(--primary-dark-border);
 }

.nav-title {
  position: absolute;
  left: 40%;
  flex-grow: 1;
  font-size: 1.1em;
  font-weight: 400;
  color: var(--text-light);
  text-align: center;
}

.dark-theme .nav-title { /* 确保暗黑模式标题颜色正确 */
  color: var(--text-dark);
}

.nav-button {
  margin: 0px 4px 0px;
  border: none;
  background:none;
  transition: background-color 0.3s ease;
  width: 24px;
  height: 24px;
  font-weight: 400;
}

#add-button {
  font-size: 1.3em;
}

.nav-button:hover {
  background-color: var(--primary-light);
}

.dark-theme .nav-button {
  color: var(--meta-dark); 
  background: none;

}

.dark-theme .nav-button:hover {
  color: var(--primary-light-border);
}

/* 添加联系人表单样式 */
.quick-add {
  padding: 12px;
  background: var(--bg-color-light);
  border-bottom: 1px solid var(--border-color);
  display: none; /* 默认隐藏 */
}

.quick-add.active {
  display: block; /* 通过active类控制显示 */
}

.quick-add input,
.quick-add textarea {
  width: 100%;
  margin: 8px 0;
  padding: 8px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--bg-color);
  color: var(--text-color);
}

/* 请求面板样式 */
.requests-panel {
  position: absolute;
  top: 45px;
  right: 15px;
  width: 300px;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  z-index: 100;
  display: none; /* 默认隐藏 */
}

.requests-panel.active {
  display: block; /* 通过active类控制显示 */
}

.request-item {
  display: flex;
  justify-content: space-between;
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
}

#send-request {
  padding: 4px 8px 4px 8px;
  margin-left: 50px;
  background: var(--bg-light);
  border: 1px solid var(--meta-dark);
  border-radius: 4px;
}
.request-actions button {
  padding: 4px 8px;
  margin-left: 8px;
  border-radius: 4px;
}

.badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: red;
  color: white;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 12px;
}

.left-panel ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
  flex-grow: 1;
  overflow-y: auto;
}

.left-panel ul li {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--primary-light-border);
  color: var(--text-light);
  transition: background-color 0.3s ease;
}

.contact-info {
  display: flex;
  flex-grow: 1;
  align-items: center;
}

.contact-avatar {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.contact-details {
  padding-left: 12px;
}

.contact-name {
  padding-left: 12px;
  font-size: 0.95em;
  font-weight: 500;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dark-theme .contact-name {
  color: var(--text-dark);
}

.message-preview {
  font-size: 0.85em;
  color: var(--meta-light);
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.left-panel ul li .contact-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10%;
  object-fit: cover;
  background-color: #ccc;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-size: 14px;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.25);
}

.left-panel ul .message-time {
  margin-left: auto; /* 将时间推到最右侧 */
  padding-left: 10px; /* 与消息预览的间距 */
  white-space: nowrap; /* 防止时间换行 */
  color: var(--meta-light); /* 设置颜色 */
  font-size: 0.75em; /* 调整字体大小 */
  align-self: flex-start; /* 时间戳顶部对齐 */
  padding-top: 4px; /* 微调顶部距离 */

}


.dark-theme .left-panel ul li .contact-avatar  {
  border-color: rgb(0 0 0 / 75%);
}

.dark-theme .left-panel ul li {
  border-bottom-color: var(--primary-dark-border);
  color: var(--text-dark);
}

.left-panel ul li:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.dark-theme .left-panel ul li:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.empty-state {
  padding: 20px;
  text-align: center;
  color: #666;
}

.new-conversation-header {
  padding: 12px;
  border-bottom: 1px solid #eee;
  font-weight: bold;
  color: #333;
}

.right-panel {
  flex-grow:1;
  width: calc(100% - 290px);
  max-width: 1200px;
  left: 290px;
  display: flex;
  margin: 0 auto;
  height: 100vh;
  position: fixed;
  flex-direction: column;
}

.left-panel.collapsed + .right-panel {
  width: calc(100% - 50px);
  max-width: 1400px; 
  left: 50px;
}

.content-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ===== 对话框标题栏样式 ===== */

.chat-header {
    position: sticky;
    top: 0;
    z-index: 5;
    padding: 0px 20px;
    border-bottom: 1px solid var(--primary-light-border);
    background-color: var(--input-area-light);
    text-align: center;
    height: 48px;
    align-items: center;
    box-sizing: border-box;
    display: flex;
}

.dark-theme .chat-header {
    background-color: var(--input-area-dark);
    border-bottom-color: var(--primary-dark-border);
}

.chat-title {
    font-weight: 600;
    text-align: center;
    font-size: 1rem;
    color: var(--text-light);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    margin: 0;
}

.dark-theme .chat-title {
    color: var(--text-dark);
}

/* ===== 聊天区域 ===== */
.chat-area {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: calc(100vh - 220px);
    margin-bottom: 120px;
    padding-top: 20px;
    box-sizing: border-box;
}

/* ===== 消息基础样式 ===== */
.message-container {
  max-width: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.3s ease;
  transform: translateY(10px);
}

.message-container.visible {
  animation: messageAppear 0.3s ease forwards;
}

/* 用户消息 */
.self-message {
  color: var(--text-light);
  align-self: flex-end;
  margin-left: 15%;
}

.self-message .message-content {
  border-radius: 8px 8px 8px 8px;
  background: rgb(118 229 94);
  border: 1px solid #e0e0e0;
  padding: 8px;
}

.dark-theme .self-message .message-content{
  color: var(--text-dark);
  background: #00340c;
  border-color: var(--primary-dark-border);
}

/* 联系人消息 */
.contact-message {
  display: flex;
  align-items: flex-start;
}

.contact-message .contact-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  margin-top: 4px;
  background-color: #ccc;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-size: 12px;
}

.contact-message .message-content{
  border-radius: 8px 8px 8px 8px;
  background: var(--input-area-light);
  border: 1px solid #e0e0e0;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.dark-theme .contact-message .message-content{
  color: var(--text-dark);
  background: var(--primary-light);
  border-color: var(--primary-dark-border);
}

/* 消息内容 */
.message-content {
  white-space: pre-wrap;
  font-size: 0.95em;
  line-height: 1.6;
}

.message-time {
  color: var(--meta-light);
  font-size: 0.75em;
  opacity: 0.8;
  align-self: flex-end;
  padding-top: 4px;
}

.dark-theme .message-time {
  color: var(--meta-dark);
}

.self-message .message-time {
  color: var(--meta-light);
  align-self: flex-end;
  padding-top: 4px;
}

.contact-message .message-time {
  color: var(--meta-light);
  align-self: flex-start;
  padding-top: 4px;
}

/* ===== 输入区域 ===== */

.input-area {
  position: absolute; /* 改为 absolute 定位 */
  bottom: 0; /* 固定在底部 */
  width: 100%; /* 保持宽度计算，可能需要根据父元素调整 */
  max-width: 1200px;
  margin: 0 auto; /* 保持居中，可能需要根据父元素调整 */
  background-color: var(--input-area-light);
  padding: 16px 20px;
  border-top: 1px solid var(--primary-light-border);
  display: grid;
  grid-template-areas:
    "input input"    /* 第一行：输入框跨两列 */
    "options send";  /* 第二行：左侧选项 | 右侧发送 */
  grid-template-columns: 1fr auto; /* 第二列自动宽度 */
  grid-template-rows: auto auto;    /* 两行自适应高度 */
  gap: 15px;
  transition: left 0.3s ease, max-width 0.3s ease;
}

.left-panel.collapsed ~ .input-area {
  width: calc(100% - 110px);
  left: 70px;
}

.dark-theme .input-area {
  background-color: var(--input-area-dark);
  border-color: var(--primary-dark-border);
  color: var(--text-dark);
}

/* 确保元素正确分配到网格区域 */
#question-input {
  border: none;
      background: none;
  outline: none; /* 去除聚焦时的轮廓线 */
  box-shadow: none; /* 去除任何阴影效果 */
  grid-area: input;
  min-height: 40px; /* 设置最小高度 */
  height: auto; /* 高度自动调整 */
  resize: none; /* 禁用用户手动调整大小 */
  overflow-y: auto; /* 内容超出时显示滚动条 */
  font-size: 1.2em;
}

.dark-theme #question-input{
  background-color: none;
  border-color: var(--primary-dark-border);
  color: var(--text-dark);
}

#send-button {
  grid-area: send;
    align-self: center; /* 垂直居中 */
    height: 32px; /* 增加高度 */
    width: 64px; /* 增加宽度 */
padding-bottom: 2px;
  background-color: var(--primary-light);
  border: 1px solid var(--primary-light-border) !important;
  border-radius: 9%;
  font-size:0.5em;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.3s ease;
}

/* 按下效果 */
#send-button:active {
    transform: scale(0.95);
}

/* 聚焦效果 */
#send-button:focus-visible {
    outline: 2px solid var(--primary-dark);
    outline-offset: 2px;
}

/* 禁用状态样式 */
#send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.dark-theme #send-button {
background-color: var(--primary-dark);
border:1px solid var(--primary-dark-border) ;
color: var(--text-dark);
}

#send-button:hover {
  opacity: 0.9;
}

/* ===== 左侧面板折叠状态 ===== */
.left-panel.collapsed {
  transform: translateX(-100%);
  width: 0;
  padding: 0;
  border: none;
  overflow: hidden;
}

.mobile-back-button {
 display: none;
}

.mobile-bottom-nav {
  display: none;
}

/* ===== 注册页面特定样式 ===== */
.register-container {
    width: 100%;
    max-width: 450px; /* 比登录页稍宽 */
    text-align: center;
    background: var(--container-bg, white);
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 8px 16px var(--shadow-color, rgba(0, 0, 0, 0.1));
    margin: auto; /* Center the container */
}

.dark-theme .register-container {
    background: var(--bg-dark);
    color: var(--text-dark);
    box-shadow: 0 8px 16px rgba(255, 255, 255, 0.05); /* Adjust shadow for dark theme */
}

.register-container h1 {
    margin-bottom: 10px;
    font-weight: 300;
    font-size: 36px;
    color: var(--text-light);
}

.dark-theme .register-container h1 {
     color: var(--text-dark);
}

.register-container p {
    margin-bottom: 25px;
    color: var(--meta-light, #666);
}

.dark-theme .register-container p {
     color: var(--meta-dark, #999);
}

.register-container .input-field {
    margin-bottom: 15px;
    text-align: left;
}

.register-container .input-field label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-light);
}

.dark-theme .register-container .input-field label {
    color: var(--text-dark);
}

.register-container .input-field input {
    width: 100%;
    padding: 10px 12px;
    font-size: 15px;
    border: 1px solid var(--primary-light-border, #ccc);
    border-radius: 6px;
    transition: border-color 0.3s, box-shadow 0.3s;
    background-color: var(--input-area-light, #f5f5f5);
    color: var(--text-light);
}

.dark-theme .register-container .input-field input {
    background-color: var(--input-area-dark, #1b1b1b);
    border-color: var(--primary-dark-border, #333);
    color: var(--text-dark);
}

.register-container .input-field input:focus {
    outline: none;
    border-color: var(--primary-color, #0078d4);
    box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.2);
}

.register-button {
    width: 100%;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background-color: var(--primary-color, #0078d4);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 15px;
}

.register-button:hover {
    background-color: var(--primary-hover, #005a9e);
}

.login-link {
    margin-top: 20px;
    font-size: 14px;
    color: var(--meta-light);
}
.dark-theme .login-link {
    color: var(--meta-dark);
}

.login-link a {
    color: var(--primary-color, #0078d4);
    text-decoration: none;
    font-weight: 500;
}

.login-link a:hover {
    text-decoration: underline;
}

.register-container .error-message {
    color: var(--error-color, #e74c3c);
    margin-top: 15px;
    font-size: 14px;
    display: none; /* Initially hidden */
    text-align: left;
}

/* Responsive adjustments for register page */
@media (max-width: 480px) {
    .register-container {
        padding: 20px;
        max-width: 100%;
        width: 100%;
        height: 100vh;
        border-radius: 0;
        box-shadow: none;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    .register-container h1 {
        font-size: 28px;
    }
}

/* ===== 响应式设计 ===== */
@media (max-width: 1400px) {
  .container {
    max-width: 100%;
  }
  
  .right-panel {
    max-width: 100%;
  }
  
  .input-area {
    max-width: 100%;
  }
  
  .left-panel.collapsed ~ .input-area {
    left: 20px;
    right: 20px;
    max-width: calc(100% - 40px);
  }
}

@media (max-width: 768px) {
.menu-toggle {
    position: fixed;
    top: 6px;
    left: 10px;
    font-size: 1.2rem;
}

.theme-toggle {
    position: fixed;
    top: 10px;
    right: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 10;
    font-size: 0.6em;
}  

.container {
    flex-direction: column;
  }

  .chat-header {
    height: 48px;
}

  .left-panel {
    position: fixed;
    width: 80% !important;
    height: 100vh;
    background-color: var(--bg-light);
    transform: translateX(-100%);
    z-index: 999;
  }

  .left-panel:not(.force-open) {
    transform: translateX(-100%);
  }
  
  .left-panel.force-open {
    transform: translateX(0);
  }
  
  .dark-theme .left-panel {
    background-color: var(--bg-dark);
  }
  
  .left-panel:not(.collapsed) {
    transform: translateX(0);
  }

  .right-panel {
    width: 100%;
    height: calc(100vh - 220px);
  }
  .chat-area {
padding: 2px;
padding-bottom: 8px;
}

  .message-container {
    max-width: 100%;
    padding: 14px;
    border-radius: 16px;
  }
  
  .self-message {
    padding: 6px;
    margin-left: 4%;
  }
  
  .contact-message {
    padding: 6px;
    margin-right: 4%;
  }
  
  .message-content {
    font-size: 0.8em;
  }

  .input-area {
    grid-template-rows: auto 1fr;
    padding: 15px;
  }
  
#question-input {
    font-size: 1em;
padding-left: 0px;
}

  .input-area input[type="text"] {
    padding: 12px;
  }
}

@media (max-width: 480px) {

.button-panel { display: none; }

.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: var(--primary-light);
  border-top: 1px solid var(--primary-light-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
}

.dark-theme .mobile-bottom-nav {
  background: var(--bg-dark);
  border-top-color: var(--primary-dark-border);
}

.mobile-bottom-nav button {

  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  color: transparent;
  background: var(--meta-light);
  -webkit-background-clip: text;
  background-clip: text;
  width: 40px;
  height: 40px;
  padding-bottom: 0;
  font-size: xx-large; /* 保持这个字体大小 */
  z-index: 999;
  display: flex; /* 添加 flex 布局以便居中 */
  align-items: center; /* 垂直居中 */
  justify-content: center; /* 水平居中 */
  }
  
  .mobile-bottom-nav button.active {
    border: none;
    color: transparent;
    background: var(--meta-dark);
    -webkit-background-clip: text;
    background-clip: text;
  }
  
  .dark-theme .mobile-bottom-nav button {
    color: transparent;
    background: var(--meta-light);
    -webkit-background-clip: text;
    background-clip: text;
    color: var(--meta-light); /* 为暗黑模式设置不同的灰色 */
  }
  
  .dark-theme .mobile-bottom-nav button.active {
    color: var(--primary-light-border); /* 保持暗黑模式激活状态的颜色 */
  }

  .theme-toggle {
   position: relative;
   align-items: center;
   display: flex; /* 改回 flex 以便对齐 */
   justify-content: center; /* 居中图标 */
   top: 0px;
   right: 0px;
   background: none; /* 透明背景 */
   border: none; /* 移除边框 */
   color: var(--meta-dark); /* 图标颜色 */
   font-size: 1.5em; /* 调整大小 */
   width: 60px; /* 与其他按钮宽度一致 */
   height: 100%; /* 占满父元素高度 */
  }
  .dark-theme .theme-toggle {
      color: var(--meta-light);
  }

  .nav-title {
    left: 46%;

  }
  
.left-panel {
  width: 100% !important;
  height: 100vh; /* 占据整个视口高度 */
  /* height: calc(100vh - 60px); */ /* 移除或注释掉原来的高度计算 */
  top: 0;
  left: 0; /* 确保从左边开始 */
  transform: translateX(0); /* 默认显示 */
  position: fixed; /* 使用 fixed 定位确保它在顶层 */
  z-index: 998; /* 比 mobile-nav 低，比 right-panel 高 */
  transition: transform 0.3s ease; /* 添加过渡效果 */
}

.message-preview {
  font-size: 0.85em;
  color: var(--meta-light);
  max-width: 280px;

}

  .right-panel {
    width: 100% !important; /* 确保 right-panel 也是全宽 */
    position: fixed; /* 使用 fixed 定位 */
    top: 0;
    left: 0;
    height: 100vh;
    transform: translateX(100%); /* 默认隐藏在右侧 */
    z-index: 999; /* 比 left-panel 高 */
    transition: transform 0.3s ease; /* 添加过渡效果 */
    background-color: var(--bg-light); /* 添加背景色以覆盖 left-panel */
  }

  .dark-theme .right-panel {
      background-color: var(--bg-dark);
  }

  .mobile-back-button {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: none; /* 默认隐藏 */
    z-index: 10; /* 确保在标题之上 */
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: var(--text-light);
  }
  .dark-theme .mobile-back-button {
      color: var(--text-dark);
  }

  /* 对话详情页状态 */
  .conversation-active .left-panel {
    transform: translateX(-100%); /* 左侧面板移出 */
  }

  .conversation-active .right-panel {
    transform: translateX(0); /* 右侧面板移入 */
  }

  .conversation-active .mobile-bottom-nav {
    /* transform: translateY(100%); */ /* 移除 transform 方式 */
    display: none; /* 使用 display: none 隐藏 */
  }

  .conversation-active .mobile-back-button {
    display: block; /* 显示返回按钮 */
    font-size: xx-large;
  }

  .user-avatar-container {
    display: none;
  }

  .content-container {
    padding-bottom: 60px; /* 为底部按钮栏留出空间 (60px) */
    height: 100%; /* 确保容器占满 right-panel */
    overflow: hidden; /* 防止内容溢出 */
    display: flex; /* 使用 flex 布局 */
    flex-direction: column; /* 垂直排列 */
  }

  .input-area { 
  
  align-items: flex-end;
  display: flex;
  gap: 8px; /* 稍微减小间距 */
  border-radius: 0px;
  width: 100%;
  min-height: 60px;
  height: auto; /* 允许高度自动扩展 */
  bottom: 0;
  padding: 10px 10px; /* 调整内边距 */
}

#question-input {
  flex: 0 0 80%;
  padding: 8px 8px; 
  font-size: 1em;
  min-height: 40px;
  height: auto; 
  max-height: 150px; 
  align-self: stretch; 
}

#send-button {
  margin-left: 36px;
  margin-bottom: 2px; /* 微调发送按钮位置，使其与其他元素底部更对齐 */
}

  .message-container {
    max-width: 100%;
    padding: 12px;
  }
  
  .message-content {
    margin-top: 10px;
  }
  
  .input-area input[type="text"] {
    font-size: 0.8em;
  }
  }