* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Outfit', sans-serif;
  background-color: #f8f9fa;
  color: #212529;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.header {
  background: #ffffff;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-bottom: 1px solid #dee2e6;
}

.brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: #343a40;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bot-icon {
  font-size: 1.8rem;
}

.motto {
  font-size: 1rem;
  color: #6c757d;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

select,
button {
  padding: 0.6rem;
  font-size: 1rem;
  border-radius: 6px;
  border: 1px solid #ced4da;
  background-color: #ffffff;
  cursor: pointer;
  color: #212529;
}

.chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
}

.message {
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  border-radius: 12px;
  max-width: 80%;
  word-wrap: break-word;
  line-height: 1.5;
}

.user {
  background-color: #e9ecef;
  align-self: flex-end;
}

.bot {
  background-color: #dee2e6;
  align-self: flex-start;
}

.typing {
  font-style: italic;
  opacity: 0.7;
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  0% { opacity: 0.2; }
  50% { opacity: 1; }
  100% { opacity: 0.2; }
}

footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1rem;
  background: #ffffff;
  border-top: 1px solid #dee2e6;
}

textarea {
  flex: 1;
  min-height: 50px;
  font-size: 1rem;
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid #ced4da;
  resize: vertical;
}

#sendBtn,
#micBtn {
  background-color: #343a40;
  border: none;
  color: white;
  font-weight: bold;
  border-radius: 8px;
  padding: 0 1rem;
  min-width: 48px;
  min-height: 48px;
}

.dark {
  background: #212529;
  color: #f8f9fa;
}

.dark .message.user {
  background-color: #495057;
}

.dark .message.bot {
  background-color: #6c757d;
}

@media (min-width: 768px) {
  .header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .brand {
    font-size: 2rem;
  }

  .controls {
    justify-content: flex-end;
  }
}
