:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --bot-bubble: #f1f2f6;
  --user-bubble: #3498db;
  --text-dark: #2c3e50;
  --text-light: #ffffff;
}

body {
  background: #f5f6fa;
  min-height: 100vh;
}

h1 {
  color: var(--primary-color);
  text-align: center;
  padding: 20px 0;
  font-size: 2.2rem;
  border-bottom: 2px solid #dfe4ea;
  margin-bottom: 20px;
}

#chat-log-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

#chat-log {
  background: white;
  border-radius: 15px;
  box-shadow: 0 2px 15px rgba(0,0,0,0.1);
  padding: 20px;
  min-height: 60vh;
  max-height: 70vh;
  overflow-y: auto;
}

.message {
  max-width: 70%;
  margin: 10px 0;
  padding: 15px 20px;
  border-radius: 25px;
  position: relative;
  line-height: 1.5;
  transition: transform 0.2s ease;
}
.message .tail-icon {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  background: inherit;
  transform: rotate(45deg);
}

.bot-message {
  background: var(--bot-bubble);
  color: var(--text-dark);
  margin-right: auto;
  border-bottom-left-radius: 5px;
}
.bot-message .tail-icon {
  left: -5px;
  bottom: 10px;
}

.user-message {
  background: var(--user-bubble);
  color: var(--text-light);
  margin-left: auto;
  border-bottom-right-radius: 5px;
}

.user-message .tail-icon {
  right: -5px;
  bottom: 10px;
}

.message i {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  background: inherit;
  transform: rotate(45deg);
}

.bot-message i {
  left: -5px;
  bottom: 10px;
}

.user-message i {
  right: -5px;
  bottom: 10px;
}

.copy-icon {
  position: absolute;
  top: 8px;
  cursor: pointer;
  opacity: 0.6;
  font-size: 14px;
  z-index: 1;
  transition: opacity 0.2s;
}

.bot-message .copy-icon {
  right: 8px;
}

.user-message .copy-icon {
  left: 8px;
}

.copy-icon:hover {
  opacity: 1;
}
          
#user-input-container {
  max-width: 1200px;
  margin: 20px auto 0px auto;
  padding: 0 20px;
  position: relative;
}

#user-input {
  width: 100%;
  min-height: 50px;
  max-height: 150px;
  padding: 15px 120px 15px 20px;
  border: 2px solid #dfe4ea;
  border-radius: 25px;
  resize: none;
  font-size: 16px;
  transition: all 0.3s ease;
}

#user-input:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 10px rgba(52, 152, 219, 0.2);
  outline: none;
}

#send-button {
  position: absolute;
  right: 30px;
  bottom: 10px;
  padding: 8px 25px;
  background: var(--secondary-color);
  color: white;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

#send-button:hover {
  background: #2980b9;
  transform: translateY(-2px);
}

#cbcontext {
  display: flex;  /* 让子元素水平排列 */
  justify-content: space-between;  /* 左右对齐 */
  align-items: center; /* 垂直居中对齐 */
  max-width: 1200px; /* 和 chat-log 宽度一致 */
  margin: 0 auto; /* 居中 */
  padding: 0px 20px;
  position: relative;
}

#clear-chatlog-button {
  background: #e74c3c;
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-left: 15px;
}

#clear-chatlog-button:hover {
  background: #c0392b;
  transform: translateY(-2px);
}

#load-more-button {
  display: block;
  width: 200px;
  margin: 10px auto;
  padding: 8px 15px;
  background: #95a5a6;
  color: white;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .message {
      max-width: 85%;
  }
  
  #send-button {
      right: 15px;
      padding: 6px 20px;
  }
}