body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background: linear-gradient(to right, #3964d3, #395dd5);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  height: 100vh;
}

#chat-container {
  box-sizing: border-box;
  width: 100%;
  max-width: 600px;
  height: 100vh;
  overflow-y: auto;
  padding: 16px;
  background-color: #e6f7ff;
  display: flex;
  flex-direction: column;
}

.chat-bubble {
  position: relative;
  margin: 8px 0;
  padding: 12px 16px;
  border-radius: 12px;
  max-width: 95%;
  word-wrap: break-word;
  color: #ffffff;
  background: linear-gradient(to right, #1E90FF, #00bfff);
}

.chat-bubble .buttons-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chat-bubble .buttons-container button {
  width: 100%;
  text-align: center;
}


.chat-bubble .buttons-container {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-bubble .buttons-container button {
  width: 100%;
  text-align: center;
}

.chat-bubble button,
.chat-bubble .submit-button,
.chat-bubble .back-button {
  border: none;
  border-radius: 4px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
  margin-top: 12px;
  display: inline-block;
  color: #ffffff;
}

.chat-bubble .buttons-container button {
  background-color: #0000ff;
}

/* 2) Кнопка "Отправить" */
.chat-bubble .submit-button {
  background-color: #00bfff; 
  width: 100%;
}

.chat-bubble .submit-button + .back-button {
  width: calc(50% - 4px); 
  margin-left: 8px;
}

.chat-bubble .back-button {
  background-color:  #0000ff; 
  color: #ffffff;
  width: 100%;
}

.chat-bubble .submit-button + .back-button {
  width: calc(50% - 4px);
}

.chat-bubble .submit-button:only-of-type {
  width: 100%;
}

.chat-bubble .submit-button:not(:only-of-type) {
  width: calc(50% - 4px);
}

.chat-bubble button:hover,
.chat-bubble .submit-button:hover,
.chat-bubble .back-button:hover {
  opacity: 0.9;
}

.chat-bubble input[type="text"] {
  width: 100%;
  padding: 8px;
  margin-top: 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  font-size: 14px;
}

.chat-bubble .error-message {
  color: #ff0000;
  margin-top: 4px;
  font-size: 13px;
  display: none;
}

@media (max-width: 480px) {
  #chat-container {
    padding: 8px;
  }
  .chat-bubble {
    padding: 10px 14px;
  }
  .chat-bubble button,
  .chat-bubble .submit-button,
  .chat-bubble .back-button {
    padding: 6px 10px;
    font-size: 13px;
    margin-top: 10px;
  }
  .chat-bubble input[type="text"] {
    padding: 6px;
    font-size: 13px;
  }
}