body{
  margin:0;
  font-family:system-ui, Arial;
  background:#0b0f1a;
  color:white;
}

header{
  background:linear-gradient(90deg,#7f1d1d,#dc2626);
  padding:18px;
  text-align:center;
  font-size:22px;
  font-weight:bold;
  letter-spacing:1px;
}

/* CONTENEDOR PRINCIPAL */
.contenedor{
  display:flex;
  gap:20px;
  padding:20px;
  align-items:flex-start;
}

/* VIDEO (MAS PEQUEÑO) */
.video{
  flex:2;              /* antes 4 → ahora menor */
  max-width:750px;
   margin:0 auto;
}

.video iframe{
  width:100%;
  aspect-ratio:16/9;
  max-height:420px;    /* limita altura */
  border-radius:14px;
  box-shadow:0 0 25px rgba(0,0,0,0.6);
   display:block;
  margin:0 auto;
}

/* CHAT (MAS GRANDE) */
.chat{
  flex:1.4;            /* aumenta espacio */
  max-width:520px;
  background:#111827;
  padding:15px;
  border-radius:14px;
  display:flex;
  flex-direction:column;
  box-shadow:0 0 20px rgba(0,0,0,0.5);
}

/* AREA MENSAJES */
#mensajes{
  height:340px;
  overflow-y:auto;
  background:#020617;
  margin-bottom:10px;
  padding:12px;
  border-radius:10px;
}

/* BURBUJAS CHAT */
.mensaje{
  background:#1f2937;
  padding:8px 10px;
  border-radius:8px;
  margin-bottom:6px;
  animation:fade .2s ease-in;
}

.nombre{
  color:#ef4444;
  font-weight:bold;
}

/* INPUTS */
input{
  margin:4px 0;
  padding:9px;
  border-radius:8px;
  border:none;
  background:#020617;
  color:white;
  height:36px;
  box-sizing:border-box;
}

/* BOTON */
button{
  padding:10px;
  border:none;
  background:#dc2626;
  color:white;
  border-radius:8px;
  cursor:pointer;
  font-weight:bold;
  margin-top:5px;
}

button:hover{
  background:#ef4444;
}

/* SCROLL BONITO */
#mensajes::-webkit-scrollbar{
  width:8px;
}
#mensajes::-webkit-scrollbar-thumb{
  background:#374151;
  border-radius:4px;
}

/* ANIMACION */
@keyframes fade{
  from{opacity:0; transform:translateY(5px);}
  to{opacity:1; transform:translateY(0);}
}

/* CELULAR */
@media(max-width:900px){
  .contenedor{
    flex-direction:column;
  }

  .video{
    max-width:100%;
  }

  .chat{
    max-width:100%;
  }

  .video iframe{
    max-height:none;
  }
}
