body {
    font-family: 'Roboto', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background: linear-gradient(135deg, #f5a9b8, #f3f2f9, #a9f5f5, #f5a9b8, #f3f2f9, #a9f5f5);
    background-size: 400% 400%;
    animation: gradient 22s ease infinite;
    position: relative;
}

@keyframes gradient {
    0% {background-position: 0% 50%;}
    25% {background-position: 50% 0%;}
    50% {background-position: 100% 50%;}
    75% {background-position: 50% 100%;}
    100% {background-position: 0% 50%;}
}

.chat-container {
    display: flex;
    flex-direction: column;
    width: 80%;
    height: 90vh;
    max-width: 1200px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.chat-box {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #f9f9f9;
}

.chat-message {
    display: flex;
    margin: 10px 0;
    align-items: center;
}

.user-message .message {
    background-color: #66a3ff;
    color: white;
    padding: 10px 15px;
    border-radius: 20px;
    margin-left: auto;
    max-width: 70%;
}

.gpt-message .message {
    background-color: #e5e5ea;
    color: black;
    padding: 10px 15px;
    border-radius: 20px;
    margin-right: auto;
    max-width: 70%;
    position: relative;
}

.gpt-message .loader {
    position: relative;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: black;
    animation: pulse 1s infinite;
    display: inline-block;
}

@keyframes pulse {
    0% { transform: scale(0.75); opacity: 0.5; }
    50% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0.75); opacity: 0.5; }
}

.input-container {
    display: flex;
    align-items: center;
    padding: 10px;
    background-color: #fff;
    border-top: 1px solid #ddd;
}

textarea {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    resize: none;
    height: 50px;
    max-height: 200px;
    overflow-y: auto;
    margin-right: 10px; /* Отступ справа для кнопок */
}

button {
    background-color: #66a3ff;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 10px 20px;
    cursor: pointer;
    outline: none;
}

button:hover {
    background-color: #558bcc;
}

pre {
    position: relative;
    overflow: hidden;
    padding: 15px 30px 15px 15px; /* Отступ справа для кнопки копирования */
}

.copy-button {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #888;
    position: absolute;
    bottom: 10px; /* Смещение кнопки от нижнего края контейнера */
    right: 10px; /* Смещение кнопки от правого края контейнера */
    z-index: 10;
}

.copy-button i {
    font-size: 18px;
}

.controls {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#font-size-slider {
    margin-top: 14px;
}

.message {
    font-size: 16px;
}

.credits {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.7);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
}

/* Hide scrollbars in WebKit browsers (Chrome, Safari) */
body::-webkit-scrollbar,  
.input-container::-webkit-scrollbar, 
.chat-box::-webkit-scrollbar,  
textarea::-webkit-scrollbar {
    width: 0;  /* Zero width scrollbar */
    background: transparent;  /* Transparent background */
}

body,
.input-container,
.chat-box,
textarea {
    /* Hide scrollbar in Firefox */
    scrollbar-width: none;
    /* Hide scrollbar in IE and Edge Legacy */
    -ms-overflow-style: none;
}

body.hidden-scrollbar, 
.input-container.hidden-scrollbar, 
.chat-box.hidden-scrollbar, 
textarea.hidden-scrollbar {
    overflow: auto;  /* Ensure scroll functionality */
}