html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', sans-serif;
}

body {
  display: flex;
  flex-direction: column;
  height: 100vh; /* Use vh for viewport height */
}

header, footer {
  flex-shrink: 0; /* Prevent header and footer from shrinking */
}

main.chat-container {
  flex-grow: 1; /* Allow the main content to grow and fill available space */
  display: flex;
  flex-direction: column;
  overflow-y: hidden; /* Hide vertical overflow */
  min-height: 0; /* Prevent flexbox overflow issues */
  background: #fff;
}

.chat-box {
  flex-grow: 1; /* Allow the chat box to grow */
  overflow-y: auto; /* Add a scrollbar when content overflows */
  padding: 20px;
  background: #f9f9f9;
  display: flex;
  flex-direction: column;
}

.chat-input {
  flex-shrink: 0; /* Prevent the input from shrinking */
  padding: 15px;
  display: flex;
  background: #f0f2f5;
  border-top: 1px solid #ddd;
}

.chat-input input {
  flex: 1;
  padding: 15px;
  border: 1px solid #ccc;
  border-radius: 25px;
  font-size: 16px;
  margin-right: 10px;
}

.chat-input button {
  padding: 15px 25px;
  background: #007bff;
  color: white;
  border: none;
  cursor: pointer;
  font-size: 16px;
  border-radius: 25px;
  transition: background-color 0.3s;
}

.chat-input button:hover {
  background: #0056b3;
}

.message {
  margin-bottom: 15px;
  padding: 12px 18px;
  border-radius: 20px;
  max-width: 75%;
  line-height: 1.5;
  word-wrap: break-word;
}

.user {
  background: #007bff;
  color: white;
  align-self: flex-end;
}

.bot {
  background: #e9e9eb;
  color: #333;
  align-self: flex-start;
}

@media (max-width: 480px) {
    .chat-input {
        padding: 10px;
    }
    .chat-input input {
        padding: 10px;
        font-size: 14px;
    }
    .chat-input button {
        padding: 10px 15px;
        font-size: 14px;
    }
    .message {
        padding: 10px 15px;
        max-width: 85%;
    }
}

.copy-btn {
  background-color: #f0f0f0;
  border: 1px solid #ccc;
  border-radius: 4px;
  color: #333;
  cursor: pointer;
  font-size: 12px;
  margin-left: 10px;
  padding: 2px 6px;
  vertical-align: middle;
}

.copy-btn:hover {
  background-color: #e0e0e0;
}