*{
  box-sizing:border-box;
}

body{
  margin:0;
  font-family: "Inter","Segoe UI",sans-serif;
  background:#0b0f19;
  color:#e5e7eb;
  height:100vh;
  display:flex;
}



/* MAIN CHAT AREA */

.chat-wrapper{
  width:100%;
  max-width:900px;
  margin:auto;
  height:100vh;
  display:flex;
  flex-direction:column;
}



/* HEADER */

.chat-header{
  padding:18px 24px;
  font-weight:600;
  font-size:15px;
  color:#9ca3af;
  border-bottom:1px solid #1f2937;
  background:#0b0f19;
}



/* CHAT AREA */

#chat{
  flex:1;
  overflow-y:auto;
  padding:30px 20px;
  display:flex;
  flex-direction:column;
  gap:22px;
  scroll-behavior:smooth;
}



/* SCROLLBAR */

#chat::-webkit-scrollbar{
  width:6px;
}

#chat::-webkit-scrollbar-thumb{
  background:#1f2937;
  border-radius:10px;
}



/* MESSAGE */

.message{
  display:flex;
  gap:14px;
  max-width:760px;
  margin:auto;
  animation:fadeIn .25s ease;
}

.message.user{
  flex-direction:row-reverse;
}



/* AVATAR */

.avatar{
  width:34px;
  height:34px;
  border-radius:8px;
  background-size:cover;
  background-position:center;
  flex-shrink:0;
}

.avatar.user{
  background-image:url("user.png");
}

.avatar.bot{
  background-image:url("shin.avif");
}



/* BUBBLE */

.bubble{
  padding:12px 14px;
  font-size:14px;
  line-height:1.55;
  border-radius:10px;
  max-width:620px;
  white-space:pre-wrap;
  word-wrap:break-word;
}



/* BOT MESSAGE */

.bot .bubble{
  background:#111827;
  border:1px solid #1f2937;
  color:#e5e7eb;
}



/* USER MESSAGE */

.user .bubble{
  background:#2563eb;
  color:white;
}



/* CODE BLOCK */

pre{
  background:#020617;
  padding:12px;
  border-radius:8px;
  overflow-x:auto;
  margin-top:10px;
  border:1px solid #1f2937;
}

code{
  font-family:Consolas,monospace;
  font-size:13px;
  color:#60a5fa;
}



/* INPUT AREA */

.input-area{
  padding:18px;
  background:#0b0f19;
  border-top:1px solid #1f2937;
}



/* INPUT CONTAINER */

.input-area-inner{
  max-width:760px;
  margin:auto;
  display:flex;
  align-items:center;
  background:#111827;
  border:1px solid #1f2937;
  border-radius:14px;
  padding:8px;
}



/* INPUT */

#input{
  flex:1;
  background:transparent;
  border:none;
  outline:none;
  padding:10px;
  font-size:14px;
  color:#e5e7eb;
}



/* BUTTONS */

#send,#mic{
  border:none;
  background:#2563eb;
  color:white;
  padding:8px 12px;
  border-radius:10px;
  cursor:pointer;
  margin-left:6px;
  transition:.2s;
  font-size:14px;
}

#send:hover,#mic:hover{
  background:#3b82f6;
}



/* LOADING TEXT */

.loading{
  opacity:.7;
  font-style:italic;
  animation:pulse 1.2s infinite;
}



/* ANIMATIONS */

@keyframes fadeIn{
  from{
    opacity:0;
    transform:translateY(6px);
  }
  to{
    opacity:1;
    transform:translateY(0);
  }
}

@keyframes pulse{
  0%{opacity:.3;}
  50%{opacity:1;}
  100%{opacity:.3;}
}



/* MOBILE */

@media(max-width:768px){

  #chat{
    padding:20px 10px;
  }

  .bubble{
    max-width:85%;
  }

}