* { box-sizing: border-box; font-family: system-ui, Segoe UI, sans-serif; }
html, body { margin: 0; height: 100%; background: #e5ddd5; }

#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.topbar {
  background: #075E54;
  color: #fff;
  padding: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.topbar img { width: 40px; border-radius: 6px; background: #fff; }
.topbar h1 { margin: 0; font-size: 16px; }
.topbar small { opacity: .9; }

#chat {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bubble {
  max-width: 80%;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.4;
}

.bot { background: #fff; align-self: flex-start; }
.user { background: #DCF8C6; align-self: flex-end; }

#controls {
  background: #fff;
  padding: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

button.choice {
  background: #075E54;
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: 18px;
  cursor: pointer;
  font-size: 13px;
}

button.alt { background: #e5e7eb; color: #111; }

input[type=file] {
  width: 100%;
}

#welcomeBubble {
  max-width: 80%;
  margin: 20px auto;
  padding: 16px 24px;
  background: #075E54;
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  text-align: center;
  border-radius: 24px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
/* Full screen overlay */
#usernameModal .modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 9998;
}

/* Modal box */
#usernameModal .modal-content {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  padding: 24px 30px;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
  z-index: 9999;
  text-align: center;
  width: 320px;
  max-width: 90%;
}

/* Input and button styling */
#usernameModal input {
  width: 100%;
  padding: 10px;
  margin-top: 12px;
  margin-bottom: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
}

#usernameModal button {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  background: #257c14;
  color: #fff;
  cursor: pointer;
  font-weight: bold;
}

#usernameModal button:hover {
  background: #1f6510;
}

/* Error text */
#usernameModal #modalError {
  margin-top: 8px;
  color: red;
  font-size: 13px;
}
