body {
  font-family: Arial, sans-serif;
  background-color: #f3f3f3;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}
.chat-container {
  width: 100%;
  max-width: 600px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100vh;
}
.chat-log {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.chat-log .message {
  display: inline-block;
  padding: 0px 12px;
  border-radius: 12px;
  margin-bottom: 12px;
  /* white-space: pre-wrap; */
  max-width: 80%;
  line-height: 1.4;
}
.chat-log .message.user {
  background-color: #dcf8c6;
  align-self: flex-end;
}
.chat-log .message.assistant {
  background-color: #f1f0f0;
  align-self: flex-start;
}
.chat-log .message img {
  max-width: 100%;
  border-radius: 8px;
  margin-top: 8px;
}
/* Input area styled like ChatGPT */
.chat-form {
  display: flex;
  align-items: center;
  padding: 8px;
  border-top: 1px solid #eee;
}
.chat-form input[type="text"] {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #ccc;
  border-radius: 18px;
  outline: none;
  font-size: 14px;
}
.chat-form input[type="text"]:focus {
  border-color: #4caf50;
}
.chat-form button {
  margin-left: 8px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  background-color: #4caf50;
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.chat-form button:hover {
  background-color: #45a049;
}

/* Hide native file input */
input[type="file"] {
  display: none;
}

/* File upload button icon */
.file-input-btn {
  margin-right: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  background: none;
  border-radius: 50%;
  font-size: 18px;
  color: #6b6b6b;
}

.file-input-btn:hover {
  background-color: #f0f0f0;
}

.preview-container:empty {
  display: none;
}
/* Image preview thumbnails */
.preview-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
}
.preview-container img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* Upload progress bar */
.upload-progress {
  display: none;
  width: 100%;
  background: #eee;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}
.upload-progress-bar {
  height: 100%;
  background: #4caf50;
  width: 0%;
  transition: width 0.2s ease;
}

/* Share link banner for public chat sharing */
.share-link-container {
  padding: 8px;
  background-color: #f9f9f9;
  border-bottom: 1px solid #eee;
  text-align: center;
  font-size: 14px;
  word-break: break-all;
}
