html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: Helvetica, ui-sans-serif, Arial, Tahoma;
  color: #efeff0;
  position: relative;
}


body::before {
    content: "";
    position: absolute;
    top: auto;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgb(22 22 24), rgb(23 24 26)), url(main.css);
    background-size: cover;
    background-position: bottom;
    background-repeat: repeat-x;
    background-origin: content-box;
    background-clip: content-box;
    z-index: -1;
<!-- filter:;
blur(3 px):;
-->:;
}

#popup-message {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  padding: 20px;
  border: 1px solid black;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
  display: none;
}


#col-container {
    display: flex;
    height: 100vh;
    max-width: 75%;
    margin-left: auto;
    margin-right: auto;
    flex-direction: column;
    justify-content: center;
}

#header {
    background-image: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -moz-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  -moz-text-fill-color: transparent;
  text-fill-color: transparent;
	opacity: 0;
 animation: appear 2s ease-in-out forwards, gradient 10s ease-in-out infinite;
}

@keyframes appear {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes gradient {
  0% { background-position: 0 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

#header:has(+#chat-container>#chat>.row) {
    display: none;
}

#chat-container {
    flex: 1;
	position: relative; /* добавляем позиционирование для вложенных элементов */
    padding: 10px 0px;
    overflow-y: overlay;
}

#input-container {
/*
 position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  margin: auto;
  width: 90%;
  max-width: 500px;
  display: flex;
  
*/
    word-wrap: break-word; /* добавлено свойство для переноса слов */
    margin: 0 0px;
    padding: 6px;
	
    background-image: linear-gradient(to bottom, #343542ad, #343542fa), url(https://i.imgur.com/pEFupGP.jpg);
    background-size: cover;
    display: flex;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    justify-content: flex-start;
    flex-wrap: wrap;
    align-content: center;
    align-items: center;
    opacity: 0; /* начальное значение прозрачности */
    animation: fadeIn 1.7s ease forwards; /* анимация появления */
}
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(50px);
        filter: blur(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}
#input-container textarea {
	    word-wrap: break-word; /* добавлено свойство для переноса слов */
    width: 100%;
    resize: vertical;
    border: 1px solid #20212280;
    outline: none;
    border-radius: 17px;
    background-color: #15161a;
    color: #fff;
    padding: 18px;
    margin-right: auto;
}

/* Chat flow */

/* 
#chat {
	    
    display: flex;
    flex-direction: column;
    margin: auto;
    min-height: 200px;
    white-space: pre-wrap;
    /*justify-content: center; выравнивание по вертикали 
    /* align-items: center; выравнивание по горизонтали 
}
*/
#chat {
	
    display: flex;
    flex-direction: column;
    min-height: 200px;
    white-space: pre-wrap;
	word-wrap: break-word;
     overflow-wrap: break-word;
}

#chat>.row>.ping {
    background-color: #383333;
    background-image: linear-gradient(rgb(35 52 62 / 61%), rgb(39 20 74 / 38%));
	 text-shadow: 1px 3px 5px #000000;
	backdrop-filter: blur(10px);
    margin: 8px;
    margin-left: 40px;
    margin-right: 0px;
    padding: 8px;
    border-radius: 16px;
    border-bottom-right-radius: 0px;
	word-wrap: break-word; 
}

 /* #chat>.row>.ping {
    margin: 8px auto;
    margin-left: 0px;
    margin-right: 40px;
    padding: 8px;
    border-radius: 16px;
    border-bottom-left-radius: 0px;
word-wrap: break-word; /* добавлено свойство для переноса слов 
    background-image: linear-gradient(to bottom, rgba(37, 93, 126, 0.57), rgba(49, 27, 88, 0.38));
    color: #ffffff;
    text-shadow: 1px 3px 5px #000000;
  backdrop-filter: blur(10px);
 opacity: 0.9;
 
}*/


#chat>.row>.pong {
    background-color: #333338;
	    background-image: linear-gradient(rgb(80 49 42 / 67%), rgb(29 41 68 / 43%));
	 text-shadow: 1px 3px 5px #000000;
	 backdrop-filter: blur(10px);
    margin: 8px;
    margin-left: 0px;
    margin-right: 40px;
    padding: 8px;
    border-radius: 16px;
    border-bottom-left-radius: 0px;
	word-wrap: break-word; 
}

/* 
#chat>.row>.pong {
	    word-wrap: break-word; добавлено свойство для переноса слов 
    background-image: linear-gradient(to bottom, rgb(145 116 64 / 50%), rgba(45, 17, 94, 0.4));
    text-shadow: 1px 3px 5px #000000;
    margin: 8px auto;
    padding: 14px;
    border-radius: 8px;
    border-bottom-left-radius: 0px;
    backdrop-filter: blur(10px);
    /* opacity: 0.9; 
}
*/
#chat>.row>.system {
    background-color: #387448;
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
}
/* Убирает пробелы пежду сообщениями
#chat > .row > .ping,
#chat > .row > .pong,
#chat > .row > .system {
	
    margin:auto;
}
*/

/* Generic tool buttons */

.toolbtn {
    vertical-align: middle;
    display: inline-block;
    width: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    vertical-align: middle;
    display: inline-block;
    border-radius: 4px;
}



.toolbtn.small {
    background-color: #40424f60;
    border-radius: 4px;
    padding: 0px;
    margin: 0px;
    width: 26px;
    height: 16px;
}

/* Source link */

#source {
    position: fixed;
    bottom: 10px;
    left: 10px;
}

a {
    color: #aaa;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* New chat button, settings button and dialog */

#buttons {
    position: static;
    white-space: nowrap;
    text-align: right;
    bottom: 10px;
    right: 10px;
}

#settings {
    display: none;
    white-space: nowrap;
    width: fit-content;
    font-size: 20px;
    padding: 18px;
    background-color: #343542dd;
    border-radius: 8px;
    position: absolute;
    bottom: 300px;
    right: 50px;
}



#settings.open {
    display: flex;
    align-content: flex-start;
    flex-wrap: wrap;
    flex-direction: column-reverse;
}

#settings p {
    margin: 8px 0px;
}

/* Message modificator panel */

#msg_mod {
    display: none;
    white-space: nowrap;
    width: fit-content;
    height: fit-content;
    font-size: 14px;
    padding-right: 8px;
    position: absolute;
    text-align: right;
}


.msg_mod-add-btn {
    background-image: url('css/add.svg');
    /* Другие CSS-правила для кнопки */
}

#chat p {

    margin-block-start: .3em;
    margin-block-end: .3em;
}



#chat pre {
    margin: .3em 0px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

h1 {
  animation: pop-up 0.5s ease-out;
}

@keyframes pop-up {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}



/* Применяем анимацию к нужному элементу */
.element {
  animation: pop-up 0.5s ease-in-out forwards;
}

#chat table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0px;
    border-right: 1px solid #d9d9e2;
    border-bottom: 1px solid #d9d9e2;
    border-radius: 5px;
    font-size: 14px;
}

#chat td,
#chat th {
    padding: 5px 8px;
    border-left: 1px solid #d9d9e2;
    border-top: 1px solid #d9d9e2;
    color: #d1d5db;
}

#chat th {
    text-align: left;
    background-color: #ececf033;
    color: #fff;
}

#chat th:first-of-type {
    border-top-left-radius: 5px;
}

#chat th:last-of-type {
    border-top-right-radius: 5px;
}

#chat tr:last-of-type td:first-of-type {

    border-bottom-left-radius: 5px;
}

#chat tr:last-of-type td:last-of-type {
    border-bottom-right-radius: 5px;
}

#chat .katex-html {
    display: none;
    font-size: 0px;
}

#chat .katex-error {
    display: block;
}

#chat svg {
    max-width: 50%;
    text-align: center;
}

/* Scrollbar */

::-webkit-scrollbar {
    width: 10px;
    background-color: #000000;
}
::-webkit-scrollbar-thumb {
    background-color: #3a3939;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #909090;
}

/* Highlight.js additional styles */

.hljs {
    padding: 8px;
    border-radius: 5px;
}

/* Generic parts */

.nobreak {
    white-space: nowrap;
}

/* Media types */

#spacer-bottom {
    width: 100%;
    height: 6px;
}

/* On mobile */
@media only screen and (max-width: 1037px) {

    /* 767px */
    .only-desktop {
        display: none;
    }

    #col-container {
        max-width: 100%;
    }
}

/* On desktop */
@media only screen and (min-width: 1038px) {

    /* 768px */
    .only-mobile {
        display: none;
    }
}

/* Print */
@media print {
    html, body {
        background-color: #ffffffff;
    }
    #chat-container {
        overflow: visible;
    }
    #input-container, #header, #buttons, #settings, #spacer-bottom, #source {
        display: none;
    }
    #col-container {
        max-width: 100%;
        width: 100%;
    }
    .clip-badge-copy-icon, button {
        display: none;
    }
    #chat>.row>.ping {
        border: 1px solid #383333;
    }
    #chat>.row>.pong {
        border: 1px solid #333338;
    }    
    #chat>.row>.system {
        border: 1px solid #583333;
    }
}