/*--------------------
Mixins
--------------------*/


:root {
  --border: #ffad7d00;
  --title : #1a1a1f;
  --title-text : #fff;
  --bg : #141417;
  --msg-text : #fff;
  --chatbubble : #454545be;
  --scrollbar : #ffffff7c;
  --avatar-border : rgba(255, 255, 255, 0.24);
  --my-message : linear-gradient(60deg, #454545be, #ff2424);
  --repliedtomsg : #454545;
  --linkcolor : #c6a7f8;
  --loadingrotatebg: #000000;
  --loadingtext: #fff;
  --replyingtobg: linear-gradient(120deg, rgb(97, 97, 97), #257287);
  --textbox-bg: #313131;
  --textbox-bo: #ffad7d;
  --textbox-text: rgb(255, 255, 255);
  --timestamp: rgba(255, 255, 255, .3);
  --msg-self: linear-gradient(120deg, #248A52, #257287);

--msg-self-tail: #257287;
}

[data-theme="light"] {
  --border: #43192d;
  --title : #43192d;
  --title-text : #fff;
  --bg : #fff;
  --msg-text : #fff;
  --chatbubble : #43192d;
  --scrollbar : #43192d;
  --avatar-border : #43192d;
  --my-message : linear-gradient(60deg, #43192d, #ff2424);
  --repliedtomsg : rgb(112, 112, 112);
  --linkcolor : #99c8ff;
  --loadingrotatebg: #43192d;
  --loadingtext: #fff;
  --replyingtobg: linear-gradient(120deg, rgb(97, 97, 97), #257287);
  --textbox-bg: #c7c7c7;
  --textbox-bo: #43192d;
  --textbox-text: rgb(0, 0, 0);
  --timestamp: rgb(99, 99, 99);
}

[data-theme="dark"] {

  --border: #ffad7d00;
  --title : #1a1a1f;
  --title-text : #fff;
  --bg : #141417;
  --msg-text : #fff;
  --chatbubble : #454545be;
  --scrollbar : #ffffff7c;
  --avatar-border : rgba(255, 255, 255, 0.24);
  --my-message : linear-gradient(60deg, #454545be, #ff2424);
  --repliedtomsg : #454545;
  --linkcolor : #c6a7f8;
  --loadingrotatebg: #000000;
  --loadingtext: #fff;
  --replyingtobg: linear-gradient(120deg, rgb(97, 97, 97), #257287);
  --textbox-bg: #313131;
  --textbox-bo: #ffad7d;
  --textbox-text: rgb(255, 255, 255);
  --timestamp: rgba(255, 255, 255, .3);
}

[data-theme="neon"] {
  --border: #ffad7d;
  --title : #000000;
  --title-text : #fff;
  --bg : rgb(63, 47, 39);
  --msg-text : #fff;
  --chatbubble : #77584cbe;
  --scrollbar : #ffad7d;
  --avatar-border : rgba(255, 255, 255, 0.24);
  --my-message : linear-gradient(60deg, #77584cbe, #ff2424);
  --repliedtomsg : rgb(112, 112, 112);
  --linkcolor : #c6a7f8;
  --loadingrotatebg: #000000;
  --loadingtext: #ffad7d;
  --replyingtobg: linear-gradient(120deg, rgb(97, 97, 97), #257287);
  --textbox-bg: #313131;
  --textbox-bo: #ffad7d;
  --textbox-text: rgb(255, 255, 255);
  --timestamp: rgba(255, 255, 255, .3);
}

[data-theme="trans"] {
  --border: #ffad7d00;
  --title : #1a1a1f;
  --title-text : #fff;
  --bg : #141417;
  --msg-text : #fff;
  --chatbubble : #454545be;
  --scrollbar : #ffffff7c;
  --avatar-border : rgba(255, 255, 255, 0.24);
  --my-message : linear-gradient(60deg, #454545be, #ff2424);
  --repliedtomsg : #454545;
  --linkcolor : #c6a7f8;
  --loadingrotatebg: #000000;
  --loadingtext: #fff;
  --replyingtobg: linear-gradient(120deg, rgb(97, 97, 97), #257287);
  --textbox-bg: #313131;
  --textbox-bo: #ffad7d;
  --textbox-text: rgb(255, 255, 255);
  --timestamp: rgba(255, 255, 255, .3);

}

[data-theme="discord"] {
  --border: #202225;
  --title : #2f3136;
  --title-text : #fff;
  --bg : #40444b;
  --msg-text : #fff;
  --chatbubble : #2f3136;
  --scrollbar : #202225;
  --avatar-border : #2f3136;
  --my-message : linear-gradient(60deg, #2f3136, #bf8622);
  --repliedtomsg : rgb(112, 112, 112);
  --linkcolor : #99c8ff;
  --loadingrotatebg: #202225;
  --loadingtext: #fff;
  --replyingtobg: linear-gradient(120deg, rgb(97, 97, 97), #257287);
  --textbox-bg: #202225;
  --textbox-bo: #40444b;
  --textbox-text: #fff;
  --timestamp: rgba(255, 255, 255, .3);
}


/*--------------------
Body
--------------------*/
*,
*::before,
*::after {
  box-sizing: border-box;
}

a {
  color: var(--linkcolor);
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  height: 100vh;
  background: url('./chatbg.jpg') no-repeat center center/cover;
  display: flex;
  justify-content: center;
  align-items: center;

  font-family: "Open Sans", sans-serif;
  font-size: 12px;
  line-height: 1.3;
  overflow: hidden;
}




@import url("https://fonts.googleapis.com/css?family=Telex");
      /* Add some styling to the loading screen */
      .loading-screen {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: #141417;
        z-index: 1000;
      }

.loading {
  color: var(--loadingtext);
  font-size: 30px;
  height: 20px;
  text-align: center;
  position: relative;
  top: 50%;
  margin-top: -10px;
  -webkit-transform-style: preserve-3d;
  -moz-transform-style: preserve-3d;
  -o-transform-style: preserve-3d;
  -ms-transform-style: preserve-3d;
  transform-style: preserve-3d;
  -webkit-perspective: 500px;
  -moz-perspective: 500px;
  -o-perspective: 500px;
  -ms-perspective: 500px;
  perspective: 500px;
  letter-spacing: 2px;
  text-rendering: optimizelegibility;
  -webkit-font-smoothing: antialiased;
  text-shadow: 2px 2px 20px var(--handle-text);
  margin-left: 20px;
}

.rotate {
  display: inline;
  position: absolute;
  background-color: var(--loadingrotatebg);
  color: var(--handle-text);
  -webkit-border-radius: 2px;
  -moz-border-radius: 2px;
  border-radius: 2px;
  -webkit-box-shadow: 0 0 60px 4px #43192d;
  -moz-box-shadow: 0 0 60px 4px #43192d;
  box-shadow: 0 0 60px 4px #43192d;
  -webkit-animation: animate-rotate-x 1s ease infinite;
  -moz-animation: animate-rotate-x 1s ease infinite;
  animation: animate-rotate-x 1s ease infinite;
  margin-left: -25px;
}


@-webkit-keyframes animate-rotate-x {
  0% {
    -webkit-transform: rotateX(1deg);
    -moz-transform: rotateX(1deg);
    -o-transform: rotateX(1deg);
    -ms-transform: rotateX(1deg);
    transform: rotateX(1deg);
  }
  100% {
    -webkit-transform: rotateX(360deg);
    -moz-transform: rotateX(360deg);
    -o-transform: rotateX(360deg);
    -ms-transform: rotateX(360deg);
    transform: rotateX(360deg);
  }
}
@-moz-keyframes animate-rotate-x {
  0% {
    -webkit-transform: rotateX(1deg);
    -moz-transform: rotateX(1deg);
    -o-transform: rotateX(1deg);
    -ms-transform: rotateX(1deg);
    transform: rotateX(1deg);
  }
  100% {
    -webkit-transform: rotateX(360deg);
    -moz-transform: rotateX(360deg);
    -o-transform: rotateX(360deg);
    -ms-transform: rotateX(360deg);
    transform: rotateX(360deg);
  }
}
@keyframes animate-rotate-x {
  0% {
    -webkit-transform: rotateX(1deg);
    -moz-transform: rotateX(1deg);
    -o-transform: rotateX(1deg);
    -ms-transform: rotateX(1deg);
    transform: rotateX(1deg);
  }
  100% {
    -webkit-transform: rotateX(360deg);
    -moz-transform: rotateX(360deg);
    -o-transform: rotateX(360deg);
    -ms-transform: rotateX(360deg);
    transform: rotateX(360deg);
  }
}
.bg {
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 1;
  }

/*--------------------
Chat
--------------------*/
.timestamp {
  position: absolute;
  bottom: -13px;
  font-size: 9px;
  color: var(--timestamp);
}

.chat {
  max-width: 600px;
  width: 100%;
  border-radius: 10px;
  border: 2px solid var(--border);
  display:flex;
  position: absolute;
  
    top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  z-index: 2;
  overflow: hidden;
  background: var(--bg);
  justify-content: space-between;
  flex-direction: column;
}

.repliedtomsg {
  cursor:pointer;
  clear: both;
  float: left;
  margin:-6px 0px 5px;
  padding: 3px 25px 4px;
  width:100%;
  border-radius: 10px 10px 0px 0;
  background: var(--repliedtomsg);
  font-size: 11px;
  line-height: 1.4;
  position: relative;
}

.repliedtomme {
  background: linear-gradient(120deg, #248A52, #257287);
}

.repliedtoavatar {
  position: absolute;
  z-index: 1;
  top: 3px;
  left: 6px;
  border-radius: 30px;
  width: 15px;
  height: 15px;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.attachment {
  margin-left:2%;
  margin-right:2%;
  margin-bottom:0%;
  margin-top: 10px;
  max-width: 96%;
  max-height:300px;
  border-radius: 5px;
}

.messagecontent {
  padding-right:10px;
  padding-left:10px;
}

/*--------------------
Chat Title
--------------------*/
.chat-title {
  flex: 0 1 45px;
  position: relative;
  z-index: 2;
  background: var(--title);
  color: var(--title-text);
  text-transform: uppercase;
  text-align: left;
  padding: 10px 10px 10px 50px;
}
.chat-title h1, .chat-title h2 {
  font-weight: normal;
  font-size: 12px;
  margin: 0;
  padding: 0;
}
.chat-title h2 {
  color: rgba(255, 255, 255, 0.5);
  font-size: 8px;
  letter-spacing: 1px;
}
.chat-title #status {
  font-weight:bolder;
  font-size: 10px;
  height: 50%;
  float:right;
}

/* <main-style> ============================ */


#openinfullscreen2 {
  color: #fff;
  text-decoration: none;
  text-transform: none;
  line-height: 2;
  position: absolute;
  padding-right: 4px;
  padding-left: 4px;
  right:15px;
  bottom:1px;
}

#connectionstatus {
text-align: center;
color: white;
}


@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.fa-spinner {
  animation: spin 2s linear infinite;
}

#openinfullscreen2::before {
  content: '';
  width: 6px;
  height: 6px;
  border-top: solid 2px #fff;
  border-right: solid 2px #fff;
  border-radius: 2px;
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translateY(-50%) rotate(45deg);
  transition: transform .4s;
}

#openinfullscreen2:hover::before {
  transform: translateX(4px) translateY(-50%) rotate(45deg);
}


.chat-title #fullscreenbutton {
  font-weight:bolder;
  font-size: 20px;
  height: 50%;
  float:right;
}
.chat-title .avatar {
  position: absolute;
  z-index: 1;
  top: 8px;
  left: 9px;
  border-radius: 30px;
  width: 30px;
  height: 30px;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.24);
}
.chat-title .avatar img {
  width: 100%;
  height: auto;
}

/*--------------------
Messages
--------------------*/

/* msg no display */
.message-nodisplay {
  display: none;
}
/* system msg */

.message-system > .avatar {
  display: none;
}

.message-system > .messagecontent > .timestamp {
  display: none;
}

.message-system {
  clear: both;  
  padding: 6px 0px 7px 0px;
  margin: 8px 0; 
  font-size: 11px;
  line-height: 1.4;
  position: relative;
  align-items: center;

  
  display: flex;
  justify-content: center; /* centers horizontally */
  align-items: center;      /* centers vertically (if multi-line) */
 
  text-align: center;
}

.message-system > .messagecontent {
  color: #ffffff50;
}


.messages {
  display: flex;
  flex-direction: column-reverse;
  flex: 1 1 auto;
  color: var(--msg-text);
  overflow: hidden;
  position: relative;
  width: 100%;
}
.messages .messages-content {
  position: absolute;
  top: 0;
  left: 0;
  height: 101%;
  width: 100%;
}



.messages .message {
  clear: both;  
  float: left;
  padding: 6px 0px 7px 0px;
  border-radius: 10px 10px 10px 0;
  background: var(--chatbubble);
  margin: 8px 0;
  font-size: 11px;
  line-height: 1.4;
  margin-left: 35px;
  position: relative;
}


.messages .message::before {
  content: "";
  position: absolute;
  bottom: -6px;
  border-top: 6px solid var(--chatbubble);
  left: 0;
  border-right: 7px solid transparent;
}
.messages .message .avatar {
  position: absolute;
  z-index: 1;
  bottom: -10px;
  left: -35px;
  border-radius: 30px;
  width: 30px;
  height: 30px;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: 2px solid var(--avatar-border);
}
.messages .message .avatar img {
  width: 100%;
  height: auto;
  word-wrap: break-word;
  overflow-wrap: break-word; 
}
.messages .message.message-personal {
  float: right;
  color: #fff;
  text-align: left;
  background: var(--msg-self);
  border-radius: 10px 10px 0 10px;
}
.messages .message.message-personal::before {
  left: auto;
  right: 0;
  border-right: none;
  border-left: 5px solid transparent;
  border-top: 4px solid var(--msg-self-tail);
  bottom: -4px;
}
.messages .message:last-child {
  margin-bottom: 30px;
}
.messages .message.new {
  transform: scale(0);
  transform-origin: 0 0;
  -webkit-animation: bounce 0ms linear both;
          animation: bounce 0ms linear both;
}

.message:hover {
  cursor: pointer;
}

.messages .message.loading::before {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  content: "";
  display: block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  z-index: 2;
  margin-top: 4px;
  -webkit-animation: ball 0.45s cubic-bezier(0, 0, 0.15, 1) alternate infinite;
          animation: ball 0.45s cubic-bezier(0, 0, 0.15, 1) alternate infinite;
  border: none;
  -webkit-animation-delay: 0.15s;
          animation-delay: 0.15s;
}
.messages .message.loading span {
  display: block;
  font-size: 0;
  width: 20px;
  height: 10px;
  position: relative;
}
.messages .message.loading span::before {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  content: "";
  display: block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  z-index: 2;
  margin-top: 4px;
  -webkit-animation: ball 0.45s cubic-bezier(0, 0, 0.15, 1) alternate infinite;
          animation: ball 0.45s cubic-bezier(0, 0, 0.15, 1) alternate infinite;
  margin-left: -7px;
}
.messages .message.loading span::after {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  content: "";
  display: block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  z-index: 2;
  margin-top: 4px;
  -webkit-animation: ball 0.45s cubic-bezier(0, 0, 0.15, 1) alternate infinite;
          animation: ball 0.45s cubic-bezier(0, 0, 0.15, 1) alternate infinite;
  margin-left: 7px;
  -webkit-animation-delay: 0.3s;
          animation-delay: 0.3s;
}

/*--------------------
Message Box
--------------------*/
.message-box {
  flex: 0 1 40px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.2);
  margin: 6px;
  background: var(--title);
  padding: 10px;
  position: relative;
}

.message-box .message-input {
  background: none;
  
  border: none;
  outline: none !important;
  resize: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  height: 17px;
  margin: 0;
  padding-right: 20px;
  width: calc(100% - 35px);
}
.message-box textarea:focus:-webkit-placeholder {
  color: transparent;
}
.message-box .message-submit {
  position: absolute;
  z-index: 1;
  top: 8px;
  right: 8px;
  color: #fff;
  border: none;
  background: #ee6464;
  font-size: 10px;
  text-transform: uppercase;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 6px;
  outline: none !important;
  transition: background 0.2s ease;
}
.message-box .message-submit:hover {
  background: #686868;
}

/*--------------------
Custom Srollbar
--------------------*/
.mCSB_scrollTools {
  margin: 1px -3px 1px 0;
  opacity: 0;
}

.mCSB_inside > .mCSB_container {
  margin-right: 0px;
  padding: 0 10px;
}

.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar {
  background-color: var(--scrollbar) !important;
}

/*--------------------
Bounce
--------------------*/
@-webkit-keyframes bounce {
  0% {
    transform: matrix3d(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  4.7% {
    transform: matrix3d(0.45, 0, 0, 0, 0, 0.45, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  9.41% {
    transform: matrix3d(0.883, 0, 0, 0, 0, 0.883, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  14.11% {
    transform: matrix3d(1.141, 0, 0, 0, 0, 1.141, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  18.72% {
    transform: matrix3d(1.212, 0, 0, 0, 0, 1.212, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  24.32% {
    transform: matrix3d(1.151, 0, 0, 0, 0, 1.151, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  29.93% {
    transform: matrix3d(1.048, 0, 0, 0, 0, 1.048, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  35.54% {
    transform: matrix3d(0.979, 0, 0, 0, 0, 0.979, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  41.04% {
    transform: matrix3d(0.961, 0, 0, 0, 0, 0.961, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  52.15% {
    transform: matrix3d(0.991, 0, 0, 0, 0, 0.991, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  63.26% {
    transform: matrix3d(1.007, 0, 0, 0, 0, 1.007, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  85.49% {
    transform: matrix3d(0.999, 0, 0, 0, 0, 0.999, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  100% {
    transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
}
@keyframes bounce {
  0% {
    transform: matrix3d(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  4.7% {
    transform: matrix3d(0.45, 0, 0, 0, 0, 0.45, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  9.41% {
    transform: matrix3d(0.883, 0, 0, 0, 0, 0.883, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  14.11% {
    transform: matrix3d(1.141, 0, 0, 0, 0, 1.141, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  18.72% {
    transform: matrix3d(1.212, 0, 0, 0, 0, 1.212, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  24.32% {
    transform: matrix3d(1.151, 0, 0, 0, 0, 1.151, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  29.93% {
    transform: matrix3d(1.048, 0, 0, 0, 0, 1.048, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  35.54% {
    transform: matrix3d(0.979, 0, 0, 0, 0, 0.979, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  41.04% {
    transform: matrix3d(0.961, 0, 0, 0, 0, 0.961, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  52.15% {
    transform: matrix3d(0.991, 0, 0, 0, 0, 0.991, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  63.26% {
    transform: matrix3d(1.007, 0, 0, 0, 0, 1.007, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  85.49% {
    transform: matrix3d(0.999, 0, 0, 0, 0, 0.999, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  100% {
    transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
}
@-webkit-keyframes ball {
  from {
    transform: translateY(0) scaleY(0.8);
  }
  to {
    transform: translateY(-10px);
  }
}
@keyframes ball {
  from {
    transform: translateY(0) scaleY(0.8);
  }
  to {
    transform: translateY(-10px);
  }
}




