body {

   font-family: system-ui, Arial, sans-serif;
  margin: 0;
 
  background: #020617;
  overflow-x: hidden;
}

/* Launcher Button */
#nami-launcher {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  background: #2563eb;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  cursor: pointer;
  z-index: 9999;
  box-shadow: 0 10px 40px rgba(37, 99, 235, 0.4);
}

/* Chat Panel */
#nami-widget-panel {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 330px;
  height: 500px;
  background: #0f172a;
  color: #f8fafc;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-width: 100%;
  z-index: 9998;
  box-shadow: 0 25px 70px rgba(0,0,0,0.5);


}

/* Header */
#nami-header {
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  background: #0f172a;
}

#nami-header .title {
  font-weight: 700;
}

#nami-header .status-dot {
  width: 10px;
  height: 10px;
  background: #22c55e;
  border-radius: 50%;
  margin-right: 10px;
}

/* Messages */
#nami-messages {
  flex: 1;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;

  width: 100%;
  min-width: 0;
  box-sizing: border-box;

  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;

  scrollbar-width: thin;
  scrollbar-color: #3b82f6 transparent;
}

/* ChatGPT-style scrollbar */
#nami-messages::-webkit-scrollbar {
  width: 6px;
}

#nami-messages::-webkit-scrollbar-track {
  background: transparent;
}

#nami-messages::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  border-radius: 999px;
}

#nami-messages::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #60a5fa, #3b82f6);
}

/* Input area */
#nami-input-wrapper {
  display: flex;
  padding: 10px;
  border-top: 1px solid rgba(255,255,255,0.12);
  background: #0f172a;
}

#nami-input {
  flex: 1;
  min-width: 0;
  padding: 12px 15px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.2);
  background: #1e293b;
  color: #f8fafc;
  outline: none;
  box-shadow: none;

}

#nami-input:focus {
  border-color: #3b82f6;
  box-shadow:
    0 0 0 1px #3b82f6,
    0 0 24px rgba(59,130,246,0.6);
}





/* Thinking message bubble */
.msg.thinking {
  align-self: flex-start;
  background: #1e293b;       /* same as bot bubble */
  color: #2563eb;            /* blue text */
  font-style: italic;
  font-size: 0.9375rem;
  line-height: 1.2;
  padding: 8px 8px;          /* smaller padding */
  border-radius: 12px;
  display: inline-flex;      /* inline-flex keeps height minimal */
  align-items: center; 
  justify-content: center; 
       /* vertically align text + dots */
  gap: 4px;
  max-width: 70%;
}
.msg.thinking .thinking-dots
{

  display: flex;
}
/* Animated dots */
.msg.thinking .thinking-dots span {
  display: inline-block;
  width: 3px;
  height: 3px;
 
 
  background: #2563eb;
  border-radius: 50%;
  animation: blink 1.4s infinite ease-in-out;
}

.msg.thinking .thinking-dots span:nth-child(1) { animation-delay: 0s; }
.msg.thinking .thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
.msg.thinking .thinking-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes blink {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.6; }
  40% { transform: translateY(-2px); opacity: 1; } /* smaller movement */
}



/* Close button hover effect */
#nami-close {
  transition: 
    color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.15s ease;
}

#nami-close:hover {
  color: #ef4444 !important; /* red icon */
  border-color: rgba(239, 68, 68, 0.8) !important;
  box-shadow:
    0 0 0 1px rgba(239, 68, 68, 0.8),
    0 0 16px rgba(239, 68, 68, 0.6),
    0 0 32px rgba(239, 68, 68, 0.4);
  transform: scale(1.05);
}

/* Optional: click feedback */
#nami-close:active {
  transform: scale(0.95);
  box-shadow:
    0 0 0 1px rgba(239, 68, 68, 0.9),
    0 0 12px rgba(239, 68, 68, 0.8);
}



#nami-send {
  margin-left: 10px;
  padding: 0 15px;
  border-radius: 12px;
  border: none;
  background: #2563eb;
  color: white;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  justify-content:center;
  align-items: center;

}

/* Message bubbles */
.msg {
  max-width: 85%;
  min-width: 0;
  box-sizing: border-box;

  padding: 10px 15px;
  border-radius: 16px;
  line-height: 1.5;

  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(37,99,235,0.7); }
  70% { box-shadow: 0 0 0 10px rgba(37,99,235,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,99,235,0); }
}


 #nami-powered {
  display: flex;
 justify-content: center;
 gap: 4px;
  align-items: center;
  text-align: center;
  font-size: 12px;
  padding: 8px 0 10px;
  color: rgba(255,255,255,0.45);
  border-top: 1px solid rgba(255,255,255,0.05);
  /* background: linear-gradient(180deg, #0b1220, #020617); */
}

#nami-powered b {
  color: #3b82f6;
}

#nami-powered span {
  color: #60a5fa;
}


  .msg.user {
  align-self: flex-end;
  background: #2563eb;
  color: #ffffff;

  padding: 10px 14px;
  max-width: 75%;

  border-radius: 18px 18px 4px 18px;
}

  /* align-self: flex-end;
  background: #2563eb;
  color: #fff; */



  .msg.bot {
  align-self: flex-start;
  background: #1e293b;
  color: #f8fafc;

  padding: 10px 14px;
  max-width: 75%;

  /* WhatsApp style */
  border-radius: 18px 18px 18px 4px;
}


/* .msg.bot {
  align-self: flex-start;
  background: #1e293b;
  color: #f8fafc;
  border: 1px solid rgba(255,255,255,0.1);
} */

/* Lock all children */
#nami-messages > *,
.msg * {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-wrap: anywhere;
}

/* Mobile full-screen */
@media (max-width: 600px) {
  #nami-widget-panel {
    width: 100vw;
    height: 90vh;
    bottom: 0;
    
    right: 0;
    border-radius: 0;
  }

  #nami-launcher {
    display: flex;
  }

  #nami-header {
    padding: 12px;
  }

  #nami-input-wrapper {
    padding: 12px;
  }





 

}
