@keyframes messageLoad {
  0% {
      opacity: 0;
      margin-left: 5vw;
  }
  100% {
      opacity: 1;
      margin-left: 0;
  }
}
@keyframes typing {
  0% { width: 0; }
}
@keyframes blink {
  50% { border-color: transparent; }
}


img {
  width: 85%;
  max-width: 7vh;
  border-radius: 50%;
  margin-left: auto;
  margin-right: auto;
  margin-top: 0.5vh;
  margin-bottom: 0.5vh;

  cursor: pointer;
}

ul {
  list-style: none;
  margin-left: 0;
  padding-left: 0;
}

li {
  padding-left: 2em;
  text-indent: -1em;

  margin-top: 0.5vh;
  margin-bottom: 0.5vh;

  color: #f3f2f5;

  transition-duration: .2s;

  cursor: pointer;
}

li:before {
  content: "#";
  padding-right: 5px;
  color: #b4bbc1;
}

li:hover {
  background-color: #404249;
  border-radius: 3px;
  transition: 0.2s;
  padding-left: 1rem;
  padding-right: 1rem;

  transition-duration: .2s;
}

details {
  margin-top: 0.5vh;
  margin-bottom: 0.5vh;
}

summary {
  color: #f3f2f5;

  cursor: pointer;
}

#discord {
  background-color: #313239;
  z-index: 2;
}

#bar{
  background-color: #1e1f22;
  width: 100%;
  height: 3%;

  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;

  gap: 0.5rem;

  cursor: pointer;
}
#bar b {
  flex: 1;
}

#discord-icon {
  background-color: #1e1f22;
  width: 5%;
  height: 5.5%;

  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  margin-left: auto;
  margin-right: auto;

  border-bottom: 1px solid #313239;
  margin-bottom: -1px;
  z-index: 0;
}
#discord-icon img {
  width: 85%;
  min-height: 100%;
  border-radius: 50%;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0;
}
#server-name {
  background-color: #2b2c30;
  width: 15%;
  height: 5.5%;

  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  margin-left: auto;
  margin-right: auto;

  border-bottom: 1px solid #1e1f22;
  margin-bottom: -1px;
  z-index: 0;
}
#channel-details {
  background-color: #313239;
  width: 80%;
  height: 5.5%;

  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  margin-left: auto;
  margin-right: auto;

  gap: 1.5rem;

  border-bottom: 1px solid #1e1f22;
  margin-bottom: -1px;
  z-index: 0;
}
#channel-details b {
  margin-left: 2vw;
}

#servers {
  background-color: #1e1f22;
  width: 5%;
  height: 91.5%;

  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  margin-left: auto;
  margin-right: auto;
}
#channels {
  background-color: #2b2c30;
  width: 15%;
  height: 91.5%;
}
#messages{
  background-color: #313239;
  width: 65%;
  height: 91.5%;

  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  margin-left: auto;
  margin-right: auto;
}
#members {
  background-color: #2b2c30;
  width: 15%;
  height: 91.5%;
}

#addServer {
  background-color: #313239;
  width: 85%;
  max-width: 7vh;

  aspect-ratio: 1/1;
  border-radius: 50%;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-left: auto;
  margin-right: auto;

  cursor: pointer;
}

#messages-box {
  width: 100%;
  height: 92%;

  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  margin-left: auto;
  margin-right: auto;

  padding-top: 1vh;
  padding-bottom: 1vh;

  gap: 1vh;

  overflow-y: scroll;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #1a1a1f #2b2c30;
}
#write-box {
  width: 100%;
  height: 8%;
}
#write-background {
  width: 95%;
  height: 70%;

  margin-left: auto;
  margin-right: auto;

  resize: none;
  box-sizing: border-box;
  border-radius: 4px;
  background-color: #383b41;

  padding-top: 1vh;
  padding-bottom: 10px;
  padding-left: 20px;
  padding-right: 20px;

  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: flex-start;
  margin-left: auto;
  margin-right: auto;
}
#write-field {
  /* animation: typing 2s steps(12, end), blink .4s step-end infinite alternate;
  border-right: 2px solid #f3f2f5; */
  /* color: #f3f2f5; */

  /*width: 12ch; /* Number of chars */
  white-space: nowrap;
  overflow: hidden;

  float: none;
}
.write {
  animation: typing 2s steps(var(--chars), end), blink .4s step-end infinite alternate;
  border-right: 2px solid #f3f2f5;
  color: #f3f2f5;

  width: var(--chars2);
  /*width: 6ch; /* Number of chars */
}
#write-text {
  color: #b4bbc1;
}

.sample-message {
  width: 100%;

  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: flex-start;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 1.5vh;

  opacity: 0;
  animation: messageLoad 1s forwards;
}
.sample-message:hover {
  background-color: #2e3134;
}
.sample-message img {
  width: 3vw;
  max-width: 5vh;
  border-radius: 50%;
  margin-left: 1vw;
  margin-right: 1vw;
  margin-top: 0.5vh;
  margin-bottom: 0.5vh;

  background-color: #f7f5ef;
  aspect-ratio: 1/1;
}
.sample-message p {
  width: 80%;
}
.sample-message:nth-child(1) {
  animation-delay: 1s;
}
.sample-message:nth-child(2) {
  animation-delay: 5.5s;
}
.sample-message:nth-child(3) {
  animation-delay: 7s;
}
.messagesAuthor {
  line-height: 3vh;
}

#members {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  margin-left: 0;
  margin-right: 0;

  gap: 0.5rem;
}
#members b {
  width: 100%;
  margin-top: 1vh;
}
.sample-member {
  width: 100%;

  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: flex-start;
  margin-left: 0;
  margin-right: 0;
}
.sample-member img {
  width: 20%;
  max-width: 5vh;
  border-radius: 50%;
  margin-left: 0.5vw;
  margin-right: 0.75vw;
  margin-top: 0.5vh;
  margin-bottom: 0.5vh;

  background-color: #f7f5ef;
  aspect-ratio: 1/1;
}
.sample-member p {
  width: 80%;
}

.ownerNickname {
  color: #c390eb;
}
.guestNickname {
  color: #8fe048;
}
.textNew {
  color: #f3f2f5;
}
.textOld {
  color: #b4bbc1;
}

.embed {
  background-color: #2b2c30;
  border-left: 4px solid #6d25bf;
  margin-left: -1px;
  z-index: 0;
  padding: 1vw;

  display: inline-block;
}

.embed span img {
  width: 80%;
  max-width: 40vh;
  border-radius: 4px;
  margin-left: 0.5vw;
  margin-right: 0.5vw;
  margin-top: 1.5vh;
  margin-bottom: 1.5vh;

  background-color: #f7f5ef;
  aspect-ratio: unset;
  display: block;
}

.command {
  background-color: #302e2b;
  outline: #1a1a1f solid 1px;
}

@media screen and (max-width: 1600px) {
  #discord {
    width: 100vw;
    height: 100%;
  }
}