:root{
  --accent:#5eead4;
  --accent2:#818cf8;
  --deep1:#040b1c;
  --deep2:#0a1a3a;
  --glass:rgba(255,255,255,.08);
  --glass-border:rgba(255,255,255,.18);
}
*{box-sizing:border-box;}
body{
  margin:0;
  min-height:100vh;
  background:
    radial-gradient(circle at 15% 20%, rgba(129,140,248,.25), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(94,234,212,.18), transparent 45%),
    linear-gradient(160deg, rgba(10,26,58,.92), rgba(4,11,28,.94)),
    url('images/fondo.jpg');
  background-size:cover;
  background-position:center;
  background-attachment:fixed;
  font-family:'Segoe UI', system-ui, sans-serif;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
}

/* --- Contenedor tipo chat --- */
.app{
  width:100%;
  max-width:480px;
  background:var(--glass);
  backdrop-filter:blur(22px) saturate(160%);
  -webkit-backdrop-filter:blur(22px) saturate(160%);
  border-radius:28px;
  box-shadow:0 20px 60px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.15);
  overflow:hidden;
  border:1px solid var(--glass-border);
  display:flex;
  flex-direction:column;
  height:80vh;
  max-height:700px;
}
.header{
  background:linear-gradient(90deg, rgba(94,234,212,.18), rgba(129,140,248,.18));
  border-bottom:1px solid var(--glass-border);
  padding:18px 20px;
  color:#e6f1ff;
  font-weight:700;
  font-size:1.15rem;
  letter-spacing:.3px;
  display:flex;
  align-items:center;
  gap:10px;
}
.header .dot{
  width:11px;height:11px;border-radius:50%;
  background:var(--accent);
  box-shadow:0 0 10px 2px rgba(94,234,212,.6);
}
.messages{
  flex:1;
  overflow-y:auto;
  padding:20px;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.msg{
  max-width:78%;
  padding:12px 16px;
  border-radius:18px;
  font-size:.95rem;
  line-height:1.4;
  animation:pop .2s ease;
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  border:1px solid var(--glass-border);
}
@keyframes pop{ from{transform:scale(.9); opacity:0;} to{transform:scale(1); opacity:1;} }
.msg.user{
  align-self:flex-end;
  background:linear-gradient(135deg, rgba(129,140,248,.45), rgba(94,234,212,.25));
  color:#fff;
  border-bottom-right-radius:4px;
}
.msg.bot{
  align-self:flex-start;
  background:rgba(255,255,255,.08);
  color:#e6f1ff;
  border-bottom-left-radius:4px;
  border-left:3px solid var(--accent);
}
.msg.typing{
  align-self:flex-start;
  background:rgba(255,255,255,.05);
  color:#9fb3d1;
  font-style:italic;
}
.inputbar{
  display:flex;
  gap:10px;
  padding:16px;
  border-top:1px solid var(--glass-border);
  background:rgba(255,255,255,.04);
}
.inputbar input{
  flex:1;
  background:rgba(255,255,255,.07);
  border:1px solid var(--glass-border);
  border-radius:999px;
  padding:12px 18px;
  font-size:.95rem;
  outline:none;
  color:#e6f1ff;
  transition:border-color .15s, background .15s;
}
.inputbar input::placeholder{ color:#8ea3c4; }
.inputbar input:focus{
  border-color:var(--accent);
  background:rgba(255,255,255,.1);
}
.inputbar button{
  background:linear-gradient(135deg, var(--accent2), var(--accent));
  color:#04122b;
  border:1px solid var(--glass-border);
  border-radius:999px;
  width:48px;
  height:48px;
  font-size:1.2rem;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:transform .1s;
}
.inputbar button:active{ transform:scale(.9); }
.inputbar button:disabled{ opacity:.5; cursor:default; }

/* --- Contenedor tipo presentación --- */
.app.presentacion{
  height:auto;
  max-height:none;
  padding:36px 30px;
  color:#e6f1ff;
}
.app.presentacion h1{
  margin:0 0 16px;
  font-size:1.7rem;
  font-weight:800;
  background:linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}
.app.presentacion p{
  margin:0 0 26px;
  line-height:1.5;
  color:#c7d6ef;
  font-size:.97rem;
}
.consent{
  display:flex;
  align-items:flex-start;
  gap:10px;
  background:rgba(255,255,255,.06);
  border:1px solid var(--glass-border);
  border-radius:14px;
  padding:14px 16px;
  margin-bottom:26px;
  cursor:pointer;
}
.consent input{
  margin-top:3px;
  width:18px;
  height:18px;
  accent-color:var(--accent);
  cursor:pointer;
  flex-shrink:0;
}
.consent span{
  font-size:.9rem;
  color:#dce8fb;
}
.btn-entrar{
  width:100%;
  background:linear-gradient(135deg, var(--accent2), var(--accent));
  color:#04122b;
  border:1px solid var(--glass-border);
  border-radius:999px;
  padding:14px;
  font-size:1rem;
  font-weight:700;
  cursor:pointer;
  transition:transform .1s, opacity .15s;
}
.btn-entrar:disabled{
  opacity:.4;
  cursor:not-allowed;
}
.btn-entrar:not(:disabled):active{ transform:scale(.97); }
