:root {
  --body-bg: #333F48;
  --msger-bg: #333F48;
  --left-msg-bg: #6C7680;
  --right-msg-bg: #009DD1;
}

html {
  box-sizing: border-box;
}

*,
*:before,
*:after {
  margin: 0;
  padding: 0;
  box-sizing: inherit;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  font-family: Helvetica, sans-serif;
  background: var(--body-bg);
  color: #fff;
}

#kantvideo {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
  display: none;
  overflow: hidden;
  width: auto; 
  height: auto; 
  min-width: 100%; 
  min-height: 100%;
  background-size: cover;
}

.msger {
  display: grid;
  grid-template-rows: 100px 1fr 1fr 44px;
  width: 100%;
  margin: 0px;
  height: 100%;
}

.msger-header {
  grid-area: 1 / 1 / 2 / 2;
  z-index: 2;
  display: grid; 
  grid-template-rows: 70px 30px;
  grid-template-columns: 1fr 200px 1fr;
  background: rgba(234, 246, 255, 0.25);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.msger-contact-image {
  grid-area: 1 / 2 / 2 / 3;
  justify-self: center;
  align-self: end;
  width: 60px;
  height: 60px;
  background: #ddd;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  border-radius: 50%;
}

.msger-contact-name {
  grid-area: 2 / 2 / 3 / 3;
  justify-self: center;
  align-self: center;
  text-align: center;
  font-size: 0.75em;
  align: center;
  font-weight: lighter;
}


.msger-chat {
  grid-area: 1 / 1 / 4 / 2;
  z-index: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 110px 10px 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--left-msg-bg) var(--body-bg);
  display: flex;
  flex-direction: column;
  align-content: flex-end;
  justify-content: flex-end;
}

.msger-chat::-webkit-scrollbar {
  width: 8px;
  padding-top: 100px;  
}
.msger-chat::-webkit-scrollbar-track {
  background: var(--body-bg);
}
.msger-chat::-webkit-scrollbar-thumb {
  background: var(--left-msg-bg);
  border-radius: 4px;
  border: 1px solid var(--body-bg);
}

.msg {
  flex: 0 0 10px;
  display: flex;
  align-items: flex-end;
  margin-bottom: 10px;
  width: 100%;
}

.msg:last-of-type {
  margin: 0;
}

.msg-bubble {
  max-width: 450px;
  padding: 6px 10px;
  border-radius: 15px;
}

.left-msg .msg-bubble {
  border-bottom-left-radius: 0;
  background: var(--left-msg-bg);
}

.left-msg .thinking {
  border-radius: 15px;
  animation: bgcshift 5s linear infinite;
}

@keyframes bgcshift {
   0%   { background: var(--left-msg-bg)}
   50%  { background: var(--body-bg)}
   100% { background: var(--left-msg-bg)}
}

.right-msg {
  flex-direction: row-reverse;
}
.right-msg .msg-bubble {
  background: var(--right-msg-bg);
  color: #fff;
  border-bottom-right-radius: 0;
}

.msger-inputarea {
  grid-area: 4 / 1 / 5 / 2;
  display: grid;
  grid-template-columns: 1fr 40px;
  padding: 6px 10px;
}
.msger-inputarea * {
  padding: 6px 10px;
  border: none;
  border-radius: 50vh;
  font-size: 1em;
  color: #fff;
}
.msger-input {
  grid-area: 1 / 1 / 2 / 3;
  z-index: 1;
  padding-right: 36px;
  background: none;
  border: 1px solid #fff;
  outline: none!important;
}
.msger-send-btn {
  grid-area: 1 / 2 / 2 / 3;
  z-index: 2;
  margin-top: 3px;
  margin-left: 11px;
  background: var(--right-msg-bg);
  font-weight: bold;
  cursor: pointer;
  transition: background 0.23s;
  font-size: 1.5em;
  line-height: 90%;
  height: 26px;
  width: 26px;
  padding: 0px;
}
.msger-send-btn:hover {
  background: #fff;
  color: var(--body-bg);
}

@media only screen and (min-width: 768px) {
  body {
    background-image: url("kant2.png");
    background-repeat: no-repeat;
    background-position: top center;
    background-size: cover;
  }
  .msger-header {
    visibility: hidden;  
  }
  .msger-chat {
    padding: 10px;
    grid-area: 3 / 1 / 4 / 2;
  }
  #kantvideo {
    display: block;
  }
}

@media only screen and (max-width: 767px) {
  body {
    background: var(--body-bg);
  }
  .msger-header {
    visibility: visible;  
  }
  .msger-chat {
    padding-top: 110px;
    grid-area: 1 / 1 / 4 / 2;
  }
  #kantvideo {
    display: none;
  }
}