/* Default light mode */
body {
  font-family: Arial, sans-serif;
  background: #f5f5f5;
  margin: 0;
  display: flex;
  justify-content: center;
  padding: 20px;
}

.chat-container {
  background: #fff;
  width: 500px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ===== Header ===== */
header {
  display: flex;
  align-items: center;
  background: #2c3e50;
  color: white;
  padding: 10px;
}

header .logo {
  height: 40px;
  margin-right: 10px;
}

header h1 {
  flex-grow: 1;
  font-size: 16px;
}

header button {
  background: transparent;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
}

/* ===== Chat Box ===== */
.chat-box {
  flex-grow: 1;
  padding: 15px;
  overflow-y: auto;
  background: #f9f9f9;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ===== Bubble ===== */
.message {
  padding: 10px 15px;
  border-radius: 12px;
  max-width: 70%;
  line-height: 1.5;
  white-space: pre-wrap; /* biar enter / \n tetap kebaca */
}

.user {
  background: #2563eb;  /* biru */
  color: white;
  align-self: flex-end;
}

.bot {
  background: #e6e6e6;  /* abu */
  color: black;
  align-self: flex-start;
}

/* ===== Input ===== */
.chat-input {
  display: flex;
  border-top: 1px solid #ccc;
}

.chat-input input {
  flex: 1;
  border: none;
  padding: 10px;
  font-size: 14px;
}

.chat-input button {
  border: none;
  padding: 10px 20px;
  background: #3498db;
  color: white;
  cursor: pointer;
}

/* ===== Dark Mode ===== */
body.dark {
  background: #222;
}

body.dark .chat-container {
  background: #333;
}

body.dark header {
  background: #111;
}

body.dark .chat-box {
  background: #444;
}

body.dark .user {
  background: #2980b9;
  color: white;
}

body.dark .bot {
  background: #555;
  color: white;
}
