/* contenedor de chat */
.ggpt-messages {
  background: #fff;
  border-radius: 16px;
  min-height: 160px;
  max-height: 260px;
  overflow-y: auto;
  padding: 0.6rem 0.4rem 0.4rem 0.4rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

/* burbujas */
.ggpt-msg {
  max-width: 78%;
  font-size: .8rem;
  line-height: 1.4;
}

.ggpt-msg.bot {
  align-self: flex-start;
  background: #f3f4f6;
  border-radius: 14px 14px 14px 4px;
  padding: .4rem .65rem .45rem;
  color: #1f2937;
}

.ggpt-msg.user {
  align-self: flex-end;
  background: #9d325f;
  color: #fff;
  border-radius: 14px 14px 4px 14px;
  padding: .4rem .65rem .45rem;
}

/* que no se rompa en mobile */
@media (max-width: 720px) {
  .ggpt-msg {
    max-width: 90%;
  }
}

/* dark mode */
body.dark-mode .ggpt-messages {
  background: rgba(3,16,21,0.3);
}
body.dark-mode .ggpt-msg.bot {
  background: rgba(255,255,255,0.07);
  color: #fff;
}
body.dark-mode .ggpt-msg.user {
  background: #e3b038;
  color: #031d26;

}

/* ===============================
   ESTILO GENERAL DEL CHAT GAUSSGPT
   =============================== */

body {
  font-family: 'Inter', sans-serif;
  background: #f8f7f6;
  color: #222;
  margin: 0;
  padding: 0;
}

.topbar {
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding: 0.7rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar a {
  text-decoration: none;
  color: #722f47;
  margin-right: 1.4rem;
  font-weight: 500;
}

.topbar a.active {
  color: #b73a68;
  border-bottom: 2px solid #b73a68;
}

.modo-toggle {
  cursor: pointer;
  font-size: 1rem;
  color: #555;
}

.ggpt-wrapper {
  text-align: center;
  padding: 2.5rem 1rem 3.5rem;
}

.ggpt-logo {
  width: 120px;
  margin-bottom: 0.5rem;
}

.ggpt-badge {
  display: inline-block;
  background: #f9eddc;
  color: #8a4f19;
  font-size: 0.8rem;
  border-radius: 12px;
  padding: 0.3rem 0.7rem;
  margin-bottom: 0.8rem;
}

.ggpt-title-block h1 {
  font-size: 2rem;
  color: #7a2a4f;
  margin: 0.3rem 0;
}

.ggpt-subtitle {
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto 1.8rem;
  color: #555;
}

/* ===============================
   CAJA DE CHAT
   =============================== */

.ggpt-chatbox {
  max-width: 680px;
  margin: 1.5rem auto 1.5rem;
  background: #ffffff;
  border-radius: 20px;
  padding: 1.2rem 1.3rem 1.6rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05);
}

.ggpt-messages {
  background: #f7f7f7;
  border-radius: 16px;
  min-height: 180px;
  max-height: 300px;
  overflow-y: auto;
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* burbujas */
.ggpt-msg {
  max-width: 78%;
  font-size: 0.88rem;
  line-height: 1.4;
  padding: 0.45rem 0.7rem;
  border-radius: 14px;
  word-wrap: break-word;
  animation: fadeIn 0.3s ease;
}

.ggpt-msg.bot {
  align-self: flex-start;
  background: #ececec;
  border-radius: 14px 14px 14px 4px;
  color: #222;
}

.ggpt-msg.user {
  align-self: flex-end;
  background: #8a2e58;
  color: #fff;
  border-radius: 14px 14px 4px 14px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===============================
   INPUT
   =============================== */

.ggpt-input {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 50px;
  margin-top: 1rem;
  padding: 0.2rem 0.6rem;
  background: #fff;
}

.ggpt-input i {
  color: #888;
  margin-left: 0.4rem;
}

#ggpt-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0.5rem;
  font-size: 0.9rem;
  background: transparent;
  color: #333;
}

.ggpt-send {
  background: #b73a68;
  color: white;
  border: none;
  padding: 0.4rem 0.6rem;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  margin-right: 0.3rem;
  transition: 0.2s;
}

.ggpt-send:hover {
  background: #8a2e58;
}

/* ===============================
   SUGERENCIAS
   =============================== */

.ggpt-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.8rem;
  justify-content: center;
}

.ggpt-sug {
  border: 1px solid #d4cbd0;
  background: #faf8f9;
  color: #6a2343;
  border-radius: 20px;
  font-size: 0.8rem;
  padding: 0.35rem 0.8rem;
  cursor: pointer;
  transition: 0.2s;
}

.ggpt-sug:hover {
  background: #e8dbe1;
}

/* ===============================
   NOTA FINAL
   =============================== */
.ggpt-disclaimer {
  font-size: 0.75rem;
  color: #888;
  margin-top: 1.3rem;
}

/* ===============================
   DARK MODE
   =============================== */

body.dark-mode {
  background: #10181b;
  color: #f3f3f3;
}

body.dark-mode .ggpt-chatbox {
  background: #182125;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
}

body.dark-mode .ggpt-messages {
  background: #1e2b31;
}

body.dark-mode .ggpt-msg.bot {
  background: #23323a;
  color: #eee;
}

body.dark-mode .ggpt-msg.user {
  background: #f0b84c;
  color: #1a1a1a;
}

body.dark-mode .ggpt-send {
  background: #f0b84c;
  color: #1a1a1a;
}

body.dark-mode .ggpt-sug {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f0b84c;
}

body.dark-mode .ggpt-sug:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ====== LOGO CENTRAL ====== */
.ggpt-logo-central {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 1rem;
  margin-bottom: 0.8rem;
  position: relative;
}

.ggpt-logo {
  width: 590px; /* aumentamos el tamaño */
  opacity: 0;
  transform: translateY(20px) scale(0.96);
  animation: appearLogo 1.6s ease-out forwards, glowPulse 3s ease-in-out 1.6s infinite alternate;
}

/* Animación de aparición */
@keyframes appearLogo {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
    filter: blur(6px);
  }
  70% {
    opacity: 1;
    transform: translateY(-2px) scale(1.02);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Sutil brillo o “latido” */
@keyframes glowPulse {
  0% {
    filter: drop-shadow(0 0 0px rgba(190, 75, 125, 0));
  }
  100% {
    filter: drop-shadow(0 0 8px rgba(190, 75, 125, 0.25));
  }
}



.ggpt-title-block h1 {
  opacity: 0;
  animation: fadeTitle 1.6s ease 0.9s forwards;
}

@keyframes fadeTitle {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}


/* corregir tamaño del logo del header en esta página */
.topbar .logo-resumido {
  height: 46px;    /* o 40px si lo querés más chico */
  width: auto;
  display: block;
}


.top-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

/* Reordenar visualmente */
.modo-toggle {
  order: 1;
}

.back-home-btn {
  order: 2;
}

.back-home-btn {
  position: relative;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  color: #7a2a4f;
  transition: all 0.3s ease;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
  overflow: hidden;
  z-index: 1;
}

/* efecto arcoíris */
.back-home-btn::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: inherit;
  background: linear-gradient(
    120deg,
    #ff0080,
    #ff8c00,
    #ffd700,
    #00ff6a,
    #00c8ff,
    #7a2aff,
    #ff0080
  );
  background-size: 400% 400%;
  z-index: -1;
  filter: blur(5px);
  animation: rainbowGlow 5s linear infinite;
  opacity: 0.9;
}

.back-home-btn:hover {
  color: #fff;
  background: #7a2a4f;
  transform: scale(1.03);
  box-shadow: 0 0 18px rgba(255,255,255,0.4);
}

/* animación arcoíris */
@keyframes rainbowGlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}


.top-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

/* Botón Inicio más grande y con halo arcoíris */
.back-home-btn {
  position: relative;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 999px;
  padding: 8px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  color: #7a2a4f;
  transition: all 0.3s ease;
  overflow: hidden;
  z-index: 1;
}

/* halo multicolor */
.back-home-btn::before {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border-radius: inherit;
  background: linear-gradient(
    120deg,
    #ff005a,
    #ff9900,
    #ffee00,
    #00ff88,
    #00c8ff,
    #9b00ff,
    #ff005a
  );
  background-size: 400% 400%;
  filter: blur(6px);
  opacity: 0.8;
  z-index: -1;
  animation: rainbowGlow 5s linear infinite;
}

@keyframes rainbowGlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.back-home-btn:hover {
  color: #fff;
  background: #7a2a4f;
  transform: scale(1.05);
  box-shadow: 0 0 18px rgba(255,255,255,0.4);
}

/* Ícono luna */
.modo-toggle {
  cursor: pointer;
  font-size: 1.2rem;
  color: #4b3a3a;
  transition: 0.3s;
}

.modo-toggle:hover {
  transform: rotate(-15deg);
  color: #7a2a4f;
}


/* ====== HEADER AJUSTE FORZADO ====== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar .top-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

/* BOTÓN INICIO CON HALO ARCOÍRIS */
.topbar .back-home-btn {
  position: relative;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 999px;
  padding: 8px 22px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  color: #7a2a4f;
  z-index: 1;
  overflow: hidden;
}

/* halo */
.topbar .back-home-btn::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  background: linear-gradient(
    120deg,
    #ff005a,
    #ff9900,
    #ffee00,
    #00ff88,
    #00c8ff,
    #9b00ff,
    #ff005a
  );
  background-size: 400% 400%;
  filter: blur(7px);
  opacity: 0.9;
  z-index: -1;
  animation: rainbowGlow 5s linear infinite;
}

@keyframes rainbowGlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.topbar .back-home-btn:hover {
  background: #7a2a4f;
  color: #fff;
  transform: translateY(-1px);
  transition: 0.2s;
}

/* LUNITA */
.topbar .modo-toggle {
  cursor: pointer;
  font-size: 1.1rem;
  color: #3f2f2f;
}

/* por si general.css mete display:block o cosas raras */
.topbar .top-actions a.back-home-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}
