.chat-container{
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 320px;
  max-height: 480px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #0b0b0c, #070708);
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.5);
  overflow: hidden;
  font-family: 'Poppins', sans-serif;
  color: #e9eef8;
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 9999;
}
  
  .chat-container.hide{
    transform: translateY(20px);
    opacity: 0;
  }
  
  .chat-header{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-weight: 600;
  }
  
  .chat-messages{
    flex:1;
    padding: 14px;
    display:flex;
    flex-direction:column;
    gap:12px;
    overflow-y:auto;
    background-image: radial-gradient(circle at 10% 10%, rgba(255,255,255,0.008), transparent 10%), radial-gradient(circle at 90% 90%, rgba(255,255,255,0.006), transparent 10%);
  }
  
  .chat-message{
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 20px;
    position: relative;
    line-height: 1.4;
    word-break: break-word;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }
  
  .chat-message.show{
    opacity:1;
    transform:none;
  }
  
  .chat-message.inbox{
    align-self: flex-start;
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
    color:#eaf0ff;
    /* box-shadow: 0 6px 20px rgba(2,6,23,0.35); */
    box-shadow: 0 6px 20px rgba(38,84,160,0.25);
    font-size: 14px;
    text-align: left;
  }

  #chat-toggle{
    background:transparent;
    border:none;
    color:#fff;
    font-size:18px;
    cursor:pointer;
  }
  

  #chat-toggle:hover{
    color:#070708 !important;
    border-radius:50px !important;
    background-color:white !important;
  }
  
  .chat-message.outbox{
    align-self: flex-end;
    background: linear-gradient(180deg, rgba(90,167,255,0.18), rgba(55,111,214,0.12));
    color: white;
    border: 1px solid rgba(65,120,210,0.12);
    box-shadow: 0 6px 20px rgba(38,84,160,0.25);
    font-size: 14px;
    text-align: right;
  }
  
  .chat-message .meta{
    font-size: 10px;
    opacity: 0.7;
    margin-top: 4px;
    text-align: right;
  }
  
  .chat-input-bar{
    display:flex;
    padding:12px;
    gap:8px;
    background: rgba(255,255,255,0.01);
    border-top: 1px solid rgba(255,255,255,0.03);
  }
  
  .chat-input{
    flex:1;
    border-radius: 12px;
    border:1px solid rgba(255,255,255,0.03);
    background: rgba(255,255,255,0.02);
    color: #eaf2ff;
    padding:10px 12px;
    resize:none;
    outline:none;
  }
  
  #sendBtn{
    background: linear-gradient(180deg,#5aa7ff,#376fd6);
    color:#fff;
    border:none;
    border-radius:10px;
    padding:8px 16px;
    font-weight:600;
    cursor:pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  #sendBtn:hover{ transform: translateY(-1px); box-shadow:0 6px 20px rgba(55,111,214,0.18); }
  
  #typing-indicator{
    display:flex;
    justify-content:flex-start;
    align-items:center;
    gap:4px;
    padding-left:12px;
    margin-bottom:4px;
  }
  #typing-indicator span.dot{
    width:6px; height:6px; border-radius:50%;
    background:#5aa7ff;
    opacity:0.5;
    animation: blink 1.2s infinite;
  }
  #typing-indicator span.dot:nth-child(2){ animation-delay:0.2s;}
  #typing-indicator span.dot:nth-child(3){ animation-delay:0.4s;}
  @keyframes blink{
    0%,80%,100%{opacity:0.3;}
    40%{opacity:1;}
  }
  .hide {
    display: none !important;
  }

  #sendBtn i, .chat-toggle-btn i{
    pointer-events: none;
    font-size: 16px;
    color: #fff;
  }
  
  .chat-message::before{
    content: attr(data-emoji);
    margin-right:6px;
    font-size:14px;
  }

  .input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
  }
  
  #chat_msg {
    width: 100%;
    padding-right: 36px; /* ruang untuk ikon gambar */
  }
  
  #imgBtn {
    position: absolute;
    right: 10px;
    bottom: 10px;
    cursor: pointer;
    background: none;
    border: none;
  }
  
  #imgBtn i {
    font-size: 18px;
    color: #5aa7ff;
    transition: color 0.2s ease;
  }
  
  #imgBtn:hover i {
    color: #82c4ff;
  }
  