body {
  font-family: Arial, sans-serif;
  background: #f3f4f6;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
}

.container {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,.1);
  text-align: center;
  max-width: 420px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

h1 {
  font-size: 1.3rem;
  margin-bottom: .5rem;
}

.chatbox {
  background: #f9fafb;
  border-radius: 12px;
  padding: 1rem;
  flex: 1;
  overflow-y: auto;
  text-align: left;
}

.mensaje {
  margin: .5rem 0;
  padding: .6rem .9rem;
  border-radius: 12px;
  max-width: 80%;
  line-height: 1.4;
  animation: fadeIn .3s ease-in;
}

.mensaje.user {
  background: #e0e7ff;
  margin-left: auto;
  border-bottom-right-radius: 0;
}

.mensaje.bot {
  background: #e5e7eb;
  margin-right: auto;
  border-bottom-left-radius: 0;
}

.input-box {
  display: flex;
  gap: .5rem;
}

input {
  flex: 1;
  padding: .6rem;
  border: 1px solid #ccc;
  border-radius: 8px;
}

button {
  background: #4f46e5;
  color: white;
  border: none;
  padding: .6rem 1rem;
  border-radius: 8px;
  cursor: pointer;
}

button:hover {
  background: #4338ca;
}

.typing {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #555;
  border-radius: 50%;
  margin: 0 2px;
  animation: blink 1.2s infinite;
}

@keyframes blink {
  0%, 80%, 100% { opacity: 0; }
  40% { opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

