body {
  font-family: 'Arial', sans-serif;
  background-color: #1e1e2f;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
  text-align: center;
  background-color: #2a2a40;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 400px;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin-bottom: 20px;
}

h1 {
  font-size: 1.5em;
  margin-bottom: 20px;
}

.chat-box {
  background-color: #3a3a5a;
  border-radius: 10px;
  padding: 15px;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: background-color 0.3s ease;
}

#output {
  font-size: 1em;
  color: #fff;
  margin-bottom: 15px;
  word-wrap: break-word;
  transition: color 0.3s ease;
}

button {
  background-color: #4CAF50;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #45a049;
}

button i {
  font-size: 1.2em;
  color: #fff;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.listening {
  animation: pulse 1s infinite;
}

footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #1e1e2f;
  color: #fff;
  text-align: center;
  padding: 10px 0;
  font-size: 0.9em;
  border-top: 1px solid #3a3a5a;
  transition: background-color 0.3s ease, color 0.3s ease, border-top 0.3s ease;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #4CAF50;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

body.light-theme {
  background-color: #f0f0f0;
  color: #000;
}

body.light-theme .container {
  background-color: #fff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

body.light-theme .chat-box {
  background-color: #e0e0e0;
}

body.light-theme #output {
  color: #000;
}

body.light-theme footer {
  background-color: #f0f0f0;
  color: #000;
  border-top: 1px solid #ccc;
}

#clear-btn, #theme-btn {
  background-color: #3a3a5a;
  margin: 5px;
}

#clear-btn:hover, #theme-btn:hover {
  background-color: #4CAF50;
}
