/* Reset */
body, h1, p, textarea, button {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  box-sizing: border-box;
}

body {
  background: #f7f7f8;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

/* Container */
.chat-wrapper {
  display: flex;
  flex-direction: column;
  width: 95%;
  max-width: 850px;
  height: 90vh;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  overflow: hidden;
}

/* Header */
.chat-header {
  background: #1c2f54;
  color: #fff;
  text-align: center;
  padding: 25px 15px 15px;
  position: relative;
}

.chat-header .logo {
  display: block;
  margin: 0 auto 15px;
  width: 340px;
  height: 95px;
  background: #ffffff;
  padding: 10px;
  border-radius: 8px;
}

.chat-header h1 {
  font-size: 1.6em;
  margin-bottom: 8px;
}

.chat-header p {
  font-size: 0.95em;
  line-height: 1.4;
  max-width: 85%;
  margin: 0 auto;
  opacity: 0.95;
}

/* Opções */
.options {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
  font-size: 0.9em;
}

.options label {
  color: #fff;
  cursor: pointer;
}

.options input[type="checkbox"] {
  margin-right: 6px;
}

#clear-btn {
  background: #f38f1a;
  border: none;
  color: white;
  font-size: 0.9em;
  font-weight: bold;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
}

#clear-btn:hover {
  background: #d97a15;
}

/* Área do Chat */
.chat-box {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: #f9fafb;
  display: flex;
  flex-direction: column;
}

/* Mensagens */
.message {
  max-width: 70%;
  padding: 12px 16px;
  margin: 10px 0;
  border-radius: 10px;
  line-height: 1.5;
  font-size: 1em;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.user {
  background: #1c2f54;
  color: white;
  margin-left: auto;
  border-bottom-right-radius: 0;
}

.bot {
  background: #e5e7eb;
  color: #333;
  margin-right: auto;
  border-bottom-left-radius: 0;
  border-left: 4px solid #3c6d6a;
}

/* Blocos especiais do bot */
.bot.block.think {
  background: #e0f0ff;
  border-left: 4px solid #2196f3;
  color: #0a3c75;
}

.bot.block.search {
  background: #fff9db;
  border-left: 4px solid #ffcc00;
  color: #665200;
}

.bot.block.answer {
  background: #ddf5dd;
  border-left: 4px solid #4caf50;
  color: #1e4620;
}

/* Área de entrada */
.input-area {
  display: flex;
  padding: 15px;
  background: #f7f7f8;
  border-top: 1px solid #ddd;
}

textarea {
  flex: 1;
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 8px;
  resize: none;
  outline: none;
}

button {
  margin-left: 10px;
  padding: 10px 20px;
  background: #1c2f54;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s;
}

button:hover {
  background: #3c6d6a;
}

/* Responsivo */
@media (max-width: 600px) {
  .chat-header .logo {
    width: 240px;
    height: auto;
  }
  .chat-header h1 {
    font-size: 1.2em;
  }
  .chat-header p {
    font-size: 0.85em;
  }
  button {
    font-size: 14px;
    padding: 8px 12px;
  }
}
