body {
  font-family: "Helvetica Neue", sans-serif;
  background-color: #f5f3ff;
  margin: 0;
  padding: 0;
}

.chat-container {
  max-width: 700px;
  margin: 2em auto;
  background-color: white;
  border-radius: 20px;
  box-shadow: 0 0 10px rgba(72, 54, 152, 0.2);
  padding: 2em;
}

.title {
  text-align: center;
  color: #483698;
  margin-bottom: 1em;
  font-size: 1.8em;
}

.chat-box {
  background-color: #f6f0ff;
  padding: 1em;
  border-radius: 10px;
  height: 400px;
  overflow-y: auto;
  margin-bottom: 1em;
}

.message {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1em;
}

.message.meijirou {
  flex-direction: row;
}

.message.user {
  flex-direction: row-reverse;
  align-items: center;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin: 0 0.5em;
  flex-shrink: 0;
}

.user-icon {
  font-size: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #ddd;
  border-radius: 50%;
  width: 40px;
  height: 40px;
}

.text {
  background-color: #eae2ff;
  padding: 0.75em 1em;
  border-radius: 15px;
  max-width: 70%;
  word-wrap: break-word;
  position: relative;
  color: #333;
}

.input-form {
  display: flex;
  gap: 0.5em;
}

input[type="text"] {
  flex: 1;
  padding: 0.8em;
  border: 1px solid #ccc;
  border-radius: 20px;
  font-size: 1em;
}

button {
  background-color: #483698;
  color: white;
  border: none;
  padding: 0.8em 1.2em;
  border-radius: 20px;
  cursor: pointer;
  font-size: 1em;
  transition: background-color 0.2s ease;
}

button:hover {
  background-color: #362877;
}

.chat-intro {
  text-align: center;
  color: #666;
  font-style: italic;
  margin-bottom: 1em;
}

/* ローディングドット */
.dot {
  height: 8px;
  width: 8px;
  margin: 0 2px;
  background-color: #483698;
  border-radius: 50%;
  display: inline-block;
  animation: blink 1.4s infinite both;
}

.dot:nth-child(2) {
  animation-delay: 0.2s;
}
.dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes blink {
  0%, 80%, 100% {
    transform: scale(0);
  } 
  40% {
    transform: scale(1);
  }
}

footer {
  margin-top: 4em;
  font-size: 0.9em;
  color: #aaa;
  text-align: center;
}
