/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* FONDO IMAGEN */
.bg-img {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 140vh;
  object-fit: cover;
  z-index: -1;
}

/* Capa oscura encima */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

/* CONTENEDOR PRINCIPAL */
.main-container {
  display: flex;
  height: 100vh;
  z-index: 2;
  position: relative;
}

/* SIDEBAR */
.sidebar {
  width: 220px;
  background-color: rgba(10, 10, 10, 0.85);
  display: flex;
  flex-direction: column;
  border-right: 1px solid #333;
}

.sidebar-header {
  padding: 20px;
  text-align: center;
}

.sidebar-header h2 {
  font-size: 1.4rem;
  color: #32ff99;
}

.sidebar-menu {
  padding: 12px;
}

.menu-item {
  background: transparent;
  color: #e0e0e0;
  padding: 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background-color 0.2s ease;
}

.menu-item:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

.menu-item.active {
  background-color: rgba(80, 200, 120, 0.2);
  color: #32ff99;
}

/* CHAT PRINCIPAL */
.chat-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
}

/* HEADER */
.chat-header {
  padding: 20px;
  background-color: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid #444;
}

.chat-header h1 {
  color: #00ffaa;
  font-size: 1.5rem;
  margin-bottom: 5px;
}

.chat-header p {
  color: #aaa;
  font-size: 0.95rem;
}

/* MENSAJES */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 30px 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.message {
  width: 100%;
  max-width: 85ch;
  padding: 14px 18px;
  border-radius: 10px;
  line-height: 1.6;
  font-size: 1rem;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  transition: all 0.3s ease;
  font-family: 'Segoe UI', sans-serif;
}

/* Usuario */
.message.user {
  align-self: flex-end;
  background-color: rgba(50, 255, 153, 0.2);
  border: 1px solid #32ff99;
  color: #e0e0e0;
}

/* Bot */
.message.bot {
  align-self: flex-start;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid #444;
  color: #f1f1f1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.message.bot p {
  margin-bottom: 12px;
}

/* INPUT AREA */
.chat-input-area {
  padding: 14px;
  background-color: rgba(0, 0, 0, 0.5);
  border-top: 1px solid #333;
}

.chat-input-wrapper {
  display: flex;
  align-items: center;
  max-width: 760px;
  margin: 0 auto;
  background-color: #2a2a2a;
  border-radius: 8px;
  padding: 8px;
  gap: 10px;
  border: 1px solid #444;
}

/* Campo texto */
.chat-input-wrapper input[type="text"] {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1rem;
  outline: none;
}

.chat-input-wrapper input[type="text"]::placeholder {
  color: #bbb;
}

/* Botones redondos */
.circle-btn {
  width: 40px;
  height: 40px;
  background-color: #3a3a3a;
  border: 1px solid #555;
  border-radius: 50%;
  color: #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.circle-btn:hover {
  background-color: #555;
  color: #fff;
}

.circle-btn svg {
  width: 18px;
  height: 18px;
}

/* Botón subir archivo */
.plus-btn input[type="file"] {
  display: none;
}

/* Botón enviar */
.arrow-btn {
  background-color: #32ff99;
  border-color: #32ff99;
  color: #000;
}

.arrow-btn:hover {
  background-color: #26cc7a;
  border-color: #26cc7a;
}

/* FUENTE GENERAL */
body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
}


/* 🧠 Mejora visual estilo ChatGPT para respuestas del bot */
.message.bot {
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid #444;
  padding: 16px;
  border-radius: 10px;
  line-height: 1.6;
  font-size: 1rem;
  white-space: pre-line;
  color: #f1f1f1;
  font-family: 'Segoe UI', sans-serif;
}

/* Títulos */
.message.bot h1,
.message.bot h2,
.message.bot h3 {
  color: #00ffaa;
  margin: 12px 0 6px;
}

/* Párrafos */
.message.bot p {
  margin-bottom: 10px;
}

/* Listas */
.message.bot ul,
.message.bot ol {
  margin-left: 20px;
  margin-bottom: 10px;
}

.message.bot li {
  margin-bottom: 6px;
}

/* Código en línea */
.message.bot code {
  background: #222;
  padding: 2px 5px;
  border-radius: 4px;
  font-family: monospace;
}

/* Bloques de código */
.message.bot pre code {
  display: block;
  background: #111;
  padding: 10px;
  border-radius: 6px;
  overflow-x: auto;
}

.message.escribiendo {
  opacity: 0.7;
  font-style: italic;
  animation: pulse 1.3s infinite ease-in-out;
}

@keyframes pulse {
  0% {
    opacity: 0.5;
  }

  50% {
    opacity: 0.9;
  }

  100% {
    opacity: 0.5;
  }
}