* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    color: white;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100vh;
}

#chat {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    width: 100%;
    max-width: 600px;
    height: calc(100vh - 130px);
    overflow-y: auto;
    background: linear-gradient(270deg, #1f7edd 0%, #6122dc 50%, #ff2f00 100%);
    background-size: 400% 400%;
    animation: gradient 40s ease infinite;
}

@keyframes gradient {
    0% {
        background-position: 0 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0 50%;
    }
}

.message {
    border-radius: 10px 10px 10px 10px;
    max-width: 80%;
    padding: 10px;
    display: inline-block;
    word-wrap: break-word;
    word-break: break-word;
    color: white;
    background: rgba(143, 143, 143, 0.4);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.l-message {
    align-self: flex-start;
    border-radius: 10px 10px 10px 0px;
    background: rgba(255, 255, 255, 0.4);
}

.r-message {
    align-self: flex-end;
    border-radius: 10px 10px 0 10px;
    background: rgba(255, 255, 255, 0.4);
}

.text-message {
    margin: 5px 0;
}

.data-message {
    font-size: 12px;
    color: rgb(81, 81, 81);
    text-align: right;
}

#message_input, #header {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 600px;
    padding: 10px;
    gap: 10px;
    background: linear-gradient(270deg, #1f7edd 0%, #6122dc 50%, #ff2f00 100%);
    background-size: 400% 400%;
    animation: gradient 40s ease infinite;
    height: 80px;
}

#header {
    height: 50px;
    border-bottom: 1.5px solid #ffffff; /* Тонкая серая граница снизу */
}

#message_input {
    justify-content: space-between;
    border-top: 1.5px solid #ffffff; /* Тонкая серая граница снизу */

}

#icon {
    width: 3rem; /* Устанавливает ширину иконки */
    height: 3rem; /* Устанавливает высоту иконки */
}

#input {
    flex: 1;
    padding: 10px;
    font-size: 16px;
    border: none;
    border-radius: 10px;
    outline: none;
    background-color: #222;
    color: white;
}

#input::placeholder {
    color: #888;
}

#button {
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    background-color: #FFD700; /* Золотой */
    color: black;
    transition: background-color 0.3s ease;
}

#button:hover {
    background-color: #FFA500; /* Оранжевый */
    color: black;
}

#button:active {
    transform: scale(1.05);
}
