@font-face {
  font-family: "SourceHanSansFull";
  src: url("../font/SourceHanSans/SourceHanSansSC-VF.otf.woff2")
    format("woff2");
}
@font-face {
  font-family: "SourceHanSans";
  src: url("../font/SourceHanSans/SourceHanSans.ttf")
    format("ttf");
}
div{
  -webkit-user-select: none;
  user-select: none;
}
:root {
  --bgcolor: #2c3e50;
  --gentle-motion: 350ms;
  color: #fff;
  font-family: "SourceHanSans", "SourceHanSansFull", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  overflow: hidden;
}
#chatlist {
  background-color: #34495e;
  box-shadow: #0008 0 0 8px 0;
  z-index: 1;
}
#listclip{
  flex: 1;
  padding-top: 4.25em;
  position: relative;
}

#listclip > div,
#icon,#user {
  display: flex;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 2em;
  height: 2em;
  padding: 0.75em;
  transition: border-radius var(--gentle-motion),
    box-shadow var(--gentle-motion), background-color var(--gentle-motion),
    z-index calc(var(--gentle-motion) * 2);
  position: relative;
  z-index: 0;
  align-items: center;
}
#icon,#user{
  padding: 0.75em;
  color: #fff;
  position: fixed;
  z-index: 100;
  background-color: #34495e;
  border-radius: 0;
}
a {
  text-decoration: none;
}
#listclip > div.chat:hover {
  z-index: 1;
}
#chatlist > hr {
  position: fixed;
  width:1.35em;
  top: 3.5em;
  z-index: 100;
  margin: 0 1em 0 1em;
  border: solid #7f8c8d 1px;
  border-radius: 1px;
}
#listclip > div.chat:hover,
#listclip > div.chat.seleted,#user:hover {
  transition: border-radius var(--gentle-motion),
    box-shadow var(--gentle-motion), background-color var(--gentle-motion);
  background-color: #fff2;
  border-radius: 0 0.75em 0.75em 0;
  box-shadow: #0008 0 0 4px 0;
}
#listclip > div.chat.seleted {
  box-shadow: #0008 0 0 8px 0;
  background-color: #fff4;
  z-index: 2;
}
#chatlist > #user:active,#chatlist > #user.active, #chatlist > #icon.active {
  background-color: #fff4;
  box-shadow: #0008 0 0 8px 0;
}
#chatlist > #icon{
  border-radius:  0 0 0.5em 0;
}
#chatlist > #user {
  border-radius:  0 0.5em 0 0;
}
.title {
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  background: #0008;
  border-radius: 0.5em;
  padding: 0.5em;
  margin-left: 1.5em;
  opacity: 0;
  transform: translate(-0.75em, 0);
  transition: opacity var(--gentle-motion), transform 1ms var(--gentle-motion);
  pointer-events: none;
}
div#user.active .title{
  opacity: 0;
  transform: translate(-0.75em, 0);
}
#icon:hover .title,#user:hover .title,
.chat:hover .title {
  transition: transform var(--gentle-motion), opacity var(--gentle-motion);
  opacity: 1;
  transform: translate(0, 0);
}
#icon .title,#user .title {
  margin-left: 2em;
}
.subtitlet ,.time{
  color: #fff8;
}
.info{
  opacity: 0;
  transition: opacity var(--gentle-motion);
}
.msgouter:hover .info{
  opacity: 1;
}
#icon .subtitlet ,.time{
  font-size: 0.25em;
}
#icon .titlet {
  font-size: 0.5em;
  height: 0.5em;
}
body {
  display: flex;
  background-color: var(--bgcolor);
}
:root,
html,
body {
  width: 100vw;
  height: 100vh;
  padding: 0;
  margin: 0;
}
#bgicon {
  width: 50vmin;
  left: calc(50vw + 2em);
  top: 50vh;
  transform: translate(-50%, -50%);
  position: absolute;
  z-index: -1;
  display: block;
}
@media screen and (min-width: 64em) {
}
@media screen and (min-width: 42em) and (max-width: 64em) {
}
@media screen and (max-width: 42em) {
}
@media screen and (max-aspect-ratio: 1/1) {
  #bgicon {
    display: none;
  }
}
@media print {
  main {
    display: none;
  }
  div#print {
    display: block;
  }
}
div#print {
  display: none;
  position: absolute;
  font-size: 3em;
  left: 50vw;
  top: 50vh;
  transform: translate(-50%, -50%);
}

div#print {
  display: none;
}
#user{

  bottom: 0;
}
#icon{
  top:0;
  padding-bottom: 1.5em;
}
.avatar{
  width: 3em;
  height: 3em;
  border-radius: 1.5em;
  margin: 0 1em;
}
.msg,.info{
  display: flex;
  align-items: flex-end;
}
.info{
  padding: 0 1em;
}
.name{
  padding: 0 0.5em;
}

#chatmain{
  flex:1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}
.msg.me,.me+.info{
  flex-direction: row-reverse;
}
.me .msgtxt{
  text-align: right;
}
input:hover{
  background-color: #3b536a;
  box-shadow: #0008 0 0 4px 0;
}
input[type="text"]:focus-visible,input[type="button"]:active{
  background-color: #425d77;
  outline: none;
  box-shadow: #0008 0 0 8px 0;
}
input{
  resize: none;
  background-color: #34495e;
  border: none;
  font-family: "SourceHanSans", "SourceHanSansFull", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1em;
  transition: background-color var(--gentle-motion),box-shadow var(--gentle-motion);
  color: #fff;
  white-space: nowrap;
}
#msginput{
  border-radius: 0.5em;
  margin: 1em;
  padding: 0.5em 1em;
  width: calc(100vw - 7.5em);
}
input[type="text"]::placeholder{
  color: #fff8;
}
#presend{
  padding-top: 0.5em;
}
#symbolbox{
  display: hidden;
}
#chatbox{
  flex:1;
  display: flex;
  flex-direction: column;
}

input:disabled{
  background-color: #263544;
  cursor: not-allowed;
  box-shadow: none;
}
#user.active img{
  src:url("../img/user_light.svg");
}
#loginbox{
  position: fixed;
  bottom:0;
  padding: 0.5em;
  border-radius: 0.5em;
  margin: 0.5em;
  margin-left: 1.25em;
  background-color: #0008;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transform: translate(-150%, 0);
  transition: transform var(--gentle-motion);
}
#loginbox.error{
  animation: errorlogin 0.75s;
}
@keyframes errorlogin {
  0%,100%{
    transform: translate(0, 0);
  }
  20%,80%{
    background-color: #e74c3c80;
  }
  25%,75%{
    transform: translate(-2.5%, 0);
  }
  50%{
    transform: translate(2.5%, 0);
  }
}
#loginbox.active{
  transform: translate(0, 0);
}
#loginbox label{
  display: block;
  font-size: 0.5em;
  margin: 0.5em 1em;
}
#loginbox *{
  margin: 0.25em;
}
#loginbox input{
  padding: 0.25em 0.5em;
  border-radius: 0.5em;
  font-size: 0.75em;
}
#loginbox #uuidbox{
  border-radius: 0.5em 0 0 0.5em;
  margin-right: 0;
  padding-right: 0.25em;
  width:20em;
}
#loginbox input[type="button"]{
  border-radius: 0 0.5em 0.5em 0;
  margin-left: 0;
}
#user > img{
  content: url("../img/user.svg");
}
#user.logged > img{
  content: url("../img/user_color.svg");
}
.chat.ani{
  animation: chatenter var(--gentle-motion) var(--delay) both;
}
@keyframes chatenter {
  0%{
    transform: translate(-100%,0);
  }
  100%{
    transform: translate(0,0);
  }
}
