* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
      Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    background: transparent;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
  }
  
  /* 视频背景容器 */
  .video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
  }
  
  /* 视频背景样式 */
  #backgroundVideo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* 保持视频比例，同时覆盖整个容器 */
    opacity: 1; /* 设置为完全不透明 */
    background: #000; /* 视频加载前的背景色 */
    /* 确保视频清晰的属性 */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: auto;
    -webkit-backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: contents;
    /* 确保没有模糊效果 */
    filter: none;
    -webkit-filter: none;
  }
  
  .chat-container {
    width: 100%;
    /* max-width: 800px; */
    height: 100%;
    background: transparent; /* 完全透明 */
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* 移除 backdrop-filter 以保持视频清晰 */
  }
  
  .chat-header {
    background: rgba(74, 111, 165, 0.9); /* 提高头部透明度，减少模糊感 */
    color: white;
    padding: 20px;
    text-align: center;
    font-size: 1.2em;
    font-weight: bold;
  }
  
  .chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: transparent; /* 添加半透明黑色背景，改善可读性 */
  }
  
  .message {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 18px;
    line-height: 1.5;
    position: relative;
    animation: fadeIn 0.3s ease-out;
  }
  
  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .user-message {
    background: rgba(74, 111, 165, 0.85); /* 提高用户消息透明度 */
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
  }
  
  .bot-message {
    background: rgba(241, 240, 240, 0.95); /* 提高机器人消息透明度 */
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
  }
  
  .chat-input {
    display: flex;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3); /* 改为半透明黑色背景 */
    border-top: 1px solid rgba(233, 236, 239, 0.7);
  }
  
  #messageInput {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 24px;
    outline: none;
    font-size: 16px;
    transition: border-color 0.3s;
  }
  
  #messageInput:focus {
    border-color: #4a6fa5;
  }
  
  #sendButton {
    margin-left: 10px;
    padding: 12px 24px;
    background: #4a6fa5;
    color: white;
    border: none;
    border-radius: 24px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
  }
  
  #sendButton:hover {
    background: #3a5a80;
  }
  
  #sendButton:disabled {
    background: #ccc;
    cursor: not-allowed;
  }
  
  .typing-indicator {
    align-self: flex-start;
    background: rgba(241, 240, 240, 0.95); /* 提高输入提示透明度 */
    padding: 12px 16px;
    border-radius: 18px;
    display: none;
    border-bottom-left-radius: 5px;
  }
  
  .typing-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #888;
    margin-right: 5px;
    animation: typing 1.4s infinite ease-in-out;
  }
  
  .typing-dot:nth-child(1) {
    animation-delay: 0s;
  }
  .typing-dot:nth-child(2) {
    animation-delay: 0.2s;
  }
  .typing-dot:nth-child(3) {
    animation-delay: 0.4s;
  }
  
  @keyframes typing {
    0%,
    60%,
    100% {
      transform: translateY(0);
    }
    30% {
      transform: translateY(-5px);
    }
  }
  
  .welcome-message {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
  }
  