* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  cursor: none;
}

#app {
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

::-webkit-scrollbar {
  display: none;
}

.container {
  display: flex;
  width: 100%;
  height: 100vh;
  flex-direction: column;
  position: relative;
}

.logo {
  position: absolute;
  top: 2vh;
  left: 2vw;
  width: 30%;
  max-width: 300px;
}

.helper-page {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  height: 100%;
}

.helper-box {
  /* background-color: rgba(48, 63, 118, 0.6); */
  /* border-radius: 16px; */
  color: #ffffff;
  margin: 2vh 2vw;
  width: 100%;
  max-height: 20vh;
  font-size: clamp(16px, 2.5vw, 32px);
  /* border: #ffffff solid 1px; */
}

.helper-text {
  padding: 0 2vw;
}

.helper-text div {
  margin: 5px 0;
  color: #01637B;
}
.helper-text .title {
  font-size: clamp(24px, 4vw, 48px);
  font-weight: bold;
  margin-bottom: 1.5vh;
}

.helper-text p {
  padding: 5px 20px;
  background: #00BBD7;
  color: #ffffff;
  width: fit-content;          /* 宽度跟随内容收缩，长文本仍按父容器宽度换行 */
  border-radius: 9999px;       /* 半径被裁剪为高度的一半，即胶囊形圆角 */
  line-height: 1.6;
  margin: 10px 0;
}

.helper-text span {
  font-weight: bold;
  font-size: clamp(16px, 2.5vw, 32px);
}

.chat-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  justify-content: center;
  background-image: url("./img/bg-1.jpg");
  background-size: cover;
  background-position: center;
}

.chat-page {
  position: absolute;
  display: flex;
  flex-direction: column;
  width: calc(100% - 4vw);
  /* max-width: 600px; */
  height: 35vh;
  left: 2vw;
  right: 2vw;
  top: 2vh;
  overflow-y: scroll;
  z-index: 1;
  /* 降低背景不透明度，让下层背景图透过玻璃可见，磨砂感才成立 */
  background-color: rgba(255, 255, 255, 0.25);
  /* 磨砂核心：模糊容器背后的画面；数值越大越"奶白" */
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%); /* Safari 需要带前缀 */
  /* 一层极淡的内描边模拟玻璃边缘高光 */
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.12);
  border-radius: 16px;
}

.messages {
  display: flex;
  flex-direction: column;
  padding: 10px;
  font-size: clamp(14px, 2.5vw, 24px);
  line-height: 1.2;
  color: #1e293b;
}

.message {
  display: flex;
  align-items: flex-start;
  width: 90%;
  margin-bottom: 10px;
}

.message-reverse {
  flex-direction: row-reverse;
  align-self: flex-end;
}

.avatar {
  height: clamp(32px, 8vw, 64px);
  width: clamp(32px, 8vw, 64px);
  border-radius: 50%;
  margin-right: 10px;
}

.message-reverse .avatar {
  margin-left: 10px;
  margin-right: 0;
}

.message-content {
  display: flex;
  border-radius: 20px;
  background-color: #f8fafc;
  padding: 10px;
  max-width: calc(100% - 80px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  color: #ffffff;
}

.message-content div {
  min-height: 24px;
  word-break: break-word;
}

.left-message {
  border-top-left-radius: 0;
  background: rgba(255,255,255,0.8);
}

.right-message {
  border-top-right-radius: 0;
  background-color: #00C5E3;
}

.anyi-box {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 60vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.show-img {
  width: auto;
  height: 100%;
  max-width: none;
  object-fit: cover;
  margin-bottom: 2vh;
}

.tips {
  position: absolute;
  bottom: 1.5vh;
  left: 0;
  right: 0;
  font-size: clamp(16px, 2.5vw, 20px);
  color: #a2a7ac;
  text-align: center;
}

@media screen and (max-width: 768px) {
  /* .helper-box {
    width: 100%;
    margin: 1vh 1vw;
  }

  .chat-page {
    width: 100%;
    right: 1vw;
    top: 1vh;
  } */

  .message-content {
    max-width: calc(100% - 50px);
  }
}

@media screen and (max-height: 600px) {
  .anyi-box {
    height: 50vh;
  }

  .chat-page {
    height: 45vh;
  }
}
@media screen and (min-height: 1600px) {
  .helper-box {
    height: 14vh;
  }
}
@media screen and (min-width: 1920px) {
  .container {
    width: 100%;
    height: 1080px;
  }
   /* 背景图交给铺满整个视口的 #app 承载，宽于 1920 时不会再留白 */
  #app {
    background-image: url("./img/bg-2.jpg");
    background-size: cover;
    background-position: center;
  }
  .chat-container {
    background-image: none; /* 取消容器自身背景，避免同一张图在两处各自裁剪造成错位 */
  }

  .logo {
    width: 15%;
  }

  /* .helper-box {
    width: 100%;
    height: 220px;
    margin: 20px;
    font-size: 20px;
  } */

  .helper-text {
    span {
      font-size: 24px;
    }
  }

  /* .chat-page {
    width: 100%;
    height: 50%;
    right: 40px;
    top: 100px;
  } */

  .messages {
    font-size: 20px;
  }

  .avatar {
    height: 48px;
    width: 48px;
  }

  .anyi-box {
    width: 1600px;
    height: 900px;
    position: absolute;
    left: 150px;
    bottom: 0;
  }

  .show-img {
    margin-left: 0;
    width: 100%;
    position: absolute;
  }
}
