/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #0d0d0d;
  color: #f0f0f0;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* ===== HEADER ===== */
header {
  background-color: #111;
  border-bottom: 2px solid #e63232;
  padding: 14px 24px;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rec {
  font-size: 13px;
  font-weight: bold;
  color: #e63232;
  letter-spacing: 1px;
  animation: blink 1.2s infinite;
}

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

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-text strong {
  font-size: 18px;
  color: #fff;
}

.logo-text span {
  font-size: 11px;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.header-sub {
  font-size: 12px;
  color: #e63232;
  font-weight: 600;
}

/* ===== MAIN / CHAT ===== */
main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: stretch;
  padding: 20px 16px;
  overflow: hidden;
}

.chat-container {
  width: 100%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  background-color: #161616;
  border-radius: 16px;
  border: 1px solid #2a2a2a;
  overflow: hidden;
}

/* ===== MENSAGENS ===== */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-messages::-webkit-scrollbar {
  width: 5px;
}
.chat-messages::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 10px;
}

.message {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.message.user {
  flex-direction: row-reverse;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #e63232;
  color: white;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.message.user .avatar {
  background-color: #333;
}

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

.message.bot .bubble {
  background-color: #1f1f1f;
  border: 1px solid #2c2c2c;
  border-bottom-left-radius: 4px;
  color: #e0e0e0;
}

.message.user .bubble {
  background-color: #e63232;
  color: #fff;
  border-bottom-right-radius: 4px;
}

/* Digitando... */
.typing .bubble {
  color: #888;
  font-style: italic;
}

/* ===== INPUT ===== */
.chat-input-area {
  display: flex;
  padding: 14px 16px;
  border-top: 1px solid #222;
  gap: 10px;
  background-color: #111;
}

#userInput {
  flex: 1;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid #2a2a2a;
  background-color: #1a1a1a;
  color: #f0f0f0;
  font-size: 14px;
  outline: none;
  transition: border 0.2s;
}

#userInput:focus {
  border-color: #e63232;
}

#sendBtn {
  padding: 12px 18px;
  background-color: #e63232;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

#sendBtn:hover {
  background-color: #cc2828;
  transform: scale(1.05);
}

/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 10px;
  font-size: 11px;
  color: #444;
  background-color: #0d0d0d;
}
