/* style_conversaciones.css — Conversaciones con IA — paleta verde-azulada con títulos dorados */

body {
  margin: 0;
  padding: 0;
  background: radial-gradient(ellipse at center, #0a1410 0%, #050a07 100%);
  color: #d8ecd8;
  font-family: 'Crimson Pro', serif;
}

main {
  padding: 3rem 2rem;
  max-width: 800px;
  margin: 2rem auto;
  background-color: rgba(8, 20, 12, 0.80);
  border: 1px solid #2a6040;
  border-radius: 12px;
  animation: heartbeat-glow-teal 2.2s ease-in-out infinite;
}

h1 {
  font-size: 2.5em;
  text-align: center;
  margin-bottom: 1.2em;
  background: linear-gradient(to right, #f0c040, #fffbe0, #e8980a, #f0c040);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 8s ease-in-out infinite;
  color: #d4a030;
  text-shadow: 0 0 10px rgba(212, 160, 48, 0.4);
}

h2, h3 {
  color: #80b898;
  border-bottom: 1px solid rgba(60, 150, 100, 0.35);
  padding-bottom: 0.3em;
}

p { margin-bottom: 1em; font-size: 1.2em; line-height: 1.6; }

a { color: #509878; text-decoration: none; transition: color 0.3s ease, text-shadow 0.3s ease; }
a:hover {
  color: #80c8a8;
  text-shadow: 0 0 8px rgba(80, 180, 130, 0.7);
  text-decoration: underline;
}

blockquote {
  border-left: 3px solid #2a6040;
  margin: 1.2em 0;
  padding: 0.5em 1.2em;
  color: #a0c8b0;
  background: rgba(10, 30, 18, 0.40);
  border-radius: 0 6px 6px 0;
}

footer {
  margin-top: 4rem;
  padding: 1.5rem;
  background: #050a06;
  color: #608070;
  text-align: center;
  font-size: 0.9rem;
  border-top: 1px solid #1a4028;
}

/* Animaciones */
@keyframes shine {
  0%   { background-position: 200% center; }
  100% { background-position: 0% center; }
}

@keyframes heartbeat-glow-teal {
  0%   { box-shadow: 0 0 8px rgba(30, 100, 60, 0.2);  border-color: #2a6040; }
  50%  { box-shadow: 0 0 40px rgba(60, 160, 100, 0.60); border-color: #50a878; }
  100% { box-shadow: 0 0 8px rgba(30, 100, 60, 0.2);  border-color: #2a6040; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Portada del libro */
.portada-libro-container { margin: 3em 0 1em; text-align: center; }
.portada-libro {
  width: 220px;
  border-radius: 12px;
  box-shadow: 0 0 14px rgba(60, 160, 100, 0.5);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  cursor: pointer;
}
.portada-libro:hover {
  transform: scale(1.07) rotate(-2deg);
  box-shadow: 0 0 28px rgba(80, 200, 130, 0.8);
}

/* Logos animados */
@keyframes tealPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(60, 160, 100, 0.3); }
  50%       { box-shadow: 0 0 25px 15px rgba(60, 160, 100, 0.45); }
}
.anim-container {
  display: inline-block;
  border-radius: 50%;
  padding: 8px;
  background-color: #0a1410;
  animation: tealPulse 3s infinite;
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}
.anim-container:hover {
  transform: scale(1.1);
  box-shadow: 0 0 30px 15px rgba(60, 160, 100, 0.6);
  z-index: 10;
}
.anim-img-round  { border-radius: 50%; object-fit: cover; vertical-align: middle; }
.anim-librovivo {
  border-radius: 12px;
  animation: tealPulse 3s infinite;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.anim-librovivo:hover {
  transform: scale(1.3) rotate(-2deg);
  box-shadow: 0 0 24px rgba(80, 200, 130, 0.8);
  z-index: 20;
}

/* Fade-in de secciones */
.fade-in-section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1.5s ease-out, transform 1.5s ease-out;
  will-change: opacity, transform;
}
.fade-in-section.is-visible { opacity: 1; transform: translateY(0); }

/* Chat bubbles para conversaciones generadas por el servidor */
.chat-bubbles { display: flex; flex-direction: column; gap: 0.5rem; }
.chat-bubble { padding: 1rem; margin-bottom: 0.8rem; border-radius: 0.5rem; max-width: 90%; line-height: 1.6; }
.user-bubble { background-color: rgba(30, 90, 60, 0.35); border: 1px solid #2a8060; color: #d8ecd8; margin-left: auto; }
.ai-bubble { background-color: rgba(10, 30, 20, 0.55); border: 1px solid #1a4028; color: #b0d8c0; margin-right: auto; }
.chat-name { font-weight: bold; margin-bottom: 0.5rem; font-size: 0.9em; opacity: 0.8; }

/* Diálogo usuario / IA */
.turn-usuario {
  border-left: 3px solid #50a878;
  padding: 0.7em 1em;
  margin: 1.2em 0 0.4em;
  background: rgba(30, 90, 55, 0.12);
  border-radius: 0 8px 8px 0;
}
.turn-usuario p { color: #90d8b0; font-style: italic; margin-bottom: 0.4em; }
.turn-ia { margin: 0.4em 0 1.4em 0; }
.turn-ia p { color: #c8e8d8; }
.turn-ia ul { color: #b0d0c0; margin-left: 1.4em; }

/* Layout nav logos */
.logos-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0 0.5rem;
}

/* Contenedor del cuerpo de conversación */
.conv-body { margin-top: 1.5em; }

/* Enlace de pie */
.footer-link { color: #509878; font-size: 1.1em; text-decoration: none; }
.footer-link:hover { color: #80c8a8; text-decoration: underline; }
