:root {
    /* --hauptfarbe: #29ffbf; */
    --hauptfarbe: rgba(1, 180, 174, 1);
    --hintergrund: rgba(1, 180, 174, .1);
    --zweitfarbe: rgba(0, 0, 0, .5);
}

::placeholder {
    color: var(--hauptfarbe);
}

html, body {
    height: 100%;
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    background-color: rgba(0, 0, 0, .03);
    background-image: linear-gradient(225deg, rgba(255, 255, 255, .5) 0%, var(--hintergrund) 100%);
}

a {
  color: rgba(255, 255, 255, 1);
  text-decoration: underline;
}

a:hover {
  color: rgba(255, 255, 255, .8);
  text-decoration: none;
}

#chat {
    flex: 1;
    overflow-y: scroll;
    padding: 20px;
}

#input {
    background-color: rgba(255, 255, 255, 1);
    min-height: 50px;
    margin-top: auto;
    display: flex;
    z-index: 2;
}

#textarea {
    flex: 1;
    color: var(--hauptfarbe);
    height: 50px;
    padding: 10px;
    border: none;
    font-size: 17px;
    outline: none;
    margin-bottom: 10px;

}

.chat-message {
    display: flex;
    flex-direction: row;

    position: relative;
    margin: 50px -20px 20px 20px;
}

.chat-message:last-child {
    margin-bottom: 100px;
}

.wait {
    margin-bottom: 500px;
}

.response,
.wait {
    justify-content: flex-start;
}

.sent {
    justify-content: flex-end;
}

.message-text {
    background: var(--hauptfarbe);
    color: #ffffff;
    box-shadow: 0 0 2rem rgba(0, 0, 0, 0.1), 0rem 1rem 1rem -1rem rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    max-width: 70%;
    word-wrap: break-word;
    white-space: pre-wrap;
    font-size: 14px;
    position: relative;
    z-index: 0;
}

.response .message-text,
.wait .message-text {
    justify-content: flex-start;
    border-radius: 0 1.125rem 1.125rem 1.125rem;
}

.sent .message-text {
    justify-content: flex-end;
    border-radius: 1.125rem 0 1.125rem 1.125rem;
    background-color: var(--zweitfarbe);
}

.response .message-text {
    padding: 17px 20px 17px 20px;
}

.sent .message-text {
    padding: 17px 20px 17px 20px;
    right: 25px;
    top: 0px;
}

.message-logo {
    border-radius: 50%;
    /* box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.4); */
    position: absolute;
    width: 70px;
    height: 70px;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 1;
}

.response .message-logo {
    background-image: url(/image/avatarResponse.png);
    left: -35px;
    top: -48px;
    background-size: 80%;
    background-position: 50% 50%;
}

.sent .message-logo {
    right: 0px;
    top: -25px;
    background-size: 245%;
    background-position: 64% 19%;
}

.message.right .logo {
    left: auto;
    right: 10px;
}

.message-text.red {
    background: red;
}

.stark {
    box-sizing: border-box;
    padding: 10px;

    background: var(--hauptfarbe);
    border-radius: 1.125rem 1.125rem 1.125rem 0;
    min-height: 2.25rem;
    width: -webkit-fit-content;
    width: -moz-fit-content;
    width: fit-content;
    max-width: 66%;
    box-shadow: 0 0 2rem rgba(0, 0, 0, 0.1), 0rem 1rem 1rem -1rem rgba(0, 0, 0, 0.6);
}

.message-time {
    position: absolute;
    color: #999;
    font-size: 12px;
}

.response .message-time {
    left: 30px;
    top: -27px;
}

.sent .message-time {
    right: 20px;
    top: -28px
}

.message-copy {
    margin-left: 10px;
    color: #999;
    font-size: 12px;
    cursor: pointer;
    z-index: 10;
}



#textarea::-webkit-scrollbar,
#chat::-webkit-scrollbar {
    -webkit-appearance: none;
    width: 6px;
    height: 6px;
}

#textarea::-webkit-scrollbar-thumb,
#chat::-webkit-scrollbar-thumb {
    border-radius: 4px;
    background-color: var(--hauptfarbe);
}

button.send,
button.stop {
    margin: auto 10px;
    height: 50px;
    padding: 0 20px;
    border: none;
    border-radius: 5px;
    background-color: var(--hauptfarbe);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    outline: none;
}

button.message-copy:hover {
    transform: scale(110%);

}

button.stop {
    padding: 0 10px;
}

button.message-copy {
    padding: 5px;
    border: none;
    cursor: pointer;
    outline: none;
    background-color: transparent;
    position: relative;
    top: 3px;
    margin: 0;
}

button.send:hover {
    background-image: linear-gradient(90deg, rgba(0, 0, 0, .1)0%, rgba(0, 0, 0, .1)100%)
}

.typing-1,
.typing-2,
.typing-3 {
    display: inline-block;
    width: 0.8rem;
    height: 0.8rem;
    margin-right: 0rem;
    box-sizing: border-box;
    background: #fff;
    border-radius: 50%;
}

.typing-1 {
    animation: typing 3s infinite;
}

.typing-2 {
    animation: typing 3s 250ms infinite;
}

.typing-3 {
    animation: typing 3s 500ms infinite;
}

#copy {
    position: absolute;
    border-radius: 10px;
    top: 50%;
    left: calc(50% + 0rem);
    transform: translate(-50%, -50%);
    opacity: 0;
    background: #ffffff;
    color: #000000;
    padding: 20px;
    border-radius: 10px;
    font-size: 14px;
    box-shadow: 0 0 5rem rgba(0, 0, 0, 1);
}

pre {
    background: #000000;
    color: #ffffff;
    padding: 10px;
    border-radius: 5px;
    white-space: pre-line;
}

code {
    background: #ffffff;
    color: #000000;
    padding: 1px 5px;
    border-radius: 2px;
    white-space: pre-line;
}

.markdowntitle {
    background-color: rgba(255, 255, 255, .2);
    font-size: 10px;
    padding: 10px 10px;
    margin: -10px -10px 15px -10px;
}

p {
    margin-block-start: 0em;
    margin-block-end: 0em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
}

pre p {
    margin: 0;
    padding: 0;
    margin-block-start: 5px;
    margin-block-end: -19px;
}

@keyframes typing {

    0%,
    75%,
    100% {
        transform: translate(0, 0.25rem) scale(0.9);
        opacity: 0.5;
    }

    25% {
        transform: translate(0, -0.25rem) scale(1);
        opacity: 1;
    }
}

@keyframes bounce {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0);
    }
}

.chat-message:last-child .message-logo {
    animation-name: bounce;
    animation-duration: 0.4s;
    animation-iteration-count: infinite;
    animation-direction: alternate;
    animation-timing-function: wobble;
    transform-origin: center bottom;
}

.chat-message:last-child .message-logo.inactive {
    animation-play-state: paused;
    animation-iteration-count: 0;
}
.chat-message:last-child .message-logo.active {
    animation-play-state: running;
}