
/* Archivo: estilos.css */
body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background-color: #f5f5f5;
}
body.modo-100 {
  background: radial-gradient(circle at center, #1a1a1a, #000000);
  color: #fff;
}
#chat-container {
  width: 90%;
  max-width: 900px;
  height: 500px;
  margin: 100px auto 20px;
  background: #fff;
  border-radius: 16px;
  overflow-y: auto;
  padding: 20px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
}
.bubble {
  display: flex;
  align-items: flex-start;
  margin-bottom: 14px;
  animation: appear 0.3s ease-in-out;
}
.bubble.user .avatar {
  background-image: url('/imagenes/aa_avatar.png');
}
.bubble.gandalf .avatar {
  background-image: url('/imagenes/gandalf.png');
}
.bubble .avatar {
  width: 40px;
  height: 40px;
  margin-right: 10px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
}
.bubble .text {
  background: #eee;
  padding: 10px 14px;
  border-radius: 20px;
  max-width: 70%;
  font-size: 15px;
}
.bubble.user .text {
  background: #d1ecf1;
}
.bubble.gandalf .text {
  background: #f3e5ab;
}
form {
  text-align: center;
}
input[type="text"] {
  width: 80%;
  padding: 12px;
  border: none;
  border-radius: 20px;
  font-size: 16px;
  outline: none;
}
@keyframes appear {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes entradaMagica {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.intro-magica {
  text-align: center;
  padding: 60px 20px;
  background: linear-gradient(to right, #292c36, #3f4450);
  color: #fff;
  font-size: 1.3em;
  animation: entradaMagica 1.2s ease-out;
  z-index: 999;
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: all 0.7s ease;
}

body.cargando main {
  display: none;
}

.intro-magica {
  text-align: center;
  padding: 60px 20px;
  background: linear-gradient(to right, #292c36, #3f4450);
  color: #fff;
  font-size: 1.3em;
  animation: entradaMagica 1.2s ease-out;
  z-index: 999;
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: all 0.7s ease;
}

body.cargando main {
  display: none;
}

.nav {
  background-color: #ff6600;
  color: white;
  padding: 10px 20px;
  margin-right: 10px;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  font-family: 'Segoe UI', sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.nav:hover {
  background-color: #e65c00;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.nav:focus {
  outline: none;
}

.nav::after {
  content: "";
  position: absolute;
  background: rgba(255, 255, 255, 0.4);
  width: 100%;
  height: 100%;
  top: 0;
  left: -100%;
  transform: skewX(-20deg);
  transition: all 0.5s ease;
}

.nav:hover::after {
  left: 100%;
}

.nav.active {
  background-color: #222;
  color: #ff6600;
  box-shadow: 0 0 12px #ff6600b2;
}

.chat-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin: 50px 0;
  gap: 30px;
}

.banners-izquierda,
.banners-derecha {
  width: 15%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-container {
  width: 70%;
  background: white;
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 0 15px rgba(0,0,0,0.2);
  position: relative;
}

.chat-box {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0,0,0,0.15);
  padding: 1rem;
  min-height: 450px; /* ¡Aquí el cambio! Antes era más bajo */
  position: relative;
}

.input-area {
  display: flex;
  margin-top: 10px;
}

#chat-input {
  flex-grow: 1;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

#enviar {
  margin-left: 10px;
  padding: 10px 15px;
  background: #ff9900;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.troll-footer {
  display: flex;
  justify-content: center;
  margin: 40px 0;
}

.burbuja {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 16px;
  margin: 8px;
  font-size: 15px;
  animation: fadein 0.5s ease;
}

.usuario {
  background: #ffe0b2;
  align-self: flex-end;
  margin-left: auto;
  border: 1px solid #ffa726;
}

.gandalf {
  background: #e1f5fe;
  align-self: flex-start;
  margin-right: auto;
  border: 1px solid #29b6f6;
}

.chat-box {
  display: flex;
  flex-direction: column;
  height: 300px;
  overflow-y: auto;
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  box-shadow: inset 0 0 4px #ccc;
}

@keyframes fadein {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.ventana-chat {
  background: #fdfdfd;
  padding: 20px;
  height: 400px;
  overflow-y: auto;
  border-radius: 15px;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.2);
}

.burbuja {
  margin: 10px;
  padding: 12px 16px;
  max-width: 70%;
  border-radius: 20px;
  animation: aparecer 0.3s ease;
  position: relative;
}

.burbuja.usuario {
  background-color: #dff0d8;
  align-self: flex-end;
  margin-left: auto;
}

.burbuja.gandalf {
  background-color: #e0eaff;
  align-self: flex-start;
}

@keyframes aparecer {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.intro-gandalf {
  max-width: 280px;
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 0 25px rgba(0,0,0,0.4);
  margin: 0 auto;
  display: block;
  transition: transform 1.5s ease;
  animation: levitar 4s infinite ease-in-out;
}

@keyframes levitar {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}


#chat-gandalf-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem 1rem;
  gap: 1rem;
  background-color: #f6f6f6;
  flex-wrap: wrap;
}

.chat-container {
  flex: 1 1 480px;
  max-width: 640px;
  min-width: 320px;
  height: 600px;
  box-shadow: 0 0 15px rgba(0,0,0,0.1);
  border-radius: 12px;
  overflow: hidden;
  background-color: white;
}

.chat-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.banner-left,
.banner-right {
  flex: 1 1 200px;
  max-width: 200px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.banner-left img,
.banner-right img {
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0,0,0,0.15);
}


body::after {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 80%);
  animation: niebla 60s ease-in-out infinite;
  z-index: -1;
  pointer-events: none;
}

@keyframes niebla {
  0% { transform: scale(1) translate(0, 0); }
  50% { transform: scale(1.1) translate(20px, -10px); }
  100% { transform: scale(1) translate(0, 0); }
}

.chatbox-wrapper {
  animation: entradaCaja 2s ease-in-out;
}

@keyframes entradaCaja {
  0% {
    transform: scale(0.8) translateY(30px);
    opacity: 0;
    filter: blur(8px);
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
    filter: blur(0);
  }
}

.ventana-chat .mensaje-gandalf {
  position: relative;
}

.ventana-chat .mensaje-gandalf::before {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, #ffffaa44 0%, transparent 60%);
  transform: translate(-50%, -50%);
  animation: pulsoLuz 2s ease-out;
  z-index: -1;
}

@keyframes pulsoLuz {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
  50% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.5); }
}
