* {
    font-family: "ms ui gothic", tahoma;
    font-size: 12px;
}

body {
    display: flex; 
    align-items: center;
    justify-content: center;
    background-color:  #f1f6e3;
    zoom: 80%;

}

.background {
    z-index: -1;
    position: absolute;
    height: 550px;
}

.chat-bg {
    width: 264px;
}

.bubble-img {
    width: 217px;
}

.chat {
    display: flex;
    flex-direction: column;
    align-items: center;
    position:fixed;
    top: 15%;
}

.topscreen {
    position: relative;
    z-index: 1;
    height: 180px;
    top: 42px;
    left: 1px;
    overflow: hidden;
    transform: scaleY(1.1);
}

.bottomscreen {
    position: relative;
    height: 192px;
    z-index: 3;
    top: 142px;
    left: 1px;
    
}

.bottomscreen p {
    position: absolute;
    text-decoration: underline;
    left: 109px;
    top: 16px;
    font-size: 14px;
    letter-spacing: 3px;
    margin: 0 auto;
    overflow: hidden;
    white-space: nowrap;
    border-right: 1px solid black;
    animation: typing 5s steps(6, end), blinking-cursor .5s step-end infinite;
    animation-delay: 2s;
    animation-fill-mode: forwards;
    opacity: 0;
}

.bubbles {
    display: flex;
    flex-direction: column;
    position: absolute;
    gap: 4px;
    left: 34px;
    top: 190px;
    animation-name: display-bubble;
    animation-duration: 10s;
    animation-fill-mode: forwards;
}


@keyframes display-bubble {
    0% {top: 190px}
    25% {top: 156px}
    50% {top: 132px}
   75% {top: 108px}
    100% {top: 64px}
}

@keyframes typing {
  from {
    width: 0;
      opacity: 100%;
  }
  to {
    width: 22%;
    opacity: 100%;
  }
}

@keyframes blinking-cursor {
  from,
  to {
    border-color: transparent
  }
  50% {
    border-color: black;
  }
}