/* 全局重置 - 无任何多余样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html, body {
  height: 100%;
  overflow: hidden;
  font-family: "Microsoft YaHei", sans-serif;
  background: #f5f7fa;
}

/* 全屏页面容器 */
.chat-page {
  position: relative;
  width: 100%;
  height: 100vh;
  padding-bottom: 60px; /* 给输入框留位置，核心兜底 */
}

/* 顶部极简标题 */
.top-bar {
  height: 40px;
  background: #1677ff;
  color: white;
  text-align: center;
  line-height: 40px;
  font-size: 16px;
}

/* 消息区域 - 占满全部屏幕（除了顶部+底部） */
.msg-container {
  width: 100%;
  height: calc(100vh - 40px);
  padding: 10px;
  overflow-y: auto;
  background: #fff;
}

/* 消息气泡样式 */
.msg {
  max-width: 85%;
  margin-bottom: 10px;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
}
.msg.user {
  margin-left: auto;
  background: #e6f4ff;
}
.msg.bot {
  margin-right: auto;
  background: #f2f3f5;
  border: 1px solid #eee;
}

/* ================= 核心：输入框永久固定底部 ================= */
.input-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: #fff;
  border-top: 1px solid #eee;
  padding: 8px 10px;
  display: flex;
  gap: 8px;
  z-index: 999; /* 永远在最上层，不会被遮挡 */
}

/* 输入框 */
#questionInput {
  flex: 1;
  border: 1px solid #eee;
  border-radius: 24px;
  padding: 8px 14px;
  resize: none;
  outline: none;
  font-size: 14px;
}
#questionInput:focus {
  border-color: #1677ff;
}

/* 发送按钮 */
.input-bar button {
  width: 70px;
  height: 44px;
  background: #1677ff;
  color: white;
  border: none;
  border-radius: 24px;
  cursor: pointer;
  font-size: 14px;
}

/* ================= 手机端极致优化 ================= */
@media (max-width: 768px) {
  .top-bar {
    height: 36px;
    line-height: 36px;
    font-size: 15px;
  }
  .msg-container {
    height: calc(100vh - 36px);
    padding: 6px;
  }
  .input-bar {
    height: 54px;
    padding: 6px 8px;
  }
  .input-bar button {
    width: 64px;
    height: 42px;
  }
}