*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body{
  background: #ebf1ff;
}
a{
color: #7146f3;
text-decoration: none;
cursor: pointer;
}
#wrapper{
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: scroll;
  transition: all .3s ease;
  padding: 0 20px;
}
.profile{
  text-align: center;
  margin-bottom: 20px;
}
.profile img{
border-radius: 50%;
}
.profile .name{
font-size: 20px;
font-weight: 600;
margin-bottom: 10px;
}
.profile .bio{
font-size: 16px;
color: #686889;
}
.header{
  padding: 15px;
  background: white;
  border-radius: 0 0 30px 30px;
  text-align: center;
  font-size: 20px;
  z-index: 10;
  box-shadow: 0 2px 30px #b6ccff; 
}
.messages{
  flex: 1;
  margin-bottom: 35px;
  display: flex;
  justify-content: flex-end;
  flex-direction: column;
  transition: all .3s ease;
}
/* Hide scrollbar for Chrome, Safari and Opera */
*::-webkit-scrollbar {
  display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
*{
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}
.message{
  padding: 20px;
  margin-top: 20px;
  background: white;
  display: inline-block;
  box-shadow: 0 2px 30px -20px #b6ccff; 
  transition: all .3s ease;
}
.message:last-child{
  margin-bottom: 40px;
}
.message .body{
  margin-bottom: 10px;
}
.message.left, .message.bot{
  border-radius: 30px 30px 30px 0;
  margin-right: auto;
}
.message.right{
  float: right;
  border-radius: 30px 30px 0 30px;
  background: #7146f3;
  color: white;
  margin-left: auto;
}
.message.bot{
  background: #9c27b0;
  color: white;
}
.message .time{
  color: #686889;
}
.message.right .time, .message.bot .time{
  float: right;
  color: #bcaad9;
}
.message.right .body{
  text-align: right;
}
.message .body code{
  color: #9c27b0;
  /* font-style: italic; */
  cursor: pointer;
  /* font-size: ; */
  background: #f8dbff;
}

.message-form{
  width: calc(100% - 40px);
  max-width: calc(600px - 40px);
  display: flex;
  position: fixed;
  bottom: 0;
  box-shadow: 0 0 30px -10px #b6ccff; 
  background: transparent;
  border-radius: 30px 30px 0 0;
}
.message-form label{
  border-radius: 30px 0 0 0;
  background: white;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
}
.message-form input[type=text]{
  width: 90%;
  border: none;
  background: white;
  padding: 20px;
}
.message-form textarea{
  width: 90%;
  border: none;
  background: white;
  padding: 20px;
  resize: none;
  height: 55px;
}
.message-form input[type=submit]{
  background: white;
  color: #7146f3;
  border: none;
  padding: 10px 20px;
  border-radius: 0 30px 0 0;
  font-weight: 600;
  cursor: pointer;
  transition: all .3s ease;
}
input:hover{
  border: none;
}
input:active{
  border: none;
}
*:focus {
  outline: none;
}


/* animate new box */
.new-message {
animation: append-animate .3s linear;
}


/* work on the modals */

#modal-container {
position: fixed;
display: table;
height: 100%;
width: 100%;
top: 0;
left: 0;
transform:scale(0);
z-index:1;
background: rgba(0, 0, 0, .8);
}
#modal-container.two {
 transform: scale(1);
}
#modal-container.two .modal-background {
 background: rgba(0, 0, 0, .0);
 animation: fadeIn 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}
#modal-container.two .modal-background .modal {
 opacity: 0;
 animation: scaleUp 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}
#modal-container.two + .content {
 animation: scaleBack 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}
#modal-container.two.out {
 animation: quickScaleDown 0.5s linear forwards;
}
#modal-container.two.out .modal-background {
 animation: fadeOut 0.3s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}
#modal-container.two.out .modal-background .modal {
 animation: scaleDown 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}
#modal-container.two.out + .content {
 animation: scaleForward 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}
#modal-container .modal-background {
 display: flex;
 background: rgba(0, 0, 0, .8);
/* 	 text-align: center; */
/* 	 vertical-align: middle; */
justify-content: center;
}
#modal-container .modal-background .modal {
 
display: inline-block;
background: white;
padding: 50px;
/*   display: block; */
width: calc(100% - 40px);
max-width: calc(600px - 40px);
border-radius: 30px 30px 0 0;
font-weight: 300;
position: fixed;
bottom: 0;
/*   margin-left: 50%; */
/*   transform: translate(-50%, -50%); */
}
.introduce_form{
display: flex;
flex-direction: column;
}
.introduce_form h2{
color: #7146f3;
}
.introduce_form input{
padding: 10px 20px;
margin-bottom: 20px;
/*   background: #f1f1f1; */
border-radius: 4px;
box-shadow: 0 0 20px -20px #7146f3; 
color: #7146f3;
border: 1px solid #7146f3;
}
.introduce_form button{
border: none;
padding: 10px;
color: white;
background: #7146f3;
border-radius: 4px;
cursor: pointer;
}
#modal-container .modal-background .modal h2 {
 font-size: 25px;
 line-height: 25px;
 margin-bottom: 15px;
}
#modal-container .modal-background .modal p {
 font-size: 18px;
 line-height: 22px;
}

/* animations */
@keyframes append-animate {
from {
  transform: scale(0);
  opacity: 0;
}
to {
  transform: scale(1);
  opacity: 1;	
}
}

@keyframes fadeIn {
0% {
  background:rgba(0,0,0,.0);
}
100% {
  background:rgba(0,0,0,.7);
}
}
@keyframes fadeOut {
0% {
  background:rgba(0,0,0,.7);
}
100% {
  background:rgba(0,0,0,.0);
}
}

@keyframes scaleUp {
0% {
  transform:scale(.8) translateY(1000px);
  opacity:0;
}
100% {
  transform:scale(1) translateY(0px);
  opacity:1;
}
}

@keyframes scaleDown {
0% {
  transform:scale(1) translateY(0px);
  opacity:1;
}
100% {
  transform:scale(.8) translateY(1000px);
  opacity:0;
}
}

@keyframes scaleBack {
0% {
  transform:scale(1);
}
100% {
  transform:scale(.85);
}
}

@keyframes quickScaleDown {
0% {
  transform:scale(1);
}
99.9% {
  transform:scale(1);
}
100% {
  transform:scale(0);
}
}
@keyframes scaleForward {
0% {
  transform:scale(.85);
}
100% {
  transform:scale(1);
}
}