body {
  margin: 0;
  background-color: #edf2fa;
}

.container {
  max-width: 460px;
  margin: 0 auto;
  min-height: 100vh;
  background-color: #edf2fa;
  height: 100%;
  flex: 1;
  position: relative;
}

.flex {
  display: flex;
}

.avatar {
  padding: 10px 0;
  width: 40px;
  height: 40px;
}

.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 100%;
}

.reply {
  justify-content: flex-end;
}

.reply .avatar {
  order: 2;
}

.reply .message {
  order: 1;
}

.messages {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 150px;
}

.message {
  font-size: 1.15rem;
  max-width: 70%;
  margin: 10px;
  padding: 10px;
  border-radius: 5px;
  background-color: #fff;
}

.reply .message {
  background: linear-gradient(270deg, rgb(149, 236, 105), rgb(149, 236, 105) 96%);
}

.receive {
  align-self: flex-start;
  animation-duration: 0.3s;
  animation-name: slideInLeft;
}

.reply {
  align-self: flex-end;
  animation-duration: 0.3s;
  animation-name: slideInRight;
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* 定义淡入动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* 定义淡出动画 */
@keyframes fadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

/* 应用淡入动画 */
.fade-in {
  animation: fadeIn .6s ease-in-out;
}

/* 应用淡出动画 */
.fade-out {
  animation: fadeOut .2s ease-in-out;
  animation-fill-mode: forwards;
}

/* 禁用点击 */
.disabled-click {
  pointer-events: none;
}

.slideInBounceBottom {
  animation: bounce-in-bottom .5s both;
}

@keyframes bounce-in-bottom {
  0% {
    transform: translateY(500px);
    animation-timing-function: ease-in;
    opacity: 0;
  }

  38% {
    transform: translateY(0);
    animation-timing-function: ease-out;
    opacity: 1;
  }

  55% {
    transform: translateY(65px);
    animation-timing-function: ease-in;
  }

  72% {
    transform: translateY(0);
    animation-timing-function: ease-out;
  }

  81% {
    transform: translateY(28px);
    animation-timing-function: ease-in;
  }

  90% {
    transform: translateY(0);
    animation-timing-function: ease-out;
  }

  95% {
    transform: translateY(8px);
    animation-timing-function: ease-in;
  }

  100% {
    transform: translateY(0);
    animation-timing-function: ease-out;
  }
}

.select {
  /* display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px; */
  padding: 20px;
  position: absolute;
  bottom: 0;
  width: calc(100% - 40px);
  /* 以下是flex布局 */
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.option {
  padding: 14px;
  border-radius: 5px;
  background-color: #d0021b;
  cursor: pointer;
  text-align: center;
  color: #fff;
  /* 以下是配合flex布局 */
  width: 38%;
  margin: 5px;
}

.atavar {
  width: 60px !important;
  height: 60px;
  border-radius: 10px;
}

.char {
  background: #efefef;
  margin: 10px;
  border-radius: 10px;
  display: none;
  align-items: center;
  padding: 10px 20px;
  position: absolute;
  width: calc(100% - 60px);
  bottom: 30px;
}

.char-title {
  padding: 0 10px;
}

.char-title>p {
  margin: 0;
  color: #000;
  font-weight: bold;
}

.char-title>span {
  color: #666;
}

.addbut {
  background-color: #f44336;
  padding: 12px;
  margin-left: auto;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
}