body {
  font-family: Arial, sans-serif;
  background-color:white;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh; 
  margin: 0;
  padding: 20px; 
}
.container {
  width: 350px;
  max-width: 100%; 
  background: #d9d4d456;
  border-radius: 10px;
  box-shadow: 0 4px 8px 10px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.container h2 {
  margin: 0;
  padding: 15px;
  background: #2d88d79f;
  font-size: 1.2rem;
  font: 1.5em sans-serif;
  text-align: center;
  color: white;
  text-shadow: 1px 1px 2px whitesmoke;
}

.chat-box {
  height: 400px;
  padding: 10px;
  overflow-y: auto;
  background: #f9f9f9;
}

.input-box {
  display: flex;
  border-top: 1px solid #ddd;
}
.input-box input {
  flex: 1;
  padding: 10px;
  border: none;
  outline: none;
  font-size: 1rem;
}
.input-box button {
  background:#2d88d79f;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
}
.input-box button:hover {
  background: #83c1e5;
}

.message {
  display: flex;
  margin-bottom: 10px;
  align-items: flex-start;
}

.message.user {
  justify-content: flex-end;
}
.message.user .text {
  background: #5a9cce;
  color: #333;
  padding: 8px 12px;
  border-radius: 12px 12px 0 12px;
  max-width: 70%;
  word-wrap: break-word;
}

.message.bot {
  justify-content: flex-start;
}
.message.bot img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 8px;
}
.message.bot .text {
  background: whitesmoke;
  color: #333;
  padding: 8px 12px;
  border-radius: 12px 12px 12px 0;
  max-width: 70%;
  word-wrap: break-word;
}
.typing-effect {
  font-size: 1.5rem;
  font-weight: bold;
  color:skyblue;
  white-space:nowrap;
  overflow: hidden;
  width: 0;
  animation: typing 3s steps(30, end) forwards, blink 0.6s step-end infinite alternate;
}

/* typing animation */
@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

/* blinking cursor */
@keyframes blink {
  50% { border-color: transparent; }
}

/* --- Responsiveness --- */
@media (max-width: 768px) {
  body {
    flex-direction: column;
    align-items: center;
    padding: 10px;
  }

  .container {
    width: 90%;
    max-width: 400px;
  }

  .chat-box {
    height: 300px;
  }
}

@media (max-width: 480px) {
  .container h2 {
    font-size: 1rem;
    padding: 10px;
  }

  .chat-box {
    height: 250px;
    padding: 8px;
  }

  .input-box input {
    font-size: 0.9rem;
    padding: 8px;
  }

  .input-box button {
    padding: 8px 12px;
  }

  .message.user .text,
  .message.bot .text {
    font-size: 0.9rem;
    max-width: 80%;
  }

  .message.bot img {
    width: 30px;
    height: 30px;
  }
}

  
    