#chat-container {
    z-index: 99;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    height: 500px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: none; /* 預設隱藏 */
    flex-direction: column;
  }
  #chat-container.visible {
    display: flex; /* 顯示對話框 */
  }

  #chat-header {
    display: flex;
    justify-content: space-between; /* 讓內容分佈在兩端 */
    align-items: center; /* 垂直居中 */
    padding: 10px;
    background-color: #f1f1f1;
    border-bottom: 1px solid #ccc;
    border-radius: 10px 10px 0 0;
  }
  #chat-title {
    margin: 0; /* 移除預設的 margin */
  }  

  #hide-chat-button {
    margin-left: auto; /* 將按鈕推到右邊 */
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #007bff;
  }
  #hide-chat-button:hover {
    text-decoration: underline;
  }
  #chat-window {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    background-color: #f9f9f9;
  }
  .message {
    margin: 10px 0;
    padding: 10px;
    border-radius: 10px;
    max-width: 70%;
    word-wrap: break-word;
  }
  .user-message {
    background-color: #007bff;
    color: white;
    margin-left: auto;
    text-align: right;
  }
  .bot-message {
    background-color: #28a745;
    color: white;
    margin-right: auto;
    text-align: left;
  }
  #input-container {
    display: flex;
    padding: 10px;
    background-color: #fff;
    border-top: 1px solid #ccc;
  }
  #input-box {
    flex: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-right: 10px;
  }
  #send-button {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
  }
  #send-button:hover {
    background-color: #0056b3;
  }
  #toggle-chat-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  }
  #toggle-chat-button:hover {
    background-color: #0056b3;
  }