/* ------------------------------------------
 * IT书包
 * 网址：www.itshubao.com
 * 整理：yinq<3331653644@qq.com> 
 -------------------------------------------- */

*, *:before, *:after {
  box-sizing: border-box;
  -webkit-font-smoothing: auto;
}

body, html {
  min-height: 100vh;
}

body, html {
  background-color: #2D3C4C;
}

#head {
  height: 60px;
  margin: 0;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  text-align: center;
  padding-right: 30px;
  width: 100%;
  mix-blend-mode: darken;
  background-color: #3186DE;
  color: #fff;
  -webkit-font-smoothing: antialiased;
}
#head .profile.pic {
  width: 40px;
  height: 40px;
  margin: 10px 20px;
  background-image: url("../images/avatar.jpg");
  background-size: cover;
  border-radius: 100%;
  display: inline-block;
  vertical-align: top;
}
#head h2 {
  font-size: 18px;
  font-weight: 300;
  line-height: 60px;
  padding: 0;
  padding-right: 20px;
  margin: 0;
  display: inline-block;
  width: auto;
  vertical-align: top;
}
#head:before {
  position: absolute;
  bottom: 0;
  height: 10px;
  width: 100%;
  margin-bottom: -10px;
  background: -webkit-linear-gradient(bottom, transparent 0%, rgba(0, 0, 0, 0.15) 100%);
  background: linear-gradient(to top, transparent 0%, rgba(0, 0, 0, 0.15) 100%);
  content: '';
  display: block;
}

.table {
  display: table;
  width: 100%;
  height: 100vh;
}

.table-cell {
  display: table-cell;
  vertical-align: middle;
}

#screen {
  overflow: hidden;
  position: relative;
  width: 375px;
  height: 667px;
  margin: auto;
  background-color: #fff;
  box-shadow: 0 5px 60px rgba(0, 0, 0, 0.4);
  font-family: sans-serif;
  font-size: 16px;
  line-height: 1.5;
  font-family: 'Microsoft YaHei', sans-serif;
}

ul {
  margin: 0;
  padding: 0;
  height: calc(667px - 44px - 60px);
  position: absolute;
  top: 60px;
  overflow-y: scroll;
  background-color: #EAECEF;
}

li {
  list-style-type: none;
  background-color: #fff;
  max-width: 75%;
  clear: both;
  padding: 0 20px;
  margin-top: 15px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

li:last-child {
  margin-bottom: 15px;
}

li > div {
  padding: 10px 0;
  border-bottom: 1px solid #e5e5e5;
  line-height: 24px;
  word-wrap: break-word;
}
li > div.typing {
  font-size: 38px;
  height: 44px;
  opacity: 0.2;
  position: relative;
  top: -10px;
}

li > div:last-of-type {
  border-bottom: none;
}
li > div:last-of-type .timestamp {
  display: inline-block;
}

.them {
  float: left;
  border-radius: 0 15px 15px 0;
  padding-left: 20px;
}

.me {
  float: right;
  border-radius: 15px 0 0 15px;
  padding-right: 20px;
}

.me > div, .them > div {
  float: left;
  clear: both;
  min-width: 100%;
}

li > div:after {
  content: "";
  display: block;
  clear: both;
}

.timestamp {
  float: right;
  color: rgba(0, 0, 0, 0.25);
  font-size: 11px;
  vertical-align: bottom;
  padding-top: 2px;
  padding-left: 10px;
  clear: both;
  display: none;
}

#type {
  position: absolute;
  bottom: 0;
  width: 100%;
  background-color: #fff;
}
#type i {
  position: absolute;
  bottom: 0;
  left: 6px;
  width: 44px;
  text-align: center;
  line-height: 44px;
  font-size: 24px;
  color: #676D77;
  cursor: pointer;
  -webkit-transition: color 0.2s;
  transition: color 0.2s;
}
#type i.send {
  left: auto;
  right: 6px;
}
#type i.send.active {
  color: #2DB37D;
}
#type:before {
  mix-blend-mode: darken;
  position: absolute;
  top: 0;
  height: 10px;
  width: 100%;
  margin-top: -10px;
  background: -webkit-linear-gradient(top, rgba(239, 239, 239, 0) 0%, rgba(239, 239, 239, 0.6) 50%, #efefef 100%);
  background: linear-gradient(to bottom, rgba(239, 239, 239, 0) 0%, rgba(239, 239, 239, 0.6) 50%, #efefef 100%);
  content: '';
  display: block;
}
#type #newMessage {
  line-height: 22px;
  padding: 11px;
  margin: 0;
  outline: none;
  border: 0;
  width: calc(100% - 100px);
  margin-left: 50px;
}

@media only screen and (max-device-width: 736px), (min-device-width: 414px) and (max-device-width: 736px) and (-webkit-min-device-pixel-ratio: 3) {
  #screen {
    width: 100vw;
    height: 100vh;
  }

  ul {
    height: calc(100vh - 88px);
    -webkit-overflow-scrolling: touch;
  }
}