body {
      margin: 0;
      padding: 0;
      background: white;
      font-family: Arial, sans-serif;
    }

    #chatToggle {
      position: fixed;
      bottom: 10px;
      right: 20px;
      background: #099edb;
      color: white;
      font-size:large;
      border-radius: 30px;
      padding: 10px 50px;
      display: flex;
      align-items: center;
      cursor: pointer;
      z-index: 999;
      box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    }

    #chatToggle img {
      width: 32px;
      height: 32px;
      margin-right: 10px;
    }

    .chat-popup {
      display: none;
      position: fixed;
      bottom: 70px;
      right: 20px;
      width: 350px;
      height: 500px;
      min-width: 280px;
      min-height: 350px;
      background: white;
      border-radius: 15px;
      box-shadow: 0 0 15px rgba(0,0,0,0.25);
      overflow: hidden;
      z-index: 1000;
      flex-direction: column;
    }

    .resize-handle-top {
      position: absolute;
      top: 0;
      left: 0;
      height: 8px;
      width: 100%;
      cursor: ns-resize;
      z-index: 10;
    }

    .resize-handle-left {
      position: absolute;
      top: 0;
      left: 0;
      width: 8px;
      height: 100%;
      cursor: ew-resize;
      z-index: 10;
    }

    .chat-header {
      background: #099edb;
      color: #faa61a;
      padding: 15px;
      font-weight: bold;
      font-size:large;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .chat-body {
      flex: 1;
      padding: 15px;
      overflow-y: auto;
      max-height: none;
    }

    .chat-message {
      display: flex;
      margin-bottom: 15px;
    }

    .chat-message.bot {
      flex-direction: row;
    }

    .chat-message.user {
      flex-direction: row-reverse;
      text-align: right;
    }

    .chat-avatar {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      background: #eee;
      margin: 0 10px;
    }

    .chat-bubble {
      max-width: 70%;
      background: #e6f0ff;
      padding: 10px 15px;
      border-radius: 15px;
      line-height: 1.5;
      white-space: normal;
      word-wrap: break-word;
      word-break: break-word;
    }

    .chat-message.user .chat-bubble {
      background: #cce5ff;
    }

    .chat-footer {
      padding: 10px;
      border-top: 1px solid #ddd;
      display: flex;
    }

    #userInput {
      flex: 1;
      padding: 10px;
      border-radius: 10px;
      border: 1px solid #ccc;
      resize: none;
      height: 40px;
    }

    #sendBtn {
      margin-left: 10px;
      padding: 10px 15px;
      background: #4da6ff;
      color: white;
      border: none;
      border-radius: 10px;
      cursor: pointer;
    }

    .chat-bubble a {
      color: #007bff;
      text-decoration: underline;
    }

    .typing-indicator .dots span {
      animation: blink 1.2s infinite;
      opacity: 0.3;
      font-size: 24px;
      margin: 0 3px;
    }

    .typing-indicator .dots span:nth-child(2) {
      animation-delay: 0.2s;
    }

    .typing-indicator .dots span:nth-child(3) {
      animation-delay: 0.4s;
    }
    /* Hiệu ứng mượt khi mở popup */
    .chat-popup {
      opacity: 0;
      transform: translateY(20px);
      transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .chat-popup.open {
    opacity: 1;
    transform: translateY(0);
    }

    @keyframes blink {
      0% { opacity: 0.3; }
      50% { opacity: 1; }
      100% { opacity: 0.3; }
    }